LATEX News
Issue 28, April 2018 (LATEX release 2018-04-01)

Contents
A new home for LATEX 2ε sources

1

Bug reports for core LATEX 2ε

1

UTF-8: the new default input encoding
The new default . . . . . . . . . . . . . . . . .
Compatibility . . . . . . . . . . . . . . . . . . .
BOM: byte order mark handling . . . . . . . .

1
2
2
2

A general rollback concept

2Integration of remreset and chngcntr packages

3

Testing for undefined commands

3

Changes to packages in the tools category
LATEX table columns with fixed widths . . . . .
Obscure overprinting with multicol fixed . . . .

3
3
3

Changes to packages in the amsmath category
Updated user’s guide . . . . . . . . . . . . . . .

3
3

replace it with the standard “Issue Tracker” available at
Github.
The requirements and the workflow for reporting a
bug in the core LATEX software is documented athttps://www.latex-project.org/bugs/

A new home for LATEX 2ε sources
In the past the development version of the LATEX 2εsource files has been managed in a Subversion source
control system with read access for the public. This way
it was possible to download in an emergency the latest
version even before it was released to CTAN and madeits way into the various distributions.
We have recently changed this setup and now manage
the sources using Git and placed the master sources on
GitHub athttps://github.com/latex3/latex2ewhere we already store the sources for expl3 and otherwork. As before, direct write access is restricted toLATEX Project Team members, but everything is publicly
accessible including the ability to download, clone (usingGit) or checkout (using SVN). More details are givenin [1].

Bug reports for core LATEX 2εFor more than two decades we used GNATS, an open
source bug tracking system developed by the FSF. Whilethat has served us well in the past it started to show
its age more and more. So as part of this move we alsodecided to finally retire the old LATEX bug database andand with further details also discussed in [1].

UTF-8: the new default input encoding
The first TEX implementations only supported reading
7-bit ascii files—any accented or otherwise “special”
character had to be entered using commands, if it could
be represented at all. For example to obtain an “ä” onewould enter \"a, and to typeset a “ß” the command\ss. Furthermore fonts at that time had 128 glyphs
inside, holding the ascii characters, some accents tobuild composite glyphs from a letter and an accent, anda few special symbols such as parentheses, etc.
With 8-bit TEX engines such as pdfTEX this situation
changed somewhat: it was now possible to process 8-bit
files, i.e., files that could encode 256 different characters.
However, 256 is still a fairly small number and with thislimitation it is only possible to encode a few languages
and for other languages one would need to change theencoding (i.e., interpret the character positions 0–255
in a different way). The first code points 0–127 wereessentially normed (corresponding to ascii) while thesecond half 128–255 would vary by holding different
accented characters to support a certain set of languages.
Each computer used one of these encodings whenstoring or interpreting files and as long as two computersused the same encoding it was (easily) possible toexchange files between them and have them interpreted
and processed correctly.
But different computers may have used different
encodings and given that a computer file is simply asequence of bytes with no indication for which encoding
is intended, chaos could easily happen and has happened.
For example, the German word “Größe” (height) enteredon a German keyboard could show up as “GrŤàe” on adifferent computer using a different encoding by default.
So in summary the situation wasn’t at all good and it
was clear in the early nineties that LATEX 2ε (that wasbeing developed to provide a LATEX version usable acrossthe world) had to provide a solution to this issue.
The LATEX 2ε answer was the introduction of theinputenc package [2] through which it is possible toLATEX News, and the LATEX software, are brought to you by the LATEX Project Team; Copyright 2018, all rights reserved.

provide support for multiple encodings. It also allows
to correctly process a file written in one encoding on acomputer using a different encoding and even supports
documents where the encoding changes midway.
Since the first release of LATEX 2ε in 1994, LATEX
documents that used any characters outside ascii inthe source (i.e. any characters in the range of 128–255)
were supposed to load inputenc and specify in which
file encoding they were written and stored. If theinputenc package was not loaded then LATEX used a“raw” encoding which essentially took each byte fromthe input file and typeset the glyph that happened tobe in that position in the current font—something thatsometimes produces the right result but often enoughwill not.
In 1992 Ken Thompson and Rob Pike developed theUTF-8 encoding scheme which enables the encodingof all Unicode characters within 8-bit sequences. Over
time this encoding has gradually taken over the world,
replacing the legacy 8-bit encodings used before. Thesedays all major computer operating systems use UTF-8
to store their files and it requires some effort to explicitly
store files in one of the legacy encodings.
As a result, whenever LATEX users want to use any
accented characters from their keyboard (instead ofresorting to \"a and the like) they always have to use\usepackage[utf8]{inputenc}
in the preamble of their documents as otherwise LATEX
will produce gibberish.
The new default
With this release, the default encoding for LATEX files
has been changed from the “fall through raw” encoding
to UTF-8 if used with classic TEX or pdfTEX. The
implementation is essentially the same as the existing
UTF-8 support from \usepackage[utf8]{inputenc}.
The LuaTEX and XETEX engines always supported
the UTF-8 encoding as their native (and only) input
encoding, so with these engines inputenc was always ano-op.
This means that with new documents one can assume
UTF-8 input and it is no longer required to always
specify \usepackage[utf8]{inputenc}. But if this line
is present it will not hurt either.
Compatibility
For most existing documents this change will betransparent:• documents using only ascii in the input file andaccessing accented characters via commands;• documents that specified the encoding of their file
via an option to the inputenc package and thenused 8-bit characters in that encoding;• documents that already had been stored in UTF-8(whether or not specifying this via inputenc).
Only documents that have been stored in a legacy
encoding and used accented letters from the keyboard
without loading inputenc (relying on the similarities
between the input used and the T1 font encoding) areaffected.
These documents will now generate an error thatthey contain invalid UTF-8 sequences. However, such
documents may be easily processed by adding the newcommand \UseRawInputEncoding as the first line of thefile. This will re-instate the previous “raw” encoding
default.
\UseRawInputEncoding may also be used on thecommand line to process existing files without requiring
the file to be edited
pdflatex ’\UseRawInputEncoding \input’

filewill process the file using the previous default encoding.
Possible alternatives are reencoding the file to UTF-8
using a tool (such as recode or iconv or an editor) or
adding the line
\usepackage[⟨encoding⟩]{inputenc}
to the preamble specifying the ⟨encoding⟩ that fits thefile encoding. In many cases this will be latin1 orcp1252. For other encoding names and their meaning
see the inputenc documentation.
As usual, this change may also be reverted via
the more general latexrelease package mechanism, byspeciying a release date earlier than this release.
BOM: byte order mark handling
When using Unicode the first bytes of a file may be a,so called, BOM character (byte order mark) to indicate
the byte order used in the file. While this is not requiredwith UTF-8 encoded files (where the byte order isknown) it is nevertheless allowed by the standard andsome editors add that byte sequence to the beginningof a file. In the past such files would have generateda “Missing begin document” error or displayed strange
characters when loaded at a later stage.
With the addition of UTF-8 support to the kernel
it is now possible to identify and ignore such BOMs
characters even before \documentclass so that theseissues will no longer be showing up.

A general rollback concept for packages andclasses
In 2015 a rollback concept for the LATEX kernel wasintroduced. 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.
–2

In this release we have now extended this concept to
the world of packages and classes which was not covered
initially. As the classes and the extension packages
have different requirements compared to the kernel,
the approach is different (and simplified). This shouldmake it easy for package developers to apply it to theirpackages and authors to use when necessary.
The documentation of this new feature is given in anarticle submitted to TUGboat and also available fromour website [3].

Integration of remreset and chngcntr packages
into the kernelWith the optional argument to \newcounter LATEX
offers to automatically reset counters when some counteris stepped, e.g., stepping a chapter counter resets thesection counter (and recursively all other headingcounters). However, what was until now missing was a
way to undo such a link between counters or to link two
counters after they have been defined.
This can be now be done with \counterwithinand \counterwithout, respectively. In the past one
had to load the chngcntr package for this. For the
programming level we also added \@removefromresetas the counterpart of the already existing \@addtoreset
command. Up to now this was offered by the remreset
package.

Testing for undefined commands
LATEX packages often use a test \@ifundefined to test
if a command is defined. Unfortunately this had theside effect of defining the command to \relax in thecase that it had no definition. The new release usesa modified definition (using extra testing possibilities
available in ε-TEX). The new definition is more natural,
however code that was relying on the side effect of thecommand being tested being defined if it was previously
undefined may have to add \let\⟨command⟩\relax.

The fix required a redesign of the output routines usedby multicol and while it “should” be transparent in othercases (and all tests in the regression test suite came outfine) there is the off-chance that code that hooked into
internals of multicol needs adjustment.

Changes to packages in the amsmath category
With this release of LATEX a few minor issues withamsmath have been corrected.
Updated user’s guide
Furthermore, amsldoc.pdf, the AMS user’s guidefor the amsmath package [5], has been updated fromversion 2.0 to 2.1 to incorporate changes and corrections
made between 2016 and 2018.

References[1] Frank Mittelbach: New rules for reporting bugs inthe LATEX core software. In: TUGboat, 39#1, 2018.
https://www.latex-project.org/publications/[2] Frank Mittelbach: LATEX 2ε Encoding
Interface — Purpose, concepts, and Open
Problems. Talk given in Brno June 1995.
https://www.latex-project.org/publications/[3] Frank Mittelbach: A rollback concept for packages
and classes. Submitted to TUGboat.
https://www.latex-project.org/publications/[4] Frank Mittelbach: LATEX table columns with fixedwidths. In: TUGboat, 38#2, 2017.
https://www.latex-project.org/publications/[5] American Mathematical Society and The LATEX
Project: User’s Guide for the amsmath package(Version 2.1). April 2018. Available fromhttps://www.ctan.org and distributed as part ofevery LATEX distribution.

Changes to packages in the tools category
LATEX table columns with fixed widths
Frank published a short paper in TUGboat [4] on
producing tables that have columns with fixed widths.
The outlined approach using column specifiers “w” and“W” has now been integrated into the array package.
Obscure overprinting with multicol fixed
A rather peculiar bug was reported on StackExchange
for multicol. If the column/page breaking was fully
controlled by the user (through \columnbreak) insteadof letting the environment do its job and if then more\columnbreak commands showed up on the last pagethen the balancing algorithm was thrown off track. Asa result some parts of the columns did overprint eachother.
–3