> 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/struktur-dokumen/03-cross-referencing-sections-equations-and-floats.md).

# Saling-referensi bagian, persamaan, dan float

Jika Anda perlu menyisipkan cross-reference ke elemen bernomor dalam dokumen, (seperti persamaan, bagian, dan gambar) ada perintah untuk mengotomatiskannya di LaTeX. Artikel ini menjelaskan caranya.

## Pendahuluan

Di bawah ini Anda dapat melihat contoh sederhana cross-reference gambar berdasarkan nomor caption gambarnya:

```latex
\section{Pendahuluan} \label{introduction}
Ini adalah paragraf pengantar dengan beberapa teks dummy. Bagian ini akan dirujuk nanti.

\begin{figure}[h]
\centering
\includegraphics[width=0.3\linewidth]{overleaf-logo}
\caption{Gambar ini akan dirujuk di bawah.}
\label{fig:leaf}
\end{figure}

Anda dapat mereferensikan gambar; misalnya, Gambar \ref{fig:leaf} menunjukkan logo \textit{Overleaf}.
```

![CrossReferencesEx1Overleaf.png](/files/417b95f79abc053136521433b7d495fbfd70351d)

Perintah `\label{ }` digunakan untuk menetapkan pengenal setelah caption, yang kemudian digunakan dalam perintah `\ref{ }` untuk menetapkan referensi.

[Buka contoh di Overleaf](https://www.overleaf.com/project/new/template/19401?id=65465598\&templateName=Cross+referencing+example\&latexEngine=\&texImage=texlive-full%3A2020.1\&mainFile=)

## Mereferensikan bagian dan bab

Di bawah ini contoh cara mereferensikan sebuah bagian

```latex
\section{Pendahuluan} \label{introduction}
Ini adalah paragraf pengantar dengan beberapa teks dummy. Bagian ini akan dirujuk nanti.

\begin{figure}[h]
\centering
\includegraphics[width=0.3\linewidth]{overleaf-logo}
\caption{Gambar ini akan dirujuk di bawah.}
\label{fig:leaf}
\end{figure}

Anda dapat mereferensikan gambar; misalnya, Gambar \ref{fig:leaf} menunjukkan logo \textit{Overleaf}.
\vspace{0.5cm}

\section{Referensi matematika} \label{mathrefs}
Seperti disebutkan dalam bagian \ref{introduction}, elemen yang berbeda dapat direferensikan dalam sebuah dokumen.
```

![CrossReferencesEx3Overleaf.png](/files/d8f9af414f6128a5277533b84fd95e96538594eb)

Sekali lagi, perintah `\label` dan `\ref` digunakan untuk referensi. Label *label* ditetapkan setelah `\section` pernyataan, yaitu `\label` perintah harus ditambahkan setelah nomor penghitung untuk bagian telah dihasilkan. Ini juga berfungsi pada bab, subbagian, dan subsubbagian. Lihat [Bagian dan bab](/latex/id/struktur-dokumen/01-sections-and-chapters.md).

[Buka contoh di Overleaf](https://www.overleaf.com/project/new/template/19401?id=65465598\&templateName=Cross+referencing+example\&latexEngine=\&texImage=texlive-full%3A2020.1\&mainFile=)

## Mereferensikan persamaan, gambar, dan tabel

Pada [pendahuluan](#introduction) contoh sebuah gambar yang dirujuk telah ditampilkan, di bawah ini cross-referencing persamaan disajikan.

```latex
\section{Referensi matematika} \label{mathrefs}
Seperti disebutkan dalam bagian \ref{introduction}, elemen yang berbeda dapat direferensikan dalam sebuah dokumen.

\subsection{Deret pangkat} \label{subsection}

\begin{equation} \label{eq:1}
\sum_{i=0}^{\infty} a_i x^i
\end{equation}

Persamaan \ref{eq:1} adalah deret pangkat khas.
```

![CrossReferencesEx2Overleaf.png](/files/ada7e1b7e63877ad4f3543a8b679519fe2b47d7e)

Untuk contoh lebih lanjut dan lebih fleksibel dengan label dan referensi, lihat

* [Menyelaraskan persamaan dengan amsmath](/latex/id/matematika/06-aligning-equations-with-amsmath.md)
* [Tabel](/latex/id/gambar-dan-tabel/01-tables.md)
* [Menyisipkan Gambar](/latex/id/topik-lainnya/27-inserting-images.md)

[Buka contoh di Overleaf](https://www.overleaf.com/project/new/template/19401?id=65465598\&templateName=Cross+referencing+example\&latexEngine=\&texImage=texlive-full%3A2020.1\&mainFile=)

## Mereferensikan halaman suatu elemen

Elemen biasanya direferensikan berdasarkan nomor yang diberikan kepada mereka, tetapi jika perlu, Anda dapat menyisipkan halaman tempat elemen tersebut muncul.

```latex
\section{Referensi matematika} \label{mathrefs}
Seperti disebutkan dalam bagian \ref{introduction}, elemen yang berbeda dapat direferensikan dalam sebuah dokumen.

\subsection{Deret pangkat} \label{subsection}

\begin{equation} \label{eq:1}
\sum_{i=0}^{\infty} a_i x^i
\end{equation}

Persamaan \ref{eq:1} adalah deret pangkat khas.
\vspace{0.5cm}

%\Blindtext

\section{Bagian terakhir}
Dalam subbagian \ref{subsection} pada halaman \pageref{eq:1} disajikan contoh deret pangkat.
```

![CrossReferencesEx4Overleaf.png](/files/ced5cca35229ee77c13e051fc45b881253ecb6a3)

Perintah `\pageref` akan menyisipkan halaman tempat elemen yang *label* digunakan muncul. Pada contoh di atas persamaan 1. Perintah ini dapat digunakan dengan semua elemen bernomor lain yang disebutkan dalam artikel ini.

[Buka contoh di Overleaf](https://www.overleaf.com/project/new/template/19401?id=65465598\&templateName=Cross+referencing+example\&latexEngine=\&texImage=texlive-full%3A2020.1\&mainFile=)

## Menyusun dokumen dengan cross reference

Di Overleaf cross reference berfungsi langsung, tetapi agar cross reference berfungsi dengan benar di distribusi LaTeX lokal Anda, Anda harus mengompilasi dokumen Anda dua kali. Ada juga perintah yang dapat secara otomatis melakukan tugas tersebut agar semua referensi berfungsi. Misalnya, jika dokumen Anda disimpan sebagai `main.tex`.

`latexmk -pdf main.tex`

menghasilkan berkas `main.pdf` dengan semua cross-reference berfungsi. Untuk mengubah format output gunakan `-dvi` atau `-ps`.

## Bacaan lanjutan

Untuk informasi lebih lanjut lihat:

* [Membuat dokumen di LaTeX](/latex/id/dasar-dasar-latex/01-learn-latex-in-30-minutes.md)
* [Ekspresi matematika](/latex/id/matematika/01-mathematical-expressions.md)
* [Menyelaraskan persamaan dengan amsmath](/latex/id/matematika/06-aligning-equations-with-amsmath.md)
* [Menyisipkan Gambar](/latex/id/topik-lainnya/27-inserting-images.md)
* [Penempatan gambar dan tabel](/latex/id/gambar-dan-tabel/02-positioning-images-and-tables.md)
* [Indeks](/latex/id/struktur-dokumen/04-indices.md)
* [Glosarium](/latex/id/struktur-dokumen/05-glossaries.md)
* [Daftar isi](/latex/id/struktur-dokumen/02-table-of-contents.md)
* [Pengelolaan dalam proyek besar](/latex/id/struktur-dokumen/07-management-in-a-large-project.md)
* [Proyek LaTeX multi-berkas](/latex/id/struktur-dokumen/08-multi-file-latex-projects.md)
* [Hyperlink](/latex/id/struktur-dokumen/09-hyperlinks.md)
* [Penghitung](/latex/id/pemformatan/10-counters.md)
* [Pengantar LaTeX2ε yang tidak terlalu singkat](http://www.ctan.org/tex-archive/info/lshort/)


---

# 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/struktur-dokumen/03-cross-referencing-sections-equations-and-floats.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.
