1 LaTex Command
1.1 Basic Syntax
A LaTeX command begins with the \
followed by a command string. Let's look at some examples.
The \alpha
command displays \beta
command displays \quad
command displays blank space.
In LaTex, whitespace such as spaces, tabs, and newline is ignored.
1.2 Arguments
A LaTex command may contain options and arguments. The general syntax for commands is \
.
Let's look at some examples.
Fraction is typeset using \frac
command with two arguments. The first argument 1
is the numerator and the second argument a+b+c
is the denominator.
Subscript is typeset using an underscore following with an argumentn+1
. If the subscript argument contains only one symbol, you can write it without a bracket.
To displays fraction's numerator to the left or right, you should use \cfrac
command and add the option [l]
or [r]
.
2 Whitespace and Line Break
2.1 Whitespace
In LaTex, whitespace such as spaces, tabs, and newline is ignored. You can use \quad
and \qquad
to typeset whitespace.
2.2 Line Break
In the default environment, LaTex typeset the equation in a single line. You can use an environment to typeset multi-line equations.
The command \begin{environment name}
and \end{environment name}
signify the boundaries of an environment.
The command \\
break a line.
The following example uses the align
environment to typeset a multi-line equation.
Other environment commands will be introduced later.
Single Line:
Multiple Line:
2.3 Column Separator: &
An align
environment is a table-like structure, and &
is a column separator.
The columns in an align are right left right left right left ...
Let's look at the example.
To align equations, you can put the &
symbol right after the equal sign. The left side is aligned to the right, and the right side is aligned to the left
3 Common Mathematical Commands
3.1 Fraction
3.2 Limit
3.3 integral
3.4 Derivative
3.5 Root, Superscript, and Subscript
3.6 Sum and Product
3.7 Matrix