Greetings, Zoran.

On Monday (in private e-mail), you wrote:

>... Still I think that macros are in a sense
>incompatibility with the language. And I like my source to be readable,
>so I try to avoid macros and sometimes use long and complicating
>sentences. Early versions of SciWord could not accept LaTeX macros. It
>would be very nice if there were some precompilers that could make pure
>LaTeX source from source with macros.
>


The TeX language falls (roughly) into a category of langauages called
"extensible."  This means that they are designed to be "extended," by
constructing "higher level" structures by utilizing the more primitive
"building blocks."  (Examples of other extensible languages include Lisp and
Forth, etc.)

This means that the language tends to be very primitive if you use it at the
most primitive level.  As it is, Donald Knuth designed TeX to support just
what you see today... the development of many different and varied "macro
packages" atop the basic language.  (He was also very adamant about
preserving the characteristics of the foundational TeX language... We can
thank him for holding the line against some efforts to revise TeX itself.)
The desired process is much like the way that we build words from
characters, or speech from phonemes.  The overall result is an optimization
of the expression process, although we come to that point gradually... (E.g.
Most of us do not think of the individual letters when we write a word, or
the separate set of phonemes when we utter a spoken sentence, although a
very young child must pass through that stage.)

Not long after the first TeX came out, Leslie Lamport (et. al.) developed
the "LaTeX" macro package.in order to specify simpler formats for many of
the common activities required for Document Typesetting.  The fact that
LaTeX has been enormously successful, to the point that many do not
recognize that it is simply a Macro Package atop TeX, is a testament to the
relative soundness of the design concept realized by Knuth.  (LaTeX even got
it's own published book! :-)

As it is, MusixTex (and the associated MusicTex... another story...) are
Macro Packages, much like Latex, but achieving a different purpose.  These
packages are based on concepts introduced in an early macro package called
MuTex, which is so very much more difficult to use to typeset music, because
it is so much closer to the foundational "TeX" language.  (You can still
find MuTeX in the archives, if you really want to write music at a level
very close to TeX. :-)

The fact that one can load LaTeX, and then also load and run MusixTex, is a
fortunate (but sometimes limited) outcome of the fact that these two
packages achieve different design goals, and hence, tend to say out of each
other's way.  (The limitiations come from the number of internal registers
demanded by each package.)  If you do not need the document style properties
offered by LaTeX, it is usually best to just run MusixTex alone atop TeX, at
least it is (today) a few milliseconds more efficient.

So, :-)... Be careful what you dream for...  Typesetting music in the
"purest ?" form, using TeX would be neither simpler nor readable.
Nonetheless, learning something about the TeX language can be beneficial,
but only 1) to appreciate the immense amount of work done by those who have
given us these packages, and 2) to better manipulate the higher level
language when we (sometimes) don't achieve what we thought we would.

Consider this... Given that you have expressed a simple song using MTeX
symbols...

Mtx is processed to PMX code....
   which is processed in TWO steps to MusixTex code....
        which is processed in Three Steps (involving internal expansion to
raw Tex) to...
            Device Independent code (the .DVI file)....
                which is processed either to raw printer commands, or
PostScript (or other...),
                    so that we can, via the printed page, communicate a
musical thought to someone.

(By the way, when I send this message, it will be translated into a long
sequence of sound patterns (a langauge) recognized by my modem, and all the
modems along the way.  I (for one) am glad that I don't have to write my
message in that language!!)

If you want to see what the raw TeX code looks like (when you process your
file...), put the command

  \tracingall

into your file where you want to see it.  Then look at the Log file when it
completes.  That will give you an idea what it would be like to typeset
music without using Macros.

I hope this has been informative.

Joel Hunsberger
[EMAIL PROTECTED]

Reply via email to