拉丁現代語和電腦現代語中括號大小不一致

拉丁現代語和電腦現代語中括號大小不一致

我注意到,當我從電腦現代切換到拉丁現代時,分隔符號的大小發生了變化。在 12pt 字體大小的文件中,這會導致內聯數學\bigl(太大而無法容納,並擴展了該行佔用的垂直空間。這對現代計算機來說不是問題。這是一個錯誤嗎?

\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 基線 kip。

根據經驗選擇的 0.92:0.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}

在此輸入影像描述

相關內容