TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Why doesn't the \ttdefault change the font in the table? I want to change font for a single table only.

\caption{Some caption.}
test1 & test2 & test3 \\
test1 & test2 & test3 \\
test1 & test2 & test3 \\
share|improve this question
Welcome to TeX.sx! \ttdefault is not a font changing command; you probably want \ttfamily, put it just before the tabularx – egreg May 4 '13 at 12:35
up vote 5 down vote accepted

If you need to have the entire table, including the caption, typeset in monospaced font, you can achieve this by inserting the sequence


immediately following the \begin{table} instruction:

  \caption{The table's caption} \label{tab:tt}
  Header 1 & Header 2 \\ \hline
  1 & 2\\ \hline

enter image description here

share|improve this answer
The braces around the macro to be redefined can be omitted, but those around the replacement text shouldn't. Omitting them works in this case, but only because of the current implementation of \renewcommand; don't trust on it forever. – egreg May 4 '13 at 15:31
@egreg - thanks! – Mico May 4 '13 at 15:32

Your Answer


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.