> 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/pl/pliki-klas/01-understanding-packages-and-class-files.md).

# Zrozumienie pakietów i plików klas

Domyślne formatowanie w dokumentach LaTeX jest określane przez **klasę** używaną przez dany dokument. Ten domyślny wygląd można zmienić, a więcej funkcji można dodać za pomocą **pakietu**. Pliki klas mają **.cls** rozszerzenie, a pliki pakietów mają **.sty** rozszerzenie.

## Różnica między klasami a pakietami

Czasami trudno podjąć decyzję, gdy trzeba wybrać, czy napisać pakiet, czy klasę. Podstawowa zasada jest taka, że jeśli Twój plik zawiera polecenia, które kontrolują wygląd logicznej struktury szczególnego typu dokumentu, to jest to klasa. W przeciwnym razie, jeśli Twój plik dodaje funkcje niezależne od typu dokumentu, tzn. mogące być używane w książkach, raportach, artykułach i tak dalej, to jest to pakiet.

Na przykład, jeśli firma potrzebuje firmowych raportów, które używają specjalnej czcionki i mają logo firmy w stopce; potrzebujesz nowej klasy.

Jeśli firma potrzebuje nowego polecenia, które ułatwia wyróżnianie ważnych zdań w dokumencie, nowy pakiet sprawdzi się w tym scenariuszu.

## Dalsza lektura

Więcej informacji znajdziesz w

* [Pisanie własnego pakietu](/latex/pl/pliki-klas/03-writing-your-own-package.md)
* [Pisanie własnej klasy](/latex/pl/pliki-klas/04-writing-your-own-class.md)
* [LaTeX2ε dla autorów klas i pakietów](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/pl/pliki-klas/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.
