Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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
add comment

2 Answers

Before you load the offending package, put

\let\Horig\H

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
add comment

Unicode to the rescue:

\usepackage{ifxetex,ifluatex}
\ifxetex
\else\ifluatex
\else
   % We use inputenc.sty only if we aren't using LuaTeX or XeTeX
  \usepackage[utf8]{inputenc}
\fi\fi
% [...]
\begin{document}
[...] 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
1  
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
add comment

Your Answer

 
discard

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.