使用精简版(或完整版)会mtpro2
导致二项式系数带有过大的括号。如何解决?理想的解决方案应该适用于内联数学以及下标和二阶下标。
\documentclass{article}
\usepackage{amsmath}
\usepackage[lite]{mtpro2}
\begin{document}
Binomial coefficient has overly large parentheses in \verb|mtpro2|
``lite'':
\[
\begin{gathered}
\binom{n}{k} = \frac{n!}{k! \, (n-k)!}
= \left(\genfrac{}{}{0pt}{}{n}{k}\right)
= \biggl(\genfrac{}{}{0pt}{}{n}{k}\biggr), \\
\binom{k+\ell}{j}
= \left(\genfrac{}{}{0pt}{}{k+\ell}{j}\right)
= \biggl(\genfrac{}{}{0pt}{}{k+\ell}{j}\biggr).
\end{gathered}
\]
A \verb|\left...\right| pair is not ideal since the delimiters may
change their sizes, depending on whether the content has ascenders
and/or descenders. A \verb|\biggl...\biggr| pair seems just right.
\end{document}
可能相关的帖子:
- 使用 xelatex 和 displaystyle 中的 unicode-math 时 \binom 中的括号大小错误。 但
mtpro2
但是不是OpenType 数学字体,因此\fontdimen20
来自\fontdimen21
系列 2 的应该可用。 - 二项式系数分隔符的奇怪行为。但
mtpro2
已经使其数学扩展字体可扩展(请参阅mtpro2.dtx
了解该行\DeclareFontShape{LMP3}{mtt}{m}{n}{<->mt2exa}{}
)。
答案1
我同意,括号确实看起来太大了。幸运的是,可以使用与第三个 binom 相同的代码来调整定义:
\documentclass{article}
\usepackage{amsmath}
\usepackage[lite]{mtpro2}
\newcommand{\mybinom}[2]{\biggl(\genfrac{}{}{0pt}{}{#1}{#2}\biggr)}
\everydisplay{\let\binom\mybinom}
\begin{document}
Binomial coefficient has overly large parentheses in \verb|mtpro2|
``lite'':
\[
\begin{gathered}
\binom{n}{k} = \frac{n!}{k! \, (n-k)!}
= \left(\genfrac{}{}{0pt}{}{n}{k}\right)
= \biggl(\genfrac{}{}{0pt}{}{n}{k}\biggr), \\
\binom{k+\ell}{j}
= \left(\genfrac{}{}{0pt}{}{k+\ell}{j}\right)
= \biggl(\genfrac{}{}{0pt}{}{k+\ell}{j}\biggr).
\end{gathered}
\]
A \verb|\left...\right| pair is not ideal since the delimiters may
change their sizes, depending on whether the content has ascenders
and/or descenders. A \verb|\biggl...\biggr| pair seems just right.
$\binom{n}{k}$
\end{document}
答案2
我们可以\fontdimen20
在数学符号字体中进行修改。
\documentclass{article}
\usepackage{amsmath}
\usepackage[lite]{mtpro2}
% Alter \fontdimen20 in the math symbol font
\DeclareFontShape{LMP2}{mtt}{m}{n}{%
<-7> mt2syf
<7-9> mt2sys
<9-> mt2syt
}{% Default is 2.39. We change it to 2.38
\fontdimen20\font=2.38\fontdimen6\font
}
\begin{document}
Binomial coefficient has overly large parentheses in \verb|mtpro2|
``lite'':
\[
\begin{gathered}
\binom{n}{k} = \frac{n!}{k! \, (n-k)!}
= \left(\genfrac{}{}{0pt}{}{n}{k}\right)
= \biggl(\genfrac{}{}{0pt}{}{n}{k}\biggr), \\
\binom{k+\ell}{j}
= \left(\genfrac{}{}{0pt}{}{k+\ell}{j}\right)
= \biggl(\genfrac{}{}{0pt}{}{k+\ell}{j}\biggr).
\end{gathered}
\]
A \verb|\left...\right| pair is not ideal since the delimiters may
change their sizes, depending on whether the content has ascenders
and/or descenders. A \verb|\biggl...\biggr| pair seems just right.
\end{document}
解释
如果 TeX 允许一个 TFM 文件中存在超过 16 种不同的高度/深度,那么一切都应该可以正常工作。
当 TeX 使用分隔符构造“广义分式”时,它遵循附录 G 中的规则 15e。TeXbook:
[规则] 15e。将规则 15c 或 15d 中构造的垂直盒子用分隔符包围起来,分隔符的高度加深度至少为