[Tugindia] LaTeX question: Verbatim font size adjustment.

Shakthi Kannan shakthimaan at gmail.com
Fri Oct 16 08:17:51 CEST 2009


Hi,

--- On Fri, 2009-10-16 at 10:28 +0530, Manjunatha G. wrote:
| I use the \begin{verbatim} ... \end{verbatim} block when I want to
| display computer output. It works fine, but I want to be able to
| control the font size in the block - how do I do that?
\--

If you want more control, you can define your own font with size,
colour, attributes using:

  \newcommand{\bigsize}[1]{\color{red}{\fontsize{60}{60}{\textbf
      {\selectfont #1}}}}

  \newcommand{\medsize}[1]{\fontsize{25}{25}\selectfont #1}

  \newcommand{\command}[1]{\textsl{\textit{#1}}}

and you can use it as:

  \bigsize{Nice}
  \medsize{output with}
  \command{$ /bin/dmesg}

SK

-- 
Shakthi Kannan
http://www.shakthimaan.com


More information about the tugindia mailing list