可能重复:
\newcommand 和间距
无参数的宏后面不能有空格
我想使用\newabbrev
来表示某些缩写,但空格不对。使用 时\newabbrev
,我在新单词和句号前都会有空格。使用 时,情况\newcommand
正好相反。我该怎么办?
\documentclass{article}
\usepackage{abbrevs}
\newabbrev{\whp}{with high probability}
\newcommand{\whpcmd}{with high probability}
\begin{document}
\setlength{\parindent}{0in}
The event occurs \whp by our previous argument. We get spacing, using \verb|\newabbrev|.
编辑:具体来说,为什么缩写在句号前有空格?这似乎没有意义。
The event occurs \whpcmd by our previous argument. No spacing (bad), Using \verb|\newcommand|.
The event occurs \whp. We get spacing (bad), using \verb|\newabbrev|.
The event occurs \whpcmd. No spacing, Using \verb|\newcommand|.
\end{document}