完整的短划线

完整的短划线

我尝试使用两个“-”字符来获得短破折号,但结果不是显示为一个长短破折号符号,而是 --。有没有什么办法可以得到完整的短破折号?

答案1

您是否想在数学模式下执行此操作?如果是,那么需要特别注意:

\documentclass{article}
\usepackage{amsmath}
\begin{document}

Outside of math mode  13--17 works.

In math mode this does not work as the dashes represent a minus operation:
\[a = d\ 17--21\]

In math mode you need to:
\[a = d \hbox{ 17--21}\]
or if you have the amsmath pacakge:
\[a = d \text{ 16--19}\]
\end{document}

相关内容