如何在文字中使用 Palatino 字體以及數學呢?

如何在文字中使用 Palatino 字體以及數學呢?

我想在文件中使用 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

我建議您不要加載mathpplemathpazo、 和upgreek包,而是加載newpxtextnewpxmath包。

在此輸入影像描述

\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 Pagellaor 。newpxtext其中一些小型股的比例有所偏差。這對於 來說尤其明顯o.sc。以下是與option和option (or )O\textsc{o}o的比較:newpxtextlargescTeX Gyre Pagellamathpazoscosf

在此輸入影像描述

如果沒有largesc選項,newpxtext則與 Pagella 相同。但是,均勻縮放largesc對字母的固有比例沒有幫助(它的高度太寬)。對我來說,粗體/斜體小型大寫字母的可用性並不能彌補這一點。相關討論位於https://tex.stackexchange.com/a/385262/140850

使用時pdflatexnewpxmath與我的 FPL 字體一起使用:

\usepackage[sc]{mathpazo} % or option osf
\usepackage{newpxmath}

當使用xelatexlualatex我使用真正的 Palatino (Linotype) 作為文本或我的FPL新:

\usepackage{unicode-math}
\setmainfont{FPL Neu}
\setmathfont{Asana Math} % alternative: TeX Gyre Pagella Math

這是O\textsc{o}o該字體的序列和改進的@符號:

在此輸入影像描述

相關內容