> 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/pytania-i-odpowiedzi/04-can-i-add-inline-or-margin-comments-to-the-pdf.md).

# Czy mogę dodawać komentarze w tekście lub na marginesie do PDF-a?

Tak, możesz użyć [`todonotes` pakietu](https://ctan.org/pkg/todonotes?lang=en) (omówione tutaj) lub przeczytaj naszą stronę pomocy o [notatkach na marginesie](/latex/pl/formatowanie/15-margin-notes.md), która omawia [`\marginpar` polecenie](/latex/pl/formatowanie/15-margin-notes.md#the-5cmarginpar-command) oraz [`marginnote` pakietu](/latex/pl/formatowanie/15-margin-notes.md#an-alternative-to-5cmarginpar-the-marginnote-package).

## Ładowanie pakietu todonotes

Aby użyć `todonotes` pakietu, dodaj następującą linię do preambuły dokumentu:

```latex
\usepackage[colorinlistoftodos]{todonotes}
```

Ta `colorinlistoftodos` opcja dodaje małe kolorowe kwadraty do listy notatek todo (zob. poniżej), pomagając odróżnić różne typy.

* **Uwaga**: Czytelnikom zdecydowanie zaleca się przejrzenie [`todonotes` dokumentację](http://mirrors.ctan.org/macros/latex/contrib/todonotes/todonotes.pdf) w celu uzyskania informacji o opcjach pakietu, przydatnych poleceniach i pomocnych przykładach.

Użyj następującego polecenia, aby dodać komentarz:

```latex
\todo{To jest komentarz, który pojawi się na marginesie}
```

## Przykład użycia pakietu todonotes

Poniżej znajduje się podstawowy przykład, który pomoże Ci zacząć: pokazuje różne style notatek i tworzy listę notatek todo za pomocą polecenia

```latex
\listoftodos[Tytuł Twojej listy...]
```

które przyjmuje opcjonalny argument, ujęty w `[...]`, używany do składania tytułu listy notatek.

```latex
\documentclass[a4paper]{article}
\usepackage[colorlinks]{hyperref}
\usepackage[colorinlistoftodos]{todonotes}
\begin{document}
\listoftodos[Lista rzeczy, które muszę dokończyć]

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla
\todo{Zwykłe todonotes.} urna. Maecenas interdum nunc in augue.
Mauris quis massa in ante tincidunt mollis. Proin imperdiet.
Donec porttitor pede id est. Sed in ante. Integer id arcu. Nam
lectus nisl, posuere sit amet, imperdiet ut, tristique ac, lorem.
In erat. In commodo enim. \todo[color=blue!40]{Notatka todo w innym kolorze.}%
Phasellus libero ipsum, tempor a, pharetra consequat, pellentesque
sit amet, sem. Praesent ut augue luctus elit adipiscing ultricies.
Vestibulum suscipit cursus leo. Nullam molestie justo.

Morbi dui. Morbi convallis mi sed sem. Nulla convallis lacus vitae
risus. Phasellus adipiscing. Nullam tortor. Sed laoreet aliquam
ante. Vestibulum diam. Pellentesque nec leo. Pellentesque velit.
\todo[nolist]{Notatka todo, która jest widoczna tylko na marginesie i nie w
liście zadań todo.}%
Praesent congue mi eu ipsum cursus fringilla. Etiam leo erat,
tristique et, pharetra eget, mollis vitae, velit. In hac habitasse
\todo[size=\small, color=green!40]{Notatka o małej czcionce.}%
platea dictumst. In quam nibh, facilisis et, laoreet non, facilisis
tempus, justo. Class aptent taciti sociosqu ad litora torquent per
conubia nostra, per inceptos himenaeos.

\todo[inline]{test test}

Donec nulla lectus, faucibus sit amet, auctor non, consectetuer
quis, pede. Nullam dictum. Nullam suscipit, ligula in scelerisque
\todo[noline]{Notatka bez linii prowadzącej z powrotem do tekstu.}%
posuere, sapien purus rutrum magna, vitae pharetra leo quam vel
tortor. Donec eleifend condimentum sapien. Etiam sed orci. Aliquam
\todo[inline, color=red!50]{Wbudowane notatki todo.}%
tempor. Pellentesque egestas tortor id eros. Donec mauris justo,
commodo id, pellentesque id, eleifend non, mi. Duis venenatis
sagittis metus. Donec tempus metus id lacus. Praesent vel diam.
Morbi nec ante. Vestibulum varius felis ac lacus. Nulla vitae neque
\todo[inline, color=green!40]{Notatka bez linii prowadzącej z powrotem do tekstu.}%
in nibh bibendum volutpat. Quisque accumsan diam. Aenean ultricies
nisl ac lacus. Aliquam posuere. Aenean venenatis tortor in felis.
\end{document}
```

Otwórz ten przykład w Overleaf

Ten przykład generuje następujący wynik:

![Prezentacja pakietu todonotes w Overleaf](/files/16d9de7a24922321b14838e7d56ca411aeac4121)

## Dalsza lektura

* Ta [`todonotes` dokumentację](http://mirrors.ctan.org/macros/latex/contrib/todonotes/todonotes.pdf) zawiera informacje o opcjach pakietu, przydatnych poleceniach i pomocnych przykładach.
* Strona pomocy Overleaf dotycząca [notatkach na marginesie](/latex/pl/formatowanie/15-margin-notes.md) omawia [`\marginpar` polecenie](/latex/pl/formatowanie/15-margin-notes.md#the-5cmarginpar-command) oraz [`marginnote` pakietu](/latex/pl/formatowanie/15-margin-notes.md#an-alternative-to-5cmarginpar-the-marginnote-package).


---

# 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/pytania-i-odpowiedzi/04-can-i-add-inline-or-margin-comments-to-the-pdf.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.
