Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I've been trying to set a document using lualatex in my TeXLive 2010 installation. Unfortunately, the non-ASCII characters are left out from the output. In the following minimal document produces a PDF with no warnings or errors but it only contains the second line. Using the inputenc package results in an error Unicode char ... not set up for use with LaTeX.

\documentclass{minimal}
\begin{document}
číčí
abcd
\end{document}

pdflatex handles the document fine. My version of lualatex is

This is LuaTeX, Version beta-0.60.2-2010071421 (Web2C 2010) (rev 3736)

Thanks for any pointers.

EDIT: For bonus points, how would I use the Bitstream Charter fonts? I use the mathdesign package, but with them (and even when loading fontspec, fontenc and/or luaotfload), the non-ASCII characters are missing :/

\usepackage[bitstream-charter]{mathdesign}
share|improve this question

2 Answers 2

up vote 15 down vote accepted

You need to actually load a font that includes these characters. By default, lualatex uses the computer modern fonts. You can select a font with the fontspec package. Just loading fontspec without explicitly setting a font, makes lualatex use the latin modern fonts, which include the characters.

\documentclass{minimal}
\usepackage{fontspec}
\begin{document}
číčí
abcd
\end{document}

gives latin modern

You can load any OTF or TTF font with the fontspec package. For details see the fontspec manual. I do not know if there is an Unicode aware version of Bitstream Charter, but you can use Charis SIL, which is based on it:

\documentclass{minimal}
\usepackage[charter]{mathdesign}  % sets the math font
\usepackage{fontspec}
\setmainfont{Charis SIL}          % sets the document font
\begin{document}
číčí abcd $abcd$
\end{document}

Charis SIL and mathdesign

Note that you have to include mathdesign before \setmainfont so that it doesn't override the document font.

share|improve this answer
    
Thanks, this helps. However, how could I use Bitstream Charter? Does it also have an alternative? –  Roman Plášil Nov 27 '10 at 22:56
    
(edited to include the answer to that question) –  Caramdir Nov 28 '10 at 0:15

You cannot use any font package except fontspec if you want to enjoy the benefits of Unicode and OpenType. The version of Charter which is freely available is a non-Unicode Type 1 font, so you shouldn't use it. Use e.g. Charis SIL which is based on Charter.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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