Professional Documents
Culture Documents
1/18/2019
Adapted from the notes on LaTeX for CIS 160
LaTeX Resources
● For detailed instructions see the the “LaTeX Setup Guide” in the
Learn and Practice with LaTeX module in Week 1 of the course
● In the same module you will find an interactive guide to LaTeX which
we also recommend browsing through, as well as a “cheat sheet”
with useful LaTeX commands for CIT 592.
● Special Characters:
○ The backslash ‘\’ denotes commands or escape special characters
○ The dollar sign ‘$’ is used to enter or leave inline math-mode
○ The percent ‘%’ sign is used to comment the remainder of the line
○ Curly braces ‘{}’ are used to tell LaTeX that “these things belong together”
Environments I
● Enumerate: used to number text clauses. Enclose desired text within the
\begin{enumerate} … \end{enumerate} environment. Use \item to advance the
numbering. You can also nest such environments as follows:
\begin{enumerate}
\item \begin{enumerate}
\item Example A
\item Example B
\end{enumerate}
\item Explanation
\end{enumerate}
● Itemize: used to list text clauses without numbers (by default it uses bullets
instead). It is used exactly like the enumerate environment but within
\begin{itemize} … \end{itemize} commands.
Environments III
● To include images in LaTeX you’ll need to import the To ensure that your image appears as
graphicx package. You can do so by including close to the last text you wrote use the
\usepackage{graphicx} somewhere in your preamble. following syntax:
● If your image is in the same directory as your .tex file use \begin{figure}[!htbp]
\includegraphics{filename} to insert it to your document (file \centering
extension not required). \includegraphics{filename}
\caption{Caption} % optional
● If your image is in a different directory, specify its full path \label{fig:my_label} % optional,
instead of just the filename. % allows \ref to link to the figure
\end{figure}
● You can also provide additional scaling and rotation
arguments in brackets.
Examples
\includegraphics[scale=1.5, angle=45]{filename}
\includegraphics[height=2cm, width=\textwidth]{filename}
Math Mode Commands - General Notation
● Probability: \Pr[E]
● Conditional Probability: \Pr[A \mid B]
● Arrow for functions: \to
● Arrow for function action on specific
element: \mapsto
● Chromatic Number: \chi(G)
AMSmath Commands
Do not forget to include the amsmath package to use the following commands by
including \usepackage{amsmath} in your preamble
Do not forget to include the amssymb package to use the following commands by
including \usepackage{amssymb} in your preamble
● You can also use the tilde ‘~’ to create more spacing in both math
mode and normal text mode.