如果使用 unicode-math,請將希臘字母替換為其變體

如果使用 unicode-math,請將希臘字母替換為其變體

什麼時候unicode 數學使用時,用其變體替換例如希臘字元不會像以前那樣工作:

\let\phi\varphi

使用 unicode-math 實現相同目的的方法是什麼?


最小的例子:

\documentclass[a4paper]{article}
\usepackage{fontspec}
\usepackage{unicode-math}

%\setmathfont{MnSymbol}
%\setmathfont[range=\mathit/{num,latin,Latin,greek,Greek}]{MinionPro-It}

\let\phi\varphi
\let\epsilon\varepsilon

\begin{document}

\noindent
varphi: $\varphi$ works!\\
phi: $\phi$ should look the same, but does not!\\
I actually want to fix the missing epsilon in MinionPro:\\
varepsilon: $\varepsilon$ works!\\
epsilon: $\epsilon$ doesn't!\\

\end{document}

在此輸入影像描述

答案1

正如您在其他帖子的答案中可以看到的,您必須在文件開始後定義符號。

% arara: lualatex

\documentclass[a4paper]{article}
\usepackage{unicode-math}
\AtBeginDocument{%
\let\phi\varphi
\let\epsilon\varepsilon
}

\begin{document}    
    \noindent
    varphi: $\varphi$ works!\\
    phi: $\phi$ should look the same, but does not!\\
    I actually want to fix the missing epsilon in MinionPro:\\
    varepsilon: $\varepsilon$ works!\\
    epsilon: $\epsilon$ doesn't!\\  
\end{document}

相關內容