[net.text] extending

colonel@gloria.UUCP (Col. G. L. Sicherman) (06/26/85)

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

edmoy@ucbopal.CC.Berkeley.ARPA (06/29/85)

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

henry@utzoo.UUCP (Henry Spencer) (06/30/85)

> 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

Better:  \[xyzabc].  \[ is not used anywhere, unless somebody has done
some really strange things to troff lately.
-- 
"Maturity means doing what's right, not just what's easy."

				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry

chris@umcp-cs.UUCP (Chris Torek) (06/30/85)

But why limit it to 8?  Someone's going to want to use ``HelveticaLight''
and have to write ``HlvtcLgt'' or something ugly like that.

(Doesn't everyone like flexnames?)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@maryland

jaap@mcvax.UUCP (Jaap Akkerhuis) (07/03/85)

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
 > 

**** NEWS FLASH *** NEWS FLASH **** NEWS FLASH ****

According to the latest rumour the next release of ([td]i)troff, scheduled
for release in September (but don't hold your breath), will allow the use
multi character names for characters as follows:
	\C'An_arbitrary_long_character_name'

colonel@gloria.UUCP (Col. G. L. Sicherman) (07/03/85)

> > 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
> 
> Better:  \[xyzabc].  \[ is not used anywhere, unless somebody has done
> some really strange things to troff lately.

I thought of that, but it won't work for strings. \*[ is used
by refer(1).  As far as I know, the space convention is the only
one that won't break strings, number registers, and fonts.  (We can
use something prettier if we allow some breakage.)
-- 
Col. G. L. Sicherman
...{rocksvax|decvax}!sunybcs!colonel