🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #6327

Re: [nt]roff problem: hanging tags

#6327
From: Michael Morrell
Date: Fri, 05 May 1989 18:29
29 lines
1424 bytes
The following changes seemed to work for me (note I can not replicate the
infinite loop when there is a comment on the "rm FD" line).
According to the documentation you should process diversions normally (i.e.,
in fill mode), then output them in no-fill mode to avoid further processing.

    Michael

    .de FB		\"File Begin section
    .if \w'\\$1'u+1m>\\n(mw .nr mw \w'\\$1'u+1m
    .nf		\"get output in fill mode
    .da FD		\"start diversion
    .ft R		\"put environment in sane state
    .ps 10
    .vs 12p
    .br		\"start a new paragraph
    .ti -\\n(mwu	\"dedent
    \\$1\t\c
    ..
    .de FS		\"Flush Section
    .in +\\n(mwu	\"set indentation to size of largest tag
    .ta \\n(mwu	\"set tab to size of hanging tag
    .nf		\"set no-fill mode
    .FD		\"output diversion
    .\" Adding a comment to the end of the next line causes an infinite loop!
    .\" Remove the macro request.
    .rm FD		\"test comment
    .in -\\n(mwu	\"dedent indent
    .nr mw 0	\"reset hanging tag size
    ..
Technical Details
Message-ID: <2610024@hpsal2.HP.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!hpda!hpcupt1!hpsal2!morrell
References: <4961@wiley.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!hpda!hpcupt1!hpsal2!morrell
From: morrell@hpsal2.HP.COM (Michael Morrell)
Newsgroups: comp.text
Subject: Re: [nt]roff problem: hanging tags
Message-ID: <2610024@hpsal2.HP.COM>
Date: 5 May 89 18:29:11 GMT
References: <4961@wiley.UUCP>
Organization: HP System Architecture Lab, Cupertino
Lines: 29