Sunteți pe pagina 1din 2

LATEX 2ε Cheat Sheet Lists Justification

\begin{enumerate} Numbered list. Environment Declaration


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

l Left-justified column. \citeyear{key} Cite year only. (1953)


c Centered column. All the above have an NP variant without parentheses; Ex. \citeNP. @String{N = {Na\-ture}}
@Article{WC:1953,
r Right-justified column. BibTEX entry types author = {James Watson and Francis Crick},
p{width} Same as \parbox[t]{width}.
@article Journal or magazine article. title = {A structure for Deoxyribose Nucleic Acid},
@{decl} Insert decl instead of inter-column space.
@book Book with publisher. journal = N,
| Inserts a vertical line between columns.
@booklet Book without publisher. volume = {171},
@conference Article in conference proceedings. pages = {737},
tabular elements @inbook A part of a book and/or range of pages. year = 1953
\hline Horizontal line between rows. @incollection A part of book with its own title. }
\cline{x-y} Horizontal line across columns x through y. @misc If nothing else fits.
\multicolumn{n}{cols}{text} @phdthesis PhD. thesis.
A cell that spans n columns, with cols column specifi- @proceedings Proceedings of a conference. Sample LATEX document
cation. @techreport Tech report, usually numbered in series. \documentclass[11pt]{article}
@unpublished Unpublished. \usepackage{fullpage}
Math mode BibTEX fields \title{Template}
\author{Name}
To use math mode, surround text with $ or use \begin{equation}. address Address of publisher. Not necessary for major publish-
\begin{document}
ers.
Superscriptx ^{x} Subscriptx _{x} \maketitle
n
author Names of authors, of format ....
x
P
y
\frac{x}{y} \sum_{k=1}^n booktitle Title of book when part of it is cited.

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

S-ar putea să vă placă și