TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using XeTeX because I want to use some fonts from my system. The next should work (I think).

I have this:





The compilation fails, although I get the document with the new font and some weird symbols arround it. What am I doing wrong?

share|improve this question
What exactly do you mean by "compilation fails"? And what weird symbols do you get? – Jan Hlavacek Nov 7 '10 at 3:38
This is an unrelated point, but you should probably use polyglossia rather than babel for XeLaTeX. – frabjous Nov 7 '10 at 3:48
In addition to Jan answer below, I strongly encourage you to read fontspec manual if you want to play with fonts in XeTeX/LuaTeX. – Khaled Hosny Nov 7 '10 at 12:07
When I asked this question, It was my first time playing with XeTeX. After Jan's answer I read the fontspec manual. It's a great package (and I think should be part of XeTeX). – Tomas Nov 8 '10 at 4:38
up vote 3 down vote accepted

If nothing else, the use of \renewcommand* is pretty suspect. I always use the fontspec package to select font. See if this works:



share|improve this answer
It doesn't work. It compiles but the text is missing. Is fontspec XeTeX specific? – Tomas Nov 7 '10 at 3:29
What system do you use? Which version of XeTeX/fontspec? Are there any messages you get from XeTeX during compilation that could be relevant to this problem? – Jan Hlavacek Nov 7 '10 at 3:37
Yes, fontspec is XeLaTeX specific. Do make sure too that you pick fonts you actually have installed! – frabjous Nov 7 '10 at 3:48
My fault. I was defining \font first when I should haven't. It does work now. – Tomas Nov 7 '10 at 4:20
@Tomas: Remember to actually try the example you post :-) – Joseph Wright Nov 7 '10 at 7:45

Your Answer


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.