> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/on-premises/it/manutenzione/extending-tex-live.md).

# Estensione di TeX Live

È possibile estendere un'immagine TeX Live esistente utilizzando un nuovo Dockerfile e configurare l'applicazione per usare la nuova immagine.

Qui offriamo alcune linee guida per installare nuovi pacchetti o font, ma la configurazione di un'immagine personalizzata non è coperta dai nostri termini di supporto.

Le immagini TeX Live ricevono aggiornamenti poco frequenti. Suggeriamo di ricostruire le immagini personalizzate quando si aggiorna Server Pro.

{% hint style="danger" %}
Le sezioni seguenti si applicano a Server Pro e [Compilazioni in sandbox](broken://pages/fb8cf6f591d459be22557e87dd7d76658e53cc7e) solo.
{% endhint %}

### Installazione e aggiornamento di nuovi pacchetti

Puoi usare `tlmgr` comandi come `tlmgr install` e `tlmgr update` per gestire i pacchetti Tex Live come nell'esempio seguente:

```dockerfile
FROM ghcr.io/ayaka-notes/texlive-full:2023.1

RUN tlmgr update --force ebproof
```

### Utilizzando `tlmgr` in una immagine TeX Live più vecchia

Per impostazione predefinita `tlmgr` scarica risorse dalla release più recente di TeX Live. Quando si applicano patch a un'immagine TeX Live più vecchia, i download devono essere indirizzati al relativo archivio. Consulta l'elenco in <https://www.tug.org/historic/> per i mirror degli archivi.

```dockerfile
FROM ghcr.io/ayaka-notes/texlive-full:2022.1

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

RUN tlmgr update --force ebproof
```

### Installazione di nuovi font

Esistono diverse procedure per installare nuovi font in una distribuzione Tex Live, e l'installazione di un font personalizzato potrebbe richiedere diversi passaggi. Consultare le [istruzioni per installare i font TeX](https://tug.org/fonts/fontinstall.html) nella documentazione ufficiale di Tex Live è probabilmente un buon punto di partenza.

Il seguente `Dockerfile` mostra un esempio di installazione di un font TrueType su un'immagine Tex Live 2022 esistente:

```dockerfile
FROM ghcr.io/ayaka-notes/texlive-full:2022.1

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

# ricostruisci la cache delle informazioni sui font
RUN fc-cache
```

### Configurazione di Server Pro per usare le nuove immagini

Usa il nome `ghcr.io/ayaka-notes/texlive-full` e un tag personalizzato per costruire la nuova immagine, come in:

```bash
docker build -t ghcr.io/ayaka-notes/texlive-full:2023.1-custom
```

Ora possiamo configurare Server Pro per usare la nuova `2023.1-custom` immagine aggiornando le `TEX_LIVE_DOCKER_IMAGE` e `ALL_TEX_LIVE_DOCKER_IMAGES` variabili d'ambiente:

{% code overflow="wrap" %}

```
TEX_LIVE_DOCKER_IMAGE: "ghcr.io/ayaka-notes/texlive-full:2023.1-custom"
ALL_TEX_LIVE_DOCKER_IMAGES: "ghcr.io/ayaka-notes/texlive-full:2023.1,ghcr.io/ayaka-notes/texlive-full:2023.1-custom"
```

{% endcode %}

Nell'esempio sopra i nuovi progetti vengono impostati per impostazione predefinita per usare la nuova `2023.1-custom` immagine, mentre `2023.1` è ancora disponibile quando serve.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/on-premises/it/manutenzione/extending-tex-live.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
