> 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/on-premises-no/vedlikehold/extending-tex-live.md).

# Utvidelse av TeX Live

Det er mulig å utvide et eksisterende TeX Live-bilde ved å bruke en ny Dockerfile og konfigurere applikasjonen til å bruke det nye bildet.

Her tilbyr vi noen retningslinjer for å installere nye pakker eller fonter, men konfigurasjonen av et egendefinert bilde dekkes ikke av våre støttevilkår.

TeX Live-bildene får sjeldne oppdateringer. Vi anbefaler å bygge egendefinerte bilder på nytt når du oppgraderer Server Pro.

{% hint style="danger" %}
Følgende seksjoner gjelder for Server Pro og [Sandboxede kompileringer](broken://pages/4f979def104d19693bf7b10960542273f88e2bff) bare.
{% endhint %}

### Installering og oppdatering av nye pakker

Du kan bruke `tlmgr` kommandoer som `tlmgr install` og `tlmgr update` for å administrere Tex Live-pakker som i følgende eksempel:

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

RUN tlmgr update --force ebproof
```

### Bruk av `tlmgr` i et eldre TeX Live-bilde

Som standard `tlmgr` laster ned ressurser fra den nyeste TeX Live-utgivelsen. Når du tilpasser et eldre TeX Live-bilde, må nedlastingene byttes til det respektive arkivet. Se listen på <https://www.tug.org/historic/> for speilservere av arkiver.

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

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

RUN tlmgr update --force ebproof
```

### Installering av nye fonter

Det finnes ulike prosedyrer for å installere nye fonter i en Tex Live-distribusjon, og installasjon av en egendefinert font kan kreve flere steg. Å sjekke [instruksjonene for å installere TeX-fonter](https://tug.org/fonts/fontinstall.html) i den offisielle Tex Live-dokumentasjonen er sannsynligvis et godt utgangspunkt.

Følgende `Dockerfile` viser et eksempel på å installere en TrueType-font over et eksisterende Tex Live 2022-bilde:

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

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

# bygg opp fontinformasjonsmellomlageret på nytt
RUN fc-cache
```

### Konfigurering av Server Pro for å bruke de nye bildene

Bruk navnet `ghcr.io/ayaka-notes/texlive-full` og en egendefinert tag for å bygge det nye bildet, som i:

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

Vi kan nå konfigurere Server Pro til å bruke det nye `2023.1-custom` bildet ved å oppdatere `TEX_LIVE_DOCKER_IMAGE` og `ALL_TEX_LIVE_DOCKER_IMAGES` miljøvariablene:

{% 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 eksemplet over settes nye prosjekter som standard til å bruke det nye `2023.1-custom` bildet, mens `2023.1` fortsatt er tilgjengelig når det er nødvendig.


---

# 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/on-premises-no/vedlikehold/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.
