# Replace greek letters with its variants in case unicode-math is used

When unicode-math is used, the replacement of e.g. greek characters with its variants does not work as before:

\let\phi\varphi


What is the way to achieve the same with unicode-math?

minimal example:

\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}


As can be seen in the answers to your other post, you have to define your symbols after the start of your document.

% 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}