Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!elroy.jpl.nasa.gov!jato!granite!dundas From: dundas@granite.jpl.nasa.gov (John Dundas) Newsgroups: comp.text.tex Subject: Help with verbatim in TeX Message-ID: <1990Nov19.181256.6683@jato.jpl.nasa.gov> Date: 19 Nov 90 18:12:56 GMT References: <0093FF01.F0DC8360@QMD.PHY.NIST.GOV> Sender: news@jato.jpl.nasa.gov Reply-To: dundas@granite.Jpl.Nasa.Gov (John Dundas) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 31 Nntp-Posting-Host: granite.jpl.nasa.gov (Warning: novice user ahead...) I am using the following macros in order to typeset code listings (taken from WEB book, p. 243): \chardef\other=12 \def\ttverbatim{\begingroup \catcode`\|=\other \catcode`\\=\other \catcode`\{=\other \catcode`\}=\other \catcode`\$=\other \catcode`\&=\other \catcode`\#=\other \catcode`\%=\other \catcode`\~=\other \catcode`\_=\other \catcode`\^=\other \obeyspaces \obeylines \tt} {\obeyspaces\global\let =\ } % from TeXbook, p. 381 \outer\def\verbatimcode{\par\ttverbatim\leftskip=0em\parskip=0pt \baselineskip=12pt\ttfinishcode} {\catcode`\|=0 |catcode`|\=\other % | is temporary escape character |obeylines % end of line is active |gdef|ttfinishcode#1^^M#2\endverbatimcode{#1#2|endgroup}} These macros generally work well except that blank lines are discarded. Can anyone suggest what to change to make blank lines appear as intended? Thanks in advance, please reply directly. John Dundas dundas@sapphire.jpl.nasa.gov