[texhax] \binom

Mon Mar 2 17:52:29 CET 2009

On Mon, 2 Mar 2009, Yannis Haralambous wrote:

> Part of my job is to process papers for a well-known Mathematical Society,
> and I'm talking of several thousand pages per year.
>
> In this context, personalized macros are a FELONY, a HEADACHE, a CURSE...
>
> 1) First of all, often they are bad, one has to read and correct them (for
> example, people will use \rm instead of \mathrm, \matrix instead of the
> matrix environment, eqnarray instead of align, etc. not to mention people who
> want to manually insert spaces about everywhere)
>
> 2) secondly, their names will often conflict with other commands I need (and
> we don't have namespaces yet in LaTeX), and the effects will sometimes be
> very subtle (this is also a bit mea culpa since I will rather use \def than
> \newcommand)
>
> 3) thirdly, they will always appear in places they shouldn't: abstracts,
> bibliographical references, section names, and the like. These pieces of
> information are needed when compiling data outside the scope of individual
> articles, and macro definitions do not accompany them...
>
> So please do not encourage people to use their own macros. I would rather
> appreciate institutions (LUGs, Mathematical societies, Faculties) to prepare
> standard styles with alternative names for macros, it will always be better
> than empirical impulsive "100% personal" macros...

As an author, I want to use logical high-level markup. This is one of the
biggest advantages of TeX. I believe that we should encourage people to
use logical macros. Ask them to write

\EXP{\frac {1}{n} \sum_{i=1}^n X_i | Y}

rather than

\mathop{\mathbf{E}} \left{ \frac {1}{n} \sum_{i=1}^n X_i \,\middle|\, Y \right}

Use logical macros rather than explicit font switches (mathcal, mathsrc,
mathds, or mathfrak), etc.

I understand your concerns, but I do not think that discouraging people to
write their own macros helps. Take the case of someone using \rm instead
of \mathrm in their macros. To give a concerete example, suppose someone
uses

\newcommand{diff}{{\rm diff}}

and then types f_{\diff} in the the text. Suppose the journal style asks
not to use personal macros. In that case, the author will use f_{\rm diff} in
the text. That does not really solve your problem, does it? What is needed
are good tutorials explaining people how to write good macros
(programming in tex is hard, but most macros do not really do anything
fancy). Clashes in macro names can also be easily avoided. Ask authors
to use uppercase names for their macros and do not define any macro which
is less than 3 letters. This elimates most potential clashes with existing classes
and styles. Use editor macros to save typing; TeX macros should be
verbose. As an institutional publisher, you can
also use a personal namespace while defining your macros. For example,
IEEEtran uses macros like \IEEEsomething for many (all?) of its macros.
This helps in avoilding clashes with users' macros. Regarding not using
macros in abstracts etc., the submission guidelines should state
clearly what is allowed and what is not. Depending on how you want to
post-process the abstract and section head information, either say that no
LaTeX markup is allowed, or give a list of marcos that are allowed (or the
list of classes and styles whole macros can be used).

The above solutions are not perfect, but trying to avoid problems by
asking people not to use logical markup is wrong. I agree that there
should be packages that encourage logical markup (e.g, the mlist package
by Will Robertson) and guidelines for user macros. But remeber, that such
packages are written by users. If you discourage them to write macros,
they will never clean up their macros and write a package.