Latex Cheat Sheet

Only available on StudyMode
  • Download(s) : 363
  • Published : February 26, 2012
Open Document
Text Preview
A L TEX 2ε Cheat Sheet

\begin{enumerate} Numbered list. \begin{itemize} Bulleted list. \begin{description}Description list. \item text Add an item. \item[x ] text Use x instead of normal bullet or number. Required for descriptions.

Environment \begin{center} \begin{flushleft} \begin{flushright} Declaration \centering \raggedright \raggedleft

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 \begin{document} to start contents and \end{document} to end the document.

\linespread{x} changes the line spacing by the multiplier x.

Set a marker for cross-reference, often of the form \label{sec:item}. \ref{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
& $ % \& \$ \% ˆ ˜ \_ \^{} \~{} ˆ o o ¸ o ¯ Æ l ¿ ... | # \ldots \textbar \# ˜ o ˇ o oo ˚ a L • \ § \textbullet \textbackslash \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
\begin{table}[place] Add numbered table. \begin{figure}[place] Add numbered figure. \begin{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.

` o o ˙ ¸ c Œ ø  \‘o \.o \c c \OE \o \j ´ o ¨ o o . æ Ø ¡ \’o "o \d o \ae \O ~‘ { \{ } \} \^o \c o \b o \AE \l ?‘ \~o \v o \t oo \aa \L \=o \H o \oe \AA \i

fullpage Use 1 inch margins. anysize Set margins: \marginsize{l}{r }{t}{b}. multicol Use n columns: \begin{multicols}{n}. A latexsym Use L TEX symbol font. graphicx Show image: \includegraphics[width=x ]{file}. url Insert URL: \url{http://. . . }. Use before \begin{document}. Usage: \usepackage{package}

Text properties
Font face
Command Declaration Effect \textrm{text} {\rmfamily text} Roman family \textsf{text} {\sffamily text} Sans serif family \texttt{text} {\ttfamily text} Typewriter family \textmd{text} {\mdseries text} Medium series \textbf{text} {\bfseries text} Bold series \textup{text} {\upshape text} Upright shape \textit{text} {\itshape text} Italic shape \textsl{text} {\slshape text} Slanted shape \textsc{text} {\scshape text} Small Caps shape \emph{text} {\em text} Emphasized \textnormal{text}{\normalfont text}Document font \underline{text} Underline The command (tttt) form handles spacing better than the declaration (tttt) form.

‘‘ ’’ “ ‘‘ ” ’’ [[ ]] (( )) < \textless > \textgreater

Name hyphen en-dash em-dash Source ---Example X-ray 1–5 Yes—or no? Usage In words. Between numbers. Punctuation.

\author{text} Author of document. \title{text} Title of document. \date{text} Date. These commands go before \begin{document}. The declaration \maketitle goes at the top of the document.

Line and page breaks
\ \* \kill \pagebreak \noindent Begin new line without new paragraph. Prohibit pagebreak after linebreak. Don’t print current line. Start new page. Do not indent current line.

\pagestyle{empty} Empty header, footer and no page numbers.

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. \rule{w}{h} Line of width w and height h. \today $\sim$ ~ \@.

tracking img