Article View: comp.text
Article #97Re: What features would you like in GNU troff?
From: Liam R. Quin
Date: Sun, 18 Jun 1989 13:55
Date: Sun, 18 Jun 1989 13:55
52 lines
3076 bytes
3076 bytes
In article <13759@ncoast.ORG> allbery@ncoast.ORG (Brandon S. Allbery) writes:
>As quoted from <25@nx32s.anduk.co.uk> by lee@anduk.co.uk (Liam R. Quin):
>| [...] ( and . are not possible in the first character of a [troff] name
>| nearly 100 names are pre-defined. On the other hand, some control
>| characters are allowed....
>Beg pardon, but the only restriction I've found is that ( can not be used as
>a single-character name; it is possible to define a macro called ".F", for
>instance, and call it as "..F".
I was wrong, sorry. You are not the only person to point this out.
The version of ditroff I checked originally had been hacked badly...
Even so, defining a number register or string whose name starts with a
dot is not a good idea, because all of the read-only number registers
do this (as in \n(.s, for example).
But the number of names you can have *is* limited, and not simply by
the name-space but by a built-in limit on the size of a (linear-searched)
symbol table.
>[...] I've not found a need to define "." as a
>macro, but it could be useful e.g. to monitor memory usage as you define
>macros, since troff will not only stop defining at .., it will execute the
>macro called "." if it exists; make "." do a ".pm" for a quick memory-usage
>debug check. (Or ".rn pm .".)
No, you have to do
.de xx .
to get this behaviour.
If you want it, I think I still have tmac.debug, and also a sed(?) script,
for tracing troff. It monitors every nr/ds/de, and every call to every
user-defined macro (xx, say) prints
.xx "a1" "" "" "" "" "" "" "" ""
or whatever. I haven't needed it in a couple of years, as I now use a
version of troff that can print a much better debugging trace into the
intermediate file.
It's sometimes useful to define . and .. as macros if you are running a
version of troff that can print warnings, as pic tends to put out lines
starting with ..., and troff might say something like
troff: pic.in: 34: warning call to undefined macro ".." ignored
The -mm package also uses some ``commenting conventions'' which involve
things that are not comments getting ignored, so it can be useful there,
too.
>++Brandon
Maybe I should be --Lee :-( :-(
Lee
--
Lee Russell Quin, Unixsys UK Ltd, The Genesis Centre, Birchwood,
Warrington, ENGLAND, WA3 7BH; Tel. +44 925 828181, Fax +44 925 827834
lee%anduk.uucp@ai.toronto.edu; {utzoo,uunet}!utai!anduk!lee
UK: uu.warwick.ac.uk!anduk.co.uk!lee
Technical Details
Message-ID:
<26@nx32s.anduk.co.uk>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcvax!ukc!warwick!anduk!leeReferences:
<JJC.89May31220314@jclark.UUCP> <742@dtscp1.UUCP> <10959@orstcs.CS.ORST.EDU> <21@nx32s.anduk.co.uk> <762@dtscp1.UUCP> <25@nx32s.anduk.co.uk> <13759@ncoast.ORG>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcvax!ukc!warwick!anduk!lee From: lee@anduk.co.uk (Liam R. Quin) Newsgroups: comp.text Subject: Re: What features would you like in GNU troff? Message-ID: <26@nx32s.anduk.co.uk> Date: 18 Jun 89 13:55:16 GMT References: <JJC.89May31220314@jclark.UUCP> <742@dtscp1.UUCP> <10959@orstcs.CS.ORST.EDU> <21@nx32s.anduk.co.uk> <762@dtscp1.UUCP> <25@nx32s.anduk.co.uk> <13759@ncoast.ORG> Reply-To: lee%anduk.uucp@ai.toronto.edu (Liam R. Quin) Distribution: comp Organization: Unixsys (UK) Ltd, Warrington, England Lines: 52