Latex L

Latex L




🔞 ALL INFORMATION CLICK HERE 👈🏻👈🏻👈🏻

































Latex L
\documentclass { article }
\begin { document }
First document. This is a simple example, with no
extra parameters or packages included.
\end { document }

\documentclass [12pt, letterpaper] { article }
\usepackage { graphicx }

\documentclass [12pt, letterpaper] { article }
\title { My first LaTeX document }
\author { Hubert Farnsworth \thanks { Funded by the Overleaf team. }}
\date { August 2022 }

\begin { document }
\maketitle
We have now added a title, author and date to our first \LaTeX {} document!
\end { document }

\documentclass [12pt, letterpaper] { article }
\title { My first LaTeX document }
\author { Hubert Farnsworth \thanks { Funded by the Overleaf team. }}
\date { August 2022 }
\begin { document }
\maketitle
We have now added a title, author and date to our first \LaTeX {} document!
\end { document }

\documentclass [12pt, letterpaper] { article }
\title { My first LaTeX document }
\author { Hubert Farnsworth \thanks { Funded by the Overleaf team. }}
\date { August 2022 }
\begin { document }
\maketitle
We have now added a title, author and date to our first \LaTeX {} document!

% This line here is a comment. It will not be typeset in the document.
\end { document }

Some of the \textbf { greatest }
discoveries in \underline { science }
were made by \textbf { \textit { accident }} .

Some of the greatest \emph { discoveries } in science
were made by accident.

\textit { Some of the greatest \emph { discoveries }
in science were made by accident. }

\textbf { Some of the greatest \emph { discoveries }
in science were made by accident. }

\documentclass { article }
\usepackage { graphicx } %LaTeX package to import graphics
\graphicspath {{ images/ }} %configuring the graphicx package

\begin { document }
The universe is immense and it seems to be homogeneous,
on a large scale, everywhere we look.

% The \includegraphcs command is
% provided (implemented) by the
% graphicx package
\includegraphics { universe }

There's a picture of a galaxy above.
\end { document }

\documentclass { article }
\usepackage { graphicx }
\graphicspath {{ images/ }}

\begin { document }

\begin { figure } [h]
\centering
\includegraphics [width=0.75\textwidth] { mesh }
\caption { A nice plot. }
\label { fig:mesh1 }
\end { figure }

As you can see in figure \ref { fig:mesh1 } , the function grows near the origin. This example is on page \pageref { fig:mesh1 } .

\end { document }

\documentclass { article }
\begin { document }
\begin { itemize }
\item The individual entries are indicated with a black dot, a so-called bullet.
\item The text in the entries may be of any length.
\end { itemize }
\end { document }

\documentclass { article }
\begin { document }
\begin { enumerate }
\item This is the first entry in our list.
\item The list numbers increase with each entry we add.
\end { enumerate }
\end { document }

\documentclass [12pt, letterpaper] { article }
\begin { document }
In physics, the mass-energy equivalence is stated
by the equation $ E = mc^ 2 $ , discovered in 1905 by Albert Einstein.
\end { document }

\documentclass [12pt, letterpaper] { article }
\begin { document }
\begin { math }
E=mc ^ 2
\end { math } is typeset in a paragraph using inline math mode---as is $ E = mc^ 2 $ , and so too is \( E = mc^ 2 \) .
\end { document }

\documentclass [12pt, letterpaper] { article }
\begin { document }
The mass-energy equivalence is described by the famous equation
\[ E = mc^ 2 \] discovered in 1905 by Albert Einstein.

In natural units ( $ c = 1 $ ), the formula expresses the identity
\begin { equation }
E=m
\end { equation }
\end { document }

\documentclass { article }
\begin { document }
Subscripts in math mode are written as $ a_b $ and superscripts are written as $ a^b $ . These can be combined and nested to write expressions such as

\[ T^{i_ 1 i_ 2 \dots i_p}_{j_ 1 j_ 2 \dots j_q} = T ( x^{i_ 1 }, \dots ,x^{i_p},e_{j_ 1 }, \dots ,e_{j_q} ) \]

We write integrals using $ \int $ and fractions using $ \frac {a}{b} $ . Limits are placed on integrals using superscripts and subscripts:

\[ \int _ 0 ^ 1 \frac {dx}{e^x} = \frac {e - 1 }{e} \]

Lower case Greek letters are written as $ \omega $ $ \delta $ etc. while upper case Greek letters are written as $ \Omega $ $ \Delta $ .

Mathematical operators are prefixed with a backslash as $ \sin ( \beta ) $ , $ \cos ( \alpha ) $ , $ \log ( x ) $ etc.
\end { document }

\usepackage { amsmath } % For the equation* environment

\documentclass { article }
\usepackage { amsmath } % For the equation* environment
\begin { document }
\section { First example }

The well-known Pythagorean theorem \( x^ 2 + y^ 2 = z^ 2 \) was proved to be invalid for other exponents, meaning the next equation has no integer solutions for \( n> 2 \) :

\[ x^n + y^n = z^n \]

\section { Second example }

This is a simple math expression \( \sqrt {x^ 2 + 1 } \) inside text.
And this is also the same:
\begin { math }
\sqrt { x ^ 2+1 }
\end { math }
but by using another command.

This is a simple math expression without numbering
\[ \sqrt {x^ 2 + 1 } \]
separated from text.

This is also the same:
\begin { displaymath }
\sqrt { x ^ 2+1 }
\end { displaymath }

\ldots and this:
\begin { equation* }
\sqrt { x ^ 2+1 }
\end { equation* }
\end { document }

\documentclass { article }
\begin { document }
\begin { abstract }
This is a simple paragraph at the beginning of the
document. A brief introduction about the main subject.
\end { abstract }
\end { document }

\documentclass { article }
\begin { document }

\begin { abstract }
This is a simple paragraph at the beginning of the
document. A brief introduction about the main subject.
\end { abstract }

After our abstract we can begin the first paragraph, then press ``enter'' twice to start the second one.

This line will start a second paragraph.

I will start the third paragraph and then add \\ a manual line break which causes this text to start on a new line but remains part of the same paragraph. Alternatively, I can use the \verb | \newline | \newline command to start a new line, which is also part of the same paragraph.
\end { document }

\documentclass { book }
\begin { document }

\chapter { First Chapter }

\section { Introduction }

This is the first section.

Lorem ipsum dolor sit amet, consectetuer adipiscing
elit. Etiam lobortisfacilisis sem. Nullam nec mi et
neque pharetra sollicitudin. Praesent imperdietmi nec ante.
Donec ullamcorper, felis non sodales...

\section { Second Section }

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Etiam lobortis facilisissem. Nullam nec mi et neque pharetra
sollicitudin. Praesent imperdiet mi necante...

\subsection { First Subsection }
Praesent imperdietmi nec ante. Donec ullamcorper, felis non sodales...

\section* { Unnumbered Section }
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Etiam lobortis facilisissem...
\end { document }

\begin { center }
\begin { tabular }{ c c c }
cell1 & cell2 & cell3 \\
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9
\end { tabular }
\end { center }

\begin { center }
\begin { tabular }{ |c|c|c| }
\hline
cell1 & cell2 & cell3 \\
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9 \\
\hline
\end { tabular }
\end { center }

\begin { center }
\begin { tabular }{ ||c c c c|| }
\hline
Col1 & Col2 & Col2 & Col3 \\ [0.5ex]
\hline\hline
1 & 6 & 87837 & 787 \\
\hline
2 & 7 & 78 & 5415 \\
\hline
3 & 545 & 778 & 7507 \\
\hline
4 & 545 & 18744 & 7560 \\
\hline
5 & 88 & 788 & 6344 \\ [1ex]
\hline
\end { tabular }
\end { center }

Table \ref { table:data } shows how to add a table caption and reference a table.
\begin { table } [h!]
\centering
\begin { tabular }{ ||c c c c|| }
\hline
Col1 & Col2 & Col2 & Col3 \\ [0.5ex]
\hline\hline
1 & 6 & 87837 & 787 \\
2 & 7 & 78 & 5415 \\
3 & 545 & 778 & 7507 \\
4 & 545 & 18744 & 7560 \\
5 & 88 & 788 & 6344 \\ [1ex]
\hline
\end { tabular }
\caption { Table to test captions and labels. }
\label { table:data }
\end { table }

\documentclass { article }
\title { Sections and Chapters }
\author { Gubert Farnsworth }
\date { August 2022 }
\begin { document }

\maketitle

\tableofcontents

\section { Introduction }

This is the first section.

Lorem ipsum dolor sit amet, consectetuer adipiscing
elit. Etiam lobortisfacilisis sem. Nullam nec mi et
neque pharetra sollicitudin. Praesent imperdietmi nec ante.
Donec ullamcorper, felis non sodales...

\section* { Unnumbered Section }
\addcontentsline { toc }{ section }{ Unnumbered Section }

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Etiam lobortis facilisissem. Nullam nec mi et neque pharetra
sollicitudin. Praesent imperdiet mi necante...

\section { Second Section }

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Etiam lobortis facilisissem. Nullam nec mi et neque pharetra
sollicitudin. Praesent imperdiet mi necante...
\end { document }

\usepackage [options] { somepackage }

\usepackage [total= { 6.5in,8.75in } ,
top=1.2in, left=0.9in, includefoot] { geometry }

\documentclass [12pt, letterpaper] { article }
\usepackage { somepackage } % a NON-EXISTENT package
\begin { document }
This will fail!
\end { document }

We only use cookies for essential purposes and to improve your experience on our site. You can find out more in our cookie policy .
Essential cookies only Accept all cookies
This introductory tutorial does not assume any prior experience of L a T e X but, hopefully, by the time you are finished, you will not only have written your first L a T e X document but also acquired sufficient knowledge and confidence to take the next steps toward L a T e X proficiency.

L a T e X (pronounced “ LAY -tek” or “ LAH -tek”) is a tool for typesetting professional-looking documents. However, LaTeX’s mode of operation is quite different to many other document-production applications you may have used, such as Microsoft Word or LibreOffice Writer: those “ WYSIWYG ” tools provide users with an interactive page into which they type and edit their text and apply various forms of styling. LaTeX works very differently: instead, your document is a plain text file interspersed with LaTeX commands used to express the desired (typeset) results. To produce a visible, typeset document, your LaTeX file is processed by a piece of software called a TeX engine which uses the commands embedded in your text file to guide and control the typesetting process, converting the LaTeX commands and document text into a professionally typeset PDF file. This means you only need to focus on the content of your document and the computer, via LaTeX commands and the TeX engine, will take care of the visual appearance (formatting).

Various arguments can be proposed for, or against, learning to use L a T e X instead of other document-authoring applications; but, ultimately, it is a personal choice based on preferences, affinities, and documentation requirements.

Arguments in favour of L a T e X include:

Overall, L a T e X provides users with a great deal of control over the production of documents which are typeset to extremely high standards. Of course, there are types of documents or publications where L a T e X doesn’t shine, including many “free form” page designs typically found in magazine-type publications.

One important benefit of L a T e X is the separation of document content from document style: once you have written the content of your document, its appearance can be changed with ease. Similarly, you can create a L a T e X file which defines the layout/style of a particular document type and that file can be used as a template to standardise authorship/production of additional documents of that type; for example, this allows scientific publishers to create article templates, in L a T e X , which authors use to write papers for submission to journals. Overleaf has a gallery containing thousands of templates , covering an enormous range of document types—everything from scientific articles, reports and books to CVs and presentations. Because these templates define the layout and style of the document, authors need only to open them in Overleaf—creating a new project—and commence writing to add their content.

The first step is to create a new L a T e X project. You can do this on your own computer by creating a new .tex file; alternatively, you can start a new project in Overleaf .

Let’s start with the simplest working example, which can be opened directly in Overleaf:

This example produces the following output:


You can see that L a T e X has automatically indented the first line of the paragraph, taking care of that formatting for you. Let’s have a closer look at what each part of our code does.

The first line of code, \documentclass{article} , declares the document type known as its class , which controls the overall appearance of the document. Different types of documents require different classes; i.e., a CV/resume will require a different class than a scientific paper which might use the standard L a T e X article class. Other types of documents you may be working on may require different classes such as book or report . To get some idea of the many L a T e X class types available, visit the relevant page on CTAN (Comprehensive TeX Archive Network) .

Having set the document class, our content, known as the body of the document, is written between the \begin{document} and \end{document} tags. After opening the example above, you can make changes to the text and, when finished, view the resulting typeset PDF by recompiling the document . To do this in Overleaf, simply hit Recompile , as demonstrated in this brief video clip:

Any Overleaf project can be configured to recompile automatically each time it is edited: click the small arrow next to the Recompile button and set Auto Compile to On , as shown in the following screengrab:

Having seen how to add content to our document, the next step is to give it a title. To do this, we must talk briefly about the preamble .

The screengrab above shows Overleaf storing a L a T e X document as a file called main.tex : the .tex file extension is, by convention, used when naming files containing your document’s LaTeX code.

The previous example showed how document content was entered after the \begin{document} command; however, everything in your .tex file appearing before that point is called the preamble , which acts as the document’s “setup” section. Within the preamble you define the document class (type) together with specifics such as languages to be used when writing the document; loading packages you would like to use (more on this later ), and it is where you’d apply other types of configuration.

A minimal document preamble might look like this:

where \documentclass[12pt, letterpaper]{article} defines the overall class (type) of document. Additional parameters, which must be separated by commas, are included in square brackets ( [...] ) and used to configure this instance of the article class; i.e., settings we wish to use for this particular article -class-based document.

In this example, the two parameters do the following:

Of course other font sizes, 9pt , 11pt , 12pt , can be used, but if none is specified, the default size is 10pt . As for the paper size, other possible values are a4paper and legalpaper . For further information see the article about page size and margins .

is an example of loading an external package (here, graphicx ) to extend L a T e X ’s capabilities, enabling it to import external graphics files. L a T e X packages are discussed in the section Finding and using L a T e X packages .

Adding a title, author and date to our document requires three more lines in the preamble ( not the main body of the document). Those lines are:

With these lines added, your preamble should look something like this:

To typeset the title, author and date use the \maketitle command within the body of the document:

The preamble and body can now be combined to produce a complete document which can be opened in Overleaf:

This example produces the following output:


LaTeX is a form of “program code”, but one which specializes in document typesetting; consequently, as with code written in any other programming language, it can very useful to include comments within your document. A L a T e X comment is a section of text that will not be typeset or affect the document in any way—often used to add “to do” notes; include explanatory notes; provide in-line explanations of tricky macros or comment-out lines/sections of LaTeX code when debugging.

To make a comment in L a T e X , simply write a % symbol at the beginning of the line, as shown in the following code which uses the example above:

This example produces output that is identical to the previous LaTeX code which did not contain the comment.

Next, we will now look at some text formatting commands:

The next example demonstrates these commands:

This example produces the following output:


Another very useful command is \emph{ argument } , whose effect on its argument depends on the context. Inside normal text, the emphasized text is italicized, but this behaviour is reversed if used inside an italicized text—see the next example:

This example produces the following output:


In this section we will now look at how to add images to a L a T e X document—note that you need to upload images to your Overleaf project.

The following example demonstrates how to include a picture:

This example produces the following output:


Importing graphics into a L a T e X document needs an add-on package which provides the commands and features required to include external graphics files. The above example loads the graphicx package which, among many other commands, provides \includegraphics{...} to import graphics and \graphicspath{...} to advise L a T e X where the graphics are located.

To use the graphicx package, include the following line in your Overleaf document preamble:

In our example the command \graphicspath{{images/}} informs L a T e X that images are kept in a folder named images , which is contained in the current directory:

The \includegraphics{universe} command does the actual work of inserting the image in the document. Here, universe is the name of the image file but without its extension.

More information on L a T e X packages can be found at the end of this tutorial in the section Finding and using LaTeX packages .

Images can be captioned, labelled and referenced by means of the figure environment, as shown below:

This example produces the following output:


There are several noteworthy commands in the example:

Images incorporated in a L a T e X document should be placed inside a figure environment, or similar, so
Japan Mom Sleeping Sex
Secretary Ero
Hot Chicks Half Naked

Report Page