A L TEX 2? Cheat Sheet Lists egin{enumerate} Numbered list. egin{itemize} Bulleted list.
egin{description}Description list. item text Add an item. item[x ] text Use x instead of normal bullet or number. Required for descriptions. Justi? cation Environment egin{center} egin{flushleft} egin{flushright} Declaration centering aggedright aggedleft Document classes book Default is two-sided. report No part divisions.
article No part or chapter divisions. letter Letter (? ). slides Large sans-serif font. Used at the very beginning of a document: documentclass{class}.Use egin{document} to start contents and end{document} to end the document. Miscellaneous linespread{x} changes the line spacing by the multiplier x.
References Set a marker for cross-reference, often of the form label{sec:item}. ef{marker } Give section/body number of marker. pageref{marker } Give page number of marker. footnote{text} Print footnote at bottom of page. label{marker } Text-mode symbols Symbols & $ % & $ \% ? ? \_ ^{} ~{} ? o o ? o ? ? l ? ..
. | # ldots extbar # ? o ? o oo ? a L • § extbullet extbackslash S ? o ? o ? ? A ?Common documentclass options Font size. Paper size. Use two columns. Set margins for two-sided. Landscape orientation.
Must use dvips -t landscape. draft Double-space lines. Usage: documentclass[opt,opt]{class}. 10pt/11pt/12pt letterpaper/a4paper twocolumn twoside landscape Floating bodies egin{table}[place] Add numbered table. egin{figure}[place] Add numbered ? gure. egin{equation}[place] Add numbered equation.
caption{text} Caption for the body. The place is a list valid placements for the body. t=top, h=here, b=bottom, p=separate page, ! =place even if ugly.Captions and label markers should be within the environment. Accents ` o o ? ? c ? o ? ‘o .
o c c OE o j ? o ? o o . ? O ? ’o "o d o ae O ~‘ { { } } ^o c o o AE l ? ‘ ~o v o oo aa L =o H o oe AA i Packages fullpage Use 1 inch margins. anysize Set margins: marginsize{l}{r }{t}{b}. multicol Use n columns: egin{multicols}{n}.
A latexsym Use L TEX symbol font. graphicx Show image: includegraphics[width=x ]{? le}. url Insert URL: url{http://. . .
}. Use before egin{document}. Usage: usepackage{package} Text properties Font face Command Declaration E? ct extrm{text} {mfamily text} Roman family extsf{text} {sffamily text} Sans serif family exttt{text} { tfamily text} Typewriter family extmd{text} {mdseries text} Medium series extbf{text} {fseries text} Bold series extup{text} {upshape text} Upright shape extit{text} {itshape text} Italic shape extsl{text} {slshape text} Slanted shape extsc{text} {scshape text} Small Caps shape emph{text} {em text} Emphasized extnormal{text}{ormalfont text}Document font underline{text} Underline The command (tttt) form handles spacing better than the declaration (tttt) form.Delimiters ‘‘ ’’ “ ‘‘ ” ’’ [[ ]] (( )) < extless > extgreater Dashes Name hyphen en-dash em-dash Source ---Example X-ray 1–5 Yes—or no? Usage In words.
Between numbers. Punctuation. Title author{text} Author of document. itle{text} Title of document.
date{text} Date. These commands go before egin{document}. The declaration maketitle goes at the top of the document. Line and page breaks * kill pagebreak oindent Begin new line without new paragraph.
Prohibit pagebreak after linebreak. Don’t print current line. Start new page. Do not indent current line. Miscellaneous pagestyle{empty} Empty header, footer and no page numbers. Miscellaneous January 11, 2010.
Prints ? instead of ~{}, which makes ?. Space, disallow linebreak (W. J. ~Clinton).
Indicate that the . ends a sentence when following an uppercase letter. hspace{l} Horizontal space of length l (Ex: l = 20pt). vspace{l} Vertical space of length l.
ule{w}{h} Line of width w and height h. oday $sim$ ~ @. Document structure part{title} subsubsection{title} chapter{title} paragraph{title} section{title} subparagraph{title} subsection{title} 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 0. Font size iny tiny Large scriptsize scriptsize LARGE footnotesize footnotesize small small huge ormalsize normalsize large large Huge These are declarations and should be used in the form {small .
. . }, or without braces to a? ect the entire document. Large LARGE huge Huge Tabular environments tabbing environment = Set tab stop. > Go to tab stop. Tab stops can be set on “invisible” lines with kill at the end of the line.
Normally is used to separate lines. Text environments begin{comment} Comment block (not printed). egin{quote} Indented quotation block. egin{quotation}Like quote with indented paragraphs.
egin{verse} Quotation block for verse. Verbatim text egin{verbatim} Verbatim environment. egin{verbatim*} Spaces are shown as . verb! text! Text between the delimiting characters (in this case ‘! ’) is verbatim. tabular environment egin{array}[pos]{cols} egin{tabular}[pos]{cols} egin{tabular*}{width}[pos]{cols} Citation types cite{key} citeA{key} citeN{key} shortcite{key} shortciteA{key} shortciteN{key} citeyear{key} All the above have Full author list and ear. (Watson and Crick 1953) Full author list.
(Watson and Crick) Full author list and year. Watson and Crick (1953) Abbreviated author list and year. ? Abbreviated author list. ? Abbreviated author list and year. ? Cite year only.
(1953) an NP variant without parentheses; Ex. citeNP. A The L TEX document should have the following two lines just before end{document}, where bibfile. bib is the name of the BibTEX ? le. ibliographystyle{plain} ibliography{bibfile} tabular column speci? cation l c r p{width} @{decl} | Left-justi? ed column. Centered column.
Right-justi? ed column. Same as parbox[t]{width}.Insert decl instead of inter-column space. Inserts a vertical line between columns. BibTEX example The BibTEX database goes in a ? le called ? le.
bib, which is processed with bibtex file. @String{N = {Na-ture}} @Article{WC:1953, author = {James Watson and Francis Crick}, title = {A structure for Deoxyribose Nucleic Acid}, journal = N, volume = {171}, pages = {737}, year = 1953 } A Sample L TEX document documentclass[11pt]{article} usepackage{fullpage} itle{Template} author{Name} egin{document} maketitle section{section} subsection*{subsection without number} text extbf{bold text} text.Some math: $2+2=5$ subsection{subsection} text emph{emphasized text} text. cite{WC:1953} discovered the structure of DNA.
A table: egin{table}[! th] egin{tabular}{|l|c|r|} hline first & row & data second & row & data hline end{tabular} caption{This is the caption} label{ex:table} end{table} The table is numbered ef{ex:table}. end{document} Copyright c 2010 Winston Chang http://www. stdout. org/? winston/latex/ BibTEX entry types @article @book @booklet @conference @inbook @incollection @misc @phdthesis @proceedings @techreport @unpublished Journal or magazine article. Book with publisher.
Book without publisher. Article in conference proceedings. A part of a book and/or range of pages. A part of book with its own title. If nothing else ? ts. PhD.
thesis. Proceedings of a conference. Tech report, usually numbered in series. Unpublished. tabular elements hline Horizontal line between rows.
cline{x-y} Horizontal line across columns x through y. multicolumn{n}{cols}{text} A cell that spans n columns, with cols column speci? cation. Math mode To use math mode, surround text with $ or use egin{equation}. Superscriptx x y v n BibTEX ? elds Address of publisher. Not necessary for major publishers. uthor Names of authors, of format .
... booktitle Title of book when part of it is cited.
chapter Chapter or section number. edition Edition of a book. editor Names of editors. institution Sponsoring institution of tech.
report. journal Journal name. key Used for cross ref. when no author. month Month published. Use 3-letter abbreviation.
note Any additional information. number Number of journal or magazine. organization Organization that sponsors a conference. pages Page range (2,6,9--12). publisher Publisher’s name. school Name of school (for thesis).
series Name of series of books. itle Title of work. type Type of tech. report, ex. “Research Note”.
volume Volume of a journal or book. year Year of publication. Not all ? elds need to be ? lled. See example below. address x ^{x} frac{x}{y} sqrt[n]{x} Subscriptx n k=1 n k=1 _{x} sum_{k=1}^n prod_{k=1}^n Math-mode symbols ? leq ? imes ? ^{circ} ? infty ? supset ? subset ? cup a dot a ? ? alpha epsilon ? heta ? lambda ? pi ? upsilon ? omega ? Lambda ? Upsilon ? ? ? ¬ ? ? ? a ? ? ? ? µ ? ? ? ? ? geq div circ eg forall exists cap hat a eta zeta iota mu ho phi Gamma Xi Phi = eq ± pm prime ? wedge ? in ? otin / | mid a ar a ? ? gamma ? eta ? kappa ? u ? sigma ? chi ? Delta ? Pi ? Psi ? · ··· ? > ? ? a ? ? ? ? ? ? ? ? ? ? approx cdot cdots vee ightarrow Rightarrow Leftrightarrow ilde a delta varepsilon vartheta xi au psi Theta Sigma Omega Bibliography and citations When using BibTEX, you need to run latex, bibtex, and latex twice more to resolve dependencies. Common BibTEX style ? les abbrv alpha plain Standard Standard Standard abstract apa unsrt alpha with abstract APA Unsorted