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 utf-8 characters like "ğ" or "ı" in math-mode in LaTex, but it does not render the characters as it should. Outside of math-mode I do not have this problem.

My preamble with respect to font and input encoding is:


Any pointers on how to fix this problem for math-mode?

share|improve this question

migrated from stackoverflow.com Aug 2 '12 at 14:00

This question came from our site for professional and enthusiast programmers.

What font(s) are you using? Could you post a compilable example which demonstrates the problem? – Loop Space Aug 2 '12 at 14:02
Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. – Werner Aug 2 '12 at 16:12
Should the first have the same output as $\hat{g}$? – egreg Aug 2 '12 at 17:09
Normally no math font provides such characters. Supported characters are normal math symbols. – Marco Daniel Aug 3 '12 at 15:48

First of all be warned, that it is not recommended to use such special chars in your math source code, as they are very hard to distinguish from each other. For example look at ğ (\breve{g}) and ǧ (\check{g}) or ı (dottless i U+0131) and ι (\iota).

If you still need it, the way to go these days is to use either xetex or luatex for compilation and the unicode-math package. In this example, my math font does not contain a native character ğ, so I also have to declare it with \newunicodechar:


\setmathfont{XITS Math}

\newunicodechar{ğ}{\ifmmode\breve{g}\else ğ\fi}

    Text-mode: ğ,ı and math-mode: $ğ,ı$.
share|improve this answer

Your Answer


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