[texhax] "@" : vowel or glottal stop ? (was : Some puzzling TeX)

Uwe Lueck uwe.lueck at web.de
Sat Feb 19 12:56:44 CET 2011


"Philip Taylor (Webmaster, Ret'd)" <P.Taylor at rhul.ac.uk> wrote 19.02.2011 11:37:16:
> I have never understood (and continue to fail to understand)
> why, when Don made it quite clear in Plain.TeX that "@" is a
> vowel,

where? how? How are \thr@@, \count@, \prim at s, \pr at m@s, \pr@@@s pronounced?

> Leslie and his followers insist on treating it as
> a glottal stop.  Why one earth did they use the horribly
> ugly :
>
>	\@firstofone
>
> instead of the far more intuitive and elegant :
>
>	\first at fone

In general, I have several questions like that 
and sometimes wonder where I could ask them and when.
Recently I learnt that \@car and \@cdr "quote" from Lisp 
-- I had often wondered before. Another urgent question: 
Who was the professional graphic designer who created 
the design (of \maketitle, \section, ...) of the LaTeX standard classes?
...

My impression of LaTeX internals is:

1. LaTeX just has many more internal control sequences than Plain TeX.

2. In the first instance, the idea in using `@' seems to be 
keeping the control sequence readable. 
\@firstofone is easier to read, while \first at fone rather is a joke 
that may take some second to be understood.

3. Another principle might have been that, for a package (incl. 
latex.ltx ...) writer, internal control sequences should be easy 
to remember. With \first at fone, the question arises whether 
it was \first at f@ne, or \firstof at ne, ...

"Joke" uses of `@' do occur frequently when a command 
needs a number of auxiliary macros, especially for dealing 
with optional arguments 
(sorry this WEB.DE editor compresses leading blank spaces, 
 too many for me now):

\def\@fileswithoptions#1{%
 \@ifnextchar[%]
 {\@fileswith at ptions#1}%
 {\@fileswith at ptions#1[]}}
\@onlypreamble\@fileswithoptions
\def\@fileswith at ptions#1[#2]#3{%
 \@ifnextchar[%]
 {\@fileswith at pti@ns#1[#2]#3}%
 {\@fileswith at pti@ns#1[#2]#3[]}}
\@onlypreamble\@fileswith at ptions
\def\@fileswith at pti@ns#1[#2]#3[#4]{%
 \ifx#1\@clsextension
 \ifx\@classoptionslist\relax
 \xdef\@classoptionslist{\zap at space#2 \@empty}%
 \def\reserved at a{%
 \@onefilewithoptions#3[#2][#4]#1%
 \@documentclasshook}%
 \else
 \def\reserved at a{%
 \@onefilewithoptions#3[#2][#4]#1}%
 \fi
 \else
 \def\reserved at b##1,{%
 \ifx\@nil##1\relax\else
 \ifx\relax##1\relax\else
 \noexpand\@onefilewithoptions##1[#2][#4]\noexpand\@pkgextension
 \fi
 \expandafter\reserved at b
 \fi}%
 \edef\reserved at a{\zap at space#3 \@empty}%
 \edef\reserved at a{\expandafter\reserved at b\reserved at a,\@nil,}%
 \fi
 \reserved at a}
\@onlypreamble\@fileswith at pti@ns

Cheers,

    Uwe.




More information about the texhax mailing list