> 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/latex/it/file-di-classe/01-understanding-packages-and-class-files.md).

# Comprendere i pacchetti e i file di classe

La formattazione predefinita nei documenti LaTeX è determinata dalla **classe** utilizzata da quel documento. Questo aspetto predefinito può essere modificato e ulteriori funzionalità possono essere aggiunte mediante una **pacchetto**. I nomi dei file di classe hanno l' **.cls** estensione, i nomi dei file di pacchetto hanno l' **.sty** estensione.

## Differenza tra classi e pacchetti

A volte è difficile prendere una decisione quando si tratta di scegliere se scrivere un pacchetto o una classe. La regola di base è che, se il tuo file contiene comandi che controllano l'aspetto della struttura logica di un tipo speciale di documento, allora è una classe. Altrimenti, se il tuo file aggiunge funzionalità indipendenti dal tipo di documento, cioè che possono essere usate in libri, relazioni, articoli e così via; allora è un pacchetto.

Ad esempio, se un'azienda ha bisogno di relazioni con il marchio aziendale che usano un font speciale e hanno il logo dell'azienda nel piè di pagina; serve una nuova classe.

Se l'azienda ha bisogno di un nuovo comando che renda più facile evidenziare frasi importanti all'interno di un documento, in questo scenario andrà bene un nuovo pacchetto.

## Letture aggiuntive

Per ulteriori informazioni vedi

* [Scrivere un proprio pacchetto](/latex/it/file-di-classe/03-writing-your-own-package.md)
* [Scrivere una propria classe](/latex/it/file-di-classe/04-writing-your-own-class.md)
* [LaTeX2ε per gli autori di classi e pacchetti](http://www.latex-project.org/guides/clsguide.pdf)


---

# 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/latex/it/file-di-classe/01-understanding-packages-and-class-files.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.
