🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #4167

Re: Inserting text directly in ditroff output

#4167
From: John Mackin
Date: Tue, 03 Nov 1987 11:20
29 lines
1720 bytes
In article <52@blipyramid.BLI.COM>,
	mao@blipyramid.BLI.COM (Mike Olson) writes:
> In article <3696@ptsfa.UUCP>, Ken Keirnan writes:
> > 	Ditroff [has] an escape sequence that allows passing source lines
> > transparently to ditroff's output.  This is the transparent line escape
> > "\!".
> 
> this works very well, so long as you don't try to use it in a diversion.  
> [...]
> in cases like this, escape the [exclamation mark] (\\!).

Mike's suggestion is correct.  Unfortunately, the number of backslashes
you need to use depends on the number of times the text is going to be
scanned -- something which is by no means obvious in advance, and varies
with different macro packages, keep types, etc.  A general method is to
use the following macro, by Mark Shand (now shand@cad.unsw.oz.AU):

.de !!
.ie '\\n(.z'' \!\\$1
.el \!.!! "\\$1
..

Then just .!! "anything at all".

John Mackin, Basser Department of Computer Science,
	     University of Sydney, Sydney, Australia

john@basser.oz.AU (john%basser.oz.AU@UUNET.UU.NET)
{uunet,hplabs,mcvax,ukc,nttlab}!munnari!basser.oz!john
Technical Details
Message-ID: <1113@basser.oz>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!munnari!otc!metro!basser!john
References: <3457@trwrb.UUCP> <3696@ptsfa.UUCP> <52@blipyramid.BLI.COM>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!munnari!otc!metro!basser!john
From: john@basser.oz (John Mackin)
Newsgroups: comp.text
Subject: Re: Inserting text directly in ditroff output
Message-ID: <1113@basser.oz>
Date: Tue, 3-Nov-87 06:20:57 EST
Article-I.D.: basser.1113
Posted: Tue Nov  3 06:20:57 1987
Date-Received: Sat, 7-Nov-87 09:18:24 EST
References: <3457@trwrb.UUCP> <3696@ptsfa.UUCP> <52@blipyramid.BLI.COM>
Reply-To: john@basser.oz (John Mackin)
Organization: Dept of Comp Sci, Uni of Sydney, Australia
Lines: 29
Summary: a more general method