# Some Greek characters are not displayed with chemgreek + fontspec + TeX Gyre fonts

Some Greek characters are not printed with chemgreek package when I use TeX Gyre fonts.

Test code:

\documentclass{article}

\usepackage{fontspec}
\newfontfamily\termes{texgyretermes-regular.otf}
\newfontfamily\schola{texgyreschola-regular.otf}
\newfontfamily\libertine{LinLibertine_R.otf}

\usepackage{chemgreek}
\selectchemgreekmapping{fontspec}

\begin{document}
{\termes Termes: \printchemgreekalphabet}
{\schola Schola: \printchemgreekalphabet}
{\libertine Linux Libertine: \printchemgreekalphabet}
\end{document}


The result with LuaTeX:

The result with XeTeX:

The results looks slightly different between engines, but the both lack gamma, epsilon, iota and phi with all but Linux Libertine.

I have found an answer mentioning the lack of complete Greek support in TeX Gyre but I confirmed that these fonts contain "basic" Greek characters above.

Can I use chemgreek and TeX Gyre without missing characters?

• Welcome to TeX.SX! The chemgreek package apparently assumes that \textphi maps to a Greek letter, but xunicode defines it as U+0278 LATIN SMALL LETTER PHI (it's thought for IPA). Not the only wrong case. – egreg Nov 15 '16 at 10:58
• This will be fixed in chemgreek v1.1 – clemens Dec 20 '16 at 10:59

# Update

This behaviour is due to issues in chemgreek which are fixed in the 1.1 (2016/12/20) release. Where possible, you should update your TeX distribution to install the current release. If this is not possible, for example if you want to change only this one package or where you do not have the privileges to update the entire distribution, you will need to install the package locally. This option should be considered a last resort, since for more complex packages there may be package dependencies that will make local installation more complicated and error-prone.

The chemgreek package makes a few wrong assumptions: it assumes that \textgamma, \textepsilon, \textiota and \textphi map to the Greek characters, but they don't, as xunicode.sty defines them to be IPA characters (Latin small letter gamma, epsilon, iota and phi, respectively).

You can fix this, at least as far as chemgreek is concerned, by remapping the wrong targets:

\documentclass{article}

\usepackage{fontspec}
\newfontfamily\termes{texgyretermes-regular.otf}
\newfontfamily\schola{texgyreschola-regular.otf}
\newfontfamily\libertine{LinLibertine_R.otf}
\newfontfamily\tempora{Tempora}

\RenewDocumentCommand{\textgamma}{}{\symbol{"03B3}}
\RenewDocumentCommand{\textepsilon}{}{\symbol{"03B5}}
\RenewDocumentCommand{\textiota}{}{\symbol{"03B9}}
\RenewDocumentCommand{\textphi}{}{\symbol{"03C6}}

\usepackage{chemgreek}
\selectchemgreekmapping{fontspec}

\begin{document}

{\termes Termes: \printchemgreekalphabet}

{\tempora Tempora: \printchemgreekalphabet}

{\schola Schola: \printchemgreekalphabet}

{\libertine Linux Libertine: \printchemgreekalphabet}
\end{document}


I also added Tempora, but you can see that the coverage by TeX Gyre fonts is complete too.

By the way, chemgreek has a wrong alphabetical order, as it has chi after psi.

• I wish I'd get bug reports in such cases. I don't always spot questions on tex.sx... – clemens Nov 15 '16 at 11:47
• – egreg Nov 15 '16 at 12:47
• @clemens I'm sorry, I thought it was probably just my fault such as misunderstanding of setup options. – omasanori Nov 15 '16 at 13:57
• I've confirmed that the problem has been fixed on latest TL2016. Thank you @egreg and @clemens! – omasanori Dec 22 '16 at 8:39