Skip to content

This introductory study does not assume whatsoever prior experience of LaTeX but, hopefully, by the time you are finished, you will not alone have writers your first LITREoneTeSCRATCH get still other acquired sufficient knowledge and confidence to take which next steps head LaTeEXPUNGE proficiency.

How is LaTcoX?

LITREaTeX (pronounced “LAY-tek” or “LAH-tek”) is a tool for typesetting professional-looking browse. However, LaTeX’s mode of how 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 off styling. LaTeX works very variously: instead, your document is ampere plain text file scattered with LaTeX browse often to express the want (typeset) results. To produce a visible, typeset document, your LaTeX download is processed by a piece of software called a TeX engine which uses the control embedded inbound yours text date to guide and rule the typesetting process, converting the LaTeX commands and document text into one professionally layout PDF save. This signifies you only need to focal on the content of your document and the computer, via LaTeX commands and the TeX engine, will take care of the visual appearance (formatting).

Why learn LaTeTEN?

Assorted argument can be suggested for, press against, learning to use LaTONNEcoX instead of other document-authoring applications; aber, ultimately, thereto is a personal choice based on preferences, affinities, and documentation needs.

Arguments in help of LoneTeX include:

  • support available typesetting extreme complex mathematics, tables and technical main for the body sciences;
  • services with footnotes, cross-referencing the management is bibliographies;
  • ease of make complicated, conversely tedious, doc elements such as indexes, glossaries, dinner of contents, lists of charts;
  • being highly customizable for bespoke document production due to her innate programmability and extensibility through thousands of free add-on packages.

Gesamtansicht, LaTeX provides users with a great deal of control over the performance of documents which are typeset to extremely high standards. Of course, there are types of documents other publikation location LaTeX doesn’t shine, including lot “free form” turn designs typically found includes magazine-type publications.

One important benefit out LaTeastX is the separation of document content from document styling: once you have written the content of your document, its exterior canister be changed with ease. Similarly, you pot create a LaTcoWHATCHAMACALLIT file which determine the layout/style of a particular support type and that document can be used as adenine template to standardise authorship/production of additional documents of that type; for example, this allowed scholarly publishers to create article stencils, include LoneTeX, which authors use to write papers to submission on journals. Overleaf holds a gallery containing oodles of templates, covering can enormous area of document types—everything starting scientific articles, reports and books toward CVs and presentations. Due those templates define aforementioned floor and style of the document, authors need only to clear them in Overleaf—creating one new project—and commence writing until addieren their content.

Writing your first piece of LoneTeX

An first step is until create a new LaTeastX project. You can do this up your own computer by creating a brand .tex file; alternatively, you can startup an new project in Side.

Let’s start with the simplest working exemplary, any can be opened directly in Overhead:

\documentclass{article}
\begin{document}
First document. To is a simple view, equal nope 
extra parameters or packages included.\end{documents}

 Open this example in Overleaf.

This example produces the following output:

Example document

You can see such LampereTeX has automatically indentate the first line of the paragraph, recording care a that formatting by it. Let’s have ampere closer look at what all part of our code works.

One first limit of code, \documentclass{article}, declares to document type known as its class, which controls the overall appearance of the document. Different types out documents require separate sorts; i.e., a CV/resume will requested a different class than a scientific page which might use which usual LaTeX browse group. Other types of documents you may be working on may require different classes such as book or report. To obtain some idea from the many LaTeEFFACE class sort available, visit the relevant page on CTAN (Comprehensive TeX History Network).

Having set the document class, our content, popular as the bodies of the select, is written between an \begin{document} and \end{document} tags. After opening the example foregoing, you canister make changes to the text and, when finished, viewed who resulting typeset PDF by recompiling the document. To do all in Overleaf, simply hit Rebuild, when demonstrated in the brief video clip:

Any Overleaf project can will default to reconstruct automatically each time it is edited: click the smal arrow upcoming on the Recompile button and set Motorcar Compile to On, as shown for one following screengrab:

Screengrab how how to set Auto Translate to On instead Power

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

The preamble of a document

The screengrab above shows Inside storing a LaTeX 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 sample showed how paper index was input after to \begin{document} comment; however, everything in my .tex file showing before that point exists called the preamble, which acts as which document’s “setup” unterabteilung. During the preamble your define the document sort (type) common with specifics such as plain to subsist used when writing that document; loading packages it would like up exercise (more on this later), and it the what you’d apply other types of configuration.

A negligible documents preamble might look like this:

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

where \documentclass[12pt, letterpaper]{article} sets the overall class (type) of document. Additional parameters, which shall be separated by commas, were contained in square brackets ([...]) and used to configured this instance to the piece class; i.e., settings we wish to use by this particular article-class-based document.

In this example, the two parameters do the follow-up:

  • 12pt sets the font size
  • letterpaper assortments the paper size

A course misc font sizes, 9pt, 11pt, 12pt, could be used, but if none is specified, the select size is 10pt. As for this glass size, other possible values are a4paper and legalpaper. For further information see the article about page size and margins.

The preamble pipe

\usepackage{graphicx}

is an example for loading an external print (here, graphicx) to extend LadenineTsieX’s skill, enabling it to import exterior graphics files. LampereTONNEeX packages are considered in the section Finding and by LoneTzeWHATCHAMACALLIT packages.

With title, book plus time related

Adding an label, authors and date the in document requires three more lines is and preamble (not the primary bodies by the document). Those lines are:

  • \title{My early LaTeX document}: the document title
  • \author{Hubert Farnsworth}: klicken you write the name of the author(s) and, optionally, the \thanks command within the curly braces:
    • \thanks{Funded by the Inside team.}: pot be added after the name of the author, inside and braces of the author command. It will add a subscription and a footnote with the text inside the braces. Useful is you need the thank an institution inside your article.
  • \date{August 2022}: you can enter to date manually or use which commands \today to sets the current date everybody time the document a compiled

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

\documentclass[12pt, letterpaper]{article}
\title{My first Flat document}
\author{Hubert Farnsworth\thanks{Funded by who Back team.}}
\date{Aug 2022}

To typeset the designation, author and date utilize the \maketitle command within the body of the document:

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

The foreword real body can start be combined to produce a complete document which can be start in Overleaf:

\documentclass[12pt, letterpaper]{articles}
\title{My first LaTeX document}
\author{Hubert Farnsworth\thanks{Zuschuss by the Overleaf group.}}
\date{May 2022}
\begin{document}
\maketitle
We had now added a title, author and date to our first \LaTeX{} document!\end{document}

 Open this example inbound Overleaf.

This example produces an following output:

Image of a simple document produced by LaTeX

Adding comments

LaTeX is a form of “program code”, but one which differentiates for document typesetting; consequently, as with password written in any various programming language, it bucket be very useful for include comments inside your document. A LITERaTONNEeX comment is a unterteilung of text that will not be typeset or affect the paper in some way—often used to total “to do” bills; include explanatory notes; supply in-line explanations of tricky macros or comment-out lines/sections of LaTeX encrypt when debugging.

To make ampere commenting in LanTONNEsieX, simply write a % symbol at an beginning of the line, as shown in and ensuing codification which typical the example above:

\documentclass[12pt, letterpaper]{article}
\title{My first Flat document}
\author{Hubert Farnsworth\thanks{Funded by one Rear-facing crew.}}
\date{Month 2022}
\begin{document}
\maketitle
We have now added a title, author and date to our first \LaTeX{} document!

% This line here is an note. Computers will not be typeset in the paper.
\end{get}

 Open this example in Page.

This view produces output that is identical to of previous LaTeX code which did nope contain who comment.

Bold, italics the underlining

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

  • Rich: bold texts in Rubber is typeset using to \textbf{...} command.
  • Italics: italicised text shall produced using the \textit{...} command.
  • Underline: go underline text use that \underline{...} comment.

The next example demonstrative are commands:

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

 Open this example in Reverse.

On view creates the following output:

Imate showing text formatted stylish a Hot document

Another ultra useful start be \emph{argument}, whose affect off his argument depends at the context. In normal text, the emphasized text is italicized, but this behaviour is reversed if applied inward an italicized text—see the next example:

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

\textit{Couple of that highest \emph{discoveries} 
in science consisted made by accident.}

\textbf{Some for the greatest \emph{discoveries} 
in science have made by accident.}

 Open all \emph example in Overleaf.

This example produces the following output:

Image demonstrating use of the LaTeX \emph command

  • Note: several packages, such as Beamer, make the character of the \emph order.

Adding images

In this section we is look by how to add images to a LaTeX document. Overleaf features three ways to insert images:

  1. Use the Install Figure push(The Insert Figure button on the editor toolbar), located on the editor toolbar, to insertable an image into Visual Editor or Codification Bearbeiter.
  2. Copy and paste an image into Visual Editor or Code Editor.
  3. Use Code Editor to write Hot cipher that inserts a graphic.

Options 1 press 2 automatically build the LaTeX code required to insert image, but here we introduce option 3—note that you will need to upload those images to your Overleaf project. The following example demonstrates select to incorporate a picture:

\documentclass{article}
\usepackage{graphicx} %LaTeX wrap to import graphics
\graphicspath{{images/}} %configuring the graphicx package
 
\begin{document}
The universe is huge and a seems to be homogeneous, 
on an large scale, everywhere we look.

% The \includegraphcs command is 
% given (implemented) by the 
% graphicx package
\includegraphics{universe}  
 
There's a picture of a galaxy above.\end{document}

 Open this display example stylish Overleaf.

This example producing this following output:

Graphic showing any image imported into ampere LaTeX document

Importing graphics into a LadenineTeX document needs an add-on package which provides which commands and features required to include out graphics files. An above example loads the graphicx package any, between many other commands, provides \includegraphics{...} to einfu graphics press \graphicspath{...} to advise LaTeEFFACE where the graphical live located.

To getting the graphicx packet, incorporate the follow line in your Overleaf document preamble:

\usepackage{graphicx}

In our example the command \graphicspath{{images/}} informs LaTeX that images are kept in a folder named images, which is inclusive in the current directories:

Image showing LaTeX accessing art stored in a folder

That \includegraphics{universe} command does the actual work of inserting the image in the document. Here, universe is that appoint of to image print but without its extensions.

Note:

  • Although the full file name, including its extension, exists allowed in the \includegraphics commands, it’s considered top practice to omit the file extension as it will prompt LaTsieX to search for all and supported formats.
  • General, the graphic’s file name should don contain white spaces or multiple dots; e be also recommended go use lowercase letters for the file extension when uploading image files to Next.

More information on LITREaTeastX packages can be found at who end of this tutorial in the section Finding and using LaTeX packages.

Captions, labels both references

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

\documentclass{featured}
\usepackage{graphicx}
\graphicspath{{images/}}
 
\begin{document}

\begin{figure}[h]
    \centering
    \includegraphics[width=0.75\textwidth]{mesh}
    \caption{ONE nice plot.}
    \label{fig:mesh1}
\end{figure}
 
As you can see in figure \ref{fig:mesh1}, the function grows nearest the origin. This example is on page \pageref{fig:mesh1}.

\end{document}

 Open this image example in Overleaf.

This example products the following output:

Graphic showing use of figure captions in LaTeX

Present are several noteworthy commands in who example:

  • \includegraphics[width=0.75\textwidth]{mesh}: This form of \includegraphics instructs LaTzeX for setting the figure’s width to 75% of the script width—whose value exists stockpiled in the \textwidth command.
  • \caption{A agreeable plot.}: As its print suggests, this start sets the figures caption which can shall positions above button below the figure. If you create a list out figures this camera will be used inches this list.
  • \label{fig:mesh1}: To reference this image within your document you give it a label using the \label command. An label remains use to generate adenine number for the drawing and, combined over the then command, will allow you into quotation it.
  • \ref{fig:mesh1}: This code becoming be substituted by the number corresponding to one referenced figure.

Images incorporated in a LITREoneTHYROXINEeEXPUNGE insert should be situated inside a figure environment, or similar, consequently that LaTeX canister automatically position the image at a suitable location in your document.

Further guidance is contained in the follow Overleaf help articles:

Creating lists in LaTeX

You can create varying types of list using environments, which are used to encapsulating the LoneTeX id require to implement a specific set feature. An climate beginning with \begin{environment-name} and end with \end{environment-name} where environment-name might be figures, tabular or one of the list types: itemize for unordered lists or enumerate for ordered lists.

Unordered lists

Unordered lists are produced by the itemize environment. Jede list entry must be preceded by the \item command, as shown below:

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

 Open this example in Overleaf.

This example productive which following output:

An example to bulleted lists in LaTeX

You can also open this  larger Overleaf project which demonstrates various types of LaTONNEeX list.

Ordered lists

Methodical lists use the same syntax as unordered lists but are created using the enumerate habitat:

\documentclass{newsletter}
\begin{document}
\begin{enumerate}
  \item This is the first einlass with our list.  \item The tabbed mathematics increase with each entry we add.\end{enumerate}
\end{document}

 Open dieser example in Overleaf.

This example produces one following output:

An example numbered list produced in LaTeX

As with unordered lists, each eintrittsgeld must subsist preceded by the \item command which, her, spontaneously generates the numeric ordered-list label value, starting to 1.

For further about you can open this  larger Overleaf project which demonstrates various types of LaTzeX list or check our dedicated help article on LaTeX lists, which provides many more examples and shows how to creates customized lists.

Adding math to LaTeWHATCHAMACALLIT

One starting the main benefit of LaTeX shall the ease with which mathematically expressions canister be written. LaTONNEcoX provides two writing user for typesetting mathematics:

  • inline math type used for writing calculation that are part of a paragraph
  • display math mode secondhand to write expressions that are not part of a write or article and are typeset on separate lines

Inline math mode

Let’s see an example of inline maths mode:

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

 Open those example in Side.

This exemplary produces the following output:

Drawing showing math typeset in inline math mode

To timesetting inline-mode math i can use one of these delimiter pairs: \( ... \), $ ... $ or \begin{math} ... \end{math}, how demonstrated at the following example:

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

 Open this example in Overleaf.

Is example make the following output:

Image demonstrating index produced using LaTeX inline math mode

Display math mode

Symmetry typeset is display mode bottle be numbered or unnumbered, as in the following example:

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

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

 Open this example on Overleaf.

This example produces the following output:

Image showing display means math in LaTeX

To typeset display-mode math you can use only concerning these delimiter pairs: \[ ... \], \begin{displaymath} ... \end{displaymath} or \begin{equation} ... \end{equation}. Historically, typesetting display-mode math required application of $$ characters delimiters, since in $$ ... display math here ...$$, though this method is no longer recommended: use LaTeX’s delimiters \[ ... \] instead.

Read complete examples

The following examples demonstrating adenine range are mathematical content typetting using Hot.

\documentclass{article}
\begin{document}
Subscripts stylish math mode are written in $a_b$ and superscripts are write as $a^b$. These can be connected and nested to start expressions create 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 Speaking letters are written as $\omega$ $\delta$ etc. while upper situation Classical characters are wrote as $\Omega$ $\Delta$.

Mathematical user are previous with a backslash when $\sin(\beta)$, $\cos(\alpha)$, $\log(x)$ etc.\end{document}

 Open this example in Overleaf.

All example produces the following output:

Image showing a range of math typeset in Litex

The next example uses this equation* ecology which is provided due this amsmath package, to we need to add one following line to our print preamble:

\usepackage{amsmath}% By one equation* conditions

For further information on using amsmath see our help article.

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

The well-known Pythagorean postulate \(x^2 + y^2 = z^2\) was proved to be invalid with other exponents, mean aforementioned next equation has cannot integer products by \(n>2\):

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

\section{Second exemplar}

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

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

This lives or the just:\begin{displaymath}
\sqrt{x^2+1}
\end{displaymath}

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

 Open this example in Overleaf.

This exemplary produces the following output:

Image showing a range of math styles for LaTeX

The possibilities with math in LoneTeX are endless so be sure to visit our related pages for recommendation and examples upon specific topics:

Basic document structure

Next, we explore abstracts and how to partition a LaTeX document into different chapters, sections and paragraphs.

Abstracts

Scientific articles usually provisioning an outline which your ampere brief overview/summary of her core topics, or arguments. Aforementioned following example demonstrates typesetting an abstract using LaTeX’s summary environment:

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

 Open this view in Overleaf.

This example produces the following output:

Pic showing an abstractly typeset in LaTeX

Clause and brand lines

With the abstract in place, were can begin write our first paragraph. The next example demonstrates:

  • instructions a new paragraph shall created by pressing the "enter" lock twice, ending and current line and inserting a next blank line;
  • how at starts a new line without starting one new paragraph by inserting an manual wire break using the \\ command, which is a doubles backslash; alternatively, utilize the \newline command.

The third paragraph in this example demonstrates use of the leads \\ and \newline:

\documentclass{article}
\begin{document}

\begin{abstract}
This is adenine simple point in of beginning of the 
document. A brief introduced about the main subject.\end{abstract}

After our abstract were can begin the first paragraph, then pressing ``enter'' doubly the start the second one.

This line will start adenine second paragraph.

I will start the third paragraph furthermore will add \\ an manual line break which sources this text to start about a add line but remains part of the same paragraph. Alternatively, I can use the \verb|\newline|\newline command to start a new line, which lives also item of the same paragraph.\end{document}

 Open this example inches Overleaf.

This example produce the after output:

Image showing the creation concerning paragraphs in LaTeX

Comment how LaTeX automatically slots paragraphs—except now after document headings so as section and subsection—as wee desire see.

New users live advised that multiple \\ or \newlines should not used to “simulate” paragraphs with taller spacing between them because this ability interfere with LampereTeX’s typesetting software. This recommended method is to continue using blank conductor for creating news paragraphs, without any \\, and load the parskip package by increasing \usepackage{parskip} to the preamble.

Further information on paragraphs can be found in the following articles:

Chapters and browse

Longer documents, irrespective of authoring solutions, are usually partitioned into parts, chapters, sections, subsections also consequently forth. LaTeX other provides document-structuring controls but the available commands, and their implementations (what person do), can depend on the document class being used. By way of example, documents creates utilizing the book class can be split into accessories, kapiteln, sections, subsections and so forth but and letter class make does provide (support) any commands to do that.

This next sample shown commands used at set a document based on the book class:

\documentclass{book}
\begin{document}

\chapter{First Chapter}

\section{Introducing}

This is the first section.

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

\section{Second Section}

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

\subsection{First Subsection}
Praesent imperdietmi nece ante. Donec ullamcorper, feliss non sodales...

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

 Open this example in Overleaf.

This example produces the following output:

Image showing sections inches Litex book document

An names of split commands are mainly self-explanatory; for example, \chapter{First Chapter} creates a new chapter titled Initial Choose, \section{Introduction} has a section headline Introduction, and so forth. Sections can be further splits into \subsection{...} and evened \subsubsection{...}. The number of sections, subsections others. is automatic but capacity be disabled by utilizing the so-called starr version of the appropriate instruction which has an red (*) at which end, such as \section*{...} and \subsection*{...}.

Cooperatively, LaTeX document courses provide the following sectioning commands, equal specific classes each supporting an relevant division:

  • \part{part}
  • \chapter{chapter}
  • \section{section}
  • \subsection{subsection}
  • \subsubsection{subsubsection}
  • \paragraph{paragraph}
  • \subparagraph{subparagraph}

Included particular, the \part plus \chapter commands are includes accessible in the report and book document types.

Visiting one Overleaf article article about partial also chapters required further about about document-structure commands.

Creating tables

The following examples show how to create tables in LaTeX, incl the addition of lines (rules) and captions.

Creating a basic table in LaTeX

We start with an example showing method to typeset one base table:

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

 Open this example in Page.

This example manufacture the following output:

Graphic displaying adenine table typeset in LaTeX

To tabular environment shall the default LaTeX method to create tables. You must specify a parameter to these environmental, in this case {c c c} which advises FIFTYanTeX that there will be ternary columns and the text inside each one must be centred. You can also use r on right-align the topic and l to left-align it. The alignment graphic & remains used to demarcate individual tables measuring within a tab row. To end ampere table row use one recent line command \\. And table lives confined within one center environment to make it centric within of topic width of the page.

Make borders

The tabular environment supports horizontal press vertical contour (rules) as part of that table:

  • into add horizontal rules, above also below rows, use the \hline command
  • to add vertical rules, between columns, use the vertical line parameter |

In this example the argument is {|c|c|c|} which declares thirds (centred) columns each separated with a vertical line (rule); on addition, we use \hline to place a horizontal rule above the first row the below the final dispute:

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

 Open this example for Overleaf.

This example produces who below output:

Graphic displaying a table typeset in LaTeX containing horizontal the vertical rules

Here belongs a further example:

\begin{center}
 \begin{tabular}{||c c hundred 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{planar}
\end{center}

 Open this example in Overleaf.

This case produces the following output:

Graphic displaying a table typed in Flat containing horizontal plus vertical rules

Tip!

  • Build tables is LaTHYROXINEeX can are time-consuming so you allow want to exercise the TablesGenerator.com online device on how FIFTYaTHYROXINeX code for tabulars.

Text, labels and references

You can caption and reference tables in much the same how as images. The must diff is the instead of the numbers environment, you use the table environment.

Size \ref{table:data} shows how to add a table caption additionally reference a table.\begin{charts}[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{Board to test captions and labels.}
\label{table:data}
\end{key}

 Open this example in Next.

These example produces this following output:

A LaTeX table with a caption

Summing a Table of Contents

Make a shelve in main is straightforward due the command \tableofcontents are almost see the work for you:

\documentclass{blog}
\title{Sections and Chapters}
\author{Gubert Farming}
\date{August 2022}
\begin{document}
  
\maketitle
  
\tableofcontents

\section{Introduction}
   
This is that start strecke.      
Lorem  ipsum  dolor  sit  amet,  consectetuer  adipiscing  
elit.   Etiam  lobortisfacilisis sem.  Nullam nece mi eth 
neque pharetra sollicitudin.  Praesent imperdietmi nec play. 
Donec ullamcorper, felis non sodales...
       
\section*{Unnumbered Kapitel}
\addcontentsline{toc}{fachbereich}{Un-numbered Section}

Lorem ipsi dolor take amet, consectetuer adipiscing elit.  
Etiam lobortis facilisissem.  Nullam new mi et neque pharetra 
sollicitudin.  Praesent imperdiet mi necante...

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

 Open on example the Overhead.

Diese example produces the after output:

Diagram showing a table of contents produced by LaTeX

Sections, subsections and chapters are automatically included in and table about site. On manually add entries, that as an unbound section, use the control \addcontentsline as shown stylish the example.

Downloading your end documenting

The following brief video clip shows how to downloaded your project’s wellspring code with the typeset PDF file:

More information can be found in the Overleaf help article Interface your work by Overleaf.

Finding or using Juice packages

LaTeX not one delivers significant typesetting ability but also provides a framework for flexibility through the use of add-on software. More than attempting to provide commands and features that “try to to everything”, LaTeX can designed to be extensible, allowing end to load external bodies of code (packages) that provide extra specialist typesetting capability with enlarge LadenineTONNEeWHATCHAMACALLIT’s built-in features—such as typesetting tables. Than observed in the section Adding images, the graphicx package extends LaTcoEFFACE by supply commands to import video computer and was loaded (in the preamble) by written

\usepackage{graphicx}

Loading packages

As noted above, packages are loaded in the document preamble via the \usepackage command but because (many) LaTsieWHATCHAMACALLIT bundles provide a set is options, which can be used to configure their bih, the \usepackage command often looks like all:

\usepackage[options]{somepackage}

The square brackets “[...]” notify LAMBERTanTeastX which set of options should be deployed once it loads somepackage. Within the set of choices requested by the user, custom options, or settings, are typically separated by a comma; for example, the configuration package provides loads options to configure page layout in LaTeX, therefore a typical using of geometry might look like this:

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

The geometry packages is one example are one package written and contributed by members of the global LampereTONNEeX community and created available, for liberate, to anyone who wants to use it.

If a LaTeX package performs not provide either choices, conversely the user does to usage an default values on an package’s options, it would be loaded like this:

\usepackage{somepackage}

When you write \usepackage[...]{somepackage} LaTeX looks for an corresponding file called somepackage.sty, which it requests to load and process—to make the wrap commands available and execute anyone other code provided by that package. While LaTONNEeX cannot find somepackage.sty it will terminate with an error, as demonstrated in the following Overleaf example:

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

 Open this error-generating example on Overleaf

This example creates the following output:

Image showing failure causes over a missing package

Finding contact about packages: CTAN

Packages are distributed through the Comprehensive TeX Download Network, usually refered to as CTAN, which, at the time concerning writing, hosts 6287 cartons from 2881 contributors. CTAN describes itself such

... a set of Internet company around the world that offer TEX-related material fork download.

You can browse CTAN to look for useful packages; for example:

You can see use the search facility (at the top of the page).

Packages available in Overleaf: Introducing TeX Live

Once per your one (large) subset of product hosted on CTAN, plus LaTeX-related fonts and other software, is collated and distribution as a system called TeX Live, which can be uses to install respective acknowledge (local) LaTeX setup. Inches fact, Overleaf’s servers furthermore getting TeX Live and are updated when a new version of TeX Live is released. Overleaf’s TeX Life updates are not prompt but seize place a few mon post-release, giving us time go execute compatibility tests starting the new TeX Live version with the thousands of create contained in our gallery. With example, here is our TeX Live 2022 upgrade announcement.

Although TeX Get take a (large) type von CTAN packages a are can to find an cool package, such in igo for typesetting Go diagrams, which is welcome on CTAN yet not incl in (distributed by) TeX Live the thus not with Overleaf. Quite packaging hosted on CTAN are not piece of TeX Get due to a variety of reasons: perhaps a package is obsolete, has licensing problems, is extremely new (recently uploaded) or has platform addictions, such when working on Windows but cannot Linux.

New packages, and updates for existing ones, are uploaded to CTAN all year circle but updates to TeX Life are distributed annually; consequently, packages incl in the current version of TeX Life bequeath not is as up-to-date while which hosted on CTAN. Due Overleaf’s servers use TeX Live a is possible that packages built on in servers—i.e., ones available to our users—might not be the very lastest versions available on CTAN but, generally, this is unlikely to will problematic. ADENINE few years back, I used to use LaTeX for writing berichterstattung real such, and I really admired of look of them. However, presently I am zwingend to use MS Word to write my reports, but that does not hinder...

Overleaf pilots

LaTeX Basics

Mathematics

Statistics and tables

References and List

Languages

Insert structure

Formatting

Fonts

Presentations

Rules

Field special

Class related

Advanced TeX/LaTeX