Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!rice!news From: dorai@tone.rice.edu (Dorai Sitaram) Newsgroups: comp.text.tex Subject: Re: TeX and poetry: \obeylines and \smallskip Message-ID: <1990Dec12.200329.10874@rice.edu> Date: 12 Dec 90 20:03:29 GMT References: <50833@eerie.acsu.Buffalo.EDU> Sender: news@rice.edu (News) Organization: Rice University, Houston Lines: 49 Cc: xiaofei@acsu.buffalo.edu dorai In article <50833@eerie.acsu.Buffalo.EDU> xiaofei@acsu.buffalo.edu (Xiaofei Wang) writes: >I have a problem: the \obeylines is very nice that it saves the >trouble of typing \par all the time but at the same time it prevents >spacing between stanzas of a poem so that one has to type \smallskip >all the time. The question is how to use the first feature and at the >same time avoid the second disadvantage? [I don't mind to type a few >\smallskip's but when I come across a long poem it is really inconvenient.] All one needs to do is modify plainTeX's definition of \obeylines to also recognize blank lines. Redefine \obeylines (or call it something else) as follows: \def\makeactive#1{\catcode`#113\relax} \def\adjustedpar{\par\mbox{}} \newdimen\adjustedparindent \adjustedparindent=0em \newskip\adjustedparskip \adjustedparskip=0pt plus 1pt {\makeactive\^^M \gdef\obeylines{% \parindent=\adjustedparindent% \parskip=\adjustedparskip% \makeactive\^^M% \let^^M=\adjustedpar% \leavevmode\hbox{}}} It causes all carriage-returns -- even the ones after blank lines -- in the body of an \obeylines to appear as newlines. Thus, you can omit all the \smallskip's in your example: >{\obeylines >I heard the trailing garments of the Night > Sweep through her marble halls! >I saw her sable skirts all fringed with light > From the celestial walls! > >\smallskip ^^^^^^^^^^<--- omit > >I felt her presence, by its spell of might, > Stoop o'er me from above; >The calm, majecstic presence of the Night, > As of the one I love. >[...] >} --d