Sign up ×
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.

Possible Duplicate:
How to mix accents from different fonts?

In TeXBook, exercise 9.6 Knuth asks to type Pal Erdos with needed accents in \tt font.

The answer from the key is {\tt P\'al Erd{\bf\H{\tt o}}s}.

However this technique doesn't work in LaTeX. How to apply this to LaTeX?

share|improve this question

marked as duplicate by Joseph Wright Jul 19 '11 at 11:16

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Also note that this might not be required for LaTeX at all. Simply load a modern font. Try \usepackage[T1]{fontenc}\usepackage{lmodern}. The \H macro is defined differently by plainTeX and LaTeX. – Martin Scharrer Jul 18 '11 at 9:50

1 Answer 1

up vote 1 down vote accepted
{\ttfamily P\'al Erd{\normalfont\bfseries\H{\ttfamily o}}s}
share|improve this answer
Thank you very much, egreg! This works! It's exactly what I've looked for. – outmind Jul 20 '11 at 14:59
However could you please comment the difference? And the problem with the former? – outmind Jul 20 '11 at 15:00
It works well with the "new" font selection commands, but it won't with the obsolete ones. – egreg Jul 20 '11 at 15:17
Thank you! Thank you! Thank you! – outmind Jul 20 '11 at 15:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.