> 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/formatting/05-line-breaks-and-blank-spaces.md).

# 줄 바꿈과 공백

LaTeX에서 문서 흐름을 끊는 것은 권장되지 않습니다. 당신이 [매크로를 만드는 중](/latex/ko/class-files/03-writing-your-own-package.md). 어쨌든 문서의 레이아웃을 더 세밀하게 제어해야 할 때 가끔은 필요하며, 이런 이유로 이 글에서는 줄 바꿈, 페이지 나누기, 임의의 공백을 삽입하는 방법을 설명합니다.

## 소개

줄을 바꾸는 가장 표준적인 방법은 새 문단을 만드는 것입니다. 이는 코드에서 빈 줄을 남겨서 수행합니다.

```latex
\documentclass{article}
\begin{document}
이 문단에는 정보가 없습니다
그리고 그 목적은 새 문단을 시작하는 방법의 예를 제공하는 것입니다.
보시다시피,
단일 줄
코드의 줄 바꿈
은 텍스트에서 공백처럼 작동합니다.

하지만 빈 줄을 남기면 새 문단이 시작됩니다.
\end{document}
```

[이 예제를 Overleaf에서 열기](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=New+paragraph\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0AThis+paragraph+contains+no+information%0Aand+its+purpose+is+to+provide+an+example+on+how+to+start+a+new+paragraph.%0AAs+you+can+see%2C%0Asingle+line%0Abreak+in+the+code%0Aacts+as+a+space+in+text.%0A%0AHowever%2C+leaving+an+empty+line+starts+a+new+paragraph.%0A%5Cend%7Bdocument%7D)

![LineBreaksEx1aupdated.png](/files/1d9ce9cee5003a9ac9c5a306348bf121f6f90b41)

줄 바꿈을 삽입하는 명령은 이것만 있는 것이 아니며, [다음 섹션에서](#line-breaks) 두 개가 더 소개될 것입니다.

## 줄 바꿈

앞서 언급했듯이, 줄 바꿈을 삽입하는 방법은 하나 이상입니다.

```latex
\documentclass{article}
\usepackage[utf8]{inputenc}

\begin{document}
이 문서의 어떤 내용입니다. 이 문단에는 정보가 없습니다
그리고 그 목적은 공백을 삽입하는 방법의 예를 제공하는
것과 줄 바꿈을 삽입하는 것입니다.\\
줄 바꿈이 삽입되면 텍스트는 들여쓰기되지 않으며,
줄 바꿈을 위한 몇 가지 추가 명령이 있습니다. \newline
이 문단은 전혀 정보를 제공하지 않습니다. 우리는
줄 바꿈을 살펴보고 있습니다. \hfill \break
그리고 두 명령을 결합하면
\end{document}
```

[이 예제를 Overleaf에서 열기](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Another+line+break+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%5Butf8%5D%7Binputenc%7D%0A%0A%5Cbegin%7Bdocument%7D%0ASomething+in+this+document.+This+paragraph+contains+no+information+%0Aand+its+purposes+is+to+provide+an+example+on+how+to+insert+white+%0Aspaces+and+lines+breaks.%5C%5C%0AWhen+a+line+break+is+inserted%2C+the+text+is+not+indented%2C+there+%0Aare+a+couple+of+extra+commands+do+line+breaks.+%5Cnewline%0AThis+paragraph+provides+no+information+whatsoever.+We+are+exploring+%0Aline+breaks.+%5Chfill+%5Cbreak%0AAnd+combining+two+commands%0A%5Cend%7Bdocument%7D)

![LineBreaksEx2new.png](/files/92fbdaed6977f5a2e53a620567d504ec7194cec0)

여기에는 예제에서 동일하게 작동하는 세 가지 명령이 있습니다:

* `\\` (백슬래시 두 개)
* `\newline`
* `\hfill \break`

더 많은 줄 바꿈 명령은 [참조 안내서](#reference-guide).

## 페이지 나누기

페이지 나누기를 삽입하는 명령은 두 가지가 있습니다, `clearpage` 및 `newpage`. 아래는 이를 사용하는 예입니다 `clearpage`.

```latex
\documentclass{article}
\usepackage[utf8]{inputenc}

\begin{document}
이 문서의 어떤 내용입니다. 이 문단에는 정보가 없으며
그 목적은 공백을 삽입하는 방법의 예를 제공하는 것입니다
과 줄 바꿈을 삽입하는 것입니다.\\
줄 바꿈이 삽입되면 텍스트는 들여쓰기되지 않으며, 몇몇
추가 명령이 줄 바꿈을 수행합니다. \newline
이 문단은 전혀 정보를 제공하지 않습니다. 우리는
줄 바꿈을 살펴보고 있습니다. \hfill \break
그리고 두 명령을 결합하면
...
...

\begin{figure}
\centering
\includegraphics[width=3cm]{overleaf-logo}
\caption{Overleaf 로고}
\end{figure}

안녕하세요,  여기  의미  없는  텍스트가  있습니다...
\clearpage
```

![LineBreaksEx3OverleafNew.png](/files/21d49eaea1c0291da81477121ac157ded0d78a21)

명령 `\clearpage` 사용되면, 표나 그림과 같은 누적된 부동 요소가 있더라도 새 페이지를 시작하기 전에 모두 배치됩니다. 위의 예에서는 같은 이미지가 세 번 삽입됩니다. 페이지 나누기가 모든 그림이 표시되기 전에 삽입되므로, 나머지 이미지는 중단 지점 아래의 텍스트를 계속하기 전에 빈 페이지에 삽입됩니다.

이것이 원하는 것이 아니라면 `\newpage` 대신 사용할 수 있습니다.

```latex
\documentclass{article}
\usepackage[utf8]{inputenc}

\begin{document}
\documentclass{article}
\usepackage[utf8]{inputenc}

\begin{document}
이 문서의 어떤 내용입니다. 이 문단에는 정보가 없으며
그 목적은 공백을 삽입하는 방법의 예를 제공하는 것입니다
과 줄 바꿈을 삽입하는 것입니다.\\
줄 바꿈이 삽입되면 텍스트는 들여쓰기되지 않으며, 몇몇
추가 명령이 줄 바꿈을 수행합니다. \newline
이 문단은 전혀 정보를 제공하지 않습니다. 우리는
줄 바꿈을 살펴보고 있습니다. \hfill \break
그리고 두 명령을 결합하면
...
...

\begin{figure}
\centering
\includegraphics[width=3cm]{overleaf-logo}
\caption{Overleaf 로고}
\end{figure}

안녕하세요,  여기  의미  없는  텍스트가  있습니다...
\newpage
```

![LineBreaksEx4Overleaf.png](/files/994a8221a416e6cf8e3b2cd1da669cafa7ab953d)

이 경우 이미지는 텍스트 흐름에 맞추도록 새 페이지에 배치됩니다.

[Overleaf에서 열기](https://www.overleaf.com/project/new/template/19338?id=65200057\&templateName=\&latexEngine=\&texImage=texlive-full%3A2020.1\&mainFile=)

## 가로 공백

임의 길이의 가로 공백은 다음 명령으로 삽입할 수 있습니다 `\hspace`.

```latex
가로 \hspace{1cm} 공백은 수동으로 삽입할 수 있습니다. 유용합니다
그림의 레이아웃 세부 조정을 제어하는 데

왼쪽 \hfill 오른쪽
```

[이 예제를 Overleaf에서 열기](https://www.overleaf.com/docs?engine=\&snip_name=Horizontal+spaces\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%0AHorizontal+%5Chspace%7B1cm%7D+spaces+can+be+inserted+manually.+Useful+%0Ato+control+the+fine-tuning+in+the+layout+of+pictures.%0A%0ALeft+Side+%5Chfill+Right+Side%0A%0A%5Cend%7Bdocument%7D)

![LineBreaksEx5.png](/files/ea0315b303aadd98973bd45747b5eb477f3f65eb)

이 예제에는 가로 공백을 삽입하는 두 가지 명령이 있습니다:

**\hspace{1cm}**

길이가 1cm인 가로 공백을 삽입합니다. 이 명령에는 다른 LaTeX 단위를 사용할 수 있습니다.

**\hfill**

사용 가능한 공간을 채우도록 그에 맞게 늘어나는 공백을 삽입합니다.

명령어 `\hrulefill` 및 `\dotfill` 다음과 같은 역할을 합니다 `\hfill` 하지만 공백 대신 각각 가로 선과 점줄을 삽입합니다.

## 세로 공백

세로 공백은 가로 공백과 같은 문법을 가집니다.

```latex
페이지 상단의 텍스트. 페이지 상단의 텍스트.
페이지 상단의 텍스트. 페이지 상단의 텍스트.
페이지 상단의 텍스트. 페이지 상단의 텍스트.
페이지 상단의 텍스트.

\vspace{5mm} %5mm 세로 공백

이 텍스트는 여전히 상단에 있으며, 첫 번째 문단 아래 5mm에 있습니다.

\vfill

페이지 하단의 텍스트.
```

[이 예제를 Overleaf에서 열기](https://www.overleaf.com/docs?engine=\&snip_name=Vertical+blank+spaces\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%0AText+at+the+top+of+the+page.+Text+at+the+top+of+the+page.+%0AText+at+the+top+of+the+page.+Text+at+the+top+of+the+page.+%0AText+at+the+top+of+the+page.+Text+at+the+top+of+the+page.+%0AText+at+the+top+of+the+page.%0A%0A%5Cvspace%7B5mm%7D+%255mm+vertical+space%0A%0AThis+text+still+at+the+top%2C+5mm+below+the+first+paragraph.%0A%0A%5Cvfill%0A%0AText+at+the+bottom+of+the+page.%0A%0A%5Cend%7Bdocument%7D)

![LineBreaksEx6.png](/files/6b250736a212f70acf5694a3d6a6a3dce293e3b5)

세로 공백을 삽입하는 두 가지 명령을 살펴보겠습니다.

**\vspace{5mm}**

길이가 5mm인 세로 공백을 삽입합니다. 이 명령에는 다른 LaTeX 단위를 사용할 수 있습니다.

**\vfill**

사용 가능한 세로 공간을 채우도록 그에 맞게 늘어나는 공백을 삽입합니다. 그래서 "페이지 하단의 텍스트."라는 줄이 아래로 이동하고, 나머지 공간이 채워집니다.

세로 공백을 삽입할 때 흔히 사용하는 다른 세 가지 명령이 있습니다

**\smallskip**

다른 요소들(문서 유형, 사용 가능한 공간 등)에 따라 ±1pt 범위의 3pt 공백을 추가합니다

**\medskip**

다른 요소들(문서 유형, 사용 가능한 공간 등)에 따라 ±2pt 범위의 6pt 공백을 추가합니다

**\bigskip**

다른 요소들(문서 유형, 사용 가능한 공간 등)에 따라 ±4pt 범위의 12pt 공백을 추가합니다

## 참조 안내서

**추가 줄 바꿈 명령**

* ```latex
   \\*
  ```

  (백슬래시 두 개와 별표)

명령이 있는 지점에서 줄을 바꾸며, 강제 줄 바꿈 뒤의 페이지 나누기도 추가로 금지합니다.

* ```latex
   \break
  ```

현재 줄을 채우지 않은 채 줄을 바꿉니다. 직접 줄을 채우지 않으면 매우 나쁜 형식이 됩니다. 줄을 채우기 위해 아래와 같이 사용할 수 있습니다.

* ```latex
   \hfill\break
  ```

이는 다음과 같은 결과를 만듭니다 *\newline* 및 *\\\\*.

또한 LaTeX는 줄 바꿈을 위한 다음 고급 옵션을 제공합니다.

* ```latex
   \linebreak[number]
  ```

명령이 있는 지점에서 줄을 바꿉니다.  *번호* 인수로 제공되는 값은 0에서 4 사이에서 명령의 우선순위를 나타냅니다. (0은 쉽게 무시될 수 있음을 의미하고 4는 어쨌든 수행함을 의미합니다). 이 줄 바꿈 옵션을 사용하면 LaTeX는 가능한 최상의 줄 바꿈을 생성하려고 합니다.

## 추가 읽을거리

자세한 내용은 다음을 참조하세요:

* [LaTeX의 길이](/latex/ko/formatting/01-lengths-in-latex.md)
* [문단과 새 줄](/latex/ko/latex/02-paragraphs-and-new-lines.md)
* [문단 서식](/latex/ko/formatting/04-articles-how-to-change-paragraph-spacing-in-latex.md)
* [텍스트 정렬](/latex/ko/formatting/06-text-alignment.md)
* [굵게, 이탤릭체 및 밑줄](/latex/ko/latex/03-bold-italics-and-underlining.md)
* [목록](/latex/ko/latex/04-lists.md)
* [단면 및 양면 문서](/latex/ko/formatting/08-single-sided-and-double-sided-documents.md)
* [다중 열](/latex/ko/formatting/09-multiple-columns.md)
* [LaTeX2ε에 대한 그다지 짧지 않은 소개](http://www.ctan.org/tex-archive/info/lshort/)


---

# 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/formatting/05-line-breaks-and-blank-spaces.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.
