[Tugindia] Verbatim like environment

Kannan Moudgalya kannan at iitb.ac.in
Sat Apr 3 14:20:47 CEST 2010


Dear Srikrishna, have you tried the listings package?  Kannan

Shashi Kumar wrote:
> Thank you, SriKrishna. It works well.
>
> Regards,
> Shashi
>
>
>
>
> From: Srikrishna Doraiswamy <srikrishnad at gmail.com>
> Reply-To: TUGIndia Mailing List <tugindia at tug.org>
> Date: Thu, 1 Apr 2010 10:21:09 -0500
> To: TUGIndia Mailing List <tugindia at tug.org>
> Subject: Re: [Tugindia] Verbatim like environment
>
> I think the best way to do what you want is to do something as follows
> include \usepackage{alltt}
>
> and in your file include the following, instead of the verbatim
>
> \begin{alltt}
> {\sf
> if (shr)
>   {
>      Angle += 5.0;
>      if (latAngle \(<\) 360.0) latAngle -= 360.0;
>      longAngle += 1.0;
>      if (longAngle \(>\) 360.0) longAngle -= 360.0;
>   }
>  }
> \end{alltt}
>
> This will give you the verbatim text, but with math ( which can be used by
> \(...\) ) and the {\sf...} will make it serif.
>
> Srikrishna
> _______________________________________________
> Home:        http://www.tug.org.in/
> TeX FAQ:     http://www.tex.ac.uk/faq
> unsubscribe: http://tug.org/mailman/listinfo/tugindia
>
> - 
> Disclaimer And Confidentiality Notice- This e-mail transmission and any
> attached
> documents, files, or previous e- mail messages attached to it, may contain
> information that is confidential. It is for the use of the intended
> recipient(s) only. If you have received this e-mail in error, please notify
> the sender immediately and then delete it. If you are not the intended
> recipient, you must not use, disclose, or distribute this e-mail without the
> senders prior permission. We have taken precautions to minimize the risk of
> transmitting software viruses, but we advise you to carry out your own virus
> checks on any attachment to this message. We do not accept liability for any
> loss or damage caused by software viruses.
>
>
>
> - 
> Disclaimer And Confidentiality Notice- This e-mail transmission and any attached
> documents, files, or previous e- mail messages attached to it, may contain
> information that is confidential. It is for the use of the intended
> recipient(s) only. If you have received this e-mail in error, please notify
> the sender immediately and then delete it. If you are not the intended
> recipient, you must not use, disclose, or distribute this e-mail without the
> senders prior permission. We have taken precautions to minimize the risk of
> transmitting software viruses, but we advise you to carry out your own virus
> checks on any attachment to this message. We do not accept liability for any
> loss or damage caused by software viruses. 
>
>
> _______________________________________________
> Home:        http://www.tug.org.in/
> TeX FAQ:     http://www.tex.ac.uk/faq
> unsubscribe: http://tug.org/mailman/listinfo/tugindia
>   


More information about the tugindia mailing list