表示不可分割的符号

表示不可分割的符号

在以下定义中,我表示条件 $a$ 不是 $b$ 的整数倍。为什么 $b$ 和带有斜线的竖线之间有这么大的间隙?

\documentclass{amsart}
\usepackage{amsmath}

\begin{document}

\noindent
The integers $q$ and $r$ are called the \textbf{quotient} and \textbf{remainder}, 
respectively, in the division of $a$ by $b$. If $r \neq 0$, $a$ is not divisible by $b$. 
The indivisibility of $a$ by $b$ is denoted by \boldmath$b \not\vert a$\unboldmath.

\end{document}

答案1

间距问题是由于存在三种不同的数学符号造成的:二元运算(例如和)+\times二元关系(例如<\leq)和普通字符(例如!\infty)。每个都有自己的间距。关系通常具有最大的间距,略大于运算,并且明显大于普通字符。运算间距使用\mathbin,关系间距使用mathrel,而普通字符间距可以使用{}(如果它已经是普通字符,则可以使用任何间距)。下表说明了这些:

在此处输入图片描述

由于“除法”是一种关系,因此正确的间距由 给出\mathrel,这是 的默认值\mid。正如@egreg 的评论所建议的那样,否定关系由命令 给出\nmid。请注意,间距与 相同\mid

\nmid使用该amssymb包。

以下是生成上表的代码:

\documentclass{article}

\usepackage{amssymb}

\begin{document}

\begin{tabular}{ll}
$a\vert b$ & \verb`$a\vert b$`\\
$a|b$ & \verb`$a|b$`\\
$a\mathbin{|}b$ & \verb`$a\mathbin{|}b$`\\
$a\mathrel{|}b$ & \verb`$a\mathrel{|}b$`\\
$a\mid b$ & \verb`$a\mid b$`\\
$a\nmid b$ & \verb`$a\nmid b$`
\end{tabular}

\end{document}

相关内容