拉丁现代语和计算机现代语中括号大小不一致

拉丁现代语和计算机现代语中括号大小不一致

我注意到,当我从 Computer Modern 切换到 Latin Modern 时,分隔符的大小会发生变化。在 12pt 字体大小的文档中,这会导致内联数学公式\bigl(太大而无法容纳,并扩大该行占用的垂直空间。这在 Computer Modern 中不是问题。这是错误吗?

\documentclass[12pt]{article}

\usepackage{lmodern}
\usepackage{amsmath}

\begin{document}
An equivalence class~$[a]_{\sim} \in A / {\sim}$ consists of all the elements
in $A$ that are mapped to $b = f(a)$. By the axiom of choice, there exists a
choice function~$c \colon A / {\sim} \to A$ which selects a representative
element of each equivalence class. There exists a
function~$h \colon B \to A / {\sim}$, so that
$h(b) = h\bigl(f(a)\bigr) = [a]_{\sim}$. This allows us to construct the
function~$g = c \circ h$, which is in fact a right-inverse of $f$.
\[
    \Biggl(\biggl(\Bigl(\bigl((X)\bigr)\Bigr)\biggr)\Biggr)
\]
\end{document}

计算机现代: 电脑现代

拉丁现代: 拉丁现代

拉丁现代文格中第四行上方有一个间隙,而计算机现代文格中没有这个间隙。


编辑:

这个帖子egreg 解决了同样的问题。

答案1

由于历史原因,可缩放分隔符使用固定大小,即使对于 cm 来说这显然不是一个好主意(参见exscale包装),但在这里它根本不好,如果您以自然缩放大小使用字体那么......

在此处输入图片描述

\documentclass[12pt]{article}

\DeclareFontFamily{OMX}{lmex}{}
\DeclareFontShape{OMX}{lmex}{m}{n}{%
   <->lmex10%
   }{}
\usepackage{lmodern}
\usepackage{amsmath}

\begin{document}



\show\big
\showthe\baselineskip
\setbox0\hbox{$\big($}\showthe\dimexpr\ht0+\dp0
\showoutput
\showbox0

An equivalence class~$[a]_{\sim} \in A / {\sim}$ consists of all the elements
in $A$ that are mapped to $b = f(a)$. By the axiom of choice, there exists a
choice function~$c \colon A / {\sim} \to A$ which selects a representative
element of each equivalence class. There exists a
function~$h \colon B \to A / {\sim}$, so that
$h(b) = h\bigl(f(a)\bigr) = [a]_{\sim}$. This allows us to construct the
function~$g = c \circ h$, which is in fact a right-inverse of $f$.
\[
    \Biggl(\biggl(\Bigl(\bigl((X)\bigr)\Bigr)\biggr)\Biggr)
\]
\end{document}

现在尺寸显示为

> 14.5pt.
l.17 \showthe\baselineskip

? 

> 14.40013pt.

\big少于\baselineskip


您可以重新定义\big尺寸并将其保持在范围内\baselineskip,从而避免\lineskip在段落内使用粘连。

\documentclass[12pt]{article}

\usepackage{lmodern}
\usepackage{amsmath}

\begin{document}


\makeatletter
\renewcommand{\big}{\bBigg@{0.92}}
\makeatother
\show\big
\showthe\baselineskip
\setbox0\hbox{$\big($}\showthe\dimexpr\ht0+\dp0
\showoutput

An equivalence class~$[a]_{\sim} \in A / {\sim}$ consists of all the elements
in $A$ that are mapped to $b = f(a)$. By the axiom of choice, there exists a
choice function~$c \colon A / {\sim} \to A$ which selects a representative
element of each equivalence class. There exists a
function~$h \colon B \to A / {\sim}$, so that
$h(b) = h\bigl(f(a)\bigr) = [a]_{\sim}$. This allows us to construct the
function~$g = c \circ h$, which is in fact a right-inverse of $f$.
\[
    \Biggl(\biggl(\Bigl(\bigl((X)\bigr)\Bigr)\biggr)\Biggr)
\]
\end{document}

\show文档顶部显示

> 14.5pt.
l.13 \showthe\baselineskip

? 

> 13.24792pt.
<to be read again> 

这表明其\big(小于 14.5pt 基线跳高。

.92 是根据经验选择的:.93 使字体跳转到下一个可用大小,但在这里太大了。

答案2

您可以通过强制使用cmex字体来解决问题。我将使用exscale中的类似设置amsfonts

\documentclass[12pt]{article}

\usepackage{lmodern}
\usepackage{amsmath}


\DeclareFontFamily{OMX}{lmex}{}
\DeclareFontShape{OMX}{lmex}{m}{n}{%
       <-7.5>cmex7%
    <7.5-8.5>cmex8%
    <8.5-9.5>cmex9%
    <9.5->cmex10%
}{}%

\begin{document}

% \showoutput

An equivalence class~$[a]_{\sim} \in A / {\sim}$ consists of all the elements
in $A$ that are mapped to $b = f(a)$. By the axiom of choice, there exists a
choice function~$c \colon A / {\sim} \to A$ which selects a representative
element of each equivalence class. There exists a
function~$h \colon B \to A / {\sim}$, so that
$h(b) = h\bigl({f}(a)\bigr) = [a]_{\sim}$. This allows us to construct the
function~$g = c \circ h$, which is in fact a right-inverse of $f$.
\[
    \Biggl(\biggl(\Bigl(\bigl((X)\bigr)\Bigr)\biggr)\Biggr)
\]
\end{document}

在此处输入图片描述

相关内容