> For the complete documentation index, see [llms.txt](https://ayakaleaf-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://ayakaleaf-pro.ayaka.space/on-premises/sv/underhall/extending-tex-live.md).

# Utöka TeX Live

Det går att utöka en befintlig TeX Live-avbild med en ny Dockerfile och konfigurera programmet att använda den nya avbilden.

Här erbjuder vi några riktlinjer för att installera nya paket eller typsnitt, men konfigurationen av en anpassad avbild omfattas inte av våra supportvillkor.

TeX Live-avbilderna uppdateras sällan. Vi föreslår att anpassade avbilder byggs om när Server Pro uppgraderas.

{% hint style="danger" %}
Följande avsnitt gäller Server Pro och [Sandboxade kompileringar](broken://pages/bad0e19dd7937326e78c42384b9f919da2ae8f76) endast.
{% endhint %}

### Installera och uppdatera nya paket

Du kan använda `tlmgr` kommandon som `tlmgr install` och `tlmgr update` för att hantera Tex Live-paket enligt följande exempel:

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

RUN tlmgr update --force ebproof
```

### Med `tlmgr` i en äldre TeX Live-avbild

Som standard `tlmgr` hämtar resurser från den senaste TeX Live-utgåvan. När en äldre TeX Live-avbild patchas behöver nedladdningarna bytas till motsvarande arkiv. Se listan i <https://www.tug.org/historic/> för speglar av arkiv.

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

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

RUN tlmgr update --force ebproof
```

### Installera nya typsnitt

Det finns olika metoder för att installera nya typsnitt i en Tex Live-distribution, och att installera ett anpassat typsnitt kan kräva flera steg. Att titta på [instruktionerna för att installera TeX-typsnitt](https://tug.org/fonts/fontinstall.html) i den officiella Tex Live-dokumentationen är förmodligen en bra utgångspunkt.

Följande `Dockerfile` visar ett exempel på att installera ett TrueType-typsnitt ovanpå en befintlig Tex Live 2022-avbild:

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

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

# bygg om cache för typsnittsinformation
RUN fc-cache
```

### Konfigurera Server Pro för att använda de nya avbilderna

Använd namnet `ghcr.io/ayaka-notes/texlive-full` och en anpassad tagg för att bygga den nya avbilden, som i:

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

Nu kan vi konfigurera Server Pro att använda den nya `2023.1-custom` avbilden genom att uppdatera `TEX_LIVE_DOCKER_IMAGE` och `ALL_TEX_LIVE_DOCKER_IMAGES` miljövariablerna:

{% 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 %}

I exemplet ovan är nya projekt som standard inställda på att använda den nya `2023.1-custom` avbilden, medan `2023.1` fortfarande är tillgänglig när den behövs.


---

# 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://ayakaleaf-pro.ayaka.space/on-premises/sv/underhall/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.
