[Tex/LaTex] Latin Modern and Greek, an issue

fontsgreeklatin-modern

Here is the code:

\documentclass{article}
\usepackage[vmargin=1in]{geometry}
\usepackage{xfrac,fontspec,unicode-math}
\setmathfont[version=lm]{Latin Modern Math}
\setmathfont[version=cambria]{Cambria Math}
\usepackage{xgreek}

\begin{document}

\setmainfont{Latin Modern Roman}
\mathversion{lm}
\section*{Latin Modern}
This is a greek text Ελληνικό Κείμενο
$\cos φ$

\setmainfont{Cambria}
\mathversion{cambria}
\section*{Cambria, Cambria Math}
This is a greek text Ελληνικό Κείμενο
$\cos φ$
\end{document}

But in the output the Greek letters are missing, when I use Latin Modern!! In Cambria mode I have no problem with the Greek letters.

Best Answer

Latin Modern doesn't support Greek. A similar set of fonts is provided by CMUnicode.

\documentclass{article}
\usepackage[vmargin=1in]{geometry}
\usepackage{unicode-math}

\setmainfont{CMU Serif}
\setmathfont[version=lm]{Latin Modern Math}
\setmathfont[version=XITS]{XITS Math}

\usepackage{xgreek}

\begin{document}

\mathversion{lm}
\section*{CMU Serif}
This is a greek text Ελληνικό Κείμενο
$\cos φ$

\setmainfont{STIX}
\mathversion{XITS}
\section*{STIX, XITS Math}
This is a greek text Ελληνικό Κείμενο
$\cos φ$
\end{document}

enter image description here

Related Question