跳到正文

LaTeX 数学字体:粗体、黑板粗体、花体

使用数学字母表命令:\mathbf{v} 得到粗体,\mathbb{R} 得到黑板粗体(amssymb),\mathcal{L} 得到花体,\mathfrak{g} 得到哥特体;\boldsymbol 或 \bm 还能把希腊字母和符号变成粗体。

数学字母表

在数学模式中,字母是斜体的变量。数学字母表命令会改变其参数中字母的样式,通常是为了赋予它们特定含义:粗体表示向量和矩阵,黑板粗体表示数集,花体表示集族。

命令效果典型用途
\mathbf{v}直立粗体向量、矩阵
\boldsymbol{\alpha}、\bm{\alpha}粗体,保持斜体,也适用于希腊字母和符号粗体希腊字母向量
\mathbb{R}黑板粗体(amssymb)ℕ、ℤ、ℚ、ℝ、ℂ
\mathcal{L}花体大写字母拉格朗日量、集族
\mathfrak{g}哥特体李代数、理想
\mathrm{d}直立罗马体单位、微分符号 d、标签
\mathit{x}斜体多字母变量名
\mathsf{T}无衬线体转置、范畴
\mathtt{x}等宽体公式中的代码

常用字母表

LaTeX导言区: \usepackage{amssymb,bm}在编辑器中打开 (在新标签页中打开)
\mathbf{A}\mathbf{x} = \mathbf{b} \qquad \bm{\mu} \in \mathbb{R}^{44} \qquad
\mathcal{L}(\theta) \qquad \mathfrak{su}(2) \qquad
\int f(x) \, \mathrm{d}x \qquad \mathbf{X}^{\mathsf{T}}

公式中的文字请使用 amsmath 的 \text{..},而不是数学字母表:\text 会保留单词之间的空格。

公式中的文字

f(x) = \begin{cases} 1 & \text{if } x \ge 44, \\ 0 & \text{otherwise.} \end{cases}

数学样式

\displaystyle、\textstyle、\scriptstyle 和 \scriptscriptstyle 会改变当前分组内其后所有内容的大小:例如,正文中的分式可以按行间公式的大小排版。

一行文字中的行间大小分式

Compare $\frac{1}{2}$ with $\displaystyle\frac{1}{2}$ in the same line,
and a sum $\sum_{i=1}^{n} x_i$ with $\displaystyle\sum_{i=1}^{n} x_i$.

全部样式命令

网格展示了每个命令作用在字母“Ab”上的效果。点击复制按钮即可复制命令。

  • \displaystyle
  • \textstyle
  • \scriptstyle
  • \scriptscriptstyle
  • \bf
  • \rm
  • \it
  • \sf
  • \frak
  • \tt
  • \cal
  • \bold
  • \mathbf
  • \bm
  • \boldsymbol
  • \pmb
  • \mathrm
  • \mathit
  • \mathnormal
  • \mathsf
  • \mathfrak
  • \mathtt
  • \Bbb
  • \mathbb
  • \mathcal
  • \mathbin
  • \mathclose
  • \mathinner
  • \mathop
  • \mathopen
  • \mathord
  • \mathpunct
  • \mathrel
  • \Huge
  • \normalsize
  • \huge
  • \small
  • \footnotesize
  • \Large
  • \LARGE
  • \scriptsize
  • \large
  • \tiny

不支持的内容

常见问题

如何在 LaTeX 中输入实数集 ℝ?

加载 amssymb 并写 \mathbb{R}。ℕ、ℤ、ℚ 和 ℂ 同理,分别用 \mathbb{N}、\mathbb{Z}、\mathbb{Q} 和 \mathbb{C}。

为什么 \mathbf 不能让希腊字母变粗?

在 LaTeX 中,\mathbf 只改变拉丁字母、数字和大写希腊字母。粗体 α 请用 \boldsymbol{\alpha} 或 \bm{\alpha}。

如何把积分中的 d 排成直立体?

写 \mathrm{d}x,并在前面加一个细空白 \,:\int f(x)\,\mathrm{d}x。

本页的每个示例都在构建网站时由 Scissor LaTeX 排版。 最后更新:2026-11-07