> 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/02-command-r-invalid-in-math-mode-on-input-line-xxx.md).

# 입력 줄 XXX에서 명령 \r은 수학 모드에서 유효하지 않습니다

이 오류는 수학 모드에서 특수 문자가 잘못 사용될 때 나타납니다. LaTeX에서는 악센트가 있는 문자나 움라우트가 있는 문자와 같은 특정 문자를 수학 모드에서 쓸 수 없습니다. 이를 해결하는 가장 좋은 방법은 이러한 문자들을 다음 안에 작성하는 것입니다. **`\text{...}`** 에서 제공하는 **`amsmath`** 패키지.

## 일반적인 원인

**수학 모드에 악센트, 움라우트 등이 있는 문자를 포함하기:**

예: ö는 실제로 {\\"o}입니다

**수학 모드에서 특수 기호를 사용하기:**

예: 옹스트롬 \AA는 실제로 \r{A}입니다


---

# 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/02-command-r-invalid-in-math-mode-on-input-line-xxx.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.
