Sign up ×
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.

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! \ttdefault is not a font changing command; you probably want \ttfamily, put it just before the tabularx – egreg May 4 '13 at 12:35

1 Answer 1

up vote 4 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.