LaTeX Grammar Learning (1): Mathematical Formulas
Article directory
I. Introduction
In LaTeX math mode, formulas come in two forms - inline formulas and inline formulas. The former formula is embedded in the line and is suitable for simple and short formulas; the latter is centered on a line and is suitable for relatively long or important formulas. Spaces in the formula will be ignored. In the formula between lines, the command \tag{nn} can be used for manual numbering. 1
2. Mathematical mode
The writing forms of LaTex are all $...$
in , and the insertion with the text is a single pair $...$
, while the LaTex expression that is alone in a line is a double pair $$...$$
.
1. In-house formula
Usage form: $...$
Example:
输出结果:$f(x) = a + b$
Output: f ( x ) = a + bf(x) = a + bf(x)=a+b
2. Interline formula
Usage form: $$...$$
Example:
输出结果:$$f(x) = a + b$$
Output: f ( x ) = a + bf(x) = a + bf(x)=a+b
3. Formula manual numbering
Usage form: unit serial number $...\tagn$
, multi-digit serial number $...\tag{n-n}$
Example 1:
$$f(x) = a + b \tag1$$
Output: f ( x ) = a + b (1) f(x) = a + b \tag1f(x)=a+b( 1 )
Example 2:
$$f(x) = a + b \tag{1-1}$$
Output: f ( x ) = a + b (1-1) f(x) = a + b \tag{1-1}f(x)=a+b(1-1)
4. Bold the formula
Usage form: $\bm{...}$
2
Examples:
$$\bm{f(x) = a + b \tag{1-1}}$$
Output: f ( x ) = a + b (1-1) \bm{f(x) = a + b \tag{1-1}}f(x)=a+b(1-1)
5. Change the color of formula letters
Usage form: $\color{blue}....$
Note: If you only change individual fields, you need to add after changing the letter \color{blue}...\color{back}...
Example 1:
$$\color{blue}f(x) = a + b \tag{1-1}$$
Output: f ( x ) = a + b (1-1) \color{blue}f(x) = a + b \tag{1-1}f(x)=a+b( 1-1 )
Example 2:
$$\color{blue}f(x) \color{back}= a + b \tag{1-1}$$
Output: f ( x ) = a + b (1-1) \color{blue}f(x) \color{back}= a + b \tag{1-1}f(x)=a+b(1-1)
3. Mathematical symbols
1. Greek letters
When writing mathematical expressions, Greek letters cannot be missing, and the following table is listed for searching.
LaTeX lowercase writing form | Greek alphabet | LaTeX uppercase writing form | Greek alphabet |
---|---|---|---|
\alpha | a \alphaa | \Alpha | A \Alpha A |
\beta | β \betab | \Beta | B \Beta B |
\gamma | γ \gamma c | \Gamma | Γ \Gamma C |
\delta | d \deltad | \Delta | D \DeltaD |
\epsilon | ϵ \epsilonϵ | \Epsilon | E \EpsilonE |
\zeta | ζ \zetag | \Zeta | From \ZetaZ |
and | the \etathe | And | H\EtaH |
\theta | θ \theta i | \Theta | Θ \Theta Th |
\iota | i \iotai | \Iota | I \Iota I |
\kappa | k \kappaK | \Kappa | K \Kappa K |
\lambda | λ \lambdal | \Lambda | Λ \LambdaL |
\mu | μ \mum | \In | M\UM |
\not | n \nun | \Not | N \NuN |
\xi | ξ \xi X | \Xi | Ξ \Xi X |
\omicron | ο \omicron The | \Omicron | O \OmicronO |
\pi | π \piPi | \Pi | Π \PiPi |
\rho | ρ \rho r | \Rho | P \Rho P |
\sigma | σ \sigma p | \Sigma | Σ \Sigma S |
\ can | τ \yeart | \Tau | T \TauT |
\varphi | φ \varphiPhi | \Phi | Φ \PhiPhi |
\chi | χ \chih | \Chi | X \WhoX |
\psi | ψ \psip | \Psi | Ψ \PsiPs |
\omega | ω \omegaoh | \Omega | Ω \OmegaOh |
2. Operator
Ordinary characters are expressed in the same way in mathematical formulas, such as plus sign +
, minus sign, -
etc., but for some characters in the form of keywords in LaTeX, such as # $ % & ~ _ \ { }
, they need to be \
escaped. As shown in the table below.
LaTeX expression | output result |
---|---|
\times |
× \times × |
\# |
# \# # |
\$ |
$ |
\% |
% \% % |
\& |
& \& & |
\_ |
_ \_ _ |
\{
|
{ \{ { |
\} |
} \} } |
Subscripts and spaces
Four. Summary
The above is what I will talk about today. This article introduces the use of LaTeX mathematical formulas in more detail, and LaTeX provides convenient typesetting, which can effectively solve the problem of paper journal typesetting.