# [texhax] \halign in terms of macro

Reinhard Kotucha reinhard.kotucha at web.de
Tue Jul 21 23:01:04 CEST 2009

On 21 July 2009 Vafa Khalighi wrote:

> Is it possible to define the control sequence \semihalign with
> macro programming which behaves exactly like \halign but in its
> definition \halign is not used at all.

There must be a reason Knuth decided to provide a primitive rather
than a macro, while he even didn't provide primitives for such basic
things like loops.

However, recently I had the great pleasure to meet Klaus Lagally, the
author of ArabTeX.  I'll never forget his words:

"You can do everything in TeX.  TeX is a Turing machine, ...
... and it can be programmed as conveniently as a Turing machine."[1]

This obviously describes your problem very well.

Regards,
Reinhard

PS: If you intend to buy a Turing machine (a hardware implementation
by Aarhus University, Denmark), this is what you are looking for:

[1] Original wording, as far as I remember: "In TeX kann man alles
machen.  TeX ist eine Turing-Maschine.  Und es lässt sich genauso
bequem programmieren wie eine Turing-Maschine."

--
----------------------------------------------------------------------------
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.
----------------------------------------------------------------------------