[comp.text.tex] Redesigning TeX

em@dce.ie (Eamonn McManus) (05/15/91)

In my opinion the TeX language, as opposed to the implementation, is not
as neatly designed as it might be.  (I'll leave comments on the
implementation for another day.)  It's not true to say that TeX has no
syntax to speak of.  Primitives should have been designed where possible
to have a syntax that could be described by macros, if only to the
extent of surrounding their arguments with braces.  It's ridiculous that
there should be constructs like
    \hskip 1pt plus 3fil
where TeX determines pretty much by magic where the argument ends.  (And
if the next word happens to be `minus' the unwary user is in for a nasty
surprise.)  I see no reason why this could not have been
    \hskip{1pt plus 3fil}
or, eliminating dimension keywords completely and using the implicit
multiplication feature,
    \newdimen\pt \pt=65536\sp
    \hskip{1\pt plus 3\fil}
There are numerous other syntactical complexities: consider \halign,
\hrule, \hbox, \leaders, \let, etc.  I'm not saying that all of these
should be shoe-horned into a brace-delimited form, but there is
certainly more complexity in the syntax than necessary.

In discussing the number of primitives, I don't think it is meaningful
just to count the number of asterisks in the TeXbook's index.  Some
primitives are just parameters, like \parindent and \maxdeadcycles and
\abovedisplayshortskip.  Others are easily expressible in terms of other
primitives, and are either there for efficiency (this is presumably the
case for \hfil etc) or because they never got removed (there doesn't
seem to be a good reason for \gdef given \global).  It would be nice to
tidy up the primitives a bit: do we need both \raise and \lower?
Shouldn't we have a parameter \interaction instead of \nonstopmode etc?
If we didn't have \futurelet could we make do with \let and
\afterassignment?  Would it be a terrible thing if \gdef and \above and
\hfilneg were macros in plain.tex instead of primitives?

One other thing I would like to change is the builtin limit in the
language design of having 256 of each sort of register.  It would make
much more sense (though perhaps at the expense of efficiency) if
\newdimen etc were the primitives and we forgot about \dimen.

Having bitched so much I must say that I think that TeX as it stands is
a wonderful system and its design, despite my complaints, is excellently
done.  Having something as portable as the existing system is much more
important than ironing out a few design nits.

,
Eamonn

monardo@cshl.org (Pat Monardo) (05/17/91)

>One other thing I would like to change is the builtin limit in the
>language design of having 256 of each sort of register.  It would make
>much more sense (though perhaps at the expense of efficiency) if
>\newdimen etc were the primitives and we forgot about \dimen.
>
would you like 4 billion registers? thats possible.

tim@cstr.ed.ac.uk (Tim Bradshaw) (05/18/91)

>>>>> On 17 May 91 03:35:42 GMT, monardo@cshl.org (Pat Monardo) said:

 [ In response to a previous post saying that the 256 register limit
   is a pain ]

> would you like 4 billion registers? thats possible.

Does Common TeX do this?  The allocations of anything ought to be
limited by the machine's VM or address space, and it sounds like
that's what you're hinting at.

--tim

monardo@cshl.org (Pat Monardo) (05/19/91)

In article <TIM.91May18144500@kahlo.cstr.ed.ac.uk> tim@cstr.ed.ac.uk (Tim Bradshaw) writes:
>>>>>> On 17 May 91 03:35:42 GMT, monardo@cshl.org (Pat Monardo) said:
>
> [ In response to a previous post saying that the 256 register limit
>   is a pain ]
>
>> would you like 4 billion registers? thats possible.
>
>Does Common TeX do this?  The allocations of anything ought to be
>limited by the machine's VM or address space, and it sounds like
>that's what you're hinting at.
>
>--tim

close. it would take some modification. there is also the
issue of the magic number 255. what could happen is we could
remove the limitations of registers but hint that registers
0-255 are "root" registers. but i dont really think its that
critical an issue. if you are asking if Common TeX uses
normal C addressing conventions for most data, then the answer is yes.

rolfl@hedda.uio.no (Rolf Lindgren) (05/21/91)

I need a rather bizarre two-column layout that really proves why one sometimes
can't get away from using (La)TeX.

I need the ability to place the footnotes under the columns in which they
appear, rather than spanned across the page.  The documentation of the
multicols environment indicates that this is possible to achieve, but it almost
certainly requires rehacking some of the footnote macros.

This is, as far as I know, impossible in any typesetter save TeX.  Has anybody
been able to do this?  I hate to reinvent the wheel.  

Regarding the need for a new LaTeX, has anybody been considering making an
object-orientet LaTeX?  How about making characters types (LaTeX supports one
type: the character, environments as classes, and giving LaTeX tha ability to
add methods to environments?

\addmethod{\baselinskip=10pt}{\footnotesize} with optional arguments to
indicate when to apply the new method (after or before setting the actual
text).

...Just a thought

Rolf Lindgren		| 	"The opinions expressed above are 
616 Bjerke Studentheim	|  	 not necessarily those of anyone"	
N-0589 OSLO 5		|             rolfl@hedda.uio.no