Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!csrd.uiuc.edu!s41.csrd.uiuc.edu!eijkhout From: eijkhout@s41.csrd.uiuc.edu (Victor Eijkhout) Newsgroups: comp.text.tex Subject: Re: Help with verbatim in TeX Message-ID: <1990Nov20.004749.24372@csrd.uiuc.edu> Date: 20 Nov 90 00:47:49 GMT References: <0093FF01.F0DC8360@QMD.PHY.NIST.GOV> <1990Nov19.181256.6683@jato.jpl.nasa.gov> Sender: news@csrd.uiuc.edu (news) Organization: UIUC Center for Supercomputing Research and Development Lines: 30 dundas@granite.jpl.nasa.gov (John Dundas) writes: >(Warning: novice user ahead...) Nothing to be ashamed of. And this is a tricky subject you're attacking. >I am using the following macros in order >to typeset code listings (taken from WEB book, p. 243): [verbatim macros deleted] >These macros generally work well except that blank lines are discarded. >Can anyone suggest what to change to make blank lines appear as intended? What happens is that a blank line generates a par, which doesn't do anything as the previous line end was also a \par. The remedy is to redefine \obeylines slightly: somewhere in \obeylines it says \def^^M{\par} Change this into \def^^M{\par\leavevmode} >Thanks in advance, please reply directly. Oops. >John Dundas >dundas@sapphire.jpl.nasa.gov Victor.