> 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/questions-and-answers/83-what-does-pdfendlink-ended-up-in-different-nesting-level-than-pdfstartlink-mean.md).

# "\pdfendlink ended up in different nesting level than \pdfstartlink"는 무슨 뜻인가요?

## 이 오류(경고)에 대한 몇 가지 배경

이름에서 알 수 있듯이, 이 `\\pdfstartlink` 및 `\\pdfendlink` 명령은 TeX/LaTeX로 생성된 PDF 파일 내에 하이퍼링크를 만드는 데 사용됩니다. 예를 들어 PDF 파일의 다른 페이지로의 링크나 웹사이트로의 링크입니다. 이러한 명령은 소위 *primitive*: TeX 엔진에 내장된 저수준 명령입니다—매크로가 아닙니다. 그 결과 대부분의 사용자는 이를 직접 접하지 않고, 다음과 같은 패키지에서 제공하는 매크로(명령)를 통해 간접적으로 사용합니다. `hyperref`.

이 글을 쓰는 시점(2022년 12월)에는 `\\pdfstartlink` 및 `\\pdfendlink` pdfTeX와 LuaTeX(및 LuaHBTeX)라는 두 개의 TeX 엔진에서만 지원됩니다. 역사적으로 pdfTeX와 LuaTeX는 모두 하나의 *오류* 다음과 같은 형식의 메시지

```latex
\\pdfendlink가 \\pdfstartlink와 다른 중첩 수준에 놓이게 되었다
```

상자 중첩 깊이와 관련된 저수준 문제에 대한 응답으로. 이 메시지의 텍스트는 TeX 엔진 소프트웨어의 깊은 내부에서 비롯된 것이며, 어떤 LaTeX 패키지도, 물론 Overleaf도 생성한 것이 아님에 유의하세요.

TeX Live 2021부터 pdfTeX와 LuaTeX는 근본적인(상자 중첩) 문제를 처리하는 방식이 달라졌고, 이제는 서로 다른 동작을 보입니다:

* pdfTeX는 이제 그 메시지를 **경고로**, 더 이상 오류를 발생시키지 않으며 컴파일이 *더 이상* 중단되지 않습니다;
* LuaTeX(LuaHBTeX)는 이 문제를 계속해서 **치명적 오류로**, 컴파일을 중단시킵니다—이 오류 메시지의 문구는 위에 제시된 것과 약간 다릅니다.

이 오류의 근본 원인을 더 살펴보고 싶은 독자는 다음을 할 수 있습니다:

* 이 Overleaf 프로젝트를 열어 보세요

  이 프로젝트는 pdfLaTeX로는 성공적으로 컴파일되지만 LuaLaTeX에서는 오류를 발생시킵니다;
* 다음의 [GitHub의 심층 기술 토론을 살펴보세요](https://github.com/latex3/latex2e/issues/94), 주요 TeX 및 LaTeX 전문가들 사이에서 진행된 것입니다.

## 실무적으로는 무엇이 원인일까요?

사용자 수준에서는, 이 경고(또는 오류)는 다음을 사용할 때 발생할 수 있습니다: `hyperref` 패키지와 하이퍼링크—예를 들어 인용, URL 또는 상호 참조—가 다단 문서에서 두 페이지 또는 두 열에 걸쳐 끊어질 때입니다. 즉, 링크가 한 페이지(또는 열)의 끝 근처에서 시작해 다음 페이지(또는 열)에서 끝나는 경우입니다.

앞서 언급했듯이, TeX Live 2021 이상을 사용하는 pdfTeX(pdfLaTeX)는 더 이상 오류를 생성하지 않지만, 이 글을 쓰는 시점(2022년 12월)에는 LuaLaTeX가 여전히 그렇게 합니다. LuaLaTeX를 사용 중이라면, 문서를 작업하는 동안의 임시 해결책은 다음을 작성하여 하이퍼링크를 비활성화하는 것입니다:

```latex
\\hypersetup{draft}
```

다음 바로 앞에

```latex
\begin{document}
```

이렇게 하면 문서에 하이퍼링크가 표시되지 않지만, 작성 중에는 오류를 피할 수 있으며, 최종 문서를 컴파일할 준비가 되면 다음을 주석 처리하거나 삭제할 수 있습니다: `\\hypersetup{draft}`. 최종 컴파일 단계에서 운 나쁘게도 여전히 이 문제를 겪게 된다면, 다음을 다시 활성화하세요: `초안` 그런 다음 PDF를 훑어보며 가능한 원인(인용, 상호 참조, 페이지 상단의 부동 요소 등)을 찾아, 그렇게 해서 *바라건대*..., 문제를 피할 수 있도록 텍스트를 수정/다시 표현할 방법을 찾으세요.

## 추가 정보

이 문제를 치명적 오류로 만난다면 정확한 원인을 추적하기 위해 약간의 수사 작업이 필요할 수 있습니다. tex.stackexchange에는 여러 토론이 있지만, 그중 일부 페이지는 pdfTeX가 이 오류를 경고로 낮추기 이전에 작성되었음을 유의하세요:

* <https://tex.stackexchange.com/questions/1522/pdfendlink-ended-up-in-different-nesting-level-than-pdfstartlink>
* <https://tex.stackexchange.com/questions/63819/mysterious-error-pdfendlink-ended-up-in-different-nesting-level-than-pdfstart>
* <https://tex.stackexchange.com/questions/249579/pdfendlink-ended-up-in-different-nesting-level-than-pdfstartlink-error-with/>


---

# 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/questions-and-answers/83-what-does-pdfendlink-ended-up-in-different-nesting-level-than-pdfstartlink-mean.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.
