[XeTeX] Problem with greek characters in math

Jonathan Kew jonathan_kew at sil.org
Wed Feb 20 18:12:58 CET 2008


On 20 Feb 2008, at 4:12 pm, gmoutsin at physics.auth.gr wrote:

> I should say in advance that i have almost no experience with Tex.  
> So my problem
> is the following.
>
> When i compile this:
>
> \documentclass{article}
> \begin{document}
> abcdef (line 1) \newline
> αβγδεζ (line 2) \newline
> $ \alpha \beta \gamma \delta \epsilon \zeta$ (line 3)
> \end{document}
>
> logically i get the first and the third line correct but not the  
> second (the
> second has the same greek letters as in the math mode).
>
>
> However when i use:
>
> \documentclass{article}
> \usepackage{fontspec}
> \usepackage{xunicode}
> \usepackage{xltxtra}
> \setromanfont{FreeSerif}
> \setsansfont{FreeSans}
> \setmonofont{FreeMono}
> \setmainfont{DejaVuSans}

Note that fontspec's \setmainfont is a synonym for \setromanfont, so  
it's pointless to give both.

> \usepackage{amsmath}
> \usepackage{amsfonts}
> \usepackage{latexsym}

Remove these to simplify your test case (I don't think they're  
relevant here).

> \begin{document}
> abcdef (line 1) \newline
> αβγδεζ (line 2) \newline
> $ \alpha \beta \gamma \delta \epsilon \zeta$ (line 3)
> \end{document}
>
> I get correctly the first two lines but nothing in the math mode.

I tried this and all three lines appeared fine.

Could you confirm what TeX distribution you're using, and the  
versions of the packages (especially fontspec, I guess). The .log  
file from your job should indicate this.

Are there any error messages in the log file -- e.g., "Missing  
character" warnings?

JK



More information about the XeTeX mailing list