> 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/sv/underhall/extending-tex-live.md).

# Utöka TeX Live

Det är möjligt att utöka en befintlig TeX Live-avbildning med en ny Dockerfile och konfigurera applikationen att använda den nya avbildningen.

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

TeX Live-avbildningarna uppdateras sällan. Vi föreslår att du bygger om anpassade avbildningar när du uppgraderar Server Pro.

{% hint style="danger" %}
Följande avsnitt gäller för Server Pro och [Kompileringar i sandlåda](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
```

### Använda `tlmgr` i en äldre TeX Live-avbildning

Som standard `tlmgr` laddas resurser ner från den senaste TeX Live-versionen. När du patchar en äldre TeX Live-avbildning måste nedladdningarna bytas till respektive arkiv. Se listan på <https://www.tug.org/historic/> för spegelservrar för 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 procedurer för att installera nya typsnitt i en TeX Live-distribution, och att installera ett anpassat typsnitt kan kräva flera steg. Att kontrollera [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-avbildning:

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

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

# bygg om cachen med typsnittsdata
RUN fc-cache
```

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

Använd namnet `ghcr.io/ayaka-notes/texlive-full` och en anpassad tagg för att bygga den nya avbildningen, 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` avbildningen 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` avbildningen, 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://overleaf-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.
