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 want some words to always be in upright teletype (they are defined to be something specific). If the sentence is emphasised and this word appears I do not want the text to be italic teletype, but remain upright teletype. In this case is it OK to use {\tt word} to achieve this effect or is there some better way?

\emph{A sentence that contains the {\tt word} yet it remains upright teletype.}
share|improve this question
add comment

1 Answer 1

up vote 18 down vote accepted

\tt is obsolete with LaTeX2e, it's just defined by classes. So, if you use a class that's still supporting it, it would work. But I would not recommend it. Classes like article.cls define for compatibility:

\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}

I would use \normalfont\ttfamily. Further, I wouldn't use it in the body text but in the preamble, defining a logical markup like \code.

share|improve this answer
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.