
TUGboat, Volume 0 (2060), No. 0 1001
Classes, styles, conflicts: The biological
realm of L
A
T
E
X
Didier Verna
Abstract
The L
A
T
E
X world is composed of thousands of soft-
ware components, most notably classes and styles.
Classes and styles are born, evolve or die, interact
with each other, compete or cooperate, very much as
living organisms do at the cellular level. This paper
attempts to draw an extended analogy between the
L
A
T
E
X biotope and cellular biology. By considering
L
A
T
E
X documents as living organisms and styles as
viruses that infect them, we are able to exhibit a set
of behavioral patterns common to both worlds. We
analyze infection methods, types and cures, and we
show how L
A
T
E
X or cellular organisms are able to
survive in a world of perpetual war.
1 Introduction
Every L
A
T
E
X user faces the “compatibility nightmare”
one day or another. With such great intercession
capability at hand (L
A
T
E
X code being able to redefine
itself at will), a time comes inevitably when the
compilation of a document fails, due to a class/style
conflict. In an ideal world, class/style conflicts should
only be a concern for package maintainers, not end
users of L
A
T
E
X. Unfortunately, the world is real,
not ideal, and end-user document compilation does
break.
As both a class/style maintainer and a docu-
ment author, I tried several times to come up with a
systematic approach, or at least some general princi-
ples on how to handle class/style cross-compatibility
in a smooth and gentle manner, but ultimately failed,
because the situation is just too complex. Classes
and styles evolve constantly, sometimes even in a
backward-incompatible way. Classes and styles die,
while new ones are born. Styles may conflict not only
with classes but with other styles as well. Styles may
be made aware of classes or other styles, but classes
may be made aware of styles as well. Then, there
is the influence of the end user who will combine
all available material in a somewhat unpredictable
way, possibly with his/her own personal additions,
or even modifications to the available features.
This vicious circle basically never ends and leads
to a paradoxical “If it ain’t broke, then fix it” situ-
ation in which complex trickery is added to classes
or styles, not to make them work out of the box,
but to prevent potential breakages resulting from
interactions with the outside world. In the end, the
only realistic conclusion is that there is no solution to
this problem, both because the system is too liberal,
and because the human factor is too important. One
cannot force a package author to write good quality
(for some definition of “quality”), non-intrusive or
even just bug-free code. One cannot force a package
author to keep track of all potential conflicts with
the rest of the L
A
T
E
X world, let alone fixing all of
them by anticipation. One simply cannot prevent
software evolution.
Facing this somewhat pessimistic conclusion, it
is all the more intriguing to acknowledge the fact that
the system still globally works. Despite the complex-
ity of what happens behind the curtain, documents
are being produced, and in some way, seeing a freshly
compiled document pop up on the screen is just like
witnessing a small miracle. When it doesn’t compile,
you don’t really know why, but when it does compile,
you really don’t know why. This is the precise point
at which the parallel with biology occurred to me.
Any living being is by itself a miracle of complexity,
and unfortunately, sometimes it breaks as well.
One Monday morning, I woke up with this vi-
sion of the L
A
T
E
X biotope, an emergent phenomenon
whose global behavior cannot be comprehended, be-
cause it is in fact the result of a myriad of “macro”-
interactions between smaller entities, themselves in
perpetual evolution. In this paper, I would like to
build bridges between L
A
T
E
X and biology, by view-
ing documents, classes and styles as living beings
constantly mutating their geneT
E
X code in order to
survive \renewcommand attacks. . . .
The basis of our analogy is to consider L
A
T
E
X
documents as living beings, and styles as viruses
that infect them. Based on this picture, a number of
puzzling similitudes can be found in the way organic/
L
A
T
E
X material interact. In the following, we first
describe how L
A
T
E
X documents can be morpholog-
ically compared to a specific kind of organic cells,
then draw a parallel between genetic and program-
matic material, and finally justify our view of styles
as viruses. After that, we respectively draw interest-
ing comparisons between existing viral or stylistic
infection methods, infection types, and also possible
cures.
2 Morphological analogy
In this section, we present a morphological analogy
between L
A
T
E
X documents and a specific kind of
organic cells from the so-called “eukaryotes” domain.
2.1 Eukaryotes
According to Whittaker’s nomenclature [
23
], eukary-
otes subsume four of the five “kingdoms” of life,
Classes, styles, conflicts: The biological realm of L
A
T
E
X