![如何在文字中使用 Palatino 字體以及數學呢?](https://rvso.com/image/400385/%E5%A6%82%E4%BD%95%E5%9C%A8%E6%96%87%E5%AD%97%E4%B8%AD%E4%BD%BF%E7%94%A8%20Palatino%20%E5%AD%97%E9%AB%94%E4%BB%A5%E5%8F%8A%E6%95%B8%E5%AD%B8%E5%91%A2%EF%BC%9F.png)
我想在文件中使用 Zapf 的 Palatino 字體,其中還包含大量數學內容。我想要一個適合數學的好字體。這是我正在做的事情的快照。
\documentclass[10pt,letterpaper]{memoir}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathpple}
\usepackage{upgreek}
\usepackage{mathpazo}
\usepackage{lipsum}
\begin{document}
\chapter{Demo}
Some regular text. \lipsum[1]
Now for some maths.
\begin{displaymath}
P_{N-1 + m} = \frac{C}{N-{1} + m} \binom{N_{2} - N_{1}}{m}
\alpha^{m}\beta^{(N_{2} - N_{1}) -m}
\end{displaymath}
The number 27 is the sum of the first 5 odd prime numbers: $27 = 1+3+5+7+11$
\end{document}
對我來說,文字和數學字體似乎很合適,但文字看起來不像 Palatino。
答案1
我建議您不要加載mathpple
、mathpazo
、 和upgreek
包,而是加載newpxtext
和newpxmath
包。
\documentclass[10pt,letterpaper]{memoir}
\usepackage{amsmath,amssymb}
%\usepackage{mathpple}
%\usepackage{upgreek}
%\usepackage{mathpazo}
\usepackage{lipsum}
\usepackage{newpxtext,newpxmath}
\begin{document}
Some regular text. \lipsum[2]
Now for some maths.
\begin{displaymath}
P_{N-1 + m} = \frac{C}{N-{1} + m} \binom{N_{2} - N_{1}}{m}\,
\alpha^{m}\beta^{(N_{2} - N_{1}) -m}
\end{displaymath}
The number 27 is the sum of the first 5 odd prime numbers: $27 = 1+3+5+7+11$.
$\alpha\beta\gamma\delta$ vs.\ $\upalpha\upbeta\upgamma\updelta$
\end{document}
答案2
您也可以使用 OpenType 字型來執行此操作unicode-math
。
\documentclass[10pt,letterpaper]{memoir}
\usepackage{amsmath}
\usepackage{unicode-math}
\usepackage{microtype}
\usepackage{lipsum}
\defaultfontfeatures{Scale=MatchLowercase}
\setmainfont{TeX Gyre Pagella}
\setmathfont{Asana Math}
\begin{document}
\chapter{Demo}
Some regular text. \lipsum[1]
Now for some maths.
\begin{displaymath}
P_{N-1 + m} = \frac{C}{N-{1} + m} \binom{N_{2} - N_{1}}{m}
\alpha^{m}\beta^{(N_{2} - N_{1}) -m}
\end{displaymath}
The number 27 is the sum of the first 5 odd prime numbers: $27 = 1+3+5+7+11$
\end{document}
使用 LuaLaTeX,包含microtype
將使您同時獲得字體突出和字體擴展,從而大大減少連字符的數量。
如果有的話,您還可以將 Palatino 或 Palatino Linotype 替換為主要字體,或將 TeX Gyre Pagella Math 替換為數學字體。非常匹配的無襯線字體是 Hermann Zapf 的 Optima,你可以在數學模式下混合使用一些 Zapf 的 Neo Euler(我喜歡它的直立字母和腳本字母表)。
答案3
如果要使用小型大寫字母,我會避免使用TeX Gyre Pagella
or 。newpxtext
其中一些小型股的比例有所偏差。這對於 來說尤其明顯o.sc
。以下是與option和option (or )O\textsc{o}o
的比較:newpxtext
largesc
TeX Gyre Pagella
mathpazo
sc
osf
如果沒有largesc
選項,newpxtext
則與 Pagella 相同。但是,均勻縮放largesc
對字母的固有比例沒有幫助(它的高度太寬)。對我來說,粗體/斜體小型大寫字母的可用性並不能彌補這一點。相關討論位於https://tex.stackexchange.com/a/385262/140850。
使用時pdflatex
我newpxmath
與我的 FPL 字體一起使用:
\usepackage[sc]{mathpazo} % or option osf
\usepackage{newpxmath}
當使用xelatex
或lualatex
我使用真正的 Palatino (Linotype) 作為文本或我的FPL新:
\usepackage{unicode-math}
\setmainfont{FPL Neu}
\setmathfont{Asana Math} % alternative: TeX Gyre Pagella Math
這是O\textsc{o}o
該字體的序列和改進的@符號: