Article View: net.text
Article #548Re: extending (di)troff
From: edmoy
Date: Sat, 29 Jun 1985 20:53
Date: Sat, 29 Jun 1985 20:53
95 lines
4108 bytes
4108 bytes
In article <877@gloria.UUCP> colonel@gloria.UUCP (Col. G. L. Sicherman) writes:
>Two-character names must go! But we don't want to break anything. How
>about this:
>
> x one-character name
> \(xy two-character name
> \( xyzabc) n-character name
>
>After all, no two-character name begins with a space. This also allows
>
> \f( xyzabc) n-character font name
> \n( xyzabc) n-character number register
> \*( xyzabc) n-character string name
>
>and even
>
> \s( 12345) huge point size
>
>It's a little ugly, but it's workable. Comments?
>--
>Col. G. L. Sicherman
>...{rocksvax|decvax}!sunybcs!colonel
At UC Berkeley Computer Center, we have been running a modified version of
ditroff that does what you are talking about, but in a different way. If
on the command line, if you specify the -x option, ditroff uses what is
called expanded mode. In expanded mode, all commands, macros, diversions,
strings and number registers may have up to eight character names. Here
is an example:
.numreg margin 1i
.defstr astring I am a \f[genevaB]string\fP
.define header
'space \\n[margin]u
'nospace
..
.define footer
'beginpg
..
.when 0 header
.when -\n[margin]u footer
.divert text
this is \s[40]some text\s0, \*[astring].
.divert
.\" now use diversion
.text
In addition, the standard two character command names may be used also, with
the difference that
.nrXX3
now tries to execute the macro nrXX3, rather than set number register XX
to 3 (i.e., spaces are required to separate command and macros names from
arguments).
As you can see, I use square brackets to indicate variable size names for
\s, \f, \n, \* and \g. Also, for example, \fX and \f(XX works as before,
but now \s takes the same meaning \sN and \s(NN, with variant forms
\s+N, \s-N, \s(+NN and \s(-NN.
If the -x option is not specified, ditroff acts as before, for compatibility.
This version of ditroff also has many advanced features and many new
escape sequences. Just to name a few, there is kerning, right to left
printing, the escape sequence \?'expression'true'false' that works
like expression?true:false in the C language and four different kinds
of spaces (the normal breakable and paddable space, the unbreakable and
unpaddable space \ , and two new ones, the breakable but unpaddable space
and the unbreakable but paddable space).
The preprocessors for ditroff have also been modified to access the
typesetter description tables (just like ditroff), rather than have
it compiled in. And in the case of eqn, the various tuning constants
that it uses to position characters has been put into a table, so that
they may be tuned for each typesetter.
Now for the not so good news.
-----------------------------
This version of ditroff is currently only available on machines at UCB,
mainly the computer center machines. CSRG, who distribute 4BSD, are
considering distributing their own version of ditroff (on a separate
license), which has modifications in the graphics area. We are just
beginning to negotiate on the combination of these two versions of ditroff
to distribute some time in the future, so that there will be only one
version of ditroff for Berkeley.
Edward Moy
Academic Computing Services
University of California
Berkeley, CA 94720
edmoy@ucbopal.APRA
ucbvax!ucbopal!edmoy
Technical Details
Message-ID:
<250@ucbopal.CC.Berkeley.ARPA>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!bonnie!akgua!whuxlm!whuxl!houxm!ihnp4!mhuxn!mhuxr!ulysses!allegra!mit-eddie!genrad!decvax!ucbvax!ucbtopaz!ucbopal!edmoyReferences:
<877@gloria.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 v7 ucbopal-1.9 BSD 4.2; site ucbopal.CC.Berkeley.ARPA Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!bonnie!akgua!whuxlm!whuxl!houxm!ihnp4!mhuxn!mhuxr!ulysses!allegra!mit-eddie!genrad!decvax!ucbvax!ucbtopaz!ucbopal!edmoy From: edmoy@ucbopal.CC.Berkeley.ARPA Newsgroups: net.text Subject: Re: extending (di)troff Message-ID: <250@ucbopal.CC.Berkeley.ARPA> Date: Sat, 29-Jun-85 16:53:22 EDT Article-I.D.: ucbopal.250 Posted: Sat Jun 29 16:53:22 1985 Date-Received: Mon, 1-Jul-85 05:47:40 EDT References: <877@gloria.UUCP> Reply-To: edmoy@ucbopal.UUCP () Distribution: net Organization: Univ. of Calif., Berkeley CA USA Lines: 95