> 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/latex/uk/faili-klasiv/01-understanding-packages-and-class-files.md).

# Розуміння пакетів і файлів класів

Стандартне форматування в документах LaTeX визначається **класом** який використовується цим документом. Цей вигляд за замовчуванням можна змінити, а додаткові можливості можна додати за допомогою **accents**. Імена файлів класів мають **.cls** розширення, а імена файлів пакетів мають **.sty** розширення.

## Різниця між класами та пакетами

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

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

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

## Додаткове читання

Для отримання додаткової інформації див.

* [Створення власного пакета](/latex/uk/faili-klasiv/03-writing-your-own-package.md)
* [Створення власного класу](/latex/uk/faili-klasiv/04-writing-your-own-class.md)
* [LaTeX2ε для авторів класів і пакетів](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://ayakaleaf-pro.ayaka.space/latex/uk/faili-klasiv/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.
