我知道,LaTeX中的:
在渲染时产生一个空格。
有没有其他办法,因为我的LaTeX渲染器不支持`:
(它把它渲染成文本),而且我找不到任何帮助/FAQ。
LaTeX有许多水平间距的宏。
1.,
在文本模式下插入一个thinspace
(相当于.16667em
),或在数学模式下插入thinmuskip
(相当于3mu
)。
2.2. !
在数学模式下插入一个负的thinmuskip'。 3.
>在数学模式中插入``medmuskip
(相当于4.0mu加2.0mu减4.0mu
)。
4.;
在数学模式中插入thickmuskip'(相当于
5.0mu加5.0mu')。
5.:
等同于`>
(见上文)。
6.enspace
在文本或数学模式下插入一个.5em'的空格。 7.
quad在文本或数学模式下插入一个
1em'的空间。
8.qquad
在文本或数学模式下插入一个2em'的空间。 8.
kern 在文本或数学模式下插入一个
(可以是负数)的跳动(一个普通的TeX跳动)。 8.
hskip (类似于
kern)。 9.
hspace{在数学或文本模式下插入一个长度为
的空格(可以是负数)(一个LaTeX
hskip)。 10.
hphantom{在数学或文本模式下,插入相当于
长度的空格。在脆弱的命令(如
caption'和章节标题)中使用时,应该是protected'。 11.<code></code> 插入所谓的"控制空格"(在文本或数学模式下)。 12. <code></code>在文本模式下插入一个字间空格(在数学模式下会被吞噬)。类似的还有
空格和
{ }。 13.
~ 插入一个"unbreakable"空格(类似于HTML中的
)(在文本或数学模式下)。 14.
hfill在元素之间插入一个所谓的"橡胶长度"或拉伸(在文本或数学模式下)。请注意,你可能需要提供一种锚的类型来填充;见[
hspace和
hfill`之间的区别是什么?](https://tex.stackexchange.com/q/45948/5764)。
你的用法应该在*数学模式下工作,所以试试$\:$
。
\documentclass{article}
\setlength{\parindent}{0pt}% Just for this example
\begin{document}
There are a number of horizontal spacing macros for LaTeX:
\begin{tabular}{lp{5cm}}
\verb|a\,b| & a\,b \\
\verb|$a\,b$| & $a\,b$ \\
\verb|a\thinspace b| & a\thinspace b \\
\verb|$a\thinspace b$| & $a\thinspace b$ \\
\verb|$a\!b$| & $a\!b$ \\
\verb|$a\mkern-\thinmuskip b$| & $a\mkern-\thinmuskip b$ \\
\verb|$a\>b$| & $a\>b$ \\
\verb|$a\mkern\medmuskip b$| & $a\mkern\medmuskip b$ \\
\verb|$a\;b$| & $a\;b$ \\
\verb|$a\mkern\thickmuskip b$| & $a\mkern\thickmuskip b$ \\
\verb|$a\:b$| & $a\:b$ \\
\verb|$a\mkern\medmuskip b$| & $a\mkern\medmuskip b$ \\
\verb|a\enspace b| & a\enspace b \\
\verb|$a\enspace b$| & $a\enspace b$ \\
\verb|a\quad b| & a\quad b \\
\verb|$a\quad b$| & $a\quad b$ \\
\verb|a\qquad b| & a\qquad b \\
\verb|$a\qquad b$| & $a\qquad b$ \\
\verb|a\hskip 1em b| & a\hskip 1em b \\
\verb|$a\hskip 1em b$| & $a\hskip 1em b$ \\
\verb|a\kern 1pc b| & a\kern 1pc b \\
\verb|$a\kern 1pc b$| & $a\kern 1pc b$ \\
\verb|a\hspace{35pt}b| & a\hspace{35pt}b \\
\verb|$a\hspace{35pt}b$| & $a\hspace{35pt}b$ \\
\verb|axyzb| & axyzb \\
\verb|a\hphantom{xyz}b| & a\hphantom{xyz}b \\
\verb|$axyzb$| & $axyzb$ \\
\verb|$a\hphantom{xyz}b$| & $a\hphantom{xyz}b$ \\
\verb|a{ }b| & a{ }b \\
\verb|$a{ }b$| & $a{ }b$ \\
\verb|a\space b| & a\space b \\
\verb|$a\space b$| & $a\space b$ \\
\verb|a\ b| & a\ b \\
\verb|$a\ b$| & $a\ b$ \\
\verb|a~b| & a~b \\
\verb|$a~b$| & $a~b$ \\
\verb|a\hfill b| & a\hfill b \\
\verb|$a\hfill b$| & $a\hfill b$
\end{tabular}
\end{document}