> 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/it/competenze/aggiungere-dipendenze-latex.md).

# Aggiungere dipendenze LaTeX

Se hai `.cls`, `.sty`, `.bst` file nel tuo progetto, il processo di compilazione di Overleaf non sarà in grado di individuare questi file a meno che non siano collocati al livello principale.

Tuttavia, per organizzare il tuo progetto, potresti voler mettere questi file in cartelle in modo che siano più facili da trovare e che il livello principale del tuo progetto non sia ingombro.

La buona notizia è che possiamo specificare directory personalizzate `TEXINPUTS` usando il `latexmkrc` file, in modo che Overleaf sappia che deve cercare in quella directory i file dei pacchetti.

Per farlo, supponiamo che tu abbia messo questi file di pacchetto in una cartella chiamata `tex/`; e rispettivamente i file di stile bibliografico in una cartella chiamata `bst/`:

1. Fai clic su “Add file” nella parte superiore della barra laterale del progetto.
2. Seleziona “Blank file” e salva il nome del file come `latexmkrc` (se non è già presente).
3. Inserisci la seguente riga in `latexmkrc`:

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

   (o cambia con i nomi delle cartelle pertinenti nel tuo progetto)

Overleaf ora cercherà la `tex/` cartella per prima, prima di cercare nel sistema `TEXINPUTS` per individuare i file dei pacchetti, e `bst/` cartella per prima, prima di cercare nel sistema `BSTINPUTS` per individuare i file di stile bibliografico.

(Fonte: <https://tex.stackexchange.com/a/50847>)

{% hint style="info" %}
Il file del documento principale e il tuo `latexmkrc` file devono rimanere al livello principale del tuo progetto, non in una cartella.
{% 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/it/competenze/aggiungere-dipendenze-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.
