[Tugindia] Text alignment in Alltt environment
S. venkataraman
svenkat at ignou.ac.in
Mon Apr 19 07:33:31 CEST 2010
On Thu, Apr 15, 2010 at 12:24 PM, Shashi Kumar <
shashi.kumar at glyphinternational.com> wrote:
> Hi,
>
> I am using alltt environment but text do not align properly as desired. Is
> there any option to make them fix.
>
> Below is the code.
>
> \begin{alltt}
> glBegin(GL\_TRIANGLE\_STRIP);
> for(i = 0; i \(<=\) p; i++)
> \{
> glVertex3f( R * cos( (float)(j+1)/q * PI/2.0 ) * cos( 2.0 *
> (float)i/p * PI ),
> R * sin( (float)(j+1)/q * PI/2.0 ),
> R * cos( (float)(j+1)/q * PI/2.0 ) * sin( 2.0 *
> (float)i/p * PI ) );
> glVertex3f( R * cos( (float)j/q * PI/2.0 ) * cos( 2.0 *
> (float)i/p * PI ),
> R * sin( (float)j/q * PI/2.0 ),
> R * cos( (float)j/q * PI/2.0 ) * sin( 2.0 *
> (float)i/p * PI ) );
> \}
> \end{alltt}
>
> Please advise.
>
>
> Regards,
> Shashi Kumar
>
>
>
> -
> 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
>
Don't use alltt. As Prof. Kannan Moudgalya said, it is better to use
listings package. It recognises all the C key words and
typesets them in a different typeface. You can even add some
of your own key words. It is a really powerful package.
Check it out.
Best,
Venkataraman
More information about the tugindia
mailing list