Show Menu
Cheatography

latex Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Paragraphs and new lines

paragraph
\begin­{ce­nte­r}...­\end­{ce­nter}
New Paragraph
\par
Paragraph Indent­ation
\setle­ngt­h{­\par­ind­ent­}{1­0ex­}...\par \noindent
Paragraph Alignment
center, flushleft and flushright
This is the text in first paragraph.
\par
This is the text in second paragraph.

\begin­{fl­ush­left}
``LaTeX is a document prepar­ation system and document markup
language.
\end{f­lus­hleft}

\setle­ngt­h{­\par­ind­ent­}{10ex}
This is the text in first paragraph. This is the text in first
paragraph.
\par
\noindent %The next paragraph is not indented
This is the text in second paragraph.

Creating a document in LaTeX

simplest
\docum­ent­cla­ss{­art­icle} \begin­{do­cument} ...\en­d{d­ocu­ment}
The preamble of a document
In the preamble you define the type of document you are writing, the language and several other elements.
title
\title­{First document} This is the title
begin
 
\begin­{ti­tle­page} \end{t­itl­epage}
This declares an enviro­nment, a block of code with a specific behaviour depending on its type. In this case whatever you include in this titlepage enviro­nment will appear in the first page of your document.
 
\maketitle
end
\docum­ent­cla­ss[­12pt, letter­paper, twosid­e]{­art­icle}
\usepa­cka­ge[­utf­8]{­inp­utenc}

\title­{First document}
\autho­r{H­ubert Farnsworth \thank­s{f­unded by the ShareLaTeX team}}
\date{­Feb­ruary 2014}

\begin­{do­cument}

\begin­{ti­tle­page}
\maketitle
\end{t­itl­epage}

In this document some extra packages and parameters
were added. There is a encoding package
an a pagesize and fontsize parame­ters.

\end{d­ocu­ment}

Basic format­ting: abstract

 
\begin­{do­cument}

\begin­{ab­stract}

..
\end{a­bst­ract}
This line will start a second Paragraph. And I can
brake\\ the lines \\ and continue in a new line.

\end{d­ocu­ment}
  

types

doucument
article report book letter slides beamer
\docum­ent­cla­ss{­art­icle}

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi