> 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/fi/yllapito/extending-tex-live.md).

# TeX Liven laajentaminen

Olemassa olevaa TeX Live -kuvaa on mahdollista laajentaa uudella Dockerfilellä ja määrittää sovellus käyttämään uutta kuvaa.

Tässä annamme joitakin ohjeita uusien pakettien tai fonttien asentamiseen, mutta mukautetun kuvan määrittäminen ei kuulu tukiehtojemme piiriin.

TeX Live -kuvat päivittyvät harvoin. Suosittelemme rakentamaan mukautetut kuvat uudelleen, kun Server Pro päivitetään.

{% hint style="danger" %}
Seuraavat osiot koskevat Server Prota ja [Hiekkalaatikossa suoritettavat käännökset](broken://pages/d2b36fccb235d9f16774964c517c180d49570220) vain.
{% endhint %}

### Uusien pakettien asentaminen ja päivittäminen

Voit käyttää `tlmgr` esimerkiksi komentoja kuten `tlmgr install` ja `tlmgr update` TeX Live -pakettien hallintaan seuraavan esimerkin mukaisesti:

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

RUN tlmgr update --force ebproof
```

### Käyttäminen `tlmgr` vanhemmassa TeX Live -kuvassa

Oletusarvoisesti `tlmgr` lataa resurssit TeX Liven uusimmasta julkaisusta. Kun vanhempaa TeX Live -kuvaa paikataan, lataukset on vaihdettava kyseiseen arkistoon. Katso luettelo osoitteessa <https://www.tug.org/historic/> arkistojen peilikopioita varten.

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

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

RUN tlmgr update --force ebproof
```

### Uusien fonttien asentaminen

TeX Live -jakelussa uusien fonttien asentamiseen on erilaisia menettelytapoja, ja mukautetun fontin asentaminen voi vaatia useita vaiheita. Tarkistamalla [TeX-fonttien asennusohjeet](https://tug.org/fonts/fontinstall.html) virallisessa TeX Live -dokumentaatiossa on todennäköisesti hyvä lähtökohta.

Seuraava `Dockerfile` näyttää esimerkin TrueType-fontin asentamisesta olemassa olevan TeX Live 2022 -kuvan päälle:

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

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

# rakenna fonttitietovälimuisti uudelleen
RUN fc-cache
```

### Server Pron määrittäminen käyttämään uusia kuvia

Käytä nimeä `ghcr.io/ayaka-notes/texlive-full` ja mukautettua tunnistetta uuden kuvan rakentamiseen, kuten:

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

Voimme nyt määrittää Server Pron käyttämään uutta `2023.1-custom` kuvaa päivittämällä `TEX_LIVE_DOCKER_IMAGE` ja `ALL_TEX_LIVE_DOCKER_IMAGES` ympäristömuuttujat:

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

Yllä olevassa esimerkissä uudet projektit määritetään oletusarvoisesti käyttämään uutta `2023.1-custom` kuvaa, kun taas `2023.1` on edelleen käytettävissä, kun sitä tarvitaan.


---

# 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/fi/yllapito/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.
