
我正在使用newtxmath
之前使用有引擎的選項libertine
(Linux Libertine)pdflatex
,但切換到unicode-math
在xelatex
。
newtxmath
為我提供了一個漂亮的開放斜體 G,這似乎是數學的首選形式。我不知道如何得到unicode-math
它Libertinus 數學字體(Linux Libertine 的最佳選擇)。我挖了進去newtxmath.sty
但找不到任何有用的信息來說明該包如何打開 G。我搜尋了 Linux Libertine 字形表,也找不到它。
pdflatex
MWE 具有所需的開路 G:
\documentclass{standalone}
\usepackage[libertine]{newtxmath}
\begin{document}
\(g\)
\end{document}
xelatex
/ unicode-math
MWE 與常規 G:
\documentclass{standalone}
\usepackage{unicode-math}
\setmathfont{Libertinus Math}
\begin{document}
\(g\)
\end{document}
我能想到的可能的解決方案:
- 分析如何
newxmath
創建開放 g 並使用它 - 將開啟的 g 作為向量圖形導入,並使其成為數學字母(如果可能)
- 僅將 Linux Libertine(如果有)的 open g 與 Libertinus 一起使用。
答案1
Imho newtxmath 使用此字體並使用選項 libertine 作為 g
\documentclass{article}
\usepackage{unicode-math}
\setmathfont{Libertinus Math}
\DeclareFontFamily{OML}{nxlmi}{\skewchar \font =127}
\DeclareFontShape{OML}{nxlmi}{m}{it}{
<-6.3> nxlmi035
<6.3-8.6> nxlmi037
<8.6-> nxlmi03
}{}
\DeclareSymbolFont{gletters}{OML}{nxlmi}{m}{it}
\DeclareMathSymbol{g}{\mathalpha}{gletters}{`g}
\begin{document}
\(abc fg \)
\end{document}
答案2
newtxmath
您可以透過宣告符號來使用開啟的 g from 。然而,該fd
文件包含一些\if
必須事先聲明的語句;但可以直接定義字體形狀。 (可能不適用於大膽的數學)
\documentclass{article}
\usepackage{unicode-math}
\setmathfont{Libertinus Math}
\DeclareFontFamily{U}{ntxmia}{\skewchar\font=127 }
\DeclareFontShape{U}{ntxmia}{m}{it}{<->nxlmia}{}
\DeclareFontShape{U}{ntxmia}{b}{it}{<->nxlbmia}{}
\DeclareSymbolFont{lettersA}{U}{ntxmia}{m}{it}
\SetSymbolFont{lettersA}{bold}{U}{ntxmia}{b}{it}
\DeclareMathSymbol{g}{\mathord}{lettersA}{49}
\begin{document}
$\mitg$ $g$
$\mathbfit{g}$ \boldmath$g$\unboldmath
\end{document}