The second LaTeX pre-release for 2021-11-15 is available for testing

A few days ago we submitted a new LaTeX development format to CTAN and by now it should be available to all users using MiKTeX or TeX Live (on any operating system).

Main features of the second pre-release for 2021-11-15

The first pre-release was just a copy of the main release for 2021-06-01 in order to avoid that people using the development release regularly get an old format.

The second pre-release now provides some improvements of the hook management as a result of feedback from developers and our own experience applying the new functionality. This includes one breaking change in behavior (relevant only to package developers), for which we offer compatibility code for now. Thus nothing will break right now, but going forward the new method needs to be used, because at some point in the future the compatibility code will be taken out.

Notable improvements already contained in the pre-release are

  • Resolving some issues around the new hook functionality:
    • Providing \ActivateGenericHook;
    • Command to clear “next” hook code before invocation;
    • Cleanup after a one-time hook;
    • Changed the behavior of \RemoveFromHook;
    • Standardizing generic hook names;
  • Other improvements:
    • \tracinglostchars got a new default
    • \PackageNote was added to show notes that aren’t “warnings” on the terminal
    • \ShowCommand got extended to show commands defined with ltcmd (former xparse)
    • \NewCommandCopy got extended as well to safely these commands to new names
    • alt key for \includegraphics (anticipating future development)

There are also a number of smaller enhancements and some bug fixes as usual. The more important ones are listed in the draft publication of “LaTeX2e News Issue 34”. A full list is given in the changes.txt files that are part of the distribution.

Improving the hook management further

The breaking change mentioned above involves the name of generic file hooks. They used a special naming convention in the past and we now changed them to use the same structure as all other generic hooks, that is, their “variable” part (i.e., the file or package name) is always in the second position. For example, to execute some code after the array package was loaded you now say

\AddToHook{package/array/after}{...code...}

just like you would set up code to be executed after each tabular environment with

\AddToHook{env/tabular/after}{...code...}

For now the old syntax package/after/array is still supported, thus packages making use of this functionality have time to adapt to the new convention once the main release is out and distributed.

Other improvements to the hook management (e.g., the functionality to have packages implement generic hooks) are discussed in LaTeX2e News Issue 34 and in the relevant kernel documentation.

Outlook

We expect to produce a third and final pre-release adding some more features and enhancements in late October.

Please help with the testing

We are issuing this second pre-release now in the hope that you will help us by making sure that all the enhancements and fixes we have provided are safe and that they do not have any undesired side effects, so please help with the testing if you can.

This development format allows you to test the upcoming LaTeX release scheduled for 2021-11-15 with your documents or packages. Such testing is particularly important for package maintainers to verify that changes to the core LaTeX haven’t introduced incompatibilities with existing code. We try to identify any such problems beforehand but such an undertaking is necessarily incomplete, which is why we are asking for user testing.

Besides developers, we also ask ordinary users to try out the new release, because the more people that test the new format, the higher the chances that any hidden problems are identified before the final release hits the streets.

Processing your documents with the pre-release is straightforward. All you have to do is to replace the invocation command by appending -dev to the executable, e.g., on the command line you would run

pdflatex-dev myfile    or    lualatex-dev myfile    or    xelatex-dev myfile

instead of using pdflatex, lualatex or xelatex. If you use an integrated editing environment, then it depends on the system how to configure it to use an alternative format; but in any case the necessary modification should be straightforward.

Enjoy — Frank