Overleaf docs
Plans and pricingTemplatesUser docsGo to Overleaf
On-premises
On-premises
  • Welcome
    • Server Pro vs. Community Edition
  • Release notes
    • Release notes 5.x.x
      • Doc version recovery
    • Release notes 4.x.x
    • Release notes 3.x.x
      • Full project history migration
    • Release notes 2.x.x
    • Release notes 1.x.x
    • Release notes 0.x.x
  • Getting started
    • Before you start
    • Requirements
      • Skills needed
      • Hardware requirements
      • Software requirements
    • Microservices
    • Server Pro infrastructure
    • What is the Overleaf Toolkit?
  • Installation
    • Introduction
    • Using the Toolkit
      • 1: Download the Toolkit
      • 2: Familiarize yourself with the Toolkit
      • 3: Initialize the configuration
      • 4. Choose Community Edition or Server Pro
      • 5. Personalizing your instance
      • 6. Post-installation tasks
    • Air-gapped/offline deployments
    • Upgrading TeX Live
  • Configuration
    • Overleaf Toolkit
      • Files and locations
      • Toolkit settings
      • Environment variables
      • Server Pro-only configuration
        • LDAP
        • SAML 2.0
        • Sandboxed Compiles
        • Git integration
        • Templates
        • Adding LaTeX user help
      • Logging
      • TLS proxy
      • Branding
      • Localization
      • Email delivery
      • Redis
      • S3
  • Maintenance
    • docker-compose.yml to Toolkit migration
    • Upgrading your deployment
    • Data and backups
      • Exporting projects
    • Extending TeX Live
    • Horizontal scaling
    • S3 migration
    • Updating MongoDB
  • User and project management
    • User management
      • Username migration
    • Understanding license usage
    • Project management
  • Support
    • Project limits
    • Troubleshooting
    • Getting help
    • Support guides
      • Using templates as an individual
    • Overleaf user docs
Powered by GitBook
LogoLogo

Discover Overleaf

  • Home
  • Features

Solutions

  • Plans and pricing
  • For universities
  • For business
  • For government

Resources

  • Templates
  • User docs and LaTeX learning
  • Blog

© Overleaf

On this page
  • Installing and updating new packages
  • Using tlmgr in an older TeX Live image
  • Installing new fonts
  • Configuring Server Pro to use the new images

Was this helpful?

Export as PDF
  1. Maintenance

Extending TeX Live

PreviousExporting projectsNextHorizontal scaling

Last updated 3 months ago

Was this helpful?

It's possible to extend an existing TeX Live image using a new Dockerfile and configure the application to use the new image.

Here we offer some guidelines to install new packages or fonts, but the configuration of a custom image is not covered by our support terms.

The TeX Live images receive infrequent updates. We suggest rebuilding custom images when upgrading Server Pro.

The following sections apply to Server Pro and only.

Installing and updating new packages

You can use tlmgr commands such as tlmgr install and tlmgr update to manage Tex Live packages as in the following example:

FROM quay.io/sharelatex/texlive-full:2023.1

RUN tlmgr update --force ebproof

Using tlmgr in an older TeX Live image

By default tlmgr downloads resources from the latest TeX Live release. When patching an older TeX Live image, the downloads need to be switched to the respective archive. See the list in https://www.tug.org/historic/ for mirrors of archives.

FROM quay.io/sharelatex/texlive-full:2022.1

RUN tlmgr option repository <MIRROR>/systems/texlive/<YEAR>/tlnet-final
# e.g. RUN tlmgr option repository ftp://tug.org/historic/systems/texlive/2022/tlnet-final

RUN tlmgr update --force ebproof

Installing new fonts

The following Dockerfile shows an example of installing a TrueType font over an existing Tex Live 2022 image:

FROM quay.io/sharelatex/texlive-full:2022.1

COPY ./myfonts/*.ttf /usr/share/fonts/truetype/myfont/

# rebuild font information cache
RUN fc-cache

Configuring Server Pro to use the new images

Use the name quay.io/sharelatex/texlive-full and a custom tag to build the new image, as in:

docker build -t quay.io/sharelatex/texlive-full:2023.1-custom

We can now configure Server Pro to use the new 2023.1-custom image updating the TEX_LIVE_DOCKER_IMAGE and ALL_TEX_LIVE_DOCKER_IMAGES environment variables:

TEX_LIVE_DOCKER_IMAGE: "quay.io/sharelatex/texlive-full:2023.1-custom"
ALL_TEX_LIVE_DOCKER_IMAGES: "quay.io/sharelatex/texlive-full:2023.1,quay.io/sharelatex/texlive-full:2023.1-custom"

In the example above new projects are set by default to use the new 2023.1-custom image, while 2023.1 is still available for when it's needed.

There are different procedures to install new fonts in a Tex Live distribution, and installing a custom font might require several steps. Checking the in the official Tex Live documentation is probably a good starting point.

Sandboxed Compiles
instructions to install TeX fonts