Article View: aus.computers.linux
Article #57802Re: latex: how to typeset program code?
From: Scott Yang
Date: Wed, 28 Aug 1996 00:00
Date: Wed, 28 Aug 1996 00:00
23 lines
1482 bytes
1482 bytes
On Wed, 28 Aug 1996, Kent Tong wrote:
> I'm learning to use LaTeX to typeset some simple documents but
> have no idea on how to typeset say a code segment written in
> a programming language (with indentation). I'm not happy with
> the verbatim env. I want something that looks just like the
> handouts from the lecturer. Any LaTeX gurus out there who can
> help me out? TIA!
You can use the environment ``verbatim''
\begin{verbatim}
% Your source code or whatever
\end{verbatim}
+-------------------------------------------------------+
| Scott Yang - School of Computer Science & Engineering | _--_|\
| University of New South Wales, Australia | / OS/2 \
| | \_.--._*
| Internet - http://www.cse.unsw.EDU.AU/~s2170607/ | v
+-------------------------------------------------------+
Technical Details
Message-ID:
<Pine.ULT.3.91.960828155704.6997B-100000@cello34.orchestra.cse.unsw.EDU.AU>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<32230CFC.609EFA4@wr.com.au>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 102983,a24f35f58b67a9a5 X-Google-Attributes: gid102983,public From: Scott Yang <s2170607@cse.unsw.EDU.AU> Subject: Re: latex: how to typeset program code? Date: 1996/08/28 Message-ID: <Pine.ULT.3.91.960828155704.6997B-100000@cello34.orchestra.cse.unsw.EDU.AU> X-Deja-AN: 176948094 references: <32230CFC.609EFA4@wr.com.au> x-sender: s2170607@cello34.orchestra.cse.unsw.EDU.AU content-type: TEXT/PLAIN; charset=US-ASCII organization: University of New South Wales mime-version: 1.0 newsgroups: aus.computers.linux