数学公式中的空格
调整(La)TeX的默认数学模式间距在某些情况下是有用的;让我们看一个例子:
\documentclass{article}
\usepackage{amssymb}
\begin{document}
Assume we have the next sets
\[
S = \{ z \in \mathbb{C}\, |\, |z| < 1 \} \quad \textrm{and} \quad S_2=\partial{S}
\]
\end{document}
空格
下面的例子包含了使用各种命令插入的空格的完整列表,并演示了它们对排版数学的影响:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Spaces in mathematical mode.
\begin{align*}
f(x) &= x^2\! +3x\! +2 \\
f(x) &= x^2+3x+2 \\
f(x) &= x^2\, +3x\, +2 \\
f(x) &= x^2\: +3x\: +2 \\
f(x) &= x^2\; +3x\; +2 \\
f(x) &= x^2\ +3x\ +2 \\
f(x) &= x^2\quad +3x\quad +2 \\
f(x) &= x^2\qquad +3x\qquad +2
\end{align*}
\end{document}
编译结果如下:
在数学模式下,运算符和关系周围的间距由特定的跳过宽度控制。
\thinmuskip (默认情况下,它等于 3 mu)。 \medmuskip (默认情况下,它等于4 mu)。 \Thickmuskip (默认情况下等于 5 mu)。
用户定义的二进制和关系运算符
你可以强制二进制或关系运算符中使用的间距,所以你可以定义自己的间距。
\begin{align*}
34x^2a \mathbin{\#} 13bc \\
34x^2a \mathrel{\#} 13bc
\end{align*}
速查表:
\quad
\,
\:
\;
\!
\
\qquad