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 am trying to write Erd\H{o}s in a LaTeX file but it gives me an error and says "\mathbb allowed only in math mode." Apparently I use a library that has other plans for \H is there something I can do?

share|improve this question

Before you load the offending package, put


and then you can say Erd\Horig{o}s

share|improve this answer
You are a genius, it worked!!! – Gil Kalai Feb 13 '12 at 3:03

Unicode to the rescue:

   % We use inputenc.sty only if we aren't using LuaTeX or XeTeX
% [...]
[...] Erdős Pál [...]

Of course if you're currently not using UTF-8 for your .tex files, this isn't exactly the easiest solution, but it surely is the one that yields the most readable .tex source and it's not very painful as long as you don't mind copy/paste from, say, Wikipedia for names with "unusual" characters in them.

Unfortunately this doesn't work with bibtex because it is... well... ancient.

share|improve this answer
This won't work for the OP, as ő will still be translated into \H{o} and the problem seems to be due to a redefined \H macro. – egreg Feb 13 '12 at 11:40

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.