> 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/07-page-size-and-margins.md).

# 페이지 크기와 여백

## 소개

LaTeX 문서의 페이지 크기는 매우 유연하게 설정할 수 있으며 [`geometry` 패키지](https://ctan.org/pkg/geometry?lang=en) 은 용지 크기, 여백, 각주, 머리말, 방향 등과 같은 다양한 요소의 길이와 레이아웃을 변경하는 간단한 방법을 제공합니다.

### 예제

A4 크기 용지를 사용하고, 너비 6인치와 높이 8인치를 넘지 않는 텍스트 영역을 가진 문서를 만들어야 한다고 가정해 봅시다. LaTeX 서문에 다음 줄을 포함하면 그런 문서를 쉽게 만들 수 있습니다:

```latex
\usepackage[a4paper, total={6in, 8in}]{geometry}
```

에 전달된 매개변수 값은 `geometry` 패키지가 필요한 레이아웃을 생성합니다. 이 경우, `a4paper` 은 원하는 A4 용지 크기를 설정하고, `총` 매개변수에 제공된 값은 텍스트 영역의 크기를 결정합니다. Overleaf는 유럽식 LaTeX 배포판을 사용하므로, 기본적으로 A4 크기의 문서를 생성한다는 점에 유의하세요.

```latex
\documentclass{article}
\usepackage{blindtext}
\usepackage[a4paper, total={6in, 8in}]{geometry}

\begin{document}
\section{Introduction}
이것은 A4 크기 용지와 사용자가 정의한 텍스트 영역을 사용하는 테스트 문서입니다.
\subsection{Some dummy text}
\blindtext[8]

\end{document}
```

[이 예제를 Overleaf에서 열기](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Basic+geometry+package+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bblindtext%7D%0A%5Cusepackage%5Ba4paper%2C+total%3D%7B6in%2C+8in%7D%5D%7Bgeometry%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%5Csection%7BIntroduction%7D%0AThis+is+a+test+document+which+uses+A4-sized+paper+and+the+user-defined+text+area.+%0A%5Csubsection%7BSome+dummy+text%7D%0A%5Cblindtext%5B8%5D%0A%0A%5Cend%7Bdocument%7D)

## 용지 크기, 방향 및 여백

문서의 용지 크기, 방향 및 여백을 수정하는 것은 흔한 요구 사항이며, 다음을 사용하면 쉽게 달성할 수 있습니다. `geometry` 패키지. 원하는 값을 설정하는 방법은 두 가지가 있습니다:

* 위의 예에서처럼 이를 `\usepackage` 문에 매개변수로 전달하거나, 또는
* 다음을 사용합니다 `\geometry` 서문에서 명령을 사용합니다.

예를 들어, legal 용지 크기, 가로 방향, 2인치 여백을 가진 문서를 만들어 봅시다:

```latex
\usepackage[legalpaper, landscape, margin=2in]{geometry}
```

조금 다른 방법으로도 같은 것을 구현할 수 있습니다:

```latex
\usepackage{geometry}
\geometry{legalpaper, landscape, margin=2in}
```

보시다시피, 매개변수는 쉼표로 구분됩니다. 정의된 용지 크기의 전체 목록은 [참조 안내서](#reference-guide)를 참조하세요. 두 번째 매개변수는 방향이며, 기본값은 `portrait`. 마지막으로, 각 `여백은` 로 설정됩니다 `2in`.

## LaTeX 페이지 크기 세부 조정

### 레이아웃 시각화

다음 [`레이아웃` 패키지](https://ctan.org/pkg/layout?lang=en) 를 시각화하는 데 매우 편리한 해결책을 제공합니다 *시각화하는* 문서의 현재 레이아웃과 그 레이아웃을 결정하는 다양한 LaTeX 매개변수 값들을 시각화합니다. 두 개의 명령을 제공합니다: `레이아웃` 및 `layout*` 는 현재 레이아웃을 나타내는 그래픽을 그립니다. 별표가 붙은 버전(`layout*`)은 그래픽을 그리는 데 사용되는 내부 값을 다시 계산하는데, LaTeX의 페이지 레이아웃 매개변수를 변경했을 때 유용할 수 있습니다. 예시는 다음과 같습니다:

```latex
\documentclass{article}
\usepackage{layout}
\begin{document}
\section{기본 \LaTeX{} 레이아웃}
기본 레이아웃은 다음과 같습니다:

\vspace{10pt}
\layout
\section{몇 가지 변경하기}
margin paragraph 설정을 변경하고 \verb|layout*| 명령을 사용하여 페이지 레이아웃 다이어그램을 다시 그리세요:
\vspace{10pt}
\setlength{\marginparwidth}{0pt}
\setlength{\marginparsep}{0pt}

\layout*
\end{document}
```

[결과를 보려면 이 예제를 Overleaf에서 열어보세요!](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Using+the+layout+package\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Blayout%7D%0A%5Cbegin%7Bdocument%7D%0A%5Csection%7BDefault+%5CLaTeX%7B%7D+layout%7D%0AHere%27s+the+default+layout%3A%0A%0A%5Cvspace%7B10pt%7D%0A%5Clayout%0A%5Csection%7BMake+some+changes%7D%0AMake+changes+to+the+margin+paragraph+settings+and+use+the+command+%5Cverb%7Clayout%2A%7C+to+redraw+the+page+layout+diagram%3A%0A%5Cvspace%7B10pt%7D%0A%5Csetlength%7B%5Cmarginparwidth%7D%7B0pt%7D%0A%5Csetlength%7B%5Cmarginparsep%7D%7B0pt%7D%0A%0A%5Clayout%2A%0A%5Cend%7Bdocument%7D)

다음 이미지는 `레이아웃` 패키지.

![Layout-dimensions.png](/files/b31fc4fed0666200f55e48b3afee7448cd6f4989)

### geometry 패키지의 레이아웃 매개변수 사용하기

다음 `geometry` 패키지는 직관적인 이름의 매개변수를 사용하여 페이지 크기를 변경할 수 있는 인터페이스를 제공합니다. 이 매개변수들은 다음 형식으로 작성해야 합니다 `parameter=value`표준 LaTeX 단위(mm, cm, pt, in)를 사용합니다. 다음 목록은 이전 섹션에서 제공한 페이지 레이아웃 그래픽을 참조합니다.

**textwidth**

그래픽의 요소 8에 해당합니다.

**textheight**

그래픽의 요소 7입니다.

**총**

다른 매개변수에 따라 달라지며, 기본적으로 본문의 크기를 정의하지만 includehead, includefoot, includeheadfoot 및 includemp 명령과 함께 사용하여 머리말, 본문, 꼬리말 및 여백 주의의 크기를 한꺼번에 변경할 수 있습니다.

**left, lmargin, inner**

이 세 매개변수는 왼쪽 여백의 길이를 변경합니다. 그래픽의 요소 1과 3을 합친 것입니다.

**right, rmargin, outer**

이 세 매개변수는 오른쪽 여백의 길이를 변경합니다. 그래픽의 요소 9와 10을 합친 것입니다.

**top, tmargin**

이 두 매개변수는 그래픽의 요소 2와 6을 합친 것입니다.

**bottom, bmargin**

이 두 매개변수는 문서의 아래쪽 가장자리부터 기준선까지의 거리를 설정합니다.

**headheight**

머리말의 높이

**headsep**

머리말(기준선)과 본문 사이의 간격입니다. 그래픽의 요소 6입니다.

**footnotesep**

본문 하단(기준선)과 각주 텍스트 상단 사이의 간격입니다.

**footskip**

본문 마지막 줄의 기준선과 꼬리말의 기준선 사이의 거리입니다.

**marginparwidth, marginpar**

여백 주의 너비입니다. 그래픽의 요소 10입니다.

용지 크기는 명령을 통해 필요한 어떤 크기로든 설정할 수 있습니다. `papersize={⟨width⟩,⟨height⟩}`.

앞서 언급한 옵션들 중 일부를 사용한 예를 보겠습니다:

```latex
\documentclass{article}
\usepackage{blindtext}
\usepackage{geometry}
 \geometry{
 a4paper,
 total={170mm,257mm},
 left=20mm,
 top=20mm,
 }
\begin{document}
\section{Some dummy text}
\blindtext[10]
\end{document}
```

[이 예제를 Overleaf에서 열기](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Using+the+geometry+package+layout+parameters\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bblindtext%7D%0A%5Cusepackage%7Bgeometry%7D%0A+%5Cgeometry%7B%0A+a4paper%2C%0A+total%3D%7B170mm%2C257mm%7D%2C%0A+left%3D20mm%2C%0A+top%3D20mm%2C%0A+%7D%0A%5Cbegin%7Bdocument%7D%0A%5Csection%7BSome+dummy+text%7D%0A%5Cblindtext%5B10%5D%0A%5Cend%7Bdocument%7D)

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

![geometry 패키지 사용하기](/files/522efa32c82d3f519012a186b2379642e101e841)

여기서는 텍스트 영역, 왼쪽 여백, 위쪽 여백이 설정됩니다. 오른쪽과 아래쪽 여백은 페이지에 맞도록 자동으로 계산됩니다.

## 참조 안내서

| 매개변수      | description   | 값                                                                                                                                                                                                                                                                                                                              |
| --------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| papersize | 용지의 크기를 결정합니다 | a0paper, a1paper, a2paper, a3paper, a4paper, a5paper, a6paper,b0paper, b1paper, b2paper, b3paper, b4paper, b5paper, b6paper,c0paper, c1paper, c2paper, c3paper, c4paper, c5paper, c6paper,b0j, b1j, b2j, b3j, b4j, b5j, b6j,ansiapaper, ansibpaper, ansicpaper, ansidpaper, ansiepaper,letterpaper, executivepaper, legalpaper |

## 추가 읽을거리

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

* [LaTeX의 길이](/latex/ko/formatting/01-lengths-in-latex.md)
* [머리말과 꼬리말](/latex/ko/formatting/02-headers-and-footers.md)
* [다중 열](/latex/ko/formatting/09-multiple-columns.md)
* [각주](/latex/ko/formatting/14-footnotes.md)
* [페이지 번호 매기기](/latex/ko/formatting/03-page-numbering.md)
* [텍스트 정렬](/latex/ko/formatting/06-text-alignment.md)
* [하이퍼링크](/latex/ko/document-structure/09-hyperlinks.md)
* [패키지와 클래스 파일 이해하기](/latex/ko/class-files/01-understanding-packages-and-class-files.md)
* [사용자 정의 패키지 작성하기](/latex/ko/class-files/03-writing-your-own-package.md)
* [자체 클래스 작성하기](/latex/ko/class-files/04-writing-your-own-class.md)
* [geometry 패키지 문서](http://mirrors.ctan.org/macros/latex/contrib/geometry/geometry.pdf).


---

# 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/07-page-size-and-margins.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.
