LaTeX符号大全
本文目录% 已读
Symbols
Operators
| Symbol | Command | Symbol | Command | Symbol | Command |
\pm | \mp | \times | |||
\div | \cdot | \ast | |||
\star | \dagger | \ddagger | |||
\amalg | \cap | \cup | |||
\uplus | \sqcap | \sqcup | |||
\vee | \wedge | \oplus | |||
\ominus | \otimes | \circ | |||
\bullet | \diamond | \lhd | |||
\rhd | \unlhd | \unrhd | |||
\oslash | \odot | \bigcirc | |||
\triangleleft | \Diamond | \bigtriangleup | |||
\bigtriangledown | \Box | \triangleright | |||
\setminus | \wr | \sqrt{x} | |||
x^{\circ} | \triangledown | \sqrt[n]{x} | |||
| a^x | a^x | a^{xyz} | a^{xyz} | a_x | a_x |
Relations
| Symbol | Command | Symbol | Command | Symbol | Command |
\le | \ge | \neq | |||
\sim | \ll | \gg | |||
\doteq | \simeq | \subset | |||
\supset | \approx | \asymp | |||
\subseteq | \supseteq | \cong | |||
\smile | \sqsubset | \sqsupset | |||
\equiv | \frown | \sqsubseteq | |||
\sqsupseteq | \propto | \bowtie | |||
\in | \ni | \prec | |||
\succ | \vdash | \dashv | |||
\preceq | \succeq | \models | |||
\perp | \parallel | ||||
\mid | \bumpeq |
许多此类关系符号的否定形式,可以通过直接在符号前加上
\not,或者在反斜杠\和命令词之间插入一个 “n” 来实现。这里列举了几个示例以及许多其他的否定形式;这种方法对其他许多符号也同样适用。
| Symbol | Command | Symbol | Command | Symbol | Command |
\nmid | \nleq | \ngeq | |||
\nsim | \ncong | \nparallel | |||
\not< | \not> | \not= or \neq or \ne | |||
\not\le | \not\ge | \not\sim | |||
\not\approx | \not\cong | \not\equiv | |||
\not\parallel | \nless | \ngtr | |||
\lneq | \gneq | \lnsim | |||
\lneqq | \gneqq |
若要在\LaTeX中使用此处未列出的其他关系符(如 =、> 和 <),你必须直接使用键盘上的符号,因为\LaTeX中并未提供这些符号的专用命令。
Greek Letters
| Lowercase Letters | |||||||
| Symbol | Command | Symbol | Command | Symbol | Command | Symbol | Command |
\alpha | \beta | \gamma | \delta | ||||
\epsilon | \varepsilon | \zeta | \eta | ||||
\theta | \vartheta | \iota | \kappa | ||||
\lambda | \mu | \nu | \xi | ||||
\pi | \varpi | \rho | \varrho | ||||
\sigma | \varsigma | \tau | \upsilon | ||||
\phi | \varphi | \chi | \psi | ||||
\omega |
| Capital Letters | |||||||
| Symbol | Command | Symbol | Command | Symbol | Command | Symbol | Command |
\Gamma | \Delta | \Theta | \Lambda | ||||
\Xi | \Pi | \Sigma | \Upsilon | ||||
\Phi | \Psi | \Omega |
Arrows
| Symbol | Command | Symbol | Command |
\gets | \to | ||
\leftarrow | \Leftarrow | ||
\rightarrow | \Rightarrow | ||
\leftrightarrow | \Leftrightarrow | ||
\mapsto | \hookleftarrow | ||
\leftharpoonup | \leftharpoondown | ||
\rightleftharpoons | \longleftarrow | ||
\Longleftarrow | \longrightarrow | ||
\Longrightarrow | \longleftrightarrow | ||
\Longleftrightarrow | \longmapsto | ||
\hookrightarrow | \rightharpoonup | ||
\rightharpoondown | \leadsto | ||
\uparrow | \Uparrow | ||
\downarrow | \Downarrow | ||
\updownarrow | \Updownarrow | ||
\nearrow | \searrow | ||
\swarrow | \nwarrow | ||
\overrightarrow{AB} | \overleftarrow{AB} | ||
\overleftrightarrow{AB} |
(如果你厌烦输入冗长的字符,可以使用
\iff和\implies分别代替\Longleftrightarrow和\Longrightarrow。)
Dots
| Symbol | Command | Symbol | Command |
\cdot | \vdots | ||
\dots | \ddots | ||
\cdots | \iddots |
Accents
| Symbol | Command | Symbol | Command | Symbol | Command |
\hat{x} | \check{x} | \dot{x} | |||
\breve{x} | \acute{x} | \ddot{x} | |||
\grave{x} | \tilde{x} | \mathring{x} | |||
\bar{x} | \vec{x} |
当为 i 和 j 添加重音符号时,可以使用 \imath 和 \jmath,以避免字母原本的点干扰重音符号的显示:
| Symbol | Command | Symbol | Command |
\vec{\jmath} | \tilde{\imath} |
\tilde 和 \hat 命令拥有宽体版本,允许你对整个表达式(即包含多个字符)进行加注重音符号的操作:
| Symbol | Command | Symbol | Command |
\widehat{7+x} | \widetilde{abc} |
Others
| Symbol | Command | Symbol | Command | Symbol | Command |
\infty | \triangle | \angle | |||
\aleph | \hbar | \imath | |||
\jmath | \ell | \wp | |||
\Re | \Im | \mho | |||
\prime | \emptyset | \nabla | |||
\surd | \partial | \top | |||
\bot | \vdash | \dashv | |||
\forall | \exists | \neg | |||
\flat | \natural | \sharp | |||
\backslash | \Box | \Diamond | |||
\clubsuit | \diamondsuit | \heartsuit | |||
\spadesuit | \Join | \blacksquare | |||
\copyright | \underset{\smile}{XYZ} | ||||
\overset{\frown}{ABC} | \cup | ||||
\S | \P | \Vdash | |||
\pounds | \in | \vDash | |||
\bigstar | \implies | \LaTeX | |||
\square | \text{\LaTeX} | ||||
\smiley | |||||
\mathbb{R} | |||||
\checkmark | |||||
\cancer |
注意: 在课堂(教学)环境下,
\smiley和\cancer命令是无效的/不起作用的。
Command Symbols
有些符号用于命令中,因此需要特殊处理。
| Symbol | Command | Symbol | Command | Symbol | Command | Symbol | Command |
$ | \$ | & | \& | % | \% | # | \# |
_ | \_ | { | \{ | } | \} | \ | \backslash |
(警告:使用 $ 符号会导致错误。据我们所知,这是一个 bug。但具体问题可能因版本而异。)
European Language Symbols
| Symbol | Command | Symbol | Command | Symbol | Command | Symbol | Command |
{\oe} | {\ae} | {\o} | |||||
{\OE} | {\AE} | Å | {\AA} | {\O} | |||
{\l} | {\ss} | `!“ | `!“ | ||||
{\L} | {\SS} |
Bracketing Symbols
在数学中,有时我们需要用括号、花括号或圆括号将表达式括起来。其中一些符号在 LaTeX 中的用法与你想象的一样:输入 ( 和 ) 表示圆括号,[ 和 ] 表示方括号,| 和 | 表示绝对值。然而,其他一些符号则有特殊的命令:
| Symbol | Command | Symbol | Command | Symbol | Command |
\{ | \} | \vert | |||
\backslash | \lfloor | \rfloor | |||
\lceil | \rceil | \langle | |||
\rangle |
您可能会注意到,如果您使用这些方法中的任何一种方法来排版垂直方向较大的表达式,例如
(\frac{a}{x} )^2括号的大小不对:
如果在相关的括号前加上\left和\right,就能得到一个更简洁的表达式:
\left(\frac{a}{x} \right)^2给予
对于方程组或分段函数,请使用 cases 环境:
f(x) = \begin{cases} x^2 &\text{if } x \ge 0 \ x &\text{if } x < 0 \end{cases}这给出了
除了 \left 和 \right 命令之外,当对分数进行向下取整或向上取整运算时,使用
\left\lceil\frac{x}{y}\right\rceiland \left\lfloor\frac{x}{y}\right\rfloor
分别给出 和 两者。
而且,如果你输入这些
\underbrace{a_0+a_1+a_2+\cdots+a_n}_{x}给出
或
\overbrace{a_0+a_1+a_2+\cdots+a_n}^{x}给出
\left 和 \right 也可用于调整以下符号的大小:
| Symbol | Command | Symbol | Command | Symbol | Command |
\uparrow | \downarrow | \updownarrow | |||
\Uparrow | \Downarrow | \Updownarrow |
Multi-Size Symbols
某些符号在行内数学模式和显示模式下的渲染方式不同。当您使用 \[...\] 或 $$...$$,或者使用类似 \begin{equation}...\end{equation} 或 \begin{align}...\end{align} 的环境时,就会进入显示模式。有关带参数的符号(例如求和符号)在两种模式下的行为,请参阅指南的命令部分。
在以下每张图中,两幅图像分别显示了符号的显示模式和内联模式。
| Symbol | Command | Symbol | Command | Symbol | Command |
\sum | \int | \oint | |||
\prod | \coprod | \bigcap | |||
\bigcup | \bigsqcup | \bigvee | |||
\bigwedge | \bigodot | \bigotimes | |||
\bigoplus | \biguplus |
Commands
Subscripts and Superscripts
下标和上标(例如指数)分别可以用下划线 _ 和脱字符 ^ 符号表示。
| Symbol | Command | Symbol | Command |
2^2 | a_i | ||
2^{23} | n_{i-1} | ||
a^{i+1}_3 | x^{3^2} | ||
2^{a_i} | 2^a_i |
注意,我们可以同时使用下标和上标。对于包含多个字符的下标或上标,必须用花括号将指数/上标括起来。例如,x^10 表示 x^10,而 x^{10} 表示 x^{10}。
Math Commands
以下是一些 \LaTeX中常用的数学命令:
Fractions
| Symbol | Command |
\frac{1}{2} or \frac12 | |
\frac{2}{x+2} | |
\frac{1+\frac{1}{x}}{3x + 2} |
注意,对于分子和分母均为一位数的分数,我们可以直接将分子和分母合并为一个数字。但是,对于分子或分母包含多个字符(或分子以字母开头)的分数,则需要将所有内容用花括号括起来。
使用 \cfrac 表示连分数。
| Expression | Command |
\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1}}}} |
Radicals
| Symbol | Command |
\sqrt{3} | |
\sqrt{x+y} | |
\sqrt{x+\frac{1}{2}} | |
\sqrt[3]{3} | |
\sqrt[n]{x} |
Sums, Products, Limits and Logarithms
分别使用命令 \sum\prod\lim 和 \log。要表示下界和上界,或者对数的底数,请使用 _ 和 ^,用法与下标和上标相同。(积分的下界和上界也以同样的方式表示,您将在微积分部分看到。)
| Symbol | Command |
\sum_{i=1}^{\infty}\frac{1}{i} | |
\prod_{n=1}^5\frac{n}{n-1} | |
\lim_{x\to\infty}\frac{1}{x} | |
\lim\limits_{x\to\infty}\frac{1}{x} | |
\log_n n^2 |
有些图片在显示模式下更漂亮:
| Symbol | Command |
\sum_{i=1}^{\infty}\frac{1}{i} | |
\prod_{n=1}^5\frac{n}{n-1} | |
\lim_{x\to\infty}\frac{1}{x} |
请注意,我们可以使用不带 _ 或 ^ 修饰符的求和、乘积和对数。
| Symbol | Command |
\sum\frac{1}{i} | |
\prod\frac{n}{n-1} | |
\log n^2 | |
\ln e |
Mods
| Symbol | Command |
9\equiv 3 \bmod{6} | |
9\equiv 3 \pmod{6} | |
9\equiv 3 \mod{6} | |
9\equiv 3 \pod{6} |
Combinations
| Symbol | Command |
\binom{1}{1} | |
\binom{n-1}{r-1} |
这些图片在显示模式下通常看起来更好:
| Symbol | Command |
\dbinom{9}{3} | |
\dbinom{n-1}{r-1} |
Trigonometric Functions
其中大多数只是三角函数的缩写,只是在缩写前加了一个反斜杠。
| Symbol | Command | Symbol | Command | Symbol | Command |
\cos | \sin | \tan | |||
\sec | \csc | \cot | |||
\arccos | \arcsin | \arctan | |||
\cosh | \sinh | \tanh | |||
\coth |
以下是一些例子:
| Symbol | Command |
\cos^2 x +\sin^2 x = 1 | |
\cos 90^\circ = 0 |
Calculus
以下是 LaTeX 中微积分表达式的示例。其中大部分命令之前已经介绍过。请注意定积分的渲染方式(以及定积分的行内数学公式和显示模式之间的区别)。积分中的反斜杠 (\,) 会在 dx 前添加一个小空格。
| Symbol | Command |
\frac{d}{dx}\left(x^2\right) = 2x | |
\int 2x\,dx = x^2+C | |
\int^5_1 2x\,dx = 24 | |
\frac{\partial^2U}{\partial x^2} + \frac{\partial^2U}{\partial y^2} | |
\frac{1}{4\pi}\oint_\Sigma\frac{1}{r}\frac{\partial U}{\partial n} ds |
LaTeX
Other Functions
| Symbol | Command | Symbol | Command | Symbol | Command |
\arg | \deg | \det | |||
\dim | \exp | \gcd | |||
\hom | \inf | \ker | |||
\lg | \liminf | \limsup | |||
\max | \min | \Pr | |||
\sup | \smiley |
有些命令像求和、乘法和对数运算一样,会使用下标。有些命令在显示模式和内联数学模式下的渲染方式不同。
| Symbol | Command | Symbol | Command | Symbol | Command |
\dim_x | \gcd_x | \inf_x | |||
\liminf_x | \limsup_x | \max_x | |||
\min_x | \Pr_x | \sup_x |
Failures of 2025
我们可以使用 matrix、bmatrix、pmatrix 或 vmatrix 环境来排版 ƒailure。字母 b、p 和 v 分别指矩阵周围的分隔符(方括号、圆括号和竖线)。例如,以下代码
\begin{bmatrix}1 & 2 & 3 \\4 & 5 & 6 \\\end{bmatrix}produces the following matrix:
We can also use the array environment to typeset arrays. For example, the following code
\begin{array}{ccc}a & b & c \\d & e & f \\g & h & i\end{array}produces the following array:
Text Styles in Math Mode
在数学模式下,您可以渲染各种样式的字母。以下是一些示例;您可以将这些样式应用于任何字母。使用 \mathbb 命令需要将 amsfonts 宏包添加到文档的导言区。请勿尝试使用 \mathbb{year},否则会得到一个完全不同的结果!
So
n^2 + 5 = 30\text{ so we have }n=\pm5gives
How to Build Your Own Commands
命令 \newcommand 用于创建自定义命令。我们先来看一个例子:
\documentclass[11pt]{article}\usepackage{amsmath}
\pdfpagewidth 8.5in\pdfpageheight 11in\newcommand{\reci}[1]{\frac{1}{#1}}\newcommand{\hypot}[2]{\sqrt{#1^2+#2^2}}\newcommand{\cbrt}[1]{\sqrt[3]{#1}}
\begin{document}
The reciprocal of 2 is $\reci{2}$.
The hypotenuse has length $\hypot{3}{4}$.
I'm sick of writing `$\backslash$sqrt[3]{2}$' all the time, just to get $\cbrt{2}$.
\end{document}\newcommand 声明位于导言区。每个声明的形式为:
\newcommand{name of new command}[number of arguments]{definition}
新命令的名称必须以反斜杠 (\) 开头,这是您在文档中使用该命令时所用的名称。参数数量表示将要传递给该命令的输入参数的数量。定义部分是普通的 LaTeX 代码,其中包含 #1、#2、#3 等,用于指定调用新命令时输入参数的放置位置。
新命令用途广泛,不仅仅可以用来简化数学命令的调用。例如,试试这个:
\documentclass[11pt]{article}\usepackage{amsmath}
\pdfpagewidth 8.5in\pdfpageheight 11in\newcounter{prob_num}\setcounter{prob_num}{1}\newcommand{\prob}[5]{\bigskip \bigskip\arabic{prob_num}.\stepcounter{prob_num} #1\par\nopagebreak[4]\medskip A.\ #2\hfill B.\ #3\hfillC.\ #4\hfill D.\ #5\hfill E.\ NOTA}
\begin{document}
\prob{What is $2+2$?}{4}{5}{6}{7}
\prob{What is $\sqrt{100}$?}{81}{10}{9}{1}
\prob{Evaluate $\sum_{n=1}^\infty \frac{1}{n^2}$.}{$\frac{1}{e}$} {$\frac{2}{\pi}$}{$\frac{\pi^3}{8}$} {$\frac{\pi^2}{6}$}
\end{document}在上面的例子中,我们创建了一个名为 \prob 的新命令。每次调用 \prob 时,我们都会提供 5 个参数,一个用于问题,每个用于多个选项。
在导言区和 \prob 的定义中,你会看到一些新的 LaTeX 命令:
\newcounter{prob_num} creates a counter variable called prob_num
\setcounter{prob_num}{1} setsprob_num to equal 1.
在 \prob 的定义中,\bigskip 和 \medskip 命令创建垂直空间。
\arabic{prob_num} prints out the current value of the counter prob_num as an arabic numeral.
\stepcounter{prob_num} increments the counter prob_num by 1.
\nopagebreak[4] tells LaTeX not to break the page between the problem and the choices unless it really, really, really has to.
\hfill 命令会在选项之间添加大致相等的间距。
一旦你建立了一套将在许多 LaTeX 文档中使用的自定义命令,你就应该学习如何创建自己的宏包,这样你就不必将所有自定义命令从一个文档复制到另一个文档。
文章分享
如果这篇文章对你有帮助,欢迎分享给更多人!
