[Tex/LaTex] the difference between \text, \textt and \texttt

fonts

LaTeX has a number of different commands which begin as \text and then end in a differing number of letter ts.

What do each of the following commands do?

  • \text
  • \textt
  • \texttt

Best Answer

  1. The \text command is defined by the amsmath package. The purpose is to be able to write words or phrases in math mode. It's quite similar to \mbox but has the advantage that it adapts the font size to the surrounding math style (display, text, script, scriptscript).

  2. \textt is not defined by LaTeX or any package I know.

  3. The \texttt command typesets its argument in teletype font (sometimes called typewriter or monospace font). The trailing tt is an abbreviation for teletype.