
首先,感謝您的大力幫助和支持 - 我已經能夠在這裡找到幾乎所有乳膠問題的答案。然而,對於這個問題,我找不到解決方案。
我目前在使用 MinionPro 字體時遇到數字垂直放置的問題。從下面的最小工作範例和附圖可以看出,Latex 正確地將第一個數字與文字對齊。然而,一些後續數字設定得較低。
我覺得它破壞了可讀性,尤其是在有大量數字、目錄和標題的頁面上。
如何強制乳膠以相同的方式垂直對齊所有數字?
預先非常感謝!
\documentclass[twoside,11pt,openright]{scrbook}
\usepackage{MinionPro}
\begin{document}
This tests vertical digit placement as regular text: 1.99 and in math context: $1.8$.
\end{document}
答案1
Minion Pro 提供 4 種數字,根據您選擇的 Lining/Oldstyle 和 Tabular/Proportional 功能的組合。表格數字(或等寬字元)具有相同的字元寬度,這使得它們適合類似陣列的環境。這是一個簡單的示範:
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Minion Pro}
\usepackage{array, makecell}
\newcommand*\nml{\addfontfeatures{Numbers={Monospaced,Lining}}}%
\newcommand*\nmo{\addfontfeatures{Numbers={Monospaced,OldStyle}}}%
\newcommand*\npl{\addfontfeatures{Numbers={Proportional,Lining}}}%
\newcommand*\npo{\addfontfeatures{Numbers={Proportional,OldStyle}}}%
\begin{document}
\begin{center}
\begin{tabular}{|>{\nml}c| >{\nmo}c|@{\quad}|>{\npl}c |>{\npo}c|}
\multicolumn{2}{c}{\bfseries Tabular\quad} & \multicolumn{2}{c}{\bfseries Proportional}\\
\hline
\thead{Lining} & \thead{OldStyle} & \thead{Lining} & \thead{OldStyle}\\
\hline
12345 & 12345 & 12345 & 12345 \\
67890& 67890 & 67890& 67890 \\
\hline
\end{tabular}
\end{center}
\end{document}
據我所知,大多數專業版Opentype字體有這4種圖形。
要充分利用 opentype 功能,您可以考慮使用 XeLaTeX 或 LuaLaTeX 進行編譯,使用(如範例中)fontspec
僅用於文字的套件(nomath
選項)和MinionPro
用於數學的套件(選項onlymath
)