Take the 2-minute tour ×
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.

I have a large table in the tabular environment and I need to make all the text verbatim font. I know I can use \begin{verbatim}...\end{verbatim} for all the entries but they are just too much for me to do. It might take a whole day from me. I know there is definitely a way out. I would be very grateful if I can get help from somebody. Thanks in advance!

share|improve this question
13  
Verbatim font? Do you actually need verbatim or is the font sufficient enough? Than {\ttfamily\begin{tabular} … \end{tabular}} would suffice. –  Qrrbrbirlbel Jan 5 '13 at 18:22
    
Thanks. The font is what I need. –  Fizzle Jan 5 '13 at 23:12

1 Answer 1

The verbatim environment uses the typewriter font, which can be used in LaTeX using \textt{...} or {\ttfamily ... }. In case you need to type symbols that have a predefined meaning in LaTeX like $, you could (depending on the symbol) simply escape them like so \$ or use the verb command: \verb+$+.

For the sake of completeness, here an example using \ttfamily

\documentclass{article}
\begin{document}

{\ttfamily                           % begin of scope
\begin{tabular}{llr}
\hline
\multicolumn{2}{c}{Item}             \\
\cline{1-2}
Animal    & Description & Price (\$) \\
\hline
Gnat      & per gram    & 13.65      \\
          & each        & 0.01       \\
Gnu       & stuffed     & 92.50      \\
Emu       & stuffed     & 33.33      \\
Armadillo & frozen      & 8.99       \\
\hline
\end{tabular}
}                                    % end of scope

\end{document}

Output

Image

share|improve this answer

Your Answer

 
discard

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.