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 have documentation with some mathematics, that I want to convert via LaTeX, but I'd also like to keep it as much readable in source as possible (as it's more for me than anybody else). Since I can write many mathematical symbols directly with digraphs in vim and they show correctly in fonts I use, I would like to use them instead of the TeX commands. There is a package unicode-math that is supposed to do it, but it would need lualatex and does not work anyway (bug report).

Now I am really using just a handful of symbols. Is it possible, and if it is, how, to map the characters I want to use manually? I have looked at the inputenc documentation, but couldn't make much sense of it and didn't notice relevant examples. Or, alternatively, can I workaround the bug somehow?

share|improve this question
Welcome to TeX.sx! This seems a job for the newunicodechar package. Can you give a short example showing the "handful of symbols" you need? – egreg Jan 31 '13 at 14:39
up vote 10 down vote accepted

Getting around the bug is easy: Add \setmathfont{lmodern-math.otf} after loading unicode-math. Btw: unicode-math can also be used with xelatex.

And if you want to declare definitions for utf8-input you can do it like this:

\DeclareUnicodeCharacter{222B}{\int}%U+222B= integral
share|improve this answer
I tried both. Both worked, but lualatex didn't like some other things about the doxygen output, so I chose the later. – Jan Hudec Feb 1 '13 at 9:08

With the newunicodechar package you don't even need to hunt through tables of Unicode characters (this assumes pdflatex is used):




$ɑ + 𝜶 = β$

enter image description here

share|improve this answer
Thanks. I eventually used the raw \DeclareUnicodeCharacter as I see the codepoints in Vim anyway. – Jan Hudec Feb 1 '13 at 9:10

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.