I am trying to get Unicode characters to compile into a PDF file using XeLaTeX. My MWE looks like this:
\documentclass[11pt]{article}
\begin{document}
Here is α, β, and finally γ.
\end{document}
When I compile to PDF I get
Here is , , and finally .
My Unicode characters do not show up. Could anyone point out my problem?
Best Answer
The default font, Computer Modern Roman, just does not have the glyphs for these Unicode characters. There are several possibilities to point out:
Math symbols
If the intended use of the characters is as shortcuts for
\alpha
,\beta
, etc., then use thenewunicodechar
package:Internationalised typesetting
If you're looking to typeset a document (or part of a document) in the Greek language, use the
polyglossia
package:Random usage
If you need these characters for occasional use in the normal text, you can also use the
fontspec
package withoutpolyglossia
to load a font that has the glyphs. You can do it either globally (change the font altogether) or just for these characters: