> 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/pt/manutencao/extending-tex-live.md).

# Expandir o TeX Live

É possível estender uma imagem TeX Live existente usando um novo Dockerfile e configurar a aplicação para usar a nova imagem.

Aqui oferecemos algumas orientações para instalar novos pacotes ou fontes, mas a configuração de uma imagem personalizada não está coberta pelos nossos termos de suporte.

As imagens TeX Live recebem atualizações pouco frequentes. Sugerimos reconstruir imagens personalizadas ao atualizar o Server Pro.

{% hint style="danger" %}
As seções seguintes aplicam-se ao Server Pro e [Compilações em sandbox](broken://pages/138a0102db4225d7cc5647c97b88312152073ca0) apenas.
{% endhint %}

### Instalação e atualização de novos pacotes

Você pode usar `tlmgr` comandos como `tlmgr install` e `tlmgr update` para gerenciar pacotes do TeX Live como no exemplo a seguir:

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

RUN tlmgr update --force ebproof
```

### Usando `tlmgr` em uma imagem TeX Live mais antiga

Por padrão `tlmgr` baixa recursos da versão mais recente do TeX Live. Ao aplicar patches a uma imagem TeX Live mais antiga, os downloads precisam ser redirecionados para o respetivo arquivo. Veja a lista em <https://www.tug.org/historic/> para espelhos dos arquivos.

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

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

RUN tlmgr update --force ebproof
```

### Instalação de novas fontes

Existem diferentes procedimentos para instalar novas fontes numa distribuição TeX Live, e instalar uma fonte personalizada pode exigir várias etapas. Consultar as [instruções para instalar fontes TeX](https://tug.org/fonts/fontinstall.html) na documentação oficial do TeX Live é provavelmente um bom ponto de partida.

O seguinte `Dockerfile` mostra um exemplo de instalação de uma fonte TrueType sobre uma imagem TeX Live 2022 existente:

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

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

# reconstruir a cache de informações de fontes
RUN fc-cache
```

### Configurar o Server Pro para usar as novas imagens

Use o nome `ghcr.io/ayaka-notes/texlive-full` e uma etiqueta personalizada para construir a nova imagem, como em:

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

Agora podemos configurar o Server Pro para usar a nova `2023.1-custom` imagem atualizando as `TEX_LIVE_DOCKER_IMAGE` e `ALL_TEX_LIVE_DOCKER_IMAGES` variáveis de 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 %}

No exemplo acima, os novos projetos são definidos por padrão para usar a nova `2023.1-custom` imagem, enquanto `2023.1` ainda está disponível quando for necessário.


---

# 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/pt/manutencao/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.
