16

Why are non-Latin characters not displayed in formulas, even when using XeLaTeX?

\documentclass{article}
\usepackage{xltxtra}

\begin{document}

$\omega$ %displyed  
$ω$ %not displyed

\end{document}

A complementary for following answers:

You can use the following sites to copy and paste a lot of math symbols directly to your tex file, using unicode-math package:

Beside more readability in your markup you have not to search for a specific package that provide a special symbol.

4

2 Answers 2

28

You can't use non-latin alphabets in math formulas for font reasons, even XeTeX use traditional Type1/MetaFont math fonts by default.

You can, however, use unicode-math package with OpenType math fonts:

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{Latin Modern Math}
\begin{document}

$α + β + γ + δ = ε$

\[
∫f(x)dx = ∑_k Λ_k
\]

\end{document}
8
  • @ Is unicode-math stable and reliable enough? Can I replace common math packages with it? May 7, 2012 at 10:05
  • @Reza: Just use it. It is good enough.
    – Leo Liu
    May 7, 2012 at 11:29
  • It is not quite perfect yet though (the version in TeX Live 2012 should be significantly improved). On the other hand, Unicode mathematics is so much nicer to type/read that I don't really care about the bad typesetting.
    – Caramdir
    May 18, 2012 at 4:07
  • @Caramdir: how do you type that nicely? Do you have a space cadet keyboard, or is there some trick that I am not aware of to type math symbols on a regular keyboard without intensive keymap modding? May 27, 2012 at 18:36
  • 3
    @FedericoPoloni Using the Neo keyboard layout (I actually imported a German keyboard, as the US keyboard has a slightly different physical layout, that makes Neo uncomfortable to use.) See also tex.stackexchange.com/questions/1979/…
    – Caramdir
    May 27, 2012 at 18:56
15

Not at all difficult:

\documentclass[a4paper]{article}
\usepackage{fontspec}

\mathcode`ω=\omega

\begin{document}

$\omega=ω$

\end{document}

Repeat for all the symbols you need, along the same path. However, switching to unicode-math might be handier:

\documentclass[a4paper]{article}
\usepackage{unicode-math}
\setmathfont{Latin Modern Math}

\begin{document}

$\omega=ω$

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .