Sei sulla pagina 1di 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.
article No \part or \chapter divisions. Required for descriptions. Miscellaneous
letter Letter (?).
slides Large sans-serif font. References \linespread{x} changes the line spacing by the multiplier x.
Used at the very beginning of a document: \label{marker } Set a marker for cross-reference, often of the
\documentclass{class}. Use \begin{document} to start form \label{sec:item}. Text-mode symbols
contents and \end{document} to end 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
10pt/11pt/12pt Font size. $ \$ ˆ \^{} | \textbar \ \textbackslash
Floating bodies % \% ˜ \~{} # \# § \S
letterpaper/a4paper Paper size.
\begin{table}[place] Add numbered table.
twocolumn Use two columns. Accents
\begin{figure}[place] Add numbered figure.
twoside Set margins for two-sided.
\begin{equation}[place] Add numbered equation. ò \‘o ó \’o ô \^o õ \~o ō \=o
landscape Landscape orientation. Must use dvips
\caption{text} Caption for the body. ȯ \.o ö \"o o̧ \c o ǒ \v o ő \H o
-t landscape.
The place is a list valid placements for the body. t=top, ç \c c o. \d o o \b o o
o \t oo œ \oe
draft Double-space lines. ¯
h=here, b=bottom, p=separate page, !=place even if ugly. Œ \OE æ \ae Æ \AE å \aa Å \AA
Usage: \documentclass[opt,opt]{class}.
Captions and label markers should be within the environment. ø \o Ø \O l \l L \L ı \i
Packages  \j ¡ ~‘ ¿ ?‘
fullpage Use 1 inch margins.
Text properties
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
url Insert URL: \url{http://. . . }. \texttt{text} {\ttfamily text} Typewriter family
Name Source Example Usage
Use before \begin{document}. Usage: \usepackage{package} \textmd{text} {\mdseries text} Medium series
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 \emph{text} {\em text} Emphasized
\\* Prohibit pagebreak after linebreak.
declaration \maketitle goes at the top of the document. \textnormal{text}{\normalfont text}Document font
\kill Don’t print current line.
\underline{text} Underline
Miscellaneous \pagebreak Start new page.
The command (tttt) form handles spacing better than the
\pagestyle{empty} Empty header, footer and no page num- \noindent Do not indent current line.
declaration (tttt) form.
bers.
Font size Miscellaneous
Document structure \tiny tiny \Large Large \today April 10, 2008.
$\sim$ Prints ∼ instead of \~{}, which makes ˜.
\part{title}
\chapter{title}
\subsubsection{title}
\paragraph{title}
\scriptsize scriptsize
\footnotesize footnotesize
\LARGE LARGE ~ Space, disallow linebreak (W.J.~Clinton).
Indicate that the . ends a sentence when following
\section{title}
\subsection{title}
\subparagraph{title} \small small
\normalsize normalsize
\huge huge \@.
an uppercase letter.
Section commands can be followed with an *, like
\section*{title}, to supress heading numbers.
\setcounter{secnumdepth}{x} supresses heading numbers of
\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
depth > x, where chapter has depth 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 Tab stops can be set on “invisible” lines with \kill at the end
\begin{verse} Quotation block for verse. this case ‘!’) is verbatim. of the line. Normally \\ is used to separate lines.
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. ?
\shortciteA{key} Abbreviated author list. ? BibTEX example
l Left-justified column.
\shortciteN{key} Abbreviated author list and year. ? The BibTEX database goes in a file called file.bib, which is
c Centered column.
\citeyear{key} Cite year only. (1953) processed with bibtex file.
r Right-justified column.
All the above have an NP variant without parentheses; Ex.
p{width} Same as \parbox[t]{width}. @String{N = {Na\-ture}}
\citeNP.
@{decl} Insert decl instead of inter-column space. @Article{WC:1953,
| Inserts a vertical line between columns. BibTEX entry types author = {James Watson and Francis Crick},
@article Journal or magazine article. title = {A structure for Deoxyribose Nucleic Acid},
tabular elements journal = N,
@book Book with publisher.
@booklet Book without publisher. volume = {171},
\hline Horizontal line between rows.
@conference Article in conference proceedings. pages = {737},
\cline{x-y} Horizontal line across columns x through y.
@inbook A part of a book and/or range of pages. year = 1953
\multicolumn{n}{cols}{text}
@incollection A part of book with its own title. }
A cell that spans n columns, with cols column
specification. @misc If nothing else fits.
@phdthesis PhD. thesis. Sample LATEX document
@proceedings Proceedings of a conference.
Math mode @techreport Tech report, usually numbered in series.
\documentclass[11pt]{article}
\usepackage{fullpage}
To use math mode, surround text with $ or use @unpublished Unpublished. \title{Template}
\begin{equation}. BibTEX fields \author{Name}
Superscriptx ^{x} Subscriptx _{x} \begin{document}
x
P n address Address of publisher. Not necessary for major \maketitle
y
\frac{x}{y} \sum_{k=1}^n publishers.

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

Bibliography and citations Common BibTEX style files


abbrv Standard abstract alpha with abstract Copyright c 2006 Winston Chang
When using BibTEX, you need to run latex, bibtex, and alpha Standard apa APA $Revision: 1.12 $, $Date: 2008/04/10 06:40:01 $.
latex twice more to resolve dependencies. plain Standard unsrt Unsorted http://www.stdout.org/∼winston/latex/

Potrebbero piacerti anche