> 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/texlive/uk/navichki/dodavannya-zalezhnostei-latex.md).

# Додавання залежностей LaTeX

Якщо у вас є `.cls`, `.sty`, `.bst` файли у вашому проєкті, процес компіляції Overleaf не зможе знайти ці файли, якщо їх не розмістити на верхньому рівні.

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

Добра новина полягає в тому, що ми можемо вказати власні `TEXINPUTS` каталоги за допомогою `latexmkrc` файлу, щоб Overleaf знав, що йому потрібно шукати у цьому каталозі файли пакета.

Щоб зробити це, припустімо, що ви помістили ці файли пакета в папку з назвою `tex/`; а файли стилю бібліографії — у папку з назвою `bst/`:

1. Натисніть «Add file» у верхній частині бічної панелі проєкту.
2. Виберіть «Blank file» і збережіть файл під назвою `latexmkrc` (якщо його там ще немає).
3. Вставте такий рядок у `latexmkrc`:

   ```perl
   $ENV{'TEXINPUTS'}='./tex//:' . $ENV{'TEXINPUTS'}; 
   $ENV{'BSTINPUTS'}='./bst//:' . $ENV{'BSTINPUTS'};
   ```

   (або змініть на відповідні назви папок у вашому проєкті)

Тепер Overleaf спочатку шукатиме `tex/` папку, перш ніж шукати в системних `TEXINPUTS` щоб знайти файли пакета, а `bst/` папку, перш ніж шукати в системних `BSTINPUTS` щоб знайти файли стилю бібліографії.

(Джерело: <https://tex.stackexchange.com/a/50847>)

{% hint style="info" %}
Ваш основний файл документа та ваш `latexmkrc` файл повинні залишатися на верхньому рівні вашого проєкту, а не в папці.
{% endhint %}


---

# 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/texlive/uk/navichki/dodavannya-zalezhnostei-latex.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.
