You are on page 1of 2

LATEX Cheat Sheet Lists Justification

\begin{enumerate} Numbered list. Environment Declaration


Document classes \begin{itemize} Bulleted list. \begin{center} \centering
book Default is two-sided. \begin{description}Description list. \begin{flushleft} \raggedright
report No \part divisions. \item text Add an item. \begin{flushright} \raggedleft
article No \part or \chapter divisions. \item[x ] text Use x instead of normal bullet or number.
Miscellaneous
letter Letter (?). Required for descriptions.
\linespread{x} changes the line spacing by the multiplier x.
slides Large sans-serif font. References
Used at the very beginning of a document: Text-mode symbols
\label{marker } Set a marker for cross-reference, often of the
\documentclass{class}. Use \begin{document} to start
form \label{sec:item}. Symbols
contents and \end{document} to end the document.
\ref{marker } Give section/body number of marker.
& \& \_ ... \ldots • \textbullet
Common documentclass options \pageref{marker } Give page number of marker.
$ \$ ˆ \^{} | \textbar \ \textbackslash
10pt/11pt/12pt Font size. \footnote{text} Print footnote at bottom of page.
% \% ˜ \~{} # \# § \S
letterpaper/a4paper Paper size. Floating bodies
twocolumn Use two columns. Accents
\begin{table}[place] Add numbered table. ò \‘o ó \’o ô \^o õ \~o ō \=o
twoside Set margins for two-sided.
\begin{figure}[place] Add numbered figure. ȯ \.o ö \"o o̧ \c o ǒ \v o ő \H o
landscape Landscape orientation. Must use dvips
\begin{equation}[place] Add numbered equation. ç \c c o. \d o o \b o o
o \t oo œ \oe
-t landscape. ¯
\caption{text} Caption for the body. Œ \OE æ \ae Æ \AE å \aa Å \AA
draft Double-space lines.
The place is a list valid placements for the body. t=top, ø \o Ø \O l \l L \L ı \i
Usage: \documentclass[opt,opt]{class}.
h=here, b=bottom, p=separate page, !=place even if ugly.  \j ¡ ~‘ ¿ ?‘
Packages Captions and label markers should be within the environment.
Delimiters
fullpage Use 1 inch margins.
anysize Set margins: \marginsize{l}{r }{t}{b}. Text properties ‘‘ “ ‘‘ { \{ [[ (( < \textless
’’ ” ’’ } \} ]] )) > \textgreater
multicol Use n columns: \begin{multicols}{n}. Font face
latexsym Use LATEX symbol font. Command Declaration Effect Dashes
graphicx Show image: \includegraphics[width=x ]{file}. \textrm{text} {\rmfamily text} Roman family Name Source Example Usage
url Insert URL: \url{http://. . . }. \textsf{text} {\sffamily text} Sans serif family hyphen - X-ray In words.
Use before \begin{document}. Usage: \usepackage{package} \texttt{text} {\ttfamily text} Typewriter family en-dash -- 1–5 Between numbers.
\textmd{text} {\mdseries text} Medium series em-dash --- Yes—or no? Punctuation.
Title
\author{text} Author of document. \textbf{text} {\bfseries text} Bold series Line and page breaks
\title{text} Title of document. \textup{text} {\upshape text} Upright shape
\\ Begin new line without new paragraph.
\date{text} Date. \textit{text} {\itshape text} Italic shape
\\* Prohibit pagebreak after linebreak.
These commands go before \begin{document}. The \textsl{text} {\slshape text} Slanted shape
\kill Don’t print current line.
declaration \maketitle goes at the top of the document. \textsc{text} {\scshape text} Small Caps shape
\pagebreak Start new page.
\emph{text} {\em text} Emphasized
\noindent Do not indent current line.
Miscellaneous \textnormal{text}{\normalfont text}Document font
\pagestyle{empty} Empty header, footer and no page num- \underline{text} Underline Miscellaneous
bers. The command (tttt) form handles spacing better than the \today August 17, 2018.
\tableofcontents Add a table of contents here. declaration (tttt) form. $\sim$ Prints ∼ instead of \~{}, which makes ˜.
~ Space, disallow linebreak (W.J.~Clinton).
Document structure Font size \@. Indicate that the . ends a sentence when following
\part{title} \subsubsection{title} \tiny tiny \Large Large an uppercase letter.
\chapter{title}
\section{title}
\paragraph{title}
\subparagraph{title}
\scriptsize scriptsize
\footnotesize footnotesize
\LARGE LARGE \hspace{l} Horizontal space of length l (Ex: l = 20pt).
\vspace{l} Vertical space of length l.
\subsection{title}
Use \setcounter{secnumdepth}{x} suppresses heading
\small small
\normalsize normalsize
\huge huge \rule{w}{h} Line of width w and height h.

numbers of depth > x, where chapter has depth 0. Use a *, as


in \section*{title}, to not number a particular item—these
\large large Huge
\Huge
These are declarations and should be used in the form {\small
Tabular environments
tabbing environment
items will also not appear in the table of contents. \= Set tab stop. \> Go to tab stop. Tab stops can be
. . . }, or without braces to affect the entire document.
Text environments set on “invisible” lines with \kill at the end of the line.
\begin{comment} Comment (not printed). Requires verbatim Verbatim text Normally \\ is used to separate lines.
package. \begin{verbatim} Verbatim environment.
\begin{quote} Indented quotation block. \begin{verbatim*} Spaces are shown as .
Rakesh Jana, Department of Math, IIT Guwahati
\begin{quotation}Like quote with indented paragraphs. \verb!text! Text between the delimiting characters (in
\begin{verse} Quotation block for verse. this case ‘!’) is verbatim. Copyright
c 2018 Rakesh Jana August 17, 2018
tabular environment Citation types The LATEX document should have the following two lines just
\cite{key} Full author list and year. (Watson and Crick before \end{document}, where bibfile.bib is the name of the
\begin{array}[pos]{cols} BibTEX file.
1953)
\begin{tabular}[pos]{cols}
\citeA{key} Full author list. (Watson and Crick)
\begin{tabular*}{width}[pos]{cols} \bibliographystyle{plain}
\citeN{key} Full author list and year. Watson and Crick
(1953) \bibliography{bibfile}
tabular column specification \shortcite{key} Abbreviated author list and year. ?
l Left-justified column. \shortciteA{key} Abbreviated author list. ? BibTEX example
c Centered column. \shortciteN{key} Abbreviated author list and year. ? The BibTEX database goes in a file called file.bib, which is
r Right-justified column. \citeyear{key} Cite year only. (1953) processed with bibtex file.
p{width} Same as \parbox[t]{width}. All the above have an NP variant without parentheses; Ex.
@{decl} Insert decl instead of inter-column space. \citeNP. @String{N = {Na\-ture}}
Inserts a vertical line between columns. @Article{WC:1953,
| BibTEX entry types
author = {James Watson and Francis Crick},
@article Journal or magazine article. title = {A structure for Deoxyribose Nucleic Acid},
tabular elements @book Book with publisher. journal = N,
\hline Horizontal line between rows. @booklet Book without publisher. volume = {171},
\cline{x-y} Horizontal line across columns x through y. @conference Article in conference proceedings. pages = {737},
\multicolumn{n}{cols}{text} @inbook A part of a book and/or range of pages. year = 1953
A cell that spans n columns, with cols column @incollection A part of book with its own title. }
specification. @misc If nothing else fits.
@phdthesis PhD. thesis.
Math mode @proceedings Proceedings of a conference. Sample LATEX document
@techreport Tech report, usually numbered in series. \documentclass[11pt]{article}
For inline math, use \(...\) or $...$. For displayed math, @unpublished Unpublished. \usepackage{fullpage}
use \[...\] or \begin{equation}. BibTEX fields \title{Template}
Superscriptx ^{x} Subscriptx _{x} \author{Name}
x
P n address Address of publisher. Not necessary for major \begin{document}
y
\frac{x}{y} \sum_{k=1}^n publishers.

n
Qnk=1 \maketitle
x \sqrt[n]{x} k=1
\prod_{k=1}^n author Names of authors, of format ....
booktitle Title of book when part of it is cited. \section{section}
Math-mode symbols chapter Chapter or section number. \subsection*{subsection without number}
edition Edition of a book. text \textbf{bold text} text. Some math: $2+2=5$
≤ \leq ≥ \geq 6= \neq ≈ \approx editor Names of editors.
× \times ÷ \div ± \pm · \cdot \subsection{subsection}
institution Sponsoring institution of tech. report. text \emph{emphasized text} text. \cite{WC:1953}
◦ ^{\circ} ◦ \circ 0 \prime ··· \cdots journal Journal name. discovered the structure of DNA.
∞ \infty ¬ \neg ∧ \wedge ∨ \vee key Used for cross ref. when no author.
⊃ \supset ∀ \forall ∈ \in → \rightarrow month Month published. Use 3-letter abbreviation.
⊂ \subset ∃ \exists ∈
/ \notin ⇒ \Rightarrow A table:
note Any additional information. \begin{table}[!th]
∪ \cup ∩ \cap | \mid ⇔ \Leftrightarrow number Number of journal or magazine.
ȧ \dot a â \hat a ā \bar a ã \tilde a \begin{tabular}{|l|c|r|}
organization Organization that sponsors a conference. \hline
α \alpha β \beta γ \gamma δ \delta pages Page range (2,6,9--12).
 \epsilon ζ \zeta η \eta ε \varepsilon first & row & data \\
publisher Publisher’s name. second & row & data \\
θ \theta ι \iota κ \kappa ϑ \vartheta school Name of school (for thesis).
λ \lambda µ \mu ν \nu ξ \xi \hline
series Name of series of books. \end{tabular}
π \pi ρ \rho σ \sigma τ \tau title Title of work.
υ \upsilon φ \phi χ \chi ψ \psi \caption{This is the caption}
type Type of tech. report, ex. “Research Note”. \label{ex:table}
ω \omega Γ \Gamma ∆ \Delta Θ \Theta volume Volume of a journal or book.
Λ \Lambda Ξ \Xi Π \Pi Σ \Sigma \end{table}
year Year of publication.
Υ \Upsilon Φ \Phi Ψ \Psi Ω \Omega Not all fields need to be filled. See example below. The table is numbered \ref{ex:table}.
Common BibTEX style files \end{document}
Bibliography and citations
abbrv Standard abstract alpha with abstract
When using BibTEX, you need to run latex, bibtex, and alpha Standard apa APA Rakesh Jana, Department of Math, IIT Guwahati
latex twice more to resolve dependencies. plain Standard unsrt Unsorted Copyright
c 2018 Rakesh Jana August 17, 2018

You might also like