[texhax] FW: Re: Implementing control sequences with key values

Reinhard Kotucha reinhard.kotucha at web.de
Tue Nov 16 04:05:18 CET 2010

On 23 November 2010 Philip Taylor (Webmaster, Ret'd) wrote:

 > Paul Isambert wrote:
 > > Both solutions I have adopted in some places, instead of braces. You've
 > > asked earlier why using the "=" syntax, and Phil mentioned plain TeX.
 > > I'll elaborate and say: you can make do without braces in many cases,
 > > something LaTeX seems to want its users to forget. I for one hate them,
 > > for no good reason but anyway, and I always welcome alternatives
 > > (starting with TeX's syntax for assignments).
 > Agreed : exactly how I feel.

Phil, you can be happy that you don't have to type curly braces on a
German keyboard.  In this respect plain TeX is a bit more convenient.

However, LaTeX aims to separate content and layout.  I regard LaTeX's
part describing the content more as a markup language rather than a
programming language.  IMO a markup language should be simple, i.e. 
depend on a very small set of well defined syntax rules.  This is
actually the case in LaTeX.

Introducing assignments to LaTeX's markup language (except in optional
arguments) seems wrong to me.  It makes things less consistent, causes
unnecessary problems (consider spell checkers, syntax highlighting,
...), and makes LaTeX more difficult to learn.

LaTeX's programming interface for defining the layout is another
story.  It's currently a mixture of LaTeX macros and TeX primitives
and therefore everything but consistent.  LaTeX 3 will definitely
provide a much more consistent interface.

Plain TeX and LaTeX are completely different things, with a different
syntax and different aims.  The worst thing one can do is to mix them
up.  It's true that \foo=3pt is more convenient to type than
\setlength{\foo}{3pt} (especially on a German keyboard), but it's also
a matter of fact that it's easier to type curly braces rather than
"begin" and "end".  

Introducing assignments in LaTeX is similar to replacing "begin"/"end"
keywords by curly braces in PASCAL.  I'm wondering why nobody provided
such a convenient version of PASCAL already.  It's easy to achieve.
Well, in PASCAL curly braces already have a meaning, but this is not a
problem at all.  The solution is to introduce \catcode and you can
change the meaning of any character you type whenever you want.

LaTeX is less flexible in this respect.  Deliberately!  It provides a
clean, well defined, user interface instead.

On 14 November 2010 Philip Taylor (Webmaster, Ret'd) wrote:
 > Because those of us that have Plain TeX running through
 > our veins instead of that awful watered-down stuff called
 > "LaTeX" think that way :-)

Programming in TeX is a challenge indeed.  You can be proud if you get
a problem solved over the weekend, even though it's just one line of
simple code in any reasonable programming language.  I assume that
LuaTeX is only good for quiche eaters.


Reinhard Kotucha			              Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.

More information about the texhax mailing list