> 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/26-missing-number-treated-as-zero.md).

# 숫자가 없습니다, 0으로 처리됨

이 오류는 count, dimension 또는 skip 항목 안에 숫자가 아닌 것을 입력했을 때 나타납니다. 이렇게 하면 아래와 같은 오류 메시지가 생성됩니다:

main.tex, 5행

숫자가 없어서 0으로 처리되었습니다.

l t l.8 \vspace{숫자여야 합니다} 숫자가 와야 했는데; \`0'를 삽입했습니다. (왜 숫자가 필요했는지 모르겠다면, The TeXbook의 색인에서 \`weird error'를 찾아보세요.)

## 일반적인 원인

**숫자가 필요한 곳에 숫자를 넣는 것을 잊는 경우:**

이 오류가 발생하는 가장 기본적인 방법은 숫자가 필요한 명령에서 숫자를 넣는 것을 잊었을 때입니다. 그 예는 아래에 나와 있습니다.

```latex
여기와

\vspace{숫자여야 합니다}

여기 사이에 세로 공백을 추가하고 싶습니다.
```

여기서 **`\vspace{...}`** 명령은 인수로 숫자를 기대하며, 텍스트 사이에 얼마나 많은 세로 공백을 둘지 알려줍니다. 숫자가 없으므로 오류가 발생합니다. 이것을 올바르게 쓰는 방법은

```latex
여기와

\vspace{6em}

여기 사이에 세로 공백을 추가하고 싶습니다.
```

![Missingnumbervspace.PNG](/files/495086b4de953cccaff1b1496940395c11d8be4a)

다음과 같이 숫자를 인수로 필요로 하는 명령이 많이 있습니다. **`\vspace{...}`** 그중 가장 흔한 것은

* 다음과 같은 간격 명령입니다:
  * **`\vspace{...}`**
  * **`\vspace*{...}`**
  * **`\hspace{...}`**
  * **`\hspace*{...}`**
* 다음과 같은 크기 조정 명령: **`\includegraphics[scale = 0.7]{image}`**. 이렇게 하면 이미지가 **`0.7`** 배의 실제 크기로 조정됩니다. 여기서 숫자를 필요로 하는 다른 옵션은 다음과 같습니다:
  * **`너비`**
  * **`높이`**
  * **`페이지에`**
  * **`해상도`**
  * **`잘라내기`**
  * **`angle`**.
* 다음 **`\linebreak[number]`** 명령으로, 인수는 건너뛰고 싶은 줄 수를 나타냅니다.
* 다음과 같은 카운터 명령:
  * **`\addtocounter{mycounter}{number}`**
  * **`\setcounter{mycounter}{number}`**
* 다음과 같은 길이 설정 명령: **`\setlenght{\lengthname}{number}`**. 이렇게 하면 **`\textwidth`** 값으로 **`번호`** (예: **`\setlength{\textwidth}{1in}`**).
* 다음과 같은 표 옵션 명령: **`\multicolumn{number}{c}{Table entry}`**.

**줄바꿈 \\\ 뒤에 대괄호가 오는 경우:**

줄바꿈 명령 **`\\`** 뒤에 대괄호가 오면 **`[...]`**, 그것은 선택적 인수로 해석되며, 따라서 대괄호 안에는 숫자가 있어야 합니다. 심지어 **`\\`** 및 **`[...]`** 명령들 사이에 공백과 줄바꿈이 있어도 마찬가지입니다. 이 문제는 아래와 같이 표에서 자주 나타납니다:

```latex
\begin{tabular}{c|c}
    [x] &  2\\
    [x]^2 & 4
\end{tabular}
```

이는 오류를 발생시킵니다. 세 번째 줄에서 줄바꿈 뒤에 대괄호가 있기 때문입니다. LaTeX는 대괄호 안에 숫자를 기대하지만, 대신 **`x`**&#xB97C; 찾습니다. 위 표를 올바르게 쓰는 방법은 중괄호 안에 대괄호를 넣는 것입니다 **`{...}`** 아래와 같이:

```latex
\begin{tabular}{c|c}
    [x] &  2\\
    {[x]}^2 & 4
\end{tabular}
```

**subfigure 패키지를 사용할 때:**

다음 **`subfigure`** 패키지는 오래전에 더 이상 사용되지 않으며, 오류가 없을 때도 'Missing number' 오류를 발생시킵니다. 그 예는 아래에 나와 있습니다:

```latex
% 프리앰블에
\usepackage{subfigure}

% 문서 본문에서
\begin{figure}
    \centering
    \begin{subfigure}[b]{0.3\textwidth}
        \includegraphics[scale=0.2]{image}
        \caption{갈매기}
        \label{fig:gull}
    \end{subfigure}%
\end{figure}
```

이는 오류를 발생시킵니다. subfigure 패키지가 **`\textwidth`** 를 숫자로 인식하지 않기 때문입니다. 사실 그것은 숫자이며(페이지의 전체 텍스트 블록의 고정 너비와 동일함), 이 문제를 해결하는 방법은 더 최신의 **`subcaption`** 패키지를 사용하는 것입니다. 이것이 **`subfigure`**&#xB97C; 대체했습니다. 위와 같은 코드를 **`\usepackage{subcaption}`** 을 프리앰블에 **`\usepackage{subfigure}`** 대신 사용하면 아무 오류 없이 원하는 결과를 얻을 수 있습니다.


---

# 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/26-missing-number-treated-as-zero.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.
