1

For some reason, when I use the cm-unicode fonts, the "modifier letter right half ring" ʾ (U+02BE) appears at baseline height and uses a slightly different symbol to the one I was hoping for. I worry that it may be a fault in the font, but it could be me doing something wrong. In any case, the correct symbol, as you can hopefully tell, actually appears at the top of the line. Whatever version of Computer Modern XeLaTeX uses by default does not have this problem, as you can see here:

\documentclass[12pt]{article}
\usepackage{fontspec}
\newfontfamily{\newTT}[Mapping=tex-text]{cmuntt.otf}

\begin{document}

\begin{enumerate}
  \item
  \texttt{hāʾādām}
  \item
  {\newTT hāʾādām}
\end{enumerate}

enter image description here

Number 1 is correct, number 2 is not.

Since cm-unicode is fundamental to my document for many of the other symbols that I need, it occurred to me that the best way around this problem would be to define a new command using a \raisebox

\documentclass[12pt]{article}
\usepackage{fontspec}
\newfontfamily{\newTT}[Mapping=tex-text]{cmuntt.otf}
\newcommand{\glottal}{\raisebox{0.7ex}{ʾ}}

\begin{document}

{\newTT hā\glottal{}ādām}

\end{document}

Is there a convenient way for me to get LaTeX to align the top of my ʾ with the top of the line, so that it is definitely in the correct place?

P.S. The problem also applies to ʿ, the "modifier letter left half ring" (U+02BF). I should like to solve this problem for both characters.

Obviously the ideal solution would be a way to get the correct symbol out of cm-unicode if anybody knows it?

1

Here, I use the \belowbaseline feature of stackengine to set the top of the \glottal a distance of -\ht0 below the baseline (i.e., \ht0 above the baseline), where box 0 has been set with a capital X which reaches to the top of the line. If I used \abovebaseline, it would be the bottom of the \glottal aligned to that point, rather than the top.

\documentclass[12pt]{article}
\usepackage{fontspec,stackengine}
\newfontfamily{\newTT}[Mapping=tex-text]{cmuntt.otf}
\newcommand{\glottal}{\setbox0=\hbox{X}\belowbaseline[-\ht0]{ʾ}}

\begin{document}

{\newTT hā\glottal{}ādām}

{\LARGE\newTT hā\glottal{}ādām}

{\tiny\newTT hā\glottal{}ādām}

\end{document}

enter image description here

0

One possibility would be to make the character come from the default latin modern font. Both latin modern and cm-unicode are interpretations of the computer modern design, so it should be reasonably compatible

enter image description here

\documentclass[12pt]{article}
\usepackage{fontspec}
\newfontfamily{\newTT}[Mapping=tex-text,
]{cmuntt.otf}
\catcode`ʾ\active
\newcommandʾ{{\fontfamily\familydefault\selectfont\stringʾ}}
\begin{document}

\begin{enumerate}
  \item
  \texttt{hāʾādām}
  \item
  {\newTT hāʾādām}
\end{enumerate}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.