3

I've been having trouble typesetting the character gamma using the textgreek package. Using textgreek, the command for the character is \textgamma. However, when using fontspec in XeLaTeX (on Mac OS X 10.11, MacTeX 2015), the wrong character is inserted into the document. Instead of inserting U+03B3, the gamma character desired, it inserts U+1041C, a character that Computer Modern doesn't even have. When specifying a different font, like Baskerville or Times New Roman, the character is visible. If you comment out fontspec and still compile with XeLaTeX, the correct gamma is used.

Here is the minimal working example:

\documentclass[letter,reqno]{amsart}

\usepackage{textgreek}
\usepackage{fontspec}

%\setmainfont[Ligatures=TeX]{Times New Roman}
%\setmainfont[Ligatures=TeX]{Baskerville}
%\setmainfont[Ligatures=TeX,BoldFont={Crimson Semibold},ItalicFont={Crimson Italic}]{Crimson Roman}

\begin{document}

\title{Why isn't text gamma working?}
\maketitle

\textgamma-Proteobacteria

\textgamma\ phosphoanhydride

\textgamma\ radiation

\textgamma-amino-butyric acid (GABA)

\end{document}

Commenting out the fontspec line

1 Answer 1

3

fontspec (more precisely xunicode) redefines \textgamma. You can reset the command but imho it would be better to drop textgreek, use a font with greek characters and the command \textgrgamma from xunicode.

\documentclass[letter,reqno]{amsart}
\usepackage[LGR]{fontenc}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Times New Roman}
%\setmainfont[Ligatures=TeX]{Baskerville}
%\setmainfont[Ligatures=TeX,BoldFont={Crimson Semibold},ItalicFont={Crimson Italic}]{Crimson Roman}
\DeclareTextCommand\textgamma{EU1}{{\fontencoding{LGR}\fontfamily{cmr}\selectfont g}}
\begin{document}
\textgamma-Proteobacteria

\textgrgamma-Proteobacteria
\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 .