TUGboat, Volume 0 (9999), No. 0

preliminary draft, August 6, 2018 13:00?1What’s to stay, what’s to go —Compatibility in the LATEX World
Frank Mittelbach

Intro (from a LaTeXperspective)

And now?

Abstract
In this talk I take a look at the major disruptions
that have rocked the LATEX world in the past decades
and how we handled them, covering some of the resulting consequences.
In the latest part of this saga a rollback concept for the LATEX kernel was introduced (around2015). Providing this feature allowed us to makecorrections to the software (which more or less didn’t
happen for nearly two decades) while continuing tomaintain backward compatibility to the highest degree.
I will give some explanation on how we have
now extended this concept to the world of packages
and classes which was not covered initially. As theclasses and the extension packages have different requirements compared to the kernel, the approach isdifferent (and simplified). This should make it easy
for package developers to apply it to their packages
and authors to use when necessary.

What's to stay, what's to go
The new compatibilityapproach

Compatibility in the LaTeXWorldMajor Disruptions in40 years

Frank Mittelbach
Rio, July 2018

So what now?

Handling disruptions

Slide #2

Gutenberg press (1450+)

Commercial Typewriters (since approx 1870)

TeX (1978/79+)

LaTeX 2.0 (1983)

Intro (from a LaTeX
perspective)

The last 4
decades

40 years

LaTeX 2.09 (1986)

35 years

LaTeX2e (1994)

iTeX solves it all (announced 2010, available ???)

Slide #3

plain TeX (1978)birth of TeX
AmSTeX (around 1981)

structural needs

user needs

Major Disruptions in40 years
externalinfluences

What's to stay, what's to go
Compatibility in the LaTeXWorldSlide #4

Frank Mittelbach
Rio, July 2018

Slide #1

preliminary draft, August 6, 2018 13:00

preliminary draft, August 6, 2018 13:00

?2

preliminary draft, August 6, 2018 13:00

TUGboat, Volume 0 (9999), No. 0

birth of TeX

structural needs

Major Disruptions in
40 years

LaTeX 2.09 (1986)

Major Disruptions in
40 years

user needs

The early years
LaTeX 2.09

external
influences

LaTeX 2.09 ->LaTeX2eHandling disruptions

Mature LaTeX2eSlide #5

Slide #8small user basebirth of TeX
starting point

structural needs

LaTeX 2.09 (1986)

7bit -> 8bit

computer affine

small developer community
small code basefairly consistent interface use

huge step(8 years)

The early years
LaTeX 2.09

TeX 3.0

provide structuregoals
get it going

Flexible font usage
LaTeX2e (1994)
user needs

stable system managed by a single developer

graphics and color needs

compatibility approach(and no history to take care of)complex mathematics

Major Disruptions in
40 years

internationalization needs
LaTeX 2.09 ->LaTeX2eexternalinfluences

Mature LaTeX2eSlide #6

Slide #9The early years
LaTeX 2.09

birth of TeX

structural needs

larger user base

LaTeX 2.09 (1986)

huge step(8 years)

7bit -> 8bit

new needs
extended userneeds

TeX 3.0

starting point

Flexible font usage

large(er) and independent developer community

bigger and inconsistent code base

LaTeX2e (1994)
user needs

graphics and color needs

less time (and interest) by Leslie to manage

unification of incompatible versions and approaches

complex mathematics
LaTeX 2.09 ->LaTeX2emedium step(21 years)

internationalization needs

goals

providing missing interfaces

providing needed functionality

Major Disruptions in
40 years

pdf format

external
influences
Unicodepdftex (becomes standard engine)enginesappearOmega,
XeTeX,
LuaTeX

becomespopular

LaTeX2e supported on
all major engines (2015)

new files are(normally)
unicodeemulate old syntax andprocessing in old documents

compatibility
approachdistinguish old and new
documents by syntaxchange at the very beginning

disallow (some) old syntax inremainder of document
Result: mix of old and new syntax
is avoidedsmall step
(3 years)develop a large regression test suite
based on LaTeX 2.09 behavior!

largely responsible for the successof the transition

LaTeX2e assumes utf8
encoding by default (2018)

Slide #7

preliminary draft, August 6, 2018 13:00

Mature LaTeX2eSlide #10

preliminary draft, August 6, 2018 13:00

TUGboat, Volume 0 (9999), No. 0

preliminary draft, August 6, 2018 13:00?3

kernel code got stale
The early years
LaTeX 2.09

starting point
everybody feared updates as they tend to breakcompatibility regardless how important they wereextended user
needs

LaTeX 2.09 ->LaTeX2ebring LaTeX back onto an active development cycle
while providing compatibility for old documents
new code base with many new features built-in, e.g.,
NFSS, language support, amsmath, graphics, color, etc

more userneeds +
external
influences

goal(s)kernel (2015)

starting point

approachmany standard extension packages

goal(s)after some period withcorrections and additions

correctly process documents even after many years

essentially frozen kernel code

packages + classes (2018)

The new compatibility
approachconclusion
further development then happened
only in packages (5000+ these days)

Mature LaTeX2e
initial compatibility
approach (failed eventually)

fixes to the kernel placed in package fixltx2e

packages are assumed to only add functionality (and fixes), i.e.
compatible changes or change name i.e., can be distingusihedfixltx2e
failed why?
package development

So what now?

Slide #11

Slide #14

The early years
LaTeX 2.09
extended user
needs

LaTeX 2.09 ->LaTeX2eintroduce latexrelease package

more userneeds +externalinfluencesusage in documents%<*2ekernel,latexrelease>%<latexrelease>\IncludeInRelease{<date>}{<label>}{<info>}...
%<latexrelease>\EndIncludeInRelease%</2ekernel,latexrelease>moving target: documents using it would changeover time as fixes and additions got added

worse: some classes added fixlt2e making the classor package a moving target without you knowing it
fixltx2eeven worse: if it implemented a change of interface then other packages
had to deal with different APIs depending on whether or not it was loaded

only a fraction of the user base was using it, thus
most never got a correction even for glaring bugs
Mature LaTeX2e

example: caption -> caption2 -> caption3 -> caption

failed why?

incompatible changes without renames

use of each and everything as hooks into kernel code%<latexrelease>\IncludeInRelease{<earlier-date>}{<label>}{<info>}%<latexrelease> ...
%<latexrelease>\EndIncludeInRelease%<latexrelease> ...
%<latexrelease> ...
%<latexrelease>\IncludeInRelease{0000-00-00}{<label>}{<info>}%<latexrelease> ...
%<latexrelease>\EndIncludeInReleasekernel (2015)

code in the kernel

current code goes into the kernel and (surrounded by\IncludeInRelease and \EndIncludeIn Release).
Older Code only goes there

package development
creation of all kind of package interdependencies(loading order, release level etc)conclusion: works well, but is not convenient to use
and not really suitable for package or class levelcompatibility broken in many ways

„don’t touch it“ mentality on large packages

Slide #12

Slide #15

The early years
LaTeX 2.09

LaTeX 2.09 ->LaTeX2estarting point

goal(s)

So what now?

Handling disruptions

Mature LaTeX2e
initial compatibility
approach (failed eventually)

got stuck

failed why?

touch anything anywhere and something will
fail and often in very surprising ways

Slide #13

preliminary draft, August 6, 2018 13:00

preliminary draft, August 6, 2018 13:00

?4preliminary draft, August 6, 2018 13:00

TUGboat, Volume 0 (9999), No. 0

but it needs to overcome the opposition of
those that do have no immediate needintroduce general rollback

it is human nature to be against leaving
well-established pathes\RequirePackage[<date>]{latexrelease}
now rolls the kernel code back and additionallyany package or class code

Future development isnecessary for the health andprosperiority of a system

Existing user base (even if dwindling)is vocal in „stay as is / why change?“in addition it is possible to request a specificrelease on package/class level

Remember that new users may be the silent majority!

And now?

\usepackage[<option(s)>]{<package>}[<min-date>]
up to now <min-date> requested that thepackage is at least from that date or younger

usage in documents

Outlook

if it contains a date, e.g., 2018-04-01
then it denotes a <min-date> as before

we now repurpose that
optional argument:

if it contains =<date> then an attempt
is made to load the package as it wasat this datethe same optional argument exists for\documentclass and is repurposed as well
\DeclareRelease{<name>}{<date>}{<external-file>}\DeclareRelease{<name>}{<later-date>}{<external-file>}...
\DeclareCurrentRelease{<name>}{<date>}

packages + classes (2018)\ProvidesPackage ...

Slide #18

<name> denotes a named version<date> denotes the first day this release was current

code in the package or class<name> or <date> but not both can be empty<external-file> is the file to load for this release<external-file> can be simply the corresponding .sty file from therelease date (preferably with the commentary at the beginning adjusted)\DeclareCurrentRelease has no file argument as
the code for it is in the current file

Future development isnecessary for the health andprosperiority of a system\IfTargetDateBefore{<date>}{<before-date-code>}{<after-or-at-date-code>}

stay with LaTeX 2.09
this concept is not intended to track each and every
minor patch but only major changes that would
have noticable effects on document processing

WHO NEEDS THES FONTS WITH ALL
THESE UNNECESSARY CHARACTERS?
(1994)

granularity

Put it into a separate format so that it
doesn’t affect existing LaTeX users

if necessary (or desired) it is possible toprovide finer granularity within a fileemail I received after Joseph discussed UTF-8
as a default on his blog
sounds familiar?

THIS WILL BREAK THEWORLD (2018)

well it didn’t ... okay, we had to get five
patch releases out fairly quickly to fix
some oversights and we missed alerting
one or the other package owner of a needto adjust --- but on the whole it went fairly
wellAnd now?

Outlook

Slide #16
Slide #19

starting point

goal(s)approach

We now have a rollback mechanism thatworks and kernel, class and package level

Future development isnecessary for the health andprosperiority of a system

This allows future development withoutcompromising compatibility
once you finished a paper you can now freeze its processing(subject to usage of the concept) by simply adding

conclusion\RequirePackage[<current-date>]{latexrelease}

The new compatibility
approach

WHO NEEDS THES FONTS WITH ALL
THESE UNNECESSARY CHARACTERS?
(1994)

at its top with a better chance that it will still work in the future

THIS WILL BREAK THEWORLD (2018)

though for important works like, say, a book I would stillsuggest to save the texmf tree along with the sources

And now?

focus further on consolidation of the 2e world(break the world --- for the better hopefully)
Outlookwork on the next big disruption: accessibility pdf

Slide #17
Slide #20

The slides have been retrospectively constructed fromthe mindmap used during the presentation.
 Frank Mittelbach
https://www.latex-project.org

preliminary draft, August 6, 2018 13:00

preliminary draft, August 6, 2018 13:00