> 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/07-extra-alignment-tab-has-been-changed-to-cr.md).

# 추가 정렬 탭이 \cr로 변경되었습니다

이 오류는 LaTeX가 표를 조판하는 중 정렬 문자(`&`)가 예상치 못한 위치에 있을 때 발생합니다. LaTeX는 정렬 문자를 사용하여 표의 열을 구분하며 [오류를 냅니다](#a-short-note-on-the-cr-command) 표가 예상보다 많은 열을 사용하려고 하면 그렇습니다.

## tabular 환경으로 인한 오류

tabular 환경은 다음 예에서 볼 수 있듯이 이 오류의 흔한 원인입니다. 여기서는 다음과 같이 작성했습니다. `{c|c|c}` 3개의(가운데 정렬된) 열을 가진 표를 지정하기 위해 사용했으며, 이는 각 표 행에 셀 3개가 있어야 함을 의미합니다.

```latex
\begin{tabular}{c|c|c} % 가운데 정렬된 3개 열 지정
   1 & 2 & 3 & 4\\ % 오류: 4개 열을 사용함, 3개가 아님
   5 & 6 & 7\\
\end{tabular}
```

[이 예제를 **오류를 생성하는** Overleaf의 예](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Example+of+a+tabular+with+too+many+alignment+characters\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cbegin%7Btabular%7D%7Bc%7Cc%7Cc%7D+%25+Specify+3+centered+columns%0A+++1+%26+2+%26+3+%26+4%5C%5C+%25+ERROR%3A+Uses+4+columns%2C+not+3%0A+++5+%26+6+%26+7%5C%5C%0A%5Cend%7Btabular%7D%0A%5Cend%7Bdocument%7D)

우리의 예제는 다음 오류 메시지를 생성합니다:

![LaTeX 표 오류 "Extra alignment tab has been changed to \cr" 시연](/files/b8d92c2f1c69bc24b3990107582dadf55b6e91dc)

그리고 다음 표를 조판합니다:

![](/files/05c49fccceaa4001a36fc88a006feac223eb2a6f)

### 오류 설명

첫 번째 `&` 가 표 행 안에 있으면 *두 번째* 열의 시작을 나타냅니다. 따라서 3열 표에서는 LaTeX가 다음을 예상합니다: *두* 각 줄바꿈(`\\`) 전에 정렬 문자가 있어야 합니다. 그러나 우리 표의 첫 번째 행은 *세 가지* 정렬 문자를 사용하고 있어 LaTeX를 혼란시키며, 예상치 못한 정렬 문자를 다음으로 바꾸게 합니다: [`\cr` 명령을 사용합니다](#a-short-note-on-the-cr-command)—이는 열 수를 3으로 줄이려는 시도입니다. 다음을 사용하려면 *세 가지* 정렬 문자가 필요하며 *4* 다.

### 오류를 수정하는 방법

이 오류를 해결하고 표를 수정하려면, 다음 중 하나를 할 수 있습니다:

* 항목을 삭제하여 추가 열을 제거합니다
* tabular 환경 옵션에 추가 열을 넣습니다(예: 다음과 같이 작성 `{c|c|c|c}`)
* 새 줄(새 표 행)을 만듭니다

다음은 이러한 각 해결 방법을 보여주는 예입니다:

```latex
\section*{추가 열 항목 제거}

\begin{center}
\begin{tabular}{c|c|c}
   1 & 2 & 3\\
   5 & 6 & 7\\
\end{tabular}
\end{center}

\section*{tabular에 추가 열 추가}

\begin{center}
\begin{tabular}{c|c|c|c}
   1 & 2 & 3 & 4\\
   5 & 6 & 7\\
\end{tabular}
\end{center}

\section*{새 줄 만들기(새 표 행)}

\begin{center}
\begin{tabular}{c|c|c}
   1 & 2 & 3 \\
   4 &   &   \\
   5 & 6 & 7 \\
\end{tabular}
\end{center}
```

[이 예제를 Overleaf에서 열기](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Options+for+correcting+a+tablular+error\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%5Csection%2A%7BRemoving+the+extra+column+entry%7D%0A%0A%5Cbegin%7Bcenter%7D%0A%5Cbegin%7Btabular%7D%7Bc%7Cc%7Cc%7D%0A+++1+%26+2+%26+3%5C%5C%0A+++5+%26+6+%26+7%5C%5C%0A%5Cend%7Btabular%7D%0A%5Cend%7Bcenter%7D%0A%0A%5Csection%2A%7BAdding+an+extra+column+to+the+tabular%7D%0A%0A%5Cbegin%7Bcenter%7D%0A%5Cbegin%7Btabular%7D%7Bc%7Cc%7Cc%7Cc%7D%0A+++1+%26+2+%26+3+%26+4%5C%5C%0A+++5+%26+6+%26+7%5C%5C%0A%5Cend%7Btabular%7D%0A%5Cend%7Bcenter%7D%0A%0A%5Csection%2A%7BCreating+a+new+line+%28new+table+row%29%7D%0A%0A%5Cbegin%7Bcenter%7D%0A%5Cbegin%7Btabular%7D%7Bc%7Cc%7Cc%7D%0A+++1+%26+2+%26+3+%5C%5C%0A+++4+%26+++%26+++%5C%5C%0A+++5+%26+6+%26+7+%5C%5C%0A%5Cend%7Btabular%7D%0A%5Cend%7Bcenter%7D%0A%5Cend%7Bdocument%7D)

이 예제는 다음 출력을 생성합니다:

![tabular 오류 수정](/files/7b13843e838dd29314e2901e487780706ca0a7e7)

## 수학 환경으로 인한 오류

수학 조판에서는 종종 수학 요소의 정렬이 필요하며, 이는 다음과 같은 환경을 사용해 이루어집니다 `array`, `행렬`와 몇 가지 다른 환경이 있습니다. 일부 수학 환경은 정렬을 수행하기 위해 표를 사용하므로 추가 정렬 탭 오류를 유발할 수 있으며, 다음 예에서 이를 보여줍니다.

### array 환경

array 행에서 사용된 정렬 탭의 수가 array 열의 수를 초과하면 LaTeX가 오류를 생성합니다. 다음은 3개 열의 array를 사용하지만 첫 번째 행이 4개 열을 사용하려는 예입니다:

```latex
\[
\begin{array}{lcl}
g(x) & = & (x+2)^2 & = (x+2)(x+2)\\ % 이 행이 오류를 유발합니다
& = & x^2+4x+4\\
\end{array}
\]
```

[이 예제를 **오류를 생성하는** Overleaf의 예](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=An+array+with+too+many+alignment+characters\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%5C%5B%0A%5Cbegin%7Barray%7D%7Blcl%7D%0Ag%28x%29+%26+%3D+%26+%28x%2B2%29%5E2+%26+%3D+%28x%2B2%29%28x%2B2%29%5C%5C+%25+This+row+triggers+the+error%0A%26+%3D+%26+x%5E2%2B4x%2B4%5C%5C%0A%5Cend%7Barray%7D%0A%5C%5D%0A%5Cend%7Bdocument%7D)

이 예는 다음 오류 메시지를 생성합니다:

![탭 문자가 너무 많아 발생한 LaTeX array 오류를 보여주는 이미지](/files/aa88698e84e2a4a90c8e2656b8f6298feb6019b6)

그리고 다음 array를 조판합니다:

$$\begin{array}{lcl} g(x) & = & (x+2)^2 \ =(x+2)(x+2) \ & = & x^2+4x+4\ \end{array}$$

이 오류를 수정하려면 array를 다음과 같이 다시 작성합니다:

```latex
\[
\begin{array}{lcl}
g(x) & = & (x+2)^2 \\
& = & (x+2)(x+2) \\
& = & x^2+4x+4\\
\end{array}
\]
```

[이 예제를 **수정됨** Overleaf의 예](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Corrected+version+of+the+array+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%5C%5B%0A%5Cbegin%7Barray%7D%7Blcl%7D%0Ag%28x%29+%26+%3D+%26+%28x%2B2%29%5E2+%5C%5C%0A%26+%3D+%26+%28x%2B2%29%28x%2B2%29+%5C%5C%0A%26+%3D+%26+x%5E2%2B4x%2B4%5C%5C%0A%5Cend%7Barray%7D%0A%5C%5D%0A%5Cend%7Bdocument%7D)

수정된 array는 다음을 생성합니다:

$$\begin{array}{lcl} g(x) & = & (x+2)^2 \ & = & (x+2)(x+2) \ & = & x^2+4x+4\ \end{array}$$

### amsmath 행렬 환경

다음 `amsmath` 패키지는 행렬 조판을 위한 여러 환경을 제공하며, 여기에는 다음이 포함됩니다: `행렬`, `pmatrix`, `bmatrix`, `Bmatrix`, `vmatrix`, 그리고 `Vmatrix`.

다음 `pmatrix` 예는 12개 열을 사용하려 하지만 오류를 발생시키는데, 그 이유는 `amsmath` 가 조판된 행렬의 기본 최대 열 수를 10개로 설정하기 때문입니다.

```latex
\documentclass{article}
\usepackage{amsmath} % matrix 환경에 접근하기 위해
\begin{document}
\[
\begin{pmatrix}
a_{1,1} & a_{1,2} & a_{1,3} & a_{1,4} & a_{1,5} & a_{1,6} & a_{1,7} & a_{1,8} & a_{1,9} & a_{1,10} & a_{1,11} & a_{1,12} \\
\end{pmatrix}
\]
\end{document}
```

[이 예제를 **오류를 생성하는** Overleaf의 예](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=A+pmatrix+with+too+many+columns\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D+%25+To+access+the+matrix+environment%0A%5Cbegin%7Bdocument%7D%0A%5C%5B%0A%5Cbegin%7Bpmatrix%7D%0Aa_%7B1%2C1%7D+%26+a_%7B1%2C2%7D+%26+a_%7B1%2C3%7D+%26+a_%7B1%2C4%7D+%26+a_%7B1%2C5%7D+%26+a_%7B1%2C6%7D+%26+a_%7B1%2C7%7D+%26+a_%7B1%2C8%7D+%26+a_%7B1%2C9%7D+%26+a_%7B1%2C10%7D+%26+a_%7B1%2C11%7D+%26+a_%7B1%2C12%7D+%5C%5C%0A%5Cend%7Bpmatrix%7D%0A%5C%5D%0A%5Cend%7Bdocument%7D)

오류를 수정하려면 다음과 같이 작성하여 최대 열 수를 12로 변경합니다 `\setcounter{MaxMatrixCols}{12}`, 또는 원하는 다른 값으로 설정할 수 있습니다.

```latex
\documentclass{article}
\usepackage{amsmath} % pmatrix 환경에 접근하기 위해
\setcounter{MaxMatrixCols}{12}
\begin{document}
\[
\begin{pmatrix}
a_{1,1} & a_{1,2} & a_{1,3} & a_{1,4} & a_{1,5} & a_{1,6} & a_{1,7} & a_{1,8} & a_{1,9} & a_{1,10} & a_{1,11} & a_{1,12} \\
\end{pmatrix}
\]
\end{document}
```

[이 예제를 **수정됨** Overleaf의 예](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=A+pmatrix+with+12+columns\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D+%25+To+access+the+pmatrix+environment%0A%5Csetcounter%7BMaxMatrixCols%7D%7B12%7D%0A%5Cbegin%7Bdocument%7D%0A%5C%5B%0A%5Cbegin%7Bpmatrix%7D%0Aa_%7B1%2C1%7D+%26+a_%7B1%2C2%7D+%26+a_%7B1%2C3%7D+%26+a_%7B1%2C4%7D+%26+a_%7B1%2C5%7D+%26+a_%7B1%2C6%7D+%26+a_%7B1%2C7%7D+%26+a_%7B1%2C8%7D+%26+a_%7B1%2C9%7D+%26+a_%7B1%2C10%7D+%26+a_%7B1%2C11%7D+%26+a_%7B1%2C12%7D+%5C%5C%0A%5Cend%7Bpmatrix%7D%0A%5C%5D%0A%5Cend%7Bdocument%7D)

수정된 예는 다음 행렬을 생성합니다:

$$\begin{pmatrix} a\_{1,1} & a\_{1,2} & a\_{1,3} & a\_{1,4} & a\_{1,5} & a\_{1,6} & a\_{1,7} & a\_{1,8} & a\_{1,9} & a\_{1,10} & a\_{1,11} & a\_{1,12} \ \end{pmatrix}$$

## \cr 명령에 대한 짧은 설명

LaTeX는 예상치 못한 정렬 문자의 문제를 다음으로 알려진 기본 명령으로 대체하여 처리합니다: `\cr`, 이는 표 행을 끝내기 위한 LaTeX의 내부 메커니즘에서 핵심적인 역할을 합니다. 사용자는 LaTeX의 `\\` 매크로를 사용하여 표 행의 끝을 표시하지만, 실제로는 `\cr` 명령이 배후에서 실행되어 행을 종료하며, 그때 `\\` 매크로가 처리됩니다.


---

# 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/07-extra-alignment-tab-has-been-changed-to-cr.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.
