> 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/ru/obsluzhivanie/extending-tex-live.md).

# Расширение TeX Live

Можно расширить существующий образ TeX Live, используя новый Dockerfile, и настроить приложение на использование нового образа.

Здесь мы предлагаем несколько рекомендаций по установке новых пакетов или шрифтов, но настройка собственного образа не покрывается нашими условиями поддержки.

Образы TeX Live обновляются нечасто. Мы рекомендуем пересобирать пользовательские образы при обновлении Server Pro.

{% hint style="danger" %}
Следующие разделы относятся к Server Pro и [Изолированные компиляции](broken://pages/87d3d92a07a8adf3e0e89789d3a72d83dff94452) только.
{% endhint %}

### Установка и обновление новых пакетов

Можно использовать `tlmgr` команды, такие как `tlmgr install` и `tlmgr update` для управления пакетами TeX Live, как в следующем примере:

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

RUN tlmgr update --force ebproof
```

### Использование `tlmgr` в более старом образе TeX Live

По умолчанию `tlmgr` загружает ресурсы из последнего выпуска TeX Live. При патчинге более старого образа TeX Live загрузки нужно переключить на соответствующий архив. См. список в <https://www.tug.org/historic/> для зеркал архивов.

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

RUN tlmgr option repository <MIRROR>/systems/texlive/<YEAR>/tlnet-final
# например, RUN tlmgr option repository ftp://tug.org/historic/systems/texlive/2022/tlnet-final

RUN tlmgr update --force ebproof
```

### Установка новых шрифтов

Существуют разные способы установки новых шрифтов в дистрибутиве TeX Live, и установка собственного шрифта может потребовать нескольких шагов. Изучение [инструкций по установке шрифтов TeX](https://tug.org/fonts/fontinstall.html) в официальной документации TeX Live, вероятно, будет хорошей отправной точкой.

Следующий `Dockerfile` показывает пример установки шрифта TrueType поверх существующего образа TeX Live 2022:

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

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

# пересобрать кэш информации о шрифтах
RUN fc-cache
```

### Настройка Server Pro для использования новых образов

Используйте имя `ghcr.io/ayaka-notes/texlive-full` и собственный тег для сборки нового образа, как в примере:

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

Теперь мы можем настроить Server Pro на использование нового `2023.1-custom` образа, обновив `TEX_LIVE_DOCKER_IMAGE` и `ALL_TEX_LIVE_DOCKER_IMAGES` переменные окружения:

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

В приведённом выше примере новые проекты по умолчанию настроены на использование нового `2023.1-custom` образа, в то время как `2023.1` по-прежнему доступен, когда это необходимо.


---

# 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/ru/obsluzhivanie/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.
