Fonts and styles\tt

\ttCommand

Legacy math-mode declaration for switching subsequent symbols in the current group to monospace/typewriter style.

x \tt y
Available in
base, textmacros
Kind
declarative
Allowed mode
math, text
Frequency
0.05% of corpus formulasrank 131 of 263
Commonality
low
Tags
presentation, discouraged
Renderer support
PackageMathJaxKaTeXXeTeX
baseMathJax: FullKaTeX: FullXeTeX: Full
textmacrosMathJax: FullKaTeX: FullXeTeX: Full
About the test scope

Syntax#

\tt

Takes no arguments. Same argspec in base and textmacros. Reading argspecs

Examples#

base

{x \tt y} z

textmacros

\text{\tt x}

Package variants#

PackageSignatureAllowed modeNotes
basemathLegacy math-mode declaration for switching subsequent symbols in the current group to monospace/typewriter style.
textmacrostextLegacy declaration that switches following text to monospaced/typewriter styling until the current group ends.

In TeXForm#

TeXForm parses this entry as declarative syntax; the package determines its argument specification.

Equivalent forms#

  • \mathtt{#1}approximate

    Prefix command alternative for math mode

  • \texttt{...}approximate

    \texttt is a command with arguments, whereas \tt is declarative.

  • {\ttfamily ...}exact

See also#

Test cases#

base
InputCaseMathJaxKaTeXXeTeX
{\tt a}Positive · baselinePassPassPass
textmacros
InputCaseMathJaxKaTeXXeTeX
{\tt a}Positive · baselinePassPassPass
All 80 in Fonts and styles