0

I want to typeset the word α-aminoacid and the α character is not shown in the compiled pdf file.

I compile using XeTeX and I found only solutions for typesetting greek letters that switch language or writing system, but that's weird to do in mid of a word. I'm also aware of math mode, but this is not math.

  • It's not that uncommon to use "math mode" outside of math. For instance, if you want to write $2^{\text{nd}}$ and similar things using sub/superscripts, you use math mode. – Charles Staats Apr 18 '18 at 22:08
  • You can see these two links: (chemistry) tex.stackexchange.com/questions/76250/… and tex.stackexchange.com/questions/69901/… – Sebastiano Apr 18 '18 at 22:10
  • If you use XeTeX one way is \usepackage{fontspec} \setmainfont{DejaVu Serif}, then just write "α-aminoacid" using UTF8 codes (e.g., Ctrl+Shift+u03b1 type α in some Linux editors) . The font obviously should be one with the greek glyphs (e.g,., do not use the cmr10 for this) . – Fran Apr 18 '18 at 23:19
  • Also LuaLaTeX, not just XeTeX. – user139954 Apr 18 '18 at 23:33
1

I used textgreek package and command \textalpha to insert α.

1

There are several issues. One of them involves font encoding. Another involves the compiler. Finally, it involves the font (not all of them have the alpha character in the correct Unicode location).

I suggest that you use LuaLaTeX (or XeTeX), which use only utf-8. Then it is a matter of using acceptable fonts. Here is one example:

\documentclass{article}
% compile using lualatex, which uses utf-8.
\usepackage{fontspec}
\setmainfont{Libertinus Serif} % because it has the alpha character.
\begin{document}
% just type or paste from character map
α-aminoacid
\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.