> 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/more-topics/42-referencing-figures.md).

# 그림 참조

LaTeX에서는 *레이블* 번호가 매겨진 항목(섹션, 수식 등)에 대해, 그런 다음 그것을 *레이블* 을 *참조할* 다른 곳에서 참조할 수 있으며, 동일한 명령은 figure 환경에도 적용됩니다(이들도 번호가 매겨집니다).

## 레이블과 참조의 기본

```latex
\label{marker}
```

다음 *표시자* 참조하고자 하는 객체에 붙이는 이름이라고 볼 수 있습니다. 추가하는 것이 중요합니다 `\label` *뒤에* 번호가 매겨진 요소, 예를 들어 `\\section`, `\subsection`, `\caption` 등입니다. 그렇지 않으면 레이블이 올바른 번호나 카운터에 "연결되지" 않습니다.

```latex
\ref{marker}
```

이는 다음 레이블이 지정된 객체에 할당된 번호를 출력합니다 *표시자*.

```latex
\pageref{marker}
```

이는 다음 레이블이 지정된 객체가 있는 페이지의 번호를 출력합니다 *표시자* 가 나타나는 곳입니다.

## 레이블과 참조가 있는 LaTeX 문서 컴파일

다음 *표시자* 객체를 레이블하는 데 사용한 것은 문서 어디에도 표시되지 않으며, 그에 대한 참조는 적절한 번호로 대체됩니다. 존재하지 않는 마커를 참조하면 LaTeX는 성공적으로 컴파일되지만 정의되지 않은 참조에 대한 경고가 표시됩니다. 알 수 없는 마커에 대한 참조는 다음으로 대체됩니다 *??*.

위에 포함된 Overleaf 예제에서 보듯이, 문서에 나중에 포함된 그림에 대한 참조를 성공적으로 추가할 수 있었습니다. 이를 가능하게 하려면 LaTeX를 두 번 실행해야 합니다. 첫 번째 실행에서는 모든 레이블과 그 위치를 컴파일하여 저장하고, 두 번째 실행에서는 모든 참조가 적절한 번호로 대체됩니다. 따라서 올바른 출력을 보려면 문서를 두 번 컴파일해야 합니다.

## 그림을 참조할 때 의미 있는 이름 사용

레이블로 어떤 문자열이든 사용할 수 있으므로, 무엇이 레이블링되었는지를 나타내기 위해 레이블에 몇 글자를 접두사로 붙이는 것이 일반적인 관행입니다. 문서에서 다양한 유형의 객체를 많이 참조할 때 이것은 중요해집니다. 레이블이 어떤 종류의 객체를 가리키는지 기억하는 데 유용할 수 있기 때문입니다. 게다가, 공통 문자열을 사용해 서로 다른 종류의 객체를 참조하는 것도 가능하게 해줍니다.

예를 들어, 문서에

* 국가 인구에 대한 섹션,
* 인구 수를 담은 표와
* 인구 규모의 막대 그래프를 담은 그림이 있다면,

이들 모두를 다음의 변형을 사용해 참조하면 편리할 수 있습니다 *인구*. 이는 다음 레이블을 사용하여 달성할 수 있습니다

* *sec:population* 섹션에는,
* *tab:population* 표에는,
* *fig:population* 그림에는.

다음은 그림의 예입니다 -

```latex
\begin{figure}[h!]
  \includegraphics[scale=1.7]{birds.jpg}
  \caption{새들}
  \label{fig:birds}
\end{figure}
```

다시 한 번, 다음에 유의하세요 `\label` 가 주어집니다 *뒤에* `\caption`.

&#x20;[Overleaf에서 예제 열기](https://www.overleaf.com/project/new/template/26046?id=111048636\&templateName=Example+to+cross-reference+figures\&latexEngine=pdflatex\&texImage=texlive-full%3A2022.1\&mainFile=)


---

# 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/more-topics/42-referencing-figures.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.
