> 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/latex-1/16-latex-error-missing-begin-document.md).

# LaTeX 오류: \begin document가 누락됨

이 오류는 다음을 포함하는 것을 잊었을 때 나타납니다 **`\begin{document}`** 문서에. 또한 다음을 작성하지 않은 경우에도 나타날 수 있습니다 **`\documentclass[...]{...}`** 기본 문서의 시작 부분에.

## 흔한 원인

**\begin{document}를 포함하는 것을 잊은 경우:**

이 오류의 가장 기본적인 원인은 다음을 작성하는 것을 잊었을 때 발생합니다 **`\begin{document}`** 기본 문서의 서문 뒤에. 이 실수를 하면 아래에 표시된 오류 메시지가 생성됩니다:

main.tex, 5행

LaTeX 오류: \begin{document}가 없습니다.

설명은 LaTeX 매뉴얼 또는 LaTeX Companion을 참조하세요. 즉시 도움말은 H를 입력하세요. ... 지금 문제가 생겼습니다. 계속하려면 입력해 보세요. 그래도 작동하지 않으면 X를 입력해 종료하세요.

이 오류를 해결하려면, 단순히 다음이 포함되어 있는지 확인하세요 **`\begin{document}`** 기본 문서의 서문 뒤에. 참조 [여기](/latex/ko/latex/01-learn-latex-in-30-minutes.md) LaTeX에서 문서를 구조화하는 방법을 더 알아보세요.

**\documentclass\[...]{...}가 잘못된 위치에 있음:**

이 오류의 또 다른 흔한 원인은 **`\documentclass[...]{...}`** 가 잘못된 위치에 작성되었기 때문입니다. 이는 기본 문서의 시작 부분에 작성되어야 합니다. 서문용 별도 파일이 있다면, 당신은 **할 수 없습니다** 포함할 **`\documentclass[...]{...}`** 그 파일에. 여전히 기본 프로젝트 파일의 맨 위에 나타나야 하며, 그렇지 않으면 서문 파일만 컴파일됩니다.

**기본 문서가 잘못 설정됨:**

왼쪽 메뉴에서 기본 문서를 잘못 설정한 경우에도 이 오류가 나타날 수 있습니다. 이는 다음과 같은 경우에 발생할 수 있습니다 **`\documentclass[...]{...}`** 가 잘못된 위치에 작성되어 있으므로, 필요하면 먼저 이것을 수정해야 합니다. 기본 문서 선택을 변경하려면 왼쪽 메뉴를 여세요:

![Lefthandmenu.PNG](/files/2e296e1bc26429e2467ac0c79a17615e7325ff2b)

그리고 *주 문서* 드롭다운 메뉴로 이동하세요:

![Maindocument.PNG](/files/feac136c9eff18f8527f2362a79a86c879bd7408)


---

# 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/latex-1/16-latex-error-missing-begin-document.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.
