Skip to content
  • TeX Live 2024 is now available

    Posted on June 27, 2024

    TeX Live 2024 is now available on Overleaf. This update will give you access to new and updated TeX-related programs, fonts, and macro packages. This post covers all the key information and important changes you need to know about.

    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. Overleaf uses TeX Live on its compile servers to power the real-time preview and produce your project PDF.

    With the introduction of TeX Live 2024, users can expect enhanced performance, updated packages, and improved compatibility.

    Will my existing projects work as usual?

    Yes, your existing projects will still work as they will continue to use the TeX Live version from when they were created.

    Can I switch to TeX Live 2024 for existing projects?

    Yes, you can easily switch to TeX Live 2024 for existing projects; the transition is simple and hassle-free. In the project you want to change, click Menu and navigate to Settings ― you’ll see a dropdown to select the TeX Live version. This allows you to quickly update your project to fit the requirements of publishers, preprint servers, and other platforms that use a specific TeX Live version to compile submissions.

    If your project compiled without problems in TeX Live 2023 (or earlier versions), but is now throwing errors in TeX Live 2024, this can be due to changes in some packages. See below for some of the changes that might affect your project.

    Key changes in TeX Live 2024

    While there are no big user-facing changes in this year's version of TeX Live, the LaTeX team is approaching a new milestone towards tagged PDF files: a streamlined way of providing structural information about the content, such as headings, paragraphs, lists, and tabular content. Tagged PDF files are crucial for ensuring accessibility and usability for individuals with disabilities, particularly those who use screen readers. Read the full announcement from the LaTeX team.

    The fontspec package now supports variable fonts. A variable font is a single font file that contains multiple variations of a typeface (such as weight, width, and slant) that can be dynamically adjusted, offering greater flexibility and efficiency in design and typography. This feature is supported only in LuaLaTeX.

    You can find the official release notes for TeX Live 2024 on the TeX Users Group (TUG) website, as well as release notes for all versions.

    Potential error sources in TeX Live 2024

    Unrecognized options in xcolor

    Previously, xcolor would quietly ignore any unsupported options — e.g. \usepackage[all]{xcolor} would compile without any errors, even though there's no "all" option provided by xcolor. In TeX Live 2024, you will see an error message "Unknown option 'all' for package xcolor."

    To resolve this, remove the unrecognized option from the package declaration.

    Use of fontspec and mathspec together

    If you load the fontspec and mathspec packages together, TeX Live 2024 will show an error. In TeX Live 2023 and earlier, there wouldn't be any errors if you have:

    \usepackage[no-math]{fontspec}
    \usepackage{mathspec}
    

    To resolve this, you only need to load mathspec; it will automatically include fontspec.

    Use of beamer and lastpage together

    Some older beamer themes or templates might load the lastpage package to put a "slide \thepage{} of \pageref{LastPage}" in the beamer frame footlines. But loading the lastpage package in a beamer document will now cause an error "Undefined control sequence: … \Hy@PageAnchorSlide…"

    To resolve this, template authors can use beamer's own \inserttotalframenumber to insert the total number of frames instead of loading the lastpage package to use \pageref{LastPage}.

    Use of "footnotes" option in the markdown package

    The markdown package no longer has a "footnotes" option — use just "notes" instead.

    Order of hyperxmp and hyperref

    The hyperxmp package lets LaTeX document authors to store XMP metadata in their documents, and is usually used with hyperref. The order of loading these packages used to not matter — but now in TeX Live 2024, hyperref must be loaded before hyperxmp.

    hyperref and grouping

    Make sure to use correct grouping and environments when loading hyperref. This is sometimes due to misunderstanding on how a command or environment should be used.

    Here's an example. Some projects might load the setspace package, to make the document body text have a specific leading/spacing:

    \usepackage{setspace}
    \spacing{1.75}
    \usepackage{hyperref}
    

    This compiles without problems in earlier TeX Live versions, but the hyperref package would throw this error message: "LaTeX socket Error: Sockets can only be declared at top-level!"

    This is because \spacing is opening a new group. spacing is an environment defined by the setspace package, to be used as \begin{spacing}{1.75}...\end{spacing}, not a command. When it is used as \spacing{1.75}, there should be a corresponding \end{spacing} to close the group properly, before the hyperref package is loaded. Similar errors would arise if \doublespace, \onehalfspace, \singlespace are used — these are all really environment names.

    In the above example code snippet, we should use a genuine command (also defined by the setspace package) \setstretch{1.75}, not \spacing{1.75}. Correspondingly, we could use the commands \doublespacing, \onehalfspacing, \singlespacing without problems.

    microtype

    If you compile the following (small) LaTeX document in TeX Live 2024:

    \documentclass{article}
    \usepackage{microtype}
    \begin{document}
    
    \begin{center}
    \textbf{\Large{abc}} Not ok
    \end{center}
    
    \begin{center}
    \textbf{\Large abc} OK
    \end{center}
    
    \begin{center}
    {\Large\textbf{abc}} OK
    \end{center}
    \end{document}
    

    The first centered bold, large "abc" would throw an error "Argument of \MT@gobble@to@nil has an extra }"; but the other two would work fine. (Similar font commands like \Huge, \textit, \emph and text-alignment environments like flushleft, flushright would cause the same problems.) This is due to recent behavior of the microtype package, as discussed here.

    If you absolutely need to follow the first syntax, the workarounds are to either:

    • Add \microtypesetup{nopatch=item} in the preamble after loading the microtype package;
    • Or add an extra pair of braces at the start of the "center" environment:
      \begin{center}
      {}\textbf{\Large{abc}} Now ok!
      \end{center}
      

    TeX Live 2024 in Server Pro

    Server Pro customers can install TeX Live 2024 by updating their config and adopting the new image name quay.io/sharelatex/texlive-full:2024.1 in TEX_LIVE_DOCKER_IMAGE and prepending it to ALL_TEX_LIVE_DOCKER_IMAGES. No upgrade is required.

    Getting help

    As always, if you need help at any time with your Overleaf project, then please reach out to our support team at support@overleaf.com, providing the link to your project. We’re here to help!

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