LATEX Expert
LATEX Expert
Prabhav Kumar
2 LATEX 101 8
2.1 TEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2 LATEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.1 The Light-Bulb Analogy . . . . . . . . . . . . . . . . . . . . 8
2.2.2 Not a Word Processor . . . . . . . . . . . . . . . . . . . . . 9
2.3 Installing LATEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1
CONTENTS
6 Page Layout 29
6.1 Line Spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
6.2 Paragraphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
6.2.1 Paragraph Indentation . . . . . . . . . . . . . . . . . . . . . 30
6.2.2 Paragraph Spacing . . . . . . . . . . . . . . . . . . . . . . . 30
6.2.3 Paragraph Shape . . . . . . . . . . . . . . . . . . . . . . . 30
6.3 Page Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
6.3.1 Headers & Footers . . . . . . . . . . . . . . . . . . . . . . 31
6.3.2 Page Numbers . . . . . . . . . . . . . . . . . . . . . . . . . 32
6.4 Page Margins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
7 Mathematics 34
7.1 AMS-LATEX packages . . . . . . . . . . . . . . . . . . . . . . . . . 34
7.2 Math Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2
CONTENTS
3
CONTENTS
8 Structures 74
8.1 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
8.2 Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4
CONTENTS
9 Navigation 82
9.1 Table of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
9.2 List of Tables & Figures . . . . . . . . . . . . . . . . . . . . . . . . 82
9.3 Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
9.4 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
9.5 Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
9.6 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
9.7 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
9.8 Hyperlinks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
10 Drawing 86
10.1 Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
10.2 Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
10.3 Curved Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
10.4 Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
10.5 Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
10.6 Decorating Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
10.6.1 Arrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
10.6.2 Line Thickness . . . . . . . . . . . . . . . . . . . . . . . . . 90
10.6.3 Line Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
10.6.4 Line Color . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
10.6.5 Grid Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
10.7 Repetition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
11 Extending LATEX 93
11.1 Physics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
11.1.1 Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
11.2 Chemistry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
11.2.1 Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
11.2.2 Reactions . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
11.2.3 Drawing Chemical Formulae . . . . . . . . . . . . . . . . . . 94
11.3 Poetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
11.4 Programming Languages . . . . . . . . . . . . . . . . . . . . . . . . 96
11.4.1 verbatim environment . . . . . . . . . . . . . . . . . . . . 96
11.4.2 listings package . . . . . . . . . . . . . . . . . . . . . . 96
5
CONTENTS
12 Clever Tricks 99
Index 103
6
Chapter 1
This guide serves as an introduction to LATEX. I have tried to make it concise and easy
to follow. I am open to criticism (hopefully constructive).
7
Chapter 2
LATEX 101
2.1 TEX
Throughout history, mathematical symbols and equations were written on materials
such as clay and paper. With the advent of technology, humans needed a way to
write math on computers, so TEX (pronounced “Tech”) was created. It is a computer
program created by Donald E. Knuth and short for τέχνη, Greek for both “art” and
“craft”.
2.2 LATEX
LATEX (pronounced “Lah-Tech”) is built on top of TEX and is much more user-friendly.
It is created by Leslie Lamport. It is useful to think of TEX as a low-level language
and LATEX as a higher-level language.
TEX and LATEX can be thought of an electrical circuit and a switch, respectively.
Both provide a similar function (lighting up a bulb), but it is much more convenient
for the user to deal with the switch than the circuit.
8
LATEX 101
9
Chapter 3
2. Read the console output - it will include the line number and the command that
caused the error.
10
Creating your First LATEX Document
3.2 \documentclass
\documentclass is the command that must appear at the start of a LATEX document.
The document class is specified within { }. Frequently used classes include:
• \article - for shorter documents (notes).
• \beamer - for presentation slides.
• \book - self-explanatory.
• \proc - for conference proceedings.
• \report - for longer documents (PhD thesis).
Document class options are specified within [ ]. Frequently used options include:
• xpt - main font size (default is 10pt).
• a4paper, a5paper, letterpaper, legalpaper - paper size.
The area between \begin{document} and \end{document} is called the body. This
is where the content goes.
3.3.1 \usepackage
Sometimes LATEX cannot solve a problem, so external packages are added in the pream-
ble using \usepackage. For example, dirtytalk allows users to deal with quotation
marks.
\documentclass[10pt]{article}
\usepackage{dirtytalk}
\begin{document}
“Stay positive & test negative!”
\say{Stay positive \& test negative!}
\end{document}
11
Creating your First LATEX Document
You can find package documentation by googling “CTAN *insert package name*”.
3.4.1 Commands
A command is a special expression that instructs LATEX to do a specific task. It is case-
sensitive, i.e. \large and \Large are different commands. Commands are sometimes
followed by declarations.
3.4.2 Declarations
A declaration is either optional [ ] or required { }. For example, in
\documentclass[10pt]{article}:
3.4.3 Environments
An environment performs a specific action on a block of LATEX code. It must have
matching \begin and \end declarations. For example:
12
Creating your First LATEX Document
\begin{center}
Core-an is the official language at Core-an is the official language at the
the center of Earth. \\ center of Earth.
P.S. This is how you center text. P.S. This is how you center text.
\end{center}
3.4.4 Spaces
Spaces and tabs are treated as 1 space (␣). Any combination of consecutive spaces
and tabs are also treated as 1 space. An empty line marks the end of a paragraph.
Consecutive empty lines are treated as 1 empty line. For example:
1 space = 1 tab.
1 space = consecutive spaces. 1 space = 1 tab. 1 space = consecutive
spaces.
1 empty line = end of paragraph.
1 empty line = end of paragraph.
1+ empty lines = 1 empty line.
1+ empty lines = 1 empty line.
# $ % & { } _ ~ ^ \
In order to print them, you must escape or prefix the character with a \:
\# \$ \% \& \{ \} \_ \~{} \^{}
\textbackslash
#$%&{}_~^\
13
Creating your First LATEX Document
Symbols
There are over 18,000 symbols1 in LATEX. They are printed using specific commands.
For example:
$\div$ \\ ÷
\copyright \\ ©
$\clubsuit$ ♣
Sometimes the symbol must be placed between $ signs (refer to 7.2 on page 34).
Helpful Resources
1. Detexify - inputs a drawing of a symbol and outputs its LATEX command (and
the package required if needed).
• \subsection
• \subsubsection
• \paragraph
1
Some symbols require packages.
14
Creating your First LATEX Document
• \chapter
3.5.2 Labelling
Section commands can be labelled with \label{labelname}. When referring to a
particular section, use \ref{labelname} (the section) or \pageref{labelname}
(page number of the section). Using an example from this guide:
\label{symbols}
% Some Code
To learn about symbols, refer to 3.4.5 on
To learn about symbols, refer to
\ref{symbols} on page page 13.
\pageref{symbols}.
3.5.3 Footnotes
\footnote prints text at the bottom of the page2 . Here is the code I used to create
the footnote:
$\ldots$ at the bottom of the
page\footnote{Footnotes are easy . . . at the bottom of the page.
with \LaTeX{}!}.
3.5.4 Comments
The % character is reserved for commenting. When used, the rest of the current line
is ignored.
2
Footnotes are easy with LATEX!
15
Creating your First LATEX Document
If multiple lines need to be commented, highlight the necessary text and use the key-
board shortcut for commenting3 .
% Body
\comment{
You Can't See Me.
3
Keyboard shortcuts for Texmaker; Texstudio.
16
Chapter 4
These words are not grouped, but These words are not grouped, but
\mbox{these words are}. these words are.
17
All About Text
4.4 Punctuation
4.4.1 Apostrophes, Colons, Commas, Periods, and Semi-Colons
Simply type these punctuation marks. It is useful but not necessary to type \frenchspacing
in the preamble. This tells the document to treat spacing after commas and periods
equally.
4.4.2 Dashes
There are 4 types of dashes:
4.4.3 Ellipsis
As it has better spacing and line-break behavior, \ldots in between dollar signs is a
better solution than typing 3 dots.
If you want to define the primary and secondary set of quotation marks, type the
following in the preamble:
18
All About Text
\usepackage[
left = ``,%
right = '',%
leftsub = `,%
rightsub = ',%
]{dirtytalk}
You can find a table of primary and secondary quotation marks in several languages
here.
4.4.5 Quotations
The quotation environment adds quotes to some text.
19
All About Text
\begin{flushleft}
Chairman Mao
\end{flushleft}
Chairman Mao
\begin{center}
Canada Canada
\end{center}
Hitler
\begin{flushright}
Hitler
\end{flushright}
% Body
Black and yellow.
\textcolor{yellow}{Black} and
{\color{black}yellow}.
The colors provided by xcolor can be found here. If you scroll down on the webpage,
there are instructions to define more colors and set the page color.
4.8 Fonts
4.8.1 Font Sizes
LATEX commands for font sizes:
20
All About Text
tiny
\underline does not break properly to the next line, so use the ulem pacakge to
resolve the issue. This package also allows for underline styling and strikethroughs.
Note that although \emph, \textit, and \textsl have the same effect here, they
render different effects with other fonts.
21
All About Text
\renewcommand{\familydefault}{\ttdefault}
Replace \ttdefault with \sfdefault for sans serif. As serif is the default font
family for a LATEX document, nothing needs to be done to use it. However, if needed,
use \rmdefault.
Then, you must typeset the document using the XƎLATEX or LuaLATEX compiler. The
section between 2:52 to 3:16 of this video might help with the compilation.
22
All About Text
\tnrm was my choice. It can be replaced with a command of your choice (just make
sure it isn’t already defined).
Notice the code pbk. You need to know this code to access the font. The codes for
the most common fonts can be found at Stack Exchange.
Sometimes the font does not appear. This is because it needs to be installed by
LATEX. For more information, read this guide.
1
If you are writing mathematical expressions, use fonts with math support.
2
Popular fonts can be found here.
23
Chapter 5
You must download the Scheherazade font on your local PC. Other fonts that support
Arabic can be found here.
Bengali
Use the polyglossia package with the XƎLATEX compiler as follows:
% Preamble
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{bengali}
\newfontfamily{\bengalifont}[Script=Bengali]{Kalpurush}
24
International Language Support
You must download the Kalpurush font on your local PC. Other fonts that support
Bengali can be found here.
Greek
Use the polyglossia package with the XƎLATEX compiler as follows:
% Preamble
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{greek}
\newfontfamily{\greekfont}[Script=Greek]{Linux Libertine}
You must download the Linux Libertine font on your local PC. Some other Greek
fonts can be found here.
Hebrew
Use the polyglossia package with the XƎLATEX compiler as follows:
% Preamble %
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{hebrew}
\newfontfamily{\hebrewfont}[Script=Hebrew]{IBM Plex Sans Hebrew}
You must download the IBM Plex Sans Hebrew font on your local PC. Other fonts
that support Hebrew can be found here.
Hindi
Use the polyglossia package with the XƎLATEX compiler as follows:
% Preamble
\usepackage{polyglossia}
\setdefaultlanguage{english}
25
International Language Support
\setotherlanguage{hindi}
\newfontfamily{\hindifont}[Script=Devanagari]{Lohit Devanagari}
You must download the Lohit Devanagari font on your local PC. Other fonts that
support Hindi can be found here.
Thai
Use the polyglossia package with the XƎLATEX compiler as follows:
% Preamble
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{thai}
\newfontfamily\thaifont[Script=Thai]{Prompt}
You must download the Prompt font on your local PC. Other fonts that support
Thai can be found here.
Russian
Use the polyglossia package with the XƎLATEX compiler as follows:
% Preamble
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{russian}
\newfontfamily\russianfont[Script=Cyrillic]{Linux Libertine}
You must download the Linux Libertine font on your local PC. Some other Russian
fonts can be found here.
If you set the default language as Russian, you can type it without \russianfont.
However, you still need to define \russianfont using \newfontfamily in the
preamble. The same applies to the other languages in 5.1.1.
26
International Language Support
French
If you also want to add French, make the following changes:
% Preamble
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguages{spanish, french} I speak Spanish.
23 de diciembre de 2021 es mi cumplea-
% Body ños.
I speak Spanish. \\ Je parle aussi français.
\textspanish{\today{} es mi
cumpleaños.} \\
\textfrench{Je parle aussi français.}
German
You can simply replace french with german in the code above.
27
International Language Support
Japanese
The xeCJK package1 takes care of Japanese.
% Preamble
\usepackage{xeCJK}
日本の首都は東京です
% Body
日本の首都は東京です
Helpful Resources
1. Language Fonts - a list of fonts that support different languages.
1
This package can also be used to typeset Chinese.
28
Chapter 6
Page Layout
29
Page Layout
6.2 Paragraphs
6.2.1 Paragraph Indentation
Temporary Indentation
Sometimes paragraphs are indented. \noindent cancels the indent. If you want to
indent a non-indented paragraph, use \indent.
Permanent Indentation
\setlength{\parindent}{4em} globally sets paragraph indentation to 4em. If you
don’t want any indentation in the document, use \setlength{\parindent}{0em}.
Place the commands in the preamble, preferably before \tableofcontents.
For more information, read the shapepar documentation. For irregular shapes, read
this post.
30
Page Layout
Advanced Customization
Load the fancyhdr package and do the following:
% Preamble
\usepackage{fancyhdr}
\pagestyle{fancy} % Sets page style to fancy
\fancyhf{} % Clears the Header and Footer for customization
31
Page Layout
% Preamble
\rhead{Right Side of Header}
\chead{Header Center}
\lchead{Left Side of Header}
\rfoot{Right Side of Footer}
\cfoot{Footer Center}
\lfoot{Left Side of Footer}
Description Command
Page Number \thepage
Chapter Number \thechapter
Section Number \thesection
Chapter Name \chaptername
Current Chapter / Section Name & Number \leftmark
Current Section / Subsection Name & Number \rightmark
fancyhdr provides decorative lines for the header and footer. If you need to customize
the lines, do the following:
% Preamble
\renewcommand{\headrulewidth}{2pt} % Header Line
\renewcommand{\footrulewidth}{2pt} % Footer Line
The page numbers will be Arabic numerals. If you need lowercase (uppercase) Roman
numerals, use roman (Roman) instead.
32
Page Layout
% Body
\begin{multicols}{3}
\section{Section 1}
\section{Section 2}
\section{Section 3}
\section{Section 4}
\end{multicols}
Helpful Resources
Frankly, I don’t have much experience with page margins, so I direct you to the
following resources.
1. CTAN - geometry package documentation.
2. Overleaf - an introduction to page size and margins.
3. Wikibooks - an advanced guide for page layout (page margins, page size, page
background).
33
Chapter 7
Mathematics
• or a math environment.
34
Mathematics
$9+10=21$ is false. \\
9 + 10 = 21 is false.
\(3^2 + 4^2 = 5^2\) is true. \\
32 + 42 = 52 is true.
\begin{math}
\sin{x}=\pi \text{ has no solutions.}
\end{math}
sin x = π has no solutions.
• or an equation* environment;
• or a displaymath environment.
35
Mathematics
• an equation environment.
If you need to use math fonts temporarily, LATEX provides a few pre-defined com-
mands:
Note that \mathbb and \mathcal only work with capital letters.
36
Mathematics
12
$1 2 $ \\ 12
$1 \! 2 $ \\
12
$1 \, 2 $ \\
$1 \: 2 $ \\ 12
$1 \; 2 $ \\ 12
$1 \ 2 $ \\ 12
$1 \quad 2 $ \\ 1 2
$1 \qquad 2 $ \\
$1 \qquad \quad 2 $ \\
1 2
$1 \qquad \qquad 2 $ \\ 1 2
$1 \hspace*{4cm} 2 $ 1 2
1 2
7.3 Equations
7.3.1 Labelling Equations
LATEX automatically labels equations. Use \tag for a custom label.
A legend once said that
A legend once said that
\begin{equation}
9+10=21 \tag{genius}
\end{equation} 9 + 10 = 21 (genius)
A long sum:
A long sum:
$$91=1+2+3+4+5+6+7+8+9+10+11+12+13$$
91 = 1+2+3+4+5+6+7+8+9+10+11+12+13
37
Mathematics
The gathered environment (within display mode) assigns 1 label to the gathered
equations.
\begin{equation}
\begin{gathered}
1+1=2 \\ 1+1=2
xyz+x+y+z=w (7.6)
xyz + x + y + z = w
\end{gathered}
\end{equation}
38
Mathematics
The aligned environment (within display mode) assigns 1 label to the aligned
equations.
\begin{equation}
\begin{aligned}
1+1=2 \\ 1+1=2
xyz+x+y+z=w (7.9)
xyz + x + y + z = w
\end{aligned}
\end{equation}
You can also use split instead of aligned. Read more about the differences here.
39
Mathematics
Implementing:
% Theorem
\begin{thm}
This is a theorem.
\end{thm}
% Example
Theorem 7.4.1 This is a theorem.
\begin{exa}
$1+1=2$ Example 7.4.2 1 + 1 = 2
\end{exa}
Exercise Does 2 + 2 = 4?
% Exercise (unnumbered)
\begin{exe*}
Does $2+2=4$?
\end{exe*}
40
Mathematics
7.4.2 Proofs
The proof environment is provided by the mathtools package.
\begin{proof}
$1+1=2 \implies 1=1$ Proof. 1 + 1 = 2 =⇒ 1 = 1
\end{proof}
% Body Proof. 1 + 1 = 2 =⇒ 1 = 1 ■
\begin{proof}
$1+1=2 \implies 1=1$
\end{proof}
% Body Proof. 1 + 1 = 2 =⇒ 1 = 1 □
\begin{proof}
$1+1=2 \implies 1 = 1$
\end{proof}
Unlike the environments in 7.3, math mode must be used in the environments men-
tioned in 7.4.1 and 7.4.2.
41
Mathematics
7.5 Numbers
7.5.1 Reals (R)
Integers (Z)
Type out the integers. The font changes in math mode.
$-1, 0, 2, 4$ \\ % math mode font −1, 0, 2, 4
-1, 0, 2, 4 % text mode font -1, 0, 2, 4
Rationals (Q)
\frac is used.
1
$\frac{1}{2}$ \\ 2
1
2
+ 12
$\frac{\frac{1}{2}+\frac{1}{2}}{1+2}$ 1+2
$$\frac{7}{10}$$ 7
10
Use \dfrac for a display mode sized fraction and \tfrac for a text mode sized
fraction.
69
$\dfrac{69}{420}$
$$\tfrac{1}{1000}$$ 420
1
1000
Irrationals(I)
A few famous irrationals:
Description Command Output
Pi \pi π
Euler’s Number e, \mathrm{e} e, e
Logarithms \log_{2}{3} log2 3
Golden Ratio \phi √φ
Unit Square Diagonal \sqrt{2} 2
42
Mathematics
√
Absolute Value: $|z|=2\sqrt{2}$ Absolute Value: |z| = 2 2
π
Argument: $\arg(z)=\frac{\pi}{2}$ Argument: arg(z) = 2
7.6 Variables
Variables are letters in math mode.
Find x vs. Find $x$ Find x vs. Find x
% Text Mode
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
% Math Mode abcdef ghijklmnopqrstuvwxyz
$abcdefghijklmnopqrstuvwxyz$
43
Mathematics
44
Mathematics
p√
$\sqrt{\sqrt{81}}=3$ \\ √ 81 = 3
2
$\sqrt[2]{9}=3$ \\ √ 9=3
3
$\sqrt[3]{27}=3$ \\ 27 = 3
$|3|=3$ \\ |3| = 3
$\ln{3}=\log_{e}{3} $ \\
$\ln(3)=\log_{e}(3)$
ln 3 = loge 3
ln(3) = loge (3)
polynom package
You can divide and factorize polynomials with the polynom package.
x2 +1
3 2
x+1 x +x +x+1
% Long Division − x3 − x2
$\polylongdiv{x^3+x^2+x+1}{x+1}$ x+1
−x−1
0
% Factorization
$x^5+x^4+x^3+x^2+x+1 = $ x5 + x4 + x3 + x 2 + x + 1 =
$$\polyfactorize{
x^5+x^4+x^3+x^2+x+1 x4 + x2 + 1 x + 1
}$$
45
Mathematics
cancel package
You can cancel fractions with the cancel package.
$$\frac{3 \cdot
\cancel{2}}{\cancel{2} \cdot 4}
3 · 2 3
=
= \frac{3}{4}$$ 2 · 4 4
7.7.4 Super
b scripts
^ and _ only impact the next character, so it’s better to group the necessary characters
with {}.
46
Mathematics
If the fences are too small, use \left and \right before the left and right fence,
respectively.
47
Mathematics
n
$$n \to \infty \implies \left( 1
1+\frac{1}{n} \right)^{n} \to e$$ n → ∞ =⇒ 1+ →e
n
For bigger, custom fence sizes, use \big, \Big, \bigg, or \Bigg before both the left
and right fence.
7.7.6 Dots
48
Mathematics
7.7.7 Arrows
49
Mathematics
7.7.8 Decorations
7.7.9 Miscellaneous
50
Mathematics
51
Mathematics
52
Mathematics
7.9 Logic
7.10 Algebra
7.10.1 Infinity
First, you ought to know the commands for ∞ and −∞.
7.10.2 Intervals
There are 9 types of intervals:
53
Mathematics
7.10.3 Functions
While you could type out “:”, \colon allows for proper spacing.
% :
$f \circ g: [0, 1] \to [0, 1]$ is a
function. \\ f ◦ g : [0, 1] → [0, 1] is a function.
% \colon f ◦ g ◦ h : A → B is a function.
$f \circ g \circ h \colon A \to B$
is a function.
54
Mathematics
7.11 Geometry
7.11.1 Geometry Notation
55
Mathematics
7.11.3 Sums
Sums are different in inline and display mode.
P∞ 1
The harmonic series n=1 n is divergent.
The harmonic series
$\sum_{n=1}^{\infty}{\frac{1}{n}}$
The harmonic series
is divergent. \\
X∞
1
The harmonic series
$$\sum_{n=1}^{\infty}{\frac{1}{n}}$$ n=1
n
is divergent.
is divergent.
While the curly braces {} are not necessary, they make the code readable.
X
b
1
$$\sum_a^b \frac{1}{n}$$
a
n
$$\sum_{i=1}^{2}{\sum_{j=1}^{2}{i+j}} X
2 X
2
= 12$$
i + j = 12
i=1 j=1
56
Mathematics
You can forcefully change the position of the limits for sums using \limits and
\nolimits2 .
% Inline Mode
$\sum_{n=1}^{5}{n}$
P5
% Inline Mode (placing limit n=1 n
position under sum) P
5
$\sum\limits_{n=1}^{5}{n}$ n
P5
n=1
% Inline Mode (placing limit n=1 n
position besides sum)
$\sum\nolimits_{n=1}^{5}{n}$ X
5
n
% Display Mode n=1
$$\sum_{n=1}^{5}{n}$$
X
5
7.11.4 Products
Refer to 7.11.3 on page 56 and replace sum with prod.
2
This also applies for products, integrals, and limits.
57
Mathematics
Q50
n=1 n = 50!
% Inline Mode
$\prod_{n=1}^{50}{n}=50!$ \\
The product
% Display Mode Y
50
= 50!
7.12 Calculus
7.12.1 Derivatives
You can write a derivative as follows:
If f (x) = x2 , then
% Leibniz Notation
If $f(x)=x^2$, then df
$$\frac{df}{dx}=2x.$$ = 2x.
dx
% Lagrange Notation
Using other notation:
Using other notation:
$$f'(x)=2x$$
f ′ (x) = 2x
Notice the slant in df . For an upright d, type the following in the preamble:
\newcommand{\dee}{\mathrm{d}}
$$\left.\frac{\dee f}{\dee df
x}\right|_{x=2}=4$$
=4
dx x=2
$$\frac{\partial g}{\partial x ∂g
\partial y}$$ ∂x∂y
58
Mathematics
diffcoeff package
diffcoeff with the ISO option also takes care of the upright d. It is also handy for
higher-order and partial derivatives.
% Preamble
\uspackage[ISO]{diffcoeff}
df
dx
df /dx
dn f
dxn
$$\diff{f}{x}$$ d n f /dxn
$$\diff{f}/{x}$$
$$\diff[n]{f}{x}$$ d cos(sin x)
$$\diff[n]{f}/{x}$$ d(sin x)
$$\diff{\cos(\sin x)}{(\sin x)}$$
$$\diff[n]{\cos(\sin{x})}{\sin{x}}$$ dn cos(sin x)
$$\diff*{f(x)}{x}$$
d(sin x)n
$$\diff*{\diff{y}{x}}{x}$$
$$\diff[n]{f}{x}[x=0]$$ d
f (x)
dx
d dy
dx dx
n
d f
dxn x=0
59
Mathematics
∂f
∂x
∂f /∂x
$$\diffp{f}{x}$$ ∂ nf
$$\diffp{f}/{x}$$ ∂xn
$$\diffp[n]{f}{x}$$
∂ n f /∂xn
$$\diffp[n]{f}/{x}$$ n
$$\diffp[n]{f(x,y)}{x}[(0,0)]$$ ∂ f (x, y)
$$\diffp{f}{x, y, z}$$
$$\diffp[2, 3, 4, 1]{f(x, y, z,
∂xn (0,0)
w)}{x, y, z, w}$$ ∂ 3f
∂x ∂y ∂z
∂ 10 f (x, y, z, w)
∂x2 ∂y 3 ∂z 4 ∂w
7.12.2 Integration
Refer to 7.11.3 on page 56 and replace sum with int. To include the differential, add
\,\dee x.
The integral $\int_{0}^{\infty}{e^x} R∞ x
\,\dee x$ diverges.
The integral 0
e dx diverges.
Z
$$\int_{0}^{2}{2x} \,\dee x =
2 2
\left[x^2\right]^{2}_{0} = 4$$ 2x dx = x2 0 = 4
0
Explicitly: Explicitly:
$$\int_{0}^{2}{\int_{0}^{2}{xy
\,\dee x} \,\dee y} = 4$$
Z 2 Z 2
xy dx dy = 4
0 0
60
Mathematics
Z∞
% Integral with Specified Limits
(Under Integral) f =0
$$\int\limits_{-\infty}^{\infty} f = −∞
0$$ ZZ
f =F
% Double / Surface Integral A
$$\iint_A f = F$$ ZZZ
% Triple / Volume Integral f =F
V
$$\iiint_V f = F$$
ZZZZ
% Quadruple Integral f =F
$$\iiiint_V f = F$$ V
Z Z
% Multiple Integral ··· f =F
$$\idotsint_V f = F$$ V
I
% Line Integral f =F
$$\oint_V f = F$$ V
7.13 Analysis
7.13.1 Sequences
Use () to denote sequences.
61
Mathematics
7.13.2 Limits
Limits can also be typeset easily.
If the limit of $f(x)$ exists at
$x=a$, then If the limit of f (x) exists at x = a, then
$(\forall\varepsilon>0) (∀ε > 0)(∃δ > 0)(0 < |x − a| < δ =⇒
(\exists\delta>0) |f (x) − f (a)| < ε).
(0<|x-a|<\delta \implies
|f(x)-f(a)|<\varepsilon)$. \\
% Inline Mode 1
limn→∞ =0
$\lim_{n \to \infty}{\frac{1}{n}} = n
0$ \\
1 1
limn→2+ n
= 2
$\lim_{n \to 2^{+}}{\frac{1}{n}} =
\frac{1}{2}$ \\
1
% Display Mode lim =0
n→∞ n
$$\lim_{n \to \infty}{\frac{1}{n}} =
0$$ f (x + h) − f (x)
f ′ (x) = lim+
$$f'(x) = \lim_{h \to h→0 h
0^{+}}{\frac{f(x+h) -
f(x)}{h}}$$ \\
62
Mathematics
63
Mathematics
64
Mathematics
\begin{equation*}
x = x_{0} + \cfrac{y_{0}}{ y0
x = x0 +
x_{1} + \cfrac{y_{1}}{ y1
x_{2} + \cfrac[l]{y_{2}}{ x1 +
x_{3} + \cfrac[r]{y_{3}}{ y2
x2 +
x_{4} + \cdots}}}} y3
\end{equation*} x3 +
x4 + · · ·
7.15.3 Combinatorics
You can also use \dbinom for a display mode sized binomial and \tbinom for a text
mode sized binomial.
65
Mathematics
7.16.2 Statistics
Bold vectors require \boldsymbol. Typing this out can be cumbersome, so define a
new command in the preamble.
\newcommand{\bvec}[1]{\boldsymbol{#1}}
Row vectors:
% Row Vector (no fences)
\begin{equation*}
\begin{matrix}
1 & 2 & 3 1 2 3
\end{matrix}
\end{equation*}
66
Mathematics
Column vectors:
% Column Vector (no delimiters)
\begin{equation*}
\begin{matrix} 1
1 \\ 2
2 \\ ..
\vdots \\ .
3 3
\end{matrix}
\end{equation*}
67
Mathematics
7.17.2 Matrices
Use the exact same environments mentioned in 7.17.1.
% Matrix (no delimiters)
\begin{equation*}
\begin{matrix}
1 2 3
1 & 2 & 3 \\
4 & 5 & 6 4 5 6
\end{matrix}
\end{equation*}
68
Mathematics
If you need matrices with different delimiters, then you add them to a plain matrix
using \left and \right.
% Matrix (custom delimiters)
$
\left(
\begin{matrix}
1 & 2 \\
3 & 4
\end{matrix}
\right]
1 2 1 2
$, ,
$ 3 4 3 4
\left\lceil
\begin{matrix}
1 & 2 \\
3 & 4
\end{matrix}
\right\rfloor
$
Even in inline mode, matrices are in display style. For smaller matrices, use smallmatrix,
psmallmatrix, or bsmallmatrix.
% Small Matrix (no delimiters)
$
\begin{smallmatrix}
1 & 2 \\ 1 2
3 4 is a 2 × 2 matrix.
3 & 4
\end{smallmatrix}
$ is a $2 \times 2$ matrix.
69
Mathematics
7.17.3 Determinants
Use the vmatrix environment.
\begin{equation*}
\begin{vmatrix}
1 & 2 \\
1 2
3 & 4 = 1 · 4 − 2 · 3 = −2
\end{vmatrix} 3 4
= 1 \cdot 4 - 2 \cdot 3 = -2
\end{equation*}
An alternative is:
\begin{equation*}
\left|
\begin{matrix}
1 & 2 \\
1 2
3 & 4 = 1 · 4 − 2 · 3 = −2
\end{matrix} 3 4
\right|
= 1 \cdot 4 - 2 \cdot 3 = -2
\end{equation*}
70
Mathematics
An alternative is:
\begin{equation*}
\left\|
\begin{matrix}
1 & 2 \\ 1 2
3 & 4 3 4
\end{matrix}
\right\|
\end{equation*}
71
Mathematics
72
Mathematics
These commands are useful with sums, products, integral, and limits.
% Display Mode
$$\sum_{n=1}^{10}{n}$$
X
10
$$\frac{\textcolor{blue}{5}}{10}= 5 1
\frac{1}{\textcolor{red}{10}}$$ =
10 10
7.20 Homework
There are a few templates for homework assignments that I have uploaded to GitHub.
More templates can be found on Overleaf.
Helpful Resources
1. Wikibooks - a thorough guide for typesetting mathematics.
2. AMS Math Guide for LATEX - a guide to LATEX by the American Mathematical
Society.
73
Chapter 8
Structures
8.1 Lists
Different environments render different lists.
Grocery list:
Grocery list:
\begin{itemize}
\item Pineapples
• Pineapples
\item More Pineapples
\item Even More Pineapples
• More Pineapples
\end{itemize}
• Even More Pineapples
74
Structures
C Nikola Vučević
8.2 Tables
The table and tabular environments are used to create tables.
75
Structures
• To place table at precisely the location in the LATEX code, load the float package
and use H instead of c.
• \\ separates rows.
• For simple tables, you may only need the tabular environment.
76
Structures
Notice the small gap between the table contents and title. The caption package
solves this. Add the following to the preamble.
\usepackage{caption}
\captionsetup[table]{skip=10pt}
The caption package provides more customization options. Read this tutorial for
more information.
\begin{tabular}[c]{|| l | c | r ||}
\hline
Col 1 & Col 2 & Col 3 \\ [0.2ex] % Col 1 Col 2 Col 3
Headings 1 2 3
1 & 2 & 3 \\
\hline 4 5 6
4 & 5 & 6 \\ 7 8 9
\hline
7 & 8 & 9 \\
\hline\hline
\end{tabular}
77
Structures
\centering
\begin{tabular}[c]{l c r}
\hline
Col 1 & Col 2 & Col 3 \\ [0.2ex] Col 1 Col 2 Col 3
\cline{2-2}
1 2 3
1 & 2 & 3 \\
\cline{2-3} 4 5 6
4 & 5 & 6 \\ 7 8 9
\hline
7 & 8 & 9 \\
\hline
\end{tabular}
\begin{tabular}[c]{| l | c | r |
p{2.5cm} |} Col 1 Col 2 Col 3 Text
\hline 1 2 3 Numbers from
Col 1 & Col 2 & Col 3 & Text \\ 1-3.
[0.2ex]
1 & 2 & 3 & Numbers from 1-3. \\ 4 5 6 Numbers from
\hline 4-6.
4 & 5 & 6 & Numbers from 4-6. \\ 7 8 9 Numbers from
\hline 7-9.
7 & 8 & 9 & Numbers from 7-9. \\
\hline
\end{tabular}
• \p{2.5cm} specifies a paragraph column with text vertically aligned at the top.
More complex tables involving merging rows and columns. Use \multicolumn to
merge cells over multiple columns.
78
Structures
\centering
\begin{tabular}[c]{| l | c | r |}
\hline
Col 1 & Col 2 & Col 3 \\ [0.2ex]
\hline Col 1 Col 2 Col 3
1 & \multicolumn{2}{c}{2, 3} \\
1 2, 3
\hline
\multicolumn{3}{c}{4, 5, 6} \\ 4, 5, 6
\hline 7 8 9
\multicolumn{1}{l}{7} &
\multicolumn{1}{c}{8} &
\multicolumn{1}{r}{9} \\
\hline
\end{tabular}
\centering
\begin{tabular}[c]{| l | c | r |}
\hline
Col 1 & Col 2 & Col 3 \\ [0.2ex]
\hline Col 1 Col 2 Col 3
1 & \multicolumn{2}{| c |}{2, 3} \\
1 2, 3
\hline
\multicolumn{3}{| c |}{4, 5, 6} \\ 4, 5, 6
\hline 7 8 9
\multicolumn{1}{| l |}{7} &
\multicolumn{1}{| c |}{8} &
\multicolumn{1}{| r |}{9} \\
\hline
\end{tabular}
Load the multirow package and use \multirow to merge cells over multiple rows.
79
Structures
\centering
\begin{tabular}{| c | c | c |}
\hline
\multicolumn{3}{| c |}{Bulls Roster}
\\
\hline
\multirow{2}{*}{Point Guards} Bulls Roster
& PG1 & Lonzo B. \\
& PG2 & Alex C. \\ PG1 Lonzo B.
Point Guards
\hline PG2 Alex C.
\multirow{2}{*}{Shooting Guards} SG1 Zach L.
& SG1 & Zach L. \\ Shooting Guards
SG2 Ayo D.
& SG2 & Ayo D. \\
\hline
SF1 DeMar D.
Small Forwards
\multirow{2}{*}{Small Forwards} SF2 Derrick J.
& SF1 & DeMar D. \\ PF1 Patrick W.
& SF2 & Derrick J. \\ Power Forwards
PF2 Javonte G.
\hline
C1 Nikola V.
\multirow{2}{*}{Power Forwards} Centers
& PF1 & Patrick W. \\ C2 Tony B.
& PF2 & Javonte G. \\
\hline
\multirow{2}{*}{Centers}
& C1 & Nikola V. \\
& C2 & Tony B. \\
\hline
\end{tabular}
Helpful Resources
1. Table to LATEX generators - converts drawn table to LATEX.
8.3 Images
1. Save the image in the folder your document is saved in (as a EPS, JPEG, PDF,
or PNG).
80
Structures
3. Use \includegraphics.
\begin{center}
\includegraphics[width=5cm,
height=3cm, angle=0,
scale=1]{ronaldo.jpeg}
\end{center}
Sometimes images and text do not work well together, so images must be placed in a
figure environment. It is similar to the table environment in some ways.
81
Chapter 9
Navigation
9.3 Abstract
Add the following code to the document body:
\chapter*{Abstract}
82
Navigation
9.4 Acknowledgements
Add the following code to the document body:
\chapter*{Acknowledgements}
9.5 Appendix
Load the appendix package as follows:
% Preamble
\usepackage[toc]{appendix} % Includes appendices in Table of Contents
% Body
\begin{appendices}
\chapter{Riemann Hypothesis Proof}
Sir Michael Atiyah claims the proof for the Riemann Hypothesis is as follows...
\end{appendices}
9.6 Bibliography
Watch this video. A few things to remember:
1. LATEX1
2. BibTEX
3. LATEX (×2)
• When you use \bibliography, the .bib file name must be within the {}.
• When you use \cite, the name must within {} must match the name in the
.bib file.
1
You can use XƎLATEX or LuaLATEX instead.
83
Navigation
9.7 Index
Load the imakeidx package and type the following code:
% Preamble
\usepackage{imakeidx}
% Alphabetical Index
\begin{filecontents*}{\jobname.mst}
headings_flag 1
heading_prefix "\\par\\penalty-50\\textbf{"
heading_suffix "}\\\\\*\~\\\\\*"
symhead_positive "Symbols"
symhead_negative "symbols"
numhead_positive "Numbers"
numhead_negative "numbers"
delim_0 ",\~"
\end{filecontents*}
% Body
1. LATEX2
2. MakeIndex
3. LATEX (×2)
9.8 Hyperlinks
Load the href package.
2
Refer to the footnote in 9.6
84
Navigation
% Preamble
\usepackage[colorlinks, urlcolor=blue]{href}
85
Chapter 10
Drawing
TikZ is the most powerful graphics tool in LATEX. While it is quite complex, I introduce
the basics.
10.1 Lines
Load the tikz package.
% Preamble
\usepackage{tikz}
Use \tikz. . .; to draw inline. ; marks the end of the instruction and is neces-
sary.
\tikz \draw (0, 0) - - (1, 0); is a
straight line
is a straight line
86
Drawing
\centering
\begin{tikzpicture}
% Drawing a Path
\draw (0, 0) - - (1, 0) -- (1, 1) --
(0, 1) -- (-1, 1) -- (-1, 0) --
(-1, -1);
\end{tikzpicture}
\end{tikzpicture}
10.2 Points
\centering
\begin{tikzpicture}
% Drawing a Path
\draw (0, 0) -| (1, 1) -| (-1, -1);
\end{tikzpicture}
\centering
\begin{tikzpicture}
\draw[help lines] (-1, -1) grid (1,
1);
% Drawing a Parabola
\draw (0, 0) parabola (1, 1);
\end{tikzpicture}
(-1, -1) and (1, -1) are the start and end points, respectively. (-0.5, 0) and
(0.5, 0) act like magnets. Make sure there is no whitespace between the 2 periods
before and after controls.
10.4 Shapes
A circle centered at the origin of radius 1:
\centering
\begin{tikzpicture}
\draw (0, 0) circle (1);
\end{tikzpicture}
A triangle:
\centering
\begin{tikzpicture}
\draw (0, 0) -- (1, 0) -- (1, 1) --
cycle;
\end{tikzpicture}
A rectangle:
\centering
\begin{tikzpicture}
\draw (0, 0) rectangle (1, 2);
\end{tikzpicture}
A square:
88
Drawing
\centering
\begin{tikzpicture}
\draw (0, 0) rectangle (2, 2);
\end{tikzpicture}
An ellipse centered at the origin with x and y-direction radii of 1 and 0.5:
\centering
\begin{tikzpicture}
\draw (0, 0) ellipse (1 and 0.5);
\end{tikzpicture}
10.5 Scaling
Scaling a drawing by a factor of 2:
\centering
\begin{tikzpicture}[scale=2]
\draw[help lines] (-1, -1) grid (1,
1);
\draw (0, 0) circle (1);
\end{tikzpicture}
89
Drawing
\centering
\begin{tikzpicture}[xscale=0.5,
yscale=2]
\draw[help lines] (-1, -1) grid (1,
1);
\draw (0, 0) circle (1);
\end{tikzpicture}
% Pre-defined Thickness %
\draw [ultra thick] (0, 0) -- (0, 1);
\draw [thick] (1, 0) -- (1, 1);
\draw [thin] (2, 0) -- (2, 1);
\draw [very thin] (3, 0) -- (3, 1);
% Custom Thickness %
\draw [line width=3pt] (4, 0) -- (4,
1);
\end{tikzpicture}
90
Drawing
\centering
\begin{tikzpicture}
\draw [dashed, ultra thick] (0, 0)
-- (0, 1);
\draw [dashed, thick] (1, 0) -- (1,
1);
\draw [dotted] (2, 0) -- (2, 1);
\end{tikzpicture}
\centering
\begin{tikzpicture}
\draw[step=1, blue, thin] (-1.9,
-1.9) grid (1.9, 1.9);
\end{tikzpicture}
91
Drawing
10.7 Repetition
If you need to reuse lines of code to draw similar things, use \foreach.
\centering
\begin{tikzpicture}
\end{tikzpicture}
Helpful Resources
I have only scratched the surface of TikZ, so please use these resources, especially if
you want to create art.
92
Chapter 11
Extending LATEX
11.1 Physics
Physics has a lot of diagrams, so TikZ is important. The rest is basically math1 . Refer
to resource 5 in 10.7.
11.1.1 Circuits
My favorite physics-related package is circuitikz.
\centering
\begin{circuitikz}
\draw (0,0) to [lamp] (4,0);
\draw (4,0) to (4, -2);
\draw (4, -2) to [battery] (0, -2);
\draw (0, -2) to [fuse] (0, 0);
\end{circuitikz}
11.2 Chemistry
11.2.1 Basics
Load the mhchem package and use \ce in math mode to write formulae.
1
Open to debate.
93
Extending LATEX
$\ce{H2O}$ \\ H2 O
$\ce{Cl-}$ \\ Cl−
$\ce{CrO4^{2}-}$ \\ CrO4 2−
$\ce{(C3H4O2)2}$ (C3 H4 O2 )2
$\ce{2O2}$ \\ 2 O2
3
$\ce{3/4Cl2}$
4
Cl2
Displaying isotopes:
14
$\ce{^{14}_{6}C}$ \\ 6C
$\ce{^{17}_{6}C+}$ 17 +
6C
11.2.2 Reactions
Bonds
O H
$\chemfig{O - H}$ \\
$\chemfig{O = H}$ \\
O H
$\chemfig{O ~ H}$ \\ O H
$\chemfig{O > H}$ \\ O H
$\chemfig{O >: H}$ \\ O H
$\chemfig{O >| H}$ \\ O H
$\chemfig{O < H}$ \\
$\chemfig{O <: H}$ \\
O H
$\chemfig{O <| H}$ O H
O H
94
Extending LATEX
Bond Angles
Water (H2 O)
\centering
Water ($\ce{H2O}$) \vspace{.5cm} \\ O
\chemfig{H-[1] O-[7] H} \\
H H
Rings
C
C C
\centering
\chemfig{C*6(-C=C-C=C-C=)}
C C
C
C is the first atom. *6 is the number of atoms. () contains the rest of the atoms.
11.3 Poetry
Use the verse package.
\centering
\begin{verse}
Roses are Red, \\ Roses are Red,
Violets are Blue, \\ Violets are Blue,
This guide with help you. This guide with help you.
\end{verse}
95
Extending LATEX
There should be no space between \verb and |. Any character except a letter or *
can be used instead of | as a delimiter.
produces
96
Extending LATEX
You can also highlight code, add line numbers, and do many more things. Read this guide for more
information.
Code highlighting can also be done via the minted package. Read about it here. Warning: minted
can cause errors. However, solutions to the most common errors can be found here.
\begin{Form}[action={path/to/submit}]
\begin{tabular}{l}
\TextField{Name} \\\\
Name
\CheckBox[width=1em]{Male}
\CheckBox[width=1em]{Female}
\CheckBox[width=1em]{Other} \\\\ Male Female Other
\Submit{Submit} \quad
\Reset{Reset}\\ Submit Reset
\end{tabular}
\end{Form}
More information can be found here. A more thorough example can be found here. Warning:
making PDF forms in LATEX can be buggy, so it’s probably better to use Adobe Acrobat.
11.6 Emojis
11.6.1 Using LuaLATEX
Use \emoji provided by the emoji package with the LuaLATEXcompiler as follows:
% Preamble
\usepackage{emoji}
% Body
\emoji{flexed-biceps-medium-dark-skin-tone}
I am {\fontspec{Symbola}\char"1F600}! I am 😀!
97
Extending LATEX
11.7 Writing a CV
If you want to write your CV with LATEX, choose one of the templates and edit accordingly. I have
also uploaded a template on GitHub.
11.9 Presentations
beamer is the document class for presentations. I learnt beamer using Overleaf’s tutorials. You can
find examples of aesthetically pleasing presentations here. A list of beamer themes can be found
here.
98
Chapter 12
Clever Tricks
99
Chapter 13
Common Errors
100
Chapter 14
More Resources
1. Big Resources
• Search Engine - Google.
• CTAN - LATEX’s humble abode.
• Stack Exchange - ask questions.
• LATEX Forum - ask questions.
• LATEX Subreddit - for reddit fans.
2. Learn LATEX
• Overleaf - learn and write LATEX online (highly recommended).
• Wikibooks - a more comprehensive LATEX online guide (highly recommended).
• LATEX Playlist - learn LATEX on YouTube.
• Dr Trefor Bazett - learn LATEX from a mathematician.
• The Art of LATEX - book to learn LATEX.
• The Not So Short Introduction to LATEX - Bible of LATEX.
• LATEX Gallery - LATEX templates (highly recommended).
3. Cheat Sheets
• LATEX Cheat Sheet - 2-page cheat sheet.
• LATEX Math Cheat Sheet - Math cheat sheet.
• LATEX Quick Guide - 2-page guide.
4. Some Pretty Cool Stuff
• Mathpix Snip Notes - convert images and pdf documents to LATEX.
101
More Resources
102
Index
Symbols \angle, 55
♣, 14 antiderivatives, 60
÷, 14 appendix, 83
\#, 65 \approx, 46
\$, 13, 34 approximately equal, 46
\%, 13, 15 Arabic, 24
©, 14 arc, 89
\\, 13, 15, 17, 76, 77, 100 arccos, 56
\\∗, 17 \arccos, 56
\{, 47, 52 arcsin, 56
\}, 47, 52 \arcsin, 56
arctan, 56
A \arctan, 56
A4 paper, 11 arithmetic, 44
A5 paper, 11 arrows, 49, 90
absolute value, 45 art, 86
abstract, 82 \article, 11
abstract algebra, 63 aside, 40
accents, 19 \ast, 50, 54
acknowledgements, 83 asterisk, 50
addition, 44 atoms, 94
\aleph, 44 \author, 12
algebra, 43, 45, 53, 63
algebraic closure, 64 B
algebraic numbers, 51 background, 33
align, 19 \backsim, 63
align center, 20 bar, 50
align equations, 38 \bar, 50
align left, 20 \baselineskip, 29
align right, 20 \beamer, 11
\alpha, 44 because, 53
American Mathematical Society, 34 \because, 53
analysis, 61 \begin, 11, 12
and, 53 Bengali, 24
angle, 56 \beta, 44
103
INDEX
\beth, 44 \checkmark, 50
BibTEX, 83 \chemfig, 94
bibliography, 83 chemical reactions, 94
\bibliography, 83 chemistry, 93
\Big, 48 \chi, 44
\big, 48 Chinese, 28
big O notation, 63 \circ, 54, 55, 72
big Omega, 63 circle, 88
big Theta, 63 circuits, 93
\bigcap, 52 \cite, 83
\bigcup, 52 \cline, 78
\Bigg, 48 closed integral, 61
\bigg, 48 closed interval, 54
bijection, 54 \clubsuit, 14
\binom, 65 coalescing words, 17
blackboard bold, 36 colon, 54
bold, 21, 36 \colon, 54
\boldsymbol, 66 color, 20, 73, 91
bonds, 94 \color, 20
\book, 11 \colorbox, 20
Bookman, 23 column vectors, 68
boolean numbers, 51 combination, 65
\bot, 53 combinatorics, 65
bottom, 53 comma separated list, 48
bow-tie, 50 commands, 12, 14
\bowtie, 50 \Bigg, 48
brackets, 47 \Big, 48
braket, 52 \Delta, 44, 61
bullet, 50 \Downarrow, 49
\bullet, 50 \Gamma, 44
\LaTeX, 99
C \Lambda, 44
calculus, 58 \Leftarrow, 49
caligraphic letters, 36 \Longleftarrow, 49, 53
\cap, 52 \Longrightarrow, 49, 53
\cdot, 44, 48, 61, 71, 72 \Omega, 44, 63
\ce, 93 \Phi, 44
ceiling, 47 \Pi, 44
center, 13, 20 \Rightarrow, 49
center text, 13 \Sigma, 44
centered dots, 48 \TeX, 99
\cfrac, 64 \Theta, 44, 63
\chapter, 15 \Uparrow, 49
chapter name, 32 \Updownarrow, 49
chapter number, 32 \Upsilon, 44
\chaptername, 32 \#, 65
characters, 13, 19 \$, 13, 34
104
INDEX
105
INDEX
\frac, 42 \limsup, 62
\frenchspacing, 18 \lim, 62
\gamma, 44 \linespread, 29
\gcd, 64 \listoffigures, 82
\geqslant, 46 \listoftables, 82
\geq, 46 \llcorner, 47
\gets, 49 \ll, 46
\gg, 46 \ln, 45
\gimel, 44 \log, 42, 45
\hat, 50, 54, 66, 71 \longleftarrow, 49
\hline, 77 \longmapsto, 49
\href, 85 \longrightarrow, 49
\idotsint, 61 \lor, 53
\iff, 49, 53 \lowercase, 21
\iiint, 61 \lrcorner, 47
\iint, 61 \maketitle, 12
\implies, 53 \mapsto, 49, 54
\includegraphics, 81 \markboth, 31
\indent, 30 \markright, 31
\infty, 53, 54 \mathbb, 36, 51
\inf, 63 \mathbf, 36, 52
\int, 60 \mathcal, 36, 51, 63
\in, 52, 99 \mathfrak, 36
\iota, 44 \mathit, 36
\item, 100 \mathrm, 36, 72
\kappa, 44 \mathtt, 36
\ker, 72 \max, 63
\label, 15, 37 \mbox, 17
\lambda, 44 \measuredangle, 55
\land, 53 \mid, 64, 65
\langle, 47, 64, 71, 72 \min, 63
\LARGE, 21 \mod, 64
\Large, 12, 21 \mp, 45
\large, 12, 21 \multicolumn, 78, 79
\lceil, 47 \multirow, 79
\ldots, 18, 48, 65 \mu, 44
\leadsto, 49 \nLeftarrow, 49
\left., 99 \nRightarrow, 49
\leftarrow, 49 \nabla, 61
\leftmark, 32 \ncong, 55
\leftrightarrow, 49 \neg, 53
\left, 47, 65, 69 \neq, 46
\leqslant, 46 \newline, 15, 17
\leq, 46, 64 \newpage, 17
\lfloor, 47 \nexists, 53
\liminf, 62 \nleftarrow, 49
\limits, 57 \nleftrightarrow, 49
106
INDEX
\nmid, 64 \rightarrowtail, 54
\noindent, 30 \rightarrow, 49, 54
\nolimits, 57 \rightmark, 32
\normalsize, 21 \right, 47, 65, 69
\notin, 52 \rmdefault, 22
\not, 52, 55, 64, 99 \rtimes, 64
\nparallel, 55 \scriptscriptstyle, 73
\nrightarrow, 49 \scriptsize, 21
\nsim, 55 \scriptstyle, 73
\nsubseteq, 52 \section, 14
\nu, 44 \sec, 56
\oint, 61 \setcounter, 33
\omega, 44, 63 \setlength, 29, 30
\oplus, 53, 72 \setminus, 52
\otimes, 71, 72 \sfdefault, 22
\overbrace, 50 \sigma, 44, 65
\overleftrightarrow, 55 \simeq, 64
\overline, 52, 55, 64, 66 \sim, 50, 53, 55, 63, 65
\overrightarrow, 55 \sinh, 56
\pagenumbering, 32 \sin, 56
\pageref, 15 \small, 21
\pagestyles, 31 \sqcup, 52
\paragraph, 14 \sqrt, 42, 45
\parallel, 55 \square, 55, 61
\parindent, 30 \star, 50
\parskip, 30 \subsection, 14
\partial, 58 \subseteq, 52
\part, 15 \subsetneq, 52
\par, 29 \subset, 52
\perp, 55, 72 \substack, 57, 62
\phantom, 37 \subsubsection, 14
\phi, 42, 44, 64 \supseteq, 52
\pi, 42, 44 \supset, 52
\pmod, 64 \sup, 63
\pm, 45 \surd, 50
\proc, 11 \tableofcontents, 30, 82
\prod, 58 \tag, 37
\propto, 46 \tanh, 56
\psi, 44 \tan, 56
\p, 78 \tau, 44
\rangle, 47, 64, 71, 72 \tbinom, 65
\rceil, 47 \textbf, 21
\ref, 15 \textcolor, 20
\report, 11 \textit, 21
\rfloor, 47 \textrm, 22
\rho, 44, 65 \textsc, 21
\right., 99 \textsf, 22
107
INDEX
\textsl, 21 comments, 15
\textstyle, 72 commutator, 64
\texttt, 22 comparison symbols, 46
\text, 35, 39, 54 compilation, 10
\tfrac, 42 compiler, 22
\thechapter, 32 complement, 52
\thepage, 32 complex numbers, 43, 51
\therefore, 53 composition, 54
\thesection, 32 Computer Modern, 21
\theta, 44 computer science, 96
\tikz, 86 conditional probability, 65
\tilde, 50 \cong, 55
\times, 44, 52, 61, 64, 71, 72 congruence, 64
\tiny, 54 congruent, 56
\tiny, 21 conjugate transpose, 72
\title, 12 contained in, 52
\today, 99 contains, 52
\top, 53 continued fractions, 64
\to, 49, 54 \copyright, 14
\triangle, 52, 55 corners, 47
\ttdefault, 22 corollary, 40
\twoheadrightarrow, 54 correlation, 65
\ulcorner, 47 \cos, 56
\underbrace, 50 cosecant, 56
\underline, 21 cosh, 56
\uparrow, 49 \cosh, 56
\updownarrow, 49 cosine, 56
\uppercase, 21 \cot, 56
\upsilon, 44 cotangent, 56
\urcorner, 47 cross product, 71
\url, 85 CS, 96
\usepackage, 11 \csc, 56
\varepsilon, 44 cube root, 45
\varnothing, 51 \cup, 52
\varphi, 44 curl, 61
\vartriangleleft, 64 curly brackets, 47
\vdots, 48 curly l, 50
\vec, 66 curve integral, 61
\verb, 96 curved lines, 87
\widehat, 50 CV, 98
\widetilde, 50
\wr, 64 D
\xhookrightarrow{}, 54 D’Alembert operator, 61
\xi, 44 dagger, 50
\xrightarrow, 54 \dagger, 50
\zeta, 44 \daleth, 44
comment, 13 dashed lines, 90
108
INDEX
dashes, 18 \dotsc, 48
\date, 12 \dotsm, 48
\dbinom, 65 \dotso, 48
\ddot, 50 dotted lines, 90
\ddots, 48 double bars, 47
declarations, 12 double factorial, 65
decorating lines, 90 double integral, 61
decorations, 50 down arrow, 49
\dee, 58 \Downarrow, 49
definition, 40 \downarrow, 49
\degree, 72 drawing, 86
degrees, 56 dual space, 72
delimiters, 47 dyadic product, 71
\Delta, 44, 61
\delta, 44 E
derangement, 65 electricity, 93
derivative, 50 element, 52
derivatives, 58 \ell, 50
\det, 70, 72 ellipse, 89
determinant, 72 ellipsis, 18
determinants, 70 em-dash, 18
\dfrac, 42 \emoji, 97
diacritics, 19 emojis, 97
diagonal dots, 48 \emph, 21
differentials, 60 emphasize, 21
differentiation, 58 empty line, 13
\dim, 72 empty set, 51
dimension, 72 \emptyset, 51
direct product, 64, 72 en-dash, 18
direct sum, 72 \end, 11, 12
discrete mathematics, 64 environments, 12
display mode, 35, 36 abstract, 82
\displaystyle, 72 align, 38
dissertaiton, 98 aligned, 39
\div, 14, 44 Bmatrix, 66
divergence, 61 bmatrix, 66
divide, 14 bsmallmatrix, 69
divides, 64 cases, 55
division, 14, 44 center, 13, 20
document classes, 14 description, 74
\documentclass, 11, 12 displaymath, 35
dollar sign, 13, 34 document, 10
Donald E. Knuth, 8 enumerate, 74
\dot, 50 equation, 36
dot product, 71 equation*, 35
dots, 18, 48 figure, 81
\dotsb, 48 flushleft, 20
109
INDEX
flushright, 20 F
Form, 97 factorial, 45, 65
gather, 38 \fbox, 17
gathered, 38 fences, 47
itemize, 74 field, 64
lstlisting, 96 field extension, 64
math, 34 file, 9
matrix, 66 floor, 47
multline, 38 font, 11
pmatrix, 66 font catalogue, 23
font codes, 23
proof, 41
font families, 21
psmallmatrix, 69
monospace, 21
quotation, 19
sans serif, 21
smallmatrix, 69
serif, 21
split, 39 font sizes, 20
table, 75 \footnotesize, 21
tabular, 75 \LARGE, 21
tikzpicture, 86 \Large, 12, 21
verbatim, 96 \large, 12, 21
Vmatrix, 71 \normalsize, 21
\epsilon, 44 \scriptsize, 21
\eqref, 37 \small, 21
equal, 46 \tiny, 21
equation, 35, 36 font styles, 21
equations, 37 fonts, 20, 36
\equiv, 53, 64 footer, 31
equivalence, 53 \footnote, 15
equivalence classes, 63 footnotes, 15
equivalence relations, 63 \footnotesize, 21
error, 10 for all, 53
escape, 13 \for all, 53
estimator, 66 for loop, 92
\eta, 44 \foreach, 92
forms, 97
Euler’s Number, 42
\frac, 42
Euler’s totient function, 64
fractions, 42, 51
evaluate derivatives, 58
fraktur, 36
example, 40
French, 27
exclusive or, 53 \frenchspacing, 18
exercise, 40 function, 54
exists, 53 functions, 54
\exists, 53
expected value, 65 G
exponentiation, 44 \Gamma, 44
exponents, 46 \gamma, 44
external fonts, 22 gather equations, 38
110
INDEX
\gcd, 64 \iint, 61
generator, 64 images, 80
geometry, 55 imaginary numbers, 43
\geq, 46 implied by, 53
\geqslant, 46 implies, 49, 53
German, 27 \implies, 53
gets, 49 \in, 52, 99
\gets, 49 \includegraphics, 81
\gg, 46 \indent, 30
\gimel, 44 indentation, 30
global font, 21, 22 index, 64, 84
Golden Ratio, 42 \inf, 63
gradient, 61 infimum, 62, 63
graphics, 80 infinity, 53
greater than, 46 \infty, 53, 54
greatest common divisor, 64 injection, 54
Greek, 25 inline, 34
Greek Letters, 44 inner product, 71
grid lines, 91 install, 9
group, 64 \int, 60
integers, 42, 51
H integral spacing, 60
Hadamard product, 72 integration, 60
half closed - half open, 54 International Language Support, 24
half open - half closed, 54 Arabic, 24
hat, 50 Bengali, 24
\hat, 50, 54, 66, 71 Chinese, 28
header, 31 French, 27
Hebrew, 25 German, 27
Hebrew Letters, 44 Greek, 25
higher-order derivatives, 58 Hebrew, 25
highlighting, 20 Hindi, 25
Hindi, 25 Japanese, 28
\hline, 77 Resources, 28
homework, 73 Russian, 26
\href, 85 Spanish, 27
hyperbolic functions, 56 Thai, 26
hyperlinks, 84 intersection, 52
hyphens, 18 intervals, 53
inverse cosine, 56
I inverse matrix, 72
\idotsint, 61 inverse sine, 56
if and only if, 53 inverse tangent, 56
if-then, 53 \iota, 44
iff, 49 irrationals, 42, 51
\iff, 49, 53 isomorphism, 64
\iiint, 61 italicize, 21
111
INDEX
112
INDEX
M multinomial coefficient, 65
\maketitle, 12 multiple integral, 61
map, 54 multiplication, 44, 57, 72
maps, 49, 54 multiplication dots, 48
\mapsto, 49, 54 \multirow, 79
\markboth, 31 multiset, 65
\markright, 31
math environments, 40 N
math fonts, 36 \nabla, 61
math mode, 34 natural log, 45
math spacing, 36 natural numbers, 51
math symbols, 44 \ncong, 55
\mathbb, 36, 51 \neg, 53
\mathbf, 36, 52 negated arrows, 49
\mathcal, 36, 51, 63 negation, 53
\mathfrak, 36 negative infinity, 53
\mathit, 36 \neq, 46
\mathrm, 36, 72 new page, 17
\mathtt, 36 newline, 13, 17
matrices, 68 \newline, 15, 17
matrix inverse, 72 \newpage, 17
matrix multiplication, 72 \nexists, 53
matrix norm, 71, 72 \nLeftarrow, 49
matrix operations, 72 \nleftarrow, 49
\max, 63 \nleftrightarrow, 49
maximum, 63 \nmid, 64
\mbox, 17 \noindent, 30
mean, 66 \nolimits, 57
\measuredangle, 55 norm, 47, 71
member, 52 normal subgroup, 64
Microsoft Word, 9 \normalsize, 21
\mid, 64, 65 not, 53
\min, 63 \not, 52, 55, 64, 99
minimum, 63 not congruent, 56
minus, 44 not equal, 46
minus sign, 18 not parallel, 56
minus-plus, 45 not perpendicular, 56
miscellaneous symbols, 50 not similar, 56
\mod, 64 \notin, 52
modular arithmetic, 64 \nparallel, 55
modulus, 45 \nRightarrow, 49
molecules, 94 \nrightarrow, 49
monospace, 36 \nsim, 55
monospace, 21 \nsubseteq, 52
\mp, 45 nth root, 45
\mu, 44 \nu, 44
\multicolumn, 78, 79 number sets, 51
113
INDEX
114
INDEX
Q \section, 14
quadruple integral, 61 section name, 32
quaternions, 51 section number, 32
quotation marks, 18 sectioning commands, 14
quotations, 11, 19 sections, 14
quotient space, 72 sedenions, 51
segment, 56
R semi-direct product, 64
\rangle, 47, 64, 71, 72 sequences, 61
rationals, 42, 51 serif, 21
ray, 56 set complement, 52
\rceil, 47 set difference, 52
reals, 42, 51, 54 set notation, 52
rectangle, 88 set theory, 50
\ref, 15 \setcounter, 33
references, 15, 83 \setlength, 29, 30
remark, 40 \setminus, 52
repetition, 92 sets, 51
\report, 11 \sfdefault, 22
reserved characters, 13 shapes, 88
resources, 14, 28, 33, 73, 80, 92 shaping paragraphs, 30
resume, 98 \Sigma, 44
\rfloor, 47 \sigma, 44, 65
\rho, 44, 65 \sim, 50, 53, 55, 63, 65
\right, 47, 65, 69 \simeq, 64
right arrow, 49 similar, 56
\right., 99 \sin, 56
\Rightarrow, 49 sine, 56
\rightarrow, 49, 54 sinh, 56
\rightarrowtail, 54 \sinh, 56
\rightmark, 32 size, 15, 20
rings, 95 slanted, 21
\rmdefault, 22 \small, 21
round brackets, 47 small o, 63
row vectors, 67 small omega, 63
\rtimes, 64 smallcaps, 21
Russian, 26 space, 15
spaces, 13
S spacing, 30, 36
sans serif, 21 spacing in integral, 60
scaling, 89 Spanish, 27
\scriptscriptstyle, 73 special characters, 13, 19
\scriptsize, 21 \sqcup, 52
\scriptstyle, 73 \sqrt, 42, 45
\sec, 56 square, 56, 88
secant, 56 \square, 55, 61
second derivative, 50 square brackets, 47
115
INDEX
116
INDEX
transpose, 72 \url, 85
triangle, 56, 88 \usepackage, 11
\triangle, 52, 55
trigonometry, 56 V
triple integral, 61 \varepsilon, 44
triple product, 71 variables, 43
troubleshooting, 10 variance, 65
\ttdefault, 22 \varnothing, 51
\twoheadrightarrow, 54 \varphi, 44
typeface, 21 \vartriangleleft, 64
typefaces, 21 \vdots, 48
typesetting, 10 \vec, 66
typewriter, 36 vector calculus, 61, 71
typewriter, 21 vector spaces, 72
vectors, 66
U \verb, 96
\ulcorner, 47 vertical dots, 48
unbreakable space, 13 volume integral, 61
under-brace, 50
\underbrace, 50 W
underline, 21 whole numbers, 42, 51
\underline, 21 \widehat, 50
union, 52 \widetilde, 50
unit vector, 71 word processor fonts, 22
unlabelled equation, 35 \wr, 64
unnumbered equation, 35 Wreath product, 64
up arrow, 49
\Uparrow, 49 X
\uparrow, 49 XƎLATEX, 22, 24–28
\Updownarrow, 49 \xhookrightarrow{}, 54
\updownarrow, 49 \xi, 44
uppercase, 21 xor, 53
\uppercase, 21 \xrightarrow, 54
\Upsilon, 44
\upsilon, 44 Z
\urcorner, 47 \zeta, 44
117