4

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.

1
  • Try CMU for a matching Greek face. Doesn’t come in multiple optical sizes like LM, though. Nov 23, 2013 at 16:21

1 Answer 1

6

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .