• ## Tex Live 2021 Now Available!

Posted by Paulo on October 20, 2021

We’re pleased to announce that we’ve upgraded our LaTeX compile servers to make TeX Live 2021 live and available on Overleaf! As of October 2021, all new Overleaf projects will be based on TeX Live 2021 — you can read below for the key information and important changes.

## What is TeX Live?

TeX Live is a free distribution of the TeX typesetting system that includes many TeX-related programs, fonts and macros packages, including LaTeX. At Overleaf we use TeX Live on our compile servers to power the real time preview and produce your project's PDF output.

## Will my existing projects work as usual?

Absolutely! This upgrade to TeX Live 2021 will not affect any existing projects you are working on. All existing projects will continue to use the TeX Live image they were created with, and should continue to work as normal.

## How can I switch to TeX Live 2021 for existing projects?

This is super easy with our Switch your TeX Live Compiler feature that we launched in April 2020. The TeX Live Compiler feature allows you to switch between TeX Live versions as and when you need to, and most importantly enables you to submit your work to publishers, preprint servers, and other platforms that use a specific TeX Live version to compile submissions.

## What’s New in TeX Live 2021?

You can find the official release notes for TeX Live 2021 on the TUG website. The key highlights are:

### General

• Donald Knuth's changes for his 2021 tuneup of TeX and Metafont are incorporated.
• If \tracinglostchars is set to 3 or more, missing characters will result in an error, not just a message in the log ﬁle, and the missing character code will be shown in hex (except in original TeX).
• A new integer parameter \tracingstacklevels, if positive, and \tracingmacros is also positive, causes a preﬁx indicating the macro expansion depth to be output on each relevant log line. Also, macro logging is truncated at a depth ≥ the parameter value.

### LuaTeX

• Lua is updated to 5.3.6.
• Callback for nesting level used in \tracingmacros, as generalized variant of the new \tracingstacklevels (see previous section).
• Mark math glyphs as protected to prevent processing as text.
• Removed width/ic compensation for traditional math code path.

### pdfTeX:

• New primitives \pdfrunninglinkoff and \pdfrunninglinkon e.g., for disabling generation of links in headers and footers.
• Warn instead of aborting when \pdfendlink ended up in different nesting level than \pdfstartlink.
• Dump \pdfglyphtounicode assignments in fmt file.

It's worth noting that the underlying operating system is Ubuntu 20.04, which along with TeX Live 2021 enables new fonts for your Overleaf projects (for a full list of supported fonts see our help file Which OTF or TTF fonts are supported via fontspec?).

## Key Changes in TeX Live 2021

### Document Hooks and bad uses of \AtBeginDocument

At the end of 2020, LaTeX added support for a general hook management system:

• Hooks to add code before and after environments (formerly offered through the etoolbox package);
• Hooks used when loading files, packages, or classes (similar to what the filehook package now provides);
• Hooks in the page-building process (e.g., functionality previously available through packages such as atbegshi or atveryend and a few others).

Old templates modifying \document, \enddocument using \def may now break. Some old templates may need to make sure that packages like hyperref, cleveref are loaded last with

\AddToHook{begindocument}{
\RequirePackage{hyperref}}
\RequirePackage{cleverer}
\hypersetup{...}
}


If you had been using a template that has worked fine in the past, but now reports errors at \begin{document} when you switch to TL2021, you may want to continue using TL2020 and check with the template maintainer/author to see if they have released any updates to the template.

### siunitx

The siunitx package is now in v3, with many changes: see the package documentation for details.

Instead of \SI, \si, \SIlist, \SIrange, siunitx now provides more descriptive command names, so you can now write \qty{3.5}{\meter\per\second}; \unit{\kilo\ohm}; \qtylist{0.76;0.8;1.54}{\micro\gram}; \qtyrange{0.4}{2.5}{\centi\meter}, etc. The old commands will still work, but it is recommended to use the new commands.

However many options, including load, input-product, inter-unit-separator, input-complex-roots, quotient-mode, tab-format, unitspace, etc. have been deprecated. You'll encounter compile errors if you use these options now.

In addition, siunitx will no longer accept quotient inputs like \qty{1/3}{\metre}, unless you apply the parse-numbers=false option: \qty[parse-numbers=false]{1/3}{\metre}

For complex numbers, there are now special commands \complexnum{1+2i} or \complexqty{1+2i}{\metre}.

Previously you could write \SI{18}{\squared\second} or \SI{18}{\second\square} without incurring compile errors; the output just won't be correct (the superscript 2 will be missing). siunitx v3 is now stricter: \square must now be written before a unit, while \squared must be written after a unit; otherwise compile errors will be raised. That is to say: write \qty{18}{\square\second} or \qty{18}{\second\squared} always.

In earlier versions of siunitx, you could typeset a unit prefix e.g. \si{\micro}. This is no longer allowed in siunitx. Instead, you will need to write:

\DeclareSIUnit\noop{\relax}
\unit{\micro\noop}


as recommended in the siunitx package documentation.

### Obsolete packages

The catoptions package is incompatible with TeX Live 2021; a simple \usepackage{catoptions} will promptly give you an error. Don't use it; instead, consider a newer alternative, e.g. xkeyval, pgfkeys, or l3keys2e.

This also means any package that uses catoptions internally will also now fail, e.g. the xwatermark package. You can use alternative packages that offer similar functionalities, for example draftwatermark.

The tocstyle, tabu packages are now also obsolete, and should not be used.

### Assorted notes

Be mindful of the following notes when using TL2021:

• Don't put blank lines in \author{...}, \title{...}, \date{...}. The default \maketitle in TL2021 will complain very loudly.
• The polyglossia and babelbib packages are not compatible now, so use babel instead of polyglossia, if you need to continue using babelbib in your project.
• Some old templates' re-definition of \@xfloat will break figure environments; contact template maintainer for updates.
• When using \documentclass{amsart}, captions might be misaligned. You can add \captionindent=0pt as a fix.
• When using \documentclass[linenumbers]{aastex631}, tabulars with auto-wrapping p{...} columns will raise errors. As a workaround, you may need to add \nolinenumbers before the tabular to suppress line-numbering, and then add \linenumbers after the tabular, to re-enable them.

## Where can I find information on previous TeX Live versions?

Full TeX Live release notes for all versions can be found on the TUG website. We’ve also written helpful updates for previous releases including TeX Live 2020, TeX Live 2019, TeX Live 2018 and TeX Live 2016.

## Getting Help

As always, if you need help at any time with your Overleaf project, then please reach out to our support team, providing the link to your project, and they’ll try to help!

Tags: