> 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/ko/document-structure/03-cross-referencing-sections-equations-and-floats.md).

# 섹션, 수식 및 부동체 상호 참조

문서의 번호가 매겨진 요소(예: 수식, 섹션, 그림)에 상호 참조를 삽입해야 하는 경우, LaTeX에는 이를 자동화하는 명령어가 있습니다. 이 글에서는 그 방법을 설명합니다.

## 소개

아래에서 그림 캡션 번호로 상호 참조되는 그림의 간단한 예를 볼 수 있습니다:

```latex
\section{소개} \label{introduction}
이것은 일부 더미 텍스트가 포함된 소개 단락입니다. 이 섹션은 나중에 참조됩니다.

\begin{figure}[h]
\centering
\includegraphics[width=0.3\linewidth]{overleaf-logo}
\caption{이 이미지는 아래에서 참조됩니다.}
\label{fig:leaf}
\end{figure}

이미지를 참조할 수 있습니다. 예를 들어 그림 \ref{fig:leaf}는 \textit{Overleaf} 로고를 보여 줍니다.
```

![CrossReferencesEx1Overleaf.png](/files/e1bd24c1b46d1f1b7dd4324ccabf0d47b29a0a87)

명령은 `\label{ }` 는 캡션 뒤에 식별자를 설정하는 데 사용되며, 이 식별자는 나중에 다음 명령어에서 사용됩니다 `\ref{ }` 참조를 설정합니다.

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

## 섹션 및 장 참조하기

아래는 섹션을 참조하는 방법의 예입니다

```latex
\section{소개} \label{introduction}
이것은 일부 더미 텍스트가 포함된 소개 단락입니다. 이 섹션은 나중에 참조됩니다.

\begin{figure}[h]
\centering
\includegraphics[width=0.3\linewidth]{overleaf-logo}
\caption{이 이미지는 아래에서 참조됩니다.}
\label{fig:leaf}
\end{figure}

이미지를 참조할 수 있습니다. 예를 들어 그림 \ref{fig:leaf}는 \textit{Overleaf} 로고를 보여 줍니다.
\vspace{0.5cm}

\section{수학 참조} \label{mathrefs}
섹션 \ref{introduction}에서 언급했듯이, 문서 내에서 다양한 요소를 참조할 수 있습니다.
```

![CrossReferencesEx3Overleaf.png](/files/024f8cde7aa48f3ae86ea4c9428fc80669959968)

다시 말해, 다음 명령어는 `\label` 및 `\ref` 참조에 사용됩니다. 다음은 *레이블* 는 다음 뒤에 설정됩니다 `\section` 문, 즉 다음 `\label` 명령어는 섹션의 카운터 번호가 생성된 후에 추가해야 합니다. 이는 장, 하위 섹션 및 하위 하위 섹션에서도 작동합니다. 다음을 참조하세요 [섹션과 장](/latex/ko/document-structure/01-sections-and-chapters.md).

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

## 수식, 그림 및 표 참조하기

에서 [소개](#introduction) 참조된 이미지의 예를 보여 주었으며, 아래에서는 수식의 상호 참조를 소개합니다.

```latex
\section{수학 참조} \label{mathrefs}
섹션 \ref{introduction}에서 언급했듯이, 문서 내에서 다양한 요소를 참조할 수 있습니다.

\subsection{멱급수} \label{subsection}

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

수식 \ref{eq:1}은 전형적인 멱급수입니다.
```

![CrossReferencesEx2Overleaf.png](/files/39a09ebbb3e90dfe7a319b05b64a4af6469256fb)

레이블과 참조를 사용하는 더 다양하고 유연한 예는 다음을 참조하세요

* [amsmath를 사용한 방정식 정렬](/latex/ko/mathematics/06-aligning-equations-with-amsmath.md)
* [표](/latex/ko/figures-and-tables/01-tables.md)
* [이미지 삽입](/latex/ko/more-topics/27-inserting-images.md)

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

## 요소가 있는 페이지 참조하기

요소는 일반적으로 할당된 번호로 참조되지만, 필요한 경우 해당 요소가 나타나는 페이지를 삽입할 수 있습니다.

```latex
\section{수학 참조} \label{mathrefs}
섹션 \ref{introduction}에서 언급했듯이, 문서 내에서 다양한 요소를 참조할 수 있습니다.

\subsection{멱급수} \label{subsection}

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

수식 \ref{eq:1}은 전형적인 멱급수입니다.
\vspace{0.5cm}

%\Blindtext

\section{마지막 섹션}
\pageref{eq:1}페이지의 하위 섹션 \ref{subsection}에서 멱급수의 예를 제시했습니다.
```

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

명령은 `\pageref` 는 다음의 요소가 나타나는 페이지를 삽입합니다 *레이블* 가 사용됩니다. 위 예에서는 수식 1입니다. 이 명령어는 이 글에서 언급한 다른 모든 번호가 매겨진 요소에도 사용할 수 있습니다.

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

## 상호 참조가 있는 문서 컴파일하기

Overleaf에서는 상호 참조가 즉시 작동하지만, 로컬 LaTeX 배포판에서 상호 참조가 제대로 작동하려면 문서를 두 번 컴파일해야 합니다. 모든 참조가 작동하도록 이 작업을 자동으로 수행하는 명령어도 있습니다. 예를 들어 문서가 다음 이름으로 저장된 경우 `main.tex`.

`latexmk -pdf main.tex`

는 다음 파일을 생성합니다 `main.pdf` 모든 상호 참조가 작동하는 상태로 생성됩니다. 출력 형식을 변경하려면 다음을 사용하세요 `-dvi` 또는 `-ps`.

## 추가 읽을거리

자세한 내용은 다음을 참조하세요:

* [LaTeX에서 문서 만들기](/latex/ko/latex/01-learn-latex-in-30-minutes.md)
* [수학 표현식](/latex/ko/mathematics/01-mathematical-expressions.md)
* [amsmath를 사용한 방정식 정렬](/latex/ko/mathematics/06-aligning-equations-with-amsmath.md)
* [이미지 삽입](/latex/ko/more-topics/27-inserting-images.md)
* [이미지와 표 배치하기](/latex/ko/figures-and-tables/02-positioning-images-and-tables.md)
* [색인](/latex/ko/document-structure/04-indices.md)
* [용어집](/latex/ko/document-structure/05-glossaries.md)
* [목차](/latex/ko/document-structure/02-table-of-contents.md)
* [대규모 프로젝트에서의 관리](/latex/ko/document-structure/07-management-in-a-large-project.md)
* [다중 파일 LaTeX 프로젝트](/latex/ko/document-structure/08-multi-file-latex-projects.md)
* [하이퍼링크](/latex/ko/document-structure/09-hyperlinks.md)
* [카운터](/latex/ko/formatting/10-counters.md)
* [LaTeX2ε에 대한 그다지 짧지 않은 소개](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/ko/document-structure/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.
