Sclub交友聊天~加入聊天室當版主 # 扯一下 mod

 加载了 amsmath 之后，关于 mod 有四个命令： 5.2 \mod and its relatives Commands \mod, \bmod, \pmod, \pod are provided to deal with the special spacing conventions of “mod” notation. \bmod and \pmod are available in LATEX, but with the amsmath package the spacing of \pmod will adjust to a smaller value if it’s used in a non-display-mode formula. \mod and \pod are variants of \pmod preferred by some authors; \mod omits the parentheses, whereas \pod omits the “mod” and retains the parentheses. \bmod  - 最细间距，无括号，不分行间行内 \pmod  - 有括号，行间间距大，行内间距稍小 \mod  - 无括号，其余同 \pmod \pod  - 无 mod ，其余同 \pmod 测试效果 \begin{align*} & \gcd(n,m\bmod n)\\ & x\equiv y\pmod b\\ & x\equiv y\mod c\\ & x\equiv y\pod d \end{align*}$\gcd(n,m\bmod n)$ $x\equiv y\pmod b$ $x\equiv y\mod c$ $x\equiv y\pod d$ 代码：\begin{align*} & \gcd(n,m\bmod n)\\ & x\equiv y\pmod b\\ & x\equiv y\mod c\\ & x\equiv y\pod d \end{align*} \$\gcd(n,m\bmod n)\$ \$x\equiv y\pmod b\$ \$x\equiv y\mod c\$ \$x\equiv y\pod d\$复制代码如果想了解得更清楚，可以看看它们在 amsmath.sty 内的定义：\renewcommand{\bmod}{\nonscript\mskip-\medmuskip\mkern5mu\mathbin   {\operator@font mod}\penalty900   \mkern5mu\nonscript\mskip-\medmuskip} \newcommand{\pod}{\allowbreak   \if@display\mkern18mu\else\mkern8mu\fi(#1)} \renewcommand{\pmod}{\pod{{\operator@font mod}\mkern6mu#1}} \newcommand{\mod}{\allowbreak\if@display\mkern18mu   \else\mkern12mu\fi{\operator@font mod}\,\,#1}复制代码\nonscript：在标号及小标号中忽略随后的粘连或 kern \allowbreak：允许断行，其定义为 \penalty0 其余的是字面义就不解释了

 返回列表 回复 发帖