11

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.}
18

\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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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