> 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/id/pertanyaan-and-jawaban/04-can-i-add-inline-or-margin-comments-to-the-pdf.md).

# Bisakah saya menambahkan komentar sebaris atau komentar margin ke PDF?

Ya, Anda dapat menggunakan [`todonotes` ke preambel dokumen Anda (seperti disarankan](https://ctan.org/pkg/todonotes?lang=en) (dibahas di sini) atau baca halaman bantuan kami tentang [catatan pinggir](/latex/id/pemformatan/15-margin-notes.md), yang membahas [`\marginpar` perintah](/latex/id/pemformatan/15-margin-notes.md#the-5cmarginpar-command) dan [`marginnote` ke preambel dokumen Anda (seperti disarankan](/latex/id/pemformatan/15-margin-notes.md#an-alternative-to-5cmarginpar-the-marginnote-package).

## Memuat paket todonotes

Untuk menggunakan `todonotes` paket, tambahkan baris berikut ke pembukaan dokumen Anda:

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

Fitur `colorinlistoftodos` opsi menambahkan kotak-kotak kecil berwarna ke daftar catatan todo (lihat di bawah), membantu membedakan antara berbagai jenis.

* **Catatan**: Pembaca sangat dianjurkan untuk menelusuri [`todonotes` dokumentasi](http://mirrors.ctan.org/macros/latex/contrib/todonotes/todonotes.pdf) untuk informasi tentang opsi paket, perintah yang berguna, dan contoh-contoh bermanfaat.

Gunakan perintah berikut untuk menambahkan komentar:

```latex
\todo{Ini adalah komentar yang akan muncul di margin}
```

## Contoh penggunaan paket todonotes

Berikut adalah contoh dasar untuk membantu Anda memulai: ini mendemonstrasikan berbagai gaya catatan dan menghasilkan daftar catatan todo melalui perintah

```latex
\listoftodos[Judul daftar Anda...]
```

yang mengambil argumen opsional, yang diapit dalam `[...]`, yang digunakan untuk menata judul untuk daftar catatan.

```latex
\documentclass[a4paper]{article}
\usepackage[colorlinks]{hyperref}
\usepackage[colorinlistoftodos]{todonotes}
\begin{document}
\listoftodos[Daftar hal yang perlu saya selesaikan]

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla
\todo{Catatan todonotes biasa.} 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]{Catatan todonote dengan warna berbeda.}%
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]{Catatan todonote yang hanya ditampilkan di margin dan tidak di
daftar 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]{Catatan dengan ukuran font kecil.}%
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]{tes tes}

Donec nulla lectus, faucibus sit amet, auctor non, consectetuer
quis, pede. Nullam dictum. Nullam suscipit, ligula in scelerisque
\todo[noline]{Catatan tanpa garis penghubung kembali ke teks.}%
posuere, sapien purus rutrum magna, vitae pharetra leo quam vel
tortor. Donec eleifend condimentum sapien. Etiam sed orci. Aliquam
\todo[inline, color=red!50]{Catatan todonotes sebaris.}%
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]{Catatan tanpa garis penghubung kembali ke teks.}%
in nibh bibendum volutpat. Quisque accumsan diam. Aenean ultricies
nisl ac lacus. Aliquam posuere. Aenean venenatis tortor in felis.
\end{document}
```

Buka contoh ini di Overleaf

Contoh ini menghasilkan keluaran berikut:

![Mendemonstrasikan paket todonotes di Overleaf](/files/970b4091a8717e89a0fd38d0fa56c3272747c947)

## Bacaan lanjutan

* Fitur [`todonotes` dokumentasi](http://mirrors.ctan.org/macros/latex/contrib/todonotes/todonotes.pdf) memiliki informasi tentang opsi paket, perintah yang berguna, dan contoh-contoh bermanfaat.
* Halaman bantuan Overleaf tentang [catatan pinggir](/latex/id/pemformatan/15-margin-notes.md) membahas [`\marginpar` perintah](/latex/id/pemformatan/15-margin-notes.md#the-5cmarginpar-command) dan [`marginnote` ke preambel dokumen Anda (seperti disarankan](/latex/id/pemformatan/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/id/pertanyaan-and-jawaban/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.
