# [texhax] Obsolete \centerline command used in amsbook class

Uwe Lück uwe.lueck at web.de
Sat Sep 22 14:53:17 CEST 2012

Am Mittwoch, den 12.09.2012, 16:37 -0400 schrieb Ari Meir Brodsky:
> The l2tabu document
> (http://mirror.ctan.org/info/l2tabu/english/l2tabuen.pdf, section 2.1.3)
> declares the \centerline command to be an obsolete TeX command that should
> not be used in LaTeX.  However, the \chapter command of amsbook.cls uses
> \centerline.

Another aspect, also dealing with an off-list mail from Barbara Beeton.

Sometimes there seems to be confusion about the notion of "LaTeX".

On the one hand, LaTeX is a restricted user interface, a front end
for TeX; or just a markup language (that could be used to generate
HTML or some other output format than DVI/PDF using some format
converter rather than TeX). l2tabu could be (partially) justified
by saying that it only addresses the use of LaTeX as a markup language.

l2tabu therefore may be helpful for journal editors, especially
as a reminder to use semantical markup only, rather than visual
markup. \centerline especially is rather a low-level formatting
instruction. For a journal editor, any non-semantical markup or
just many commands beyond a limited set of markup contents tends
to mean additonal work, e.g., removing those commands. The journal
has its own ideas how to format an article. An obvious example
would be \pagebreak. It is a "legal" LaTeX command, but is not
semantical markup, it is visual formatting.

On the other hand, LaTeX is a collection of internal macros
(definitions in latex.ltx) that package and class file writers
typically use extensively, as a kind of program library.
It includes almost all of Plain TeX (plain.tex), some macros
are slightly redefined, \centerline among them. The result is
the same: "\centerline{<content>}" sends

\hbox to\hsize{\hss<content>\hss}

to TeX's stomach (with some qualifications about <content>).

This is (I'm) sure what amsbook's programmer intended, also
assuming that "CHAPTER 111" will not need a second line,
so no paragraph settings as with \centering are needed.

If you say amsbook.cls should not use \centerline, then you
also should say that amsbook.cls must not use any LaTeX
internals, e.g., \@makechapterhead must not use \m at ne
(which also is from plain.tex). This is a little ridiculous ...

However, indeed the LaTeX Companion contains admonitions
of this kind. In the review of its second edition in TUGboat
24:2, Claudio Beccari started one discussion as follows.

There is a third point I would like to comment on,
namely the excessively discouraging sentences
connected with the use of primitive TEX commands.

I would be happy if somebody reads on there
(http://tug.org/TUGboat/tb24-2/tb77becc.pdf).

Cheers,

Uwe.