Contents
How to use Unicode in LaTeX by LuaTeX or XeTeX?
The goal of this post is to gradually build up minimal examples for making Unicode text work in LaTeX documents by using LuaTeX or XeTeX. In the end, we will have produced PDF files containing CJK text (Chinese, Japanese, Korean or hangul text).
What happens to broken letters in LuaTeX and XeTeX?
According to my test, with XeLaTeX, broken letters are displayed as spaces, but with LuaLaTeX, broken letters are just gone. Now add the following line to the preamble and try again (we are specifying a font now):
Is there a way to compile Tex with LuaTeX?
Compiling with LuaLaTeX is similar. If TeXworks does not remember your choice next time you open the same file, add the following line to the beginning of the document file. If you are using Emacs AUCTeX, start by setting the file local variable TeX-engine to luatex . The produced PDF output may have some missing letters.
Is there a way to use LuaTeX in AUCTeX?
If you are using Emacs AUCTeX, start by setting the file local variable TeX-engine to luatex . The produced PDF output may have some missing letters. In particular, CJK texts are not displayed in the output.
How can I get XeTeX to print a character?
So XeTeX will again try to find the character in the font, where it is not available. The only way to get the character printed is to substitute the font for those special characters (also by way of ewunicodechar for example). But this may look rather ugly.
Can you make characters outside the ASCII range in Tex?
In TeX, characters outside the ASCII range can be constructed with commands like \\”a for ä, \\=a for ā, \\.n for ṅ etc. It seems this mechanism is not supported in XeTeX. You can still use those commands like \\d {m} to get a ṃ, but if it it’s not in the font, it will not be constructed from .m as in TeX, so they are of no help in XeTeX.
Are there any fonts that are encoded in Unicode?
Most of the modern fonts out there are encoded in Unicode, but provide only a subset of the whole range of glyphs defined in Unicode. Most lack the Latin Extended Additional range ( http://www.unicode.org/charts/PDF/U1E00.pdf ).