I’m typesetting a text with some math and Greek letters. LaTeX handles Greek letters just fine in math mode but I can’t get it to display the character ‘β’ using either direct input or the \b
macro provided by the chemmacros
package.
Here's a minimal example:
\documentclass{minimal}
\usepackage{fontspec}
\usepackage[greek=textgreek]{chemmacros}
\begin{document}
\iupac{\b-carotene} % doesn't work
\iupac{β-carotene} % doesn't work
β % doesn't work
\Chembeta % doesn't work
$\beta$ % works fine
\end{document}
I’m compiling the document with lualatex
.
Update
Using a different font (namely, Linux Libertine or Times New Roman) solves the problem. Does that mean the Latin Modern family has no support for upright Greek letters?
Best Answer
upgreek
works fine both with XeLaTeX and LuaLaTeX. Apparently it isn't clear fromchemmacros
' documentation though that setting the optiongreek=upgreek
does not loadupgreek
andgreek=textgreek
does not loadtextgreek
! The option exists to preventchemmacros
from choosing betweenupgreek
ortextgreek
automatically if either of them or both are loaded by the user. Using either option without loading the appropriate package usually throws an error likeHowever, when
fontspec
is loaded, too, the code silently fails with Latin Modern. (I should probably add some checking whether the needed packages are loaded.)