Skip to content
  • TeX Live 2022 Now Available!

    Posted by Paulo on August 10, 2022

    We’re pleased to announce that we’ve upgraded our LaTeX compile servers to make TeX Live 2022 live and available on Overleaf! As of August 2022, all new Overleaf projects will be based on TeX Live 2022 — 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 2022 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 2022 for existing projects?

    This is super easy with our Switch your TeX Live Compiler feature. 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.

    There are no big user-facing changes in TeX Live 2022. However, be mindful of the key changes presented in the next section.

    Key Changes in TeX Live 2022

    Considerations when using the hyperref package

    • Don't load \usepackage[utf8x]{inputenc} nor \usepackage{ucs} when you are also loading the hyperref package, otherwise you'll get compile error messages about unicode characters. See this Stack Overflow answer for reference.

    • Don't load \usepackage{hyperref} or \RequirePackage{hyperref} inside \AtBeginDocument{...} now; you may see errors like this:

      ! LaTeX hooks Error: Sorting rule for 'begindocument' hook applied too late.
      (hooks)              Try setting this rule earlier.
      

      Use \AddToHook{begindocument/before}{\usepackage{hyperref}} or \AddToHook{begindocument/before}{\RequirePackage{hyperref}} instead. See also this comment for reference.

    • Some older templates use the command \htmladdnormallink, but it has been removed from hyperref, so you would get errors complaining that this command was never defined. If you're working with such templates but would like to use TL2022 with your project, you can add

      \AddToHook{package/hyperref/after}{\def\htmladdnormallink#1#2{\href{#2}{#1}}}
      

      before your \documentclass declaration.

    Using boolean conditions within package options

    The option parser i.e. keyval has changed mid TL2021. Earlier if you had code like this:

    \documentclass{article}
    \newif\iffoo
    \usepackage[\iffoo top=1cm, \fi twoside]{geometry}
    \usepackage[style=authoryear,\iffoo dashed=false \fi]{biblatex}
    \addbibresource{refs.bib}
    \begin{document}
    Lorem ipsum \parencite{Wootton2016Manyweak,Wootton2016Press}
    \printbibliography
    \end{document}
    

    this would compile fine. But in TL2022, the same code may raise some cryptic errors, unless you take care to make sure there's no space before each \fi. It may also be more robust to test the conditions and load the package options separately, using the commands provided by each package as available:

    \newif\iffoo
    \usepackage[twoside]{geometry}
    \usepackage[style=authoryear]{biblatex}
    \iffoo
      \geometry{top=1cm}
      \ExecuteBibliographyOptions{dashed=false}
    \fi
    

    Or use \PassOptionsToPackage before loading the packages:

    \newif\iffoo
    \iffoo
      \PassOptionsToPackage{top=1cm}{geometry}
      \PassOptionsToPackage{dashed=false}{biblatex}
    \fi
    \usepackage[twoside]{geometry}
    \usepackage[style=authoryear]{biblatex}
    

    Updates to caption package

    The caption package has updated how some options or lengths are accessed. For example, in TeX Live 2021 and prior you can write

    \setcaptionmargin{2em}
    \setlength{\captionwidth}{0.8\textwidth}
    

    But in recent versions of caption, the uniform \captionsetup mechanism is used:

    \captionsetup{margin=2em}
    \captionsetup{width=0.8\textwidth}
    

    If you're trying to use the caption back in backward-compatibility mode: instead of \captionsetup{compatibility=true}, you'll have set

    \usepackage{caption}[=v1]
    

    or

    \usepackage{caption-light}
    

    now.

    units and siunitx

    It used to be that you could load both the units and siunitx packages in the same document; but this will now raise an error. Load only one of these packages; presumably siunitx since it is newer and is maintained.

    fontawesome and fontawesome5 when using moderncv

    moderncv is a popular class for creating customisable CVs and résumés, with a few pre-defined themes. The current version loads the fontawesome5 for inserting some symbols in some of its themes. This means you can no longer load \usepackage{fontawesome} yourself in your .tex file: The fontawesome package is older, and cannot be loaded together with fontawesome5.

    Therefore if you had previously used fontawesome in your .tex file with the moderncv class, you should now remove \usepackage{fontawesome}, and make sure to use only fontawesome5 commands for any symbols that you have added in your document.

    Using custom fonts and the newtxtext, newpxtext packages with XeLaTeX, LuaLaTeX

    If you're using the newtxtext or newpxtext packages with the XeLaTeX or LuaLaTeX compilers, you may discover now that fontspec can't locate other typefaces/fonts, even though they are installed on the system and previously working fine on TL2021:

    \documentclass{article}
    \usepackage{newtxtext}  % or newpxtext 
    \setsansfont{Ubuntu}
    \begin{document}
    Lorem \textsf{ipsum}
    \end{document}
    

    This is due to newtxtext resetting fontspec font features, including (but not limited to) the path to locate font files. (See this StackExchange answer)

    If you can control the package loading order in your .tex file's preamble, you can set your own fonts first, before loading newtxtext or newpxtext:

    \documentclass{article}
    \usepackage{fontspec}
    \setsansfont{Ubuntu}
    \usepackage{newtxtext}
    \begin{document}
    Lorem \textsf{ipsum}
    \end{document}
    

    Alternatively, you can reset all font features after loading newtxtext or newpxtext:

    \documentclass{article}
    \usepackage{newtxtext}
    \defaultfontfeatures{}
    \setsansfont{Ubuntu}
    \begin{document}
    Lorem \textsf{ipsum}
    \end{document}
    

    If the newtxtext and/or newpxtext are loaded by a package or document class, where it's inconvenient (and not recommended) to modify the .cls or .sty file,, then you can add a document hook rule before the \documentclass declaration in your .tex file to reset the font features:

    \AddToHook{package/newtxtext/after}{\defaultfontfeatures{}}
    \AddToHook{package/newpxtext/after}{\defaultfontfeatures{}}
    \documentclass{foobarthesis}
    \setsansfont{Ubuntu}
    \begin{document}
    Lorem \textsf{ipsum}
    \end{document}
    

    In the same vein, be careful with using \defaultfontfeatures{Path=...} in your own preamble to access .ttf or .otf files in your subfolders — this may prevent other font-changing commands from functioning. It may be more robust to set the Path for each \setmainfont, \setsansfont, \newfontfamily, etc.

    kotex + hyperref + pdflatex

    Users might experience problems with kotex (for typesetting Korean) + hyperref + pdflatex in TL2022. Two solutions can be employed:

    • If situation allows, switch compiler to xelatex or lualatex (there is no need to change any code).
    • If pdflatex must be used: pass the cjk option to kotex i.e. \usepackage[cjk]{kotex}.

    Assorted notes

    Be mindful of the following notes when using TL2022:

    • It's highly advisable to not rely on \usepackage[utf8x]{inputenc} anymore. Note that omitting inputenc completely is the recommended way when you use UTF-8 as it's the default now for pdfLaTeX. Also, if circumstances allow, consider using XeLaTeX or LuaLaTeX instead.

    • For font commands, make sure to have them robust, otherwise they will fail within \MakeUppercase now.

    What’s New in TeX Live 2022?

    You can find the official release notes for TeX Live 2022 on the TeX Users Group (TUG) website. The key highlights are:

    Cross-engine extensions

    • New primitive \showstream to redirect \show output to a file.
    • New primitives \partokenname and \partokencontext allow overriding the name of the \par token emitted at blank lines, the end of vboxes, etc.

    pdfTeX:

    • Support structured destinations from PDF 2.0.
    • For letterspaced fonts, use explicit \fontdimen6 if specified.
    • Always start a warning at the beginning of a line.
    • For characters with autokern (\pdfappendkern and \pdfprependkern), still do protrusion; likewise, autokern both implicit and explicit hyphens.

    LuaTeX

    • Support structured destinations from PDF 2.0.
    • PNG /Smask for PDF 2.0.
    • Different radical style defaults in mathdefaultsmode.
    • Optionally block selected discretionary creation.
    • Improvements for TrueType fonts implementation.
    • More efficient \fontdimen allocation.
    • Ignore paragraphs with only a local par node followed by direction synchronization nodes.

    It's worth noting that the underlying operating system is Ubuntu 22.04, which along with TeX Live 2022 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?).

    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 2021, 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!


    Post scriptum: it is worth mentioning that, with TeX Live 2022, you can also create documents featuring an interesting walk routine as a page numbering style. But maybe that's far too silly. 😀

Sign up for a free account and receive regular updates

Register

Popular Tags


Start writing now!

Create A New Paper

Overleaf is Free

New to LaTeX?
Start with a template

Company