> 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/zh-tw/ge-shi-hua/08-single-sided-and-double-sided-documents.md).

# 單面與雙面文件

## 簡介

LaTeX 隨附了多種「標準」類別，可用來建立不同類型的文件，包括： `article`, `book`, `報告`, `letter`, `投影片` 和 `proc` （用於會議論文集）。LaTeX 也提供了 `minimal` 類別，可用於除錯，或作為撰寫您自己的類別檔案的基礎。許多額外的文件類別都發表於 [Overleaf 範本藝廊](https://www.overleaf.com/latex/templates)，或可 [從 CTAN 下載](https://ctan.org/topic/class).

## 建立雙面文件

若要建立雙面文件，請傳入 `twoside` 選項給 `\documentclass` 宣告；例如：

```latex
\documentclass[twoside]{article}
```

**注意**:

* 該 `book` 類別預設即為雙面，因此您不需要加入 `twoside` 選項。
* 該 `投影片` 類別不支援 `twoside` 選項——或許因為簡報投影片這麼做沒有意義。

### 探索文件版面配置的 Overleaf 範例

以下範例提供一個小型 Overleaf 專案，使用 `版面配置` 套件來建立圖形，顯示初始（*預設*）您偏好的文件類別之文件版面配置。這些預設值可藉由載入套件來變更，例如 `geometry`，它會變更 LaTeX 頁面版面參數的預設值。請參閱文章 [頁面大小與邊界](/latex/zh-tw/ge-shi-hua/07-page-size-and-margins.md) 和 [LaTeX 頁面版面參數視覺指南](/latex/zh-tw/shen-ru-wen-zhang/04-a-visual-guide-to-latex-s-page-layout-parameters.md) 以取得更多資訊。

對於雙面文件， `book` 類別，以及其他使用 `twoside` 選項的類別，範例將為左頁與右頁建立分開的圖形。開啟專案時，您會看到左頁與右頁的 `\documentclass[twoside]{article}`.

```latex
% 選擇您要視覺化版面配置的文件類別：取消註解
% 您想要的那一個，將其他的註解掉。
% \documentclass[a4paper]{article} %產生一頁（以 A4 紙張大小為基礎）
% \documentclass[a4paper]{report} %產生一頁（以 A4 紙張大小為基礎）
% \documentclass[twoside,a4paper]{report} %產生兩頁（以 A4 紙張大小為基礎）
% \documentclass[a4paper]{book} %產生兩頁（以 A4 紙張大小為基礎）
% \documentclass[a4paper]{letter} %產生一頁（以 A4 紙張大小為基礎）
% \documentclass[twoside, a4paper]{letter} %產生兩頁（以 A4 紙張大小為基礎）
\documentclass[twoside,a4paper]{article} %產生兩頁（以 A4 紙張大小為基礎）
\usepackage{layout}
\begin{document}
\layout
\end{document}
```

[開啟此專案以探索標準 LaTeX 文件類別的版面配置。](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=document+class+layout\&snip=%25+Choose+the+document+class+whose+layout+you+want+to+visualize%3A+uncomment%0A%25+the+one+you+want%2C+comment+out+the+others.%0A%25+%5Cdocumentclass%5Ba4paper%5D%7Barticle%7D+%25Produces+one+page+%28based+on+A4+paper+size%29%0A%25+%5Cdocumentclass%5Ba4paper%5D%7Breport%7D+%25Produces+one+page+%28based+on+A4+paper+size%29%0A%25+%5Cdocumentclass%5Btwoside%2Ca4paper%5D%7Breport%7D+%25Produces+two+pages+%28based+on+A4+paper+size%29%0A%25+%5Cdocumentclass%5Ba4paper%5D%7Bbook%7D+%25Produces+two+pages+%28based+on+A4+paper+size%29%0A%25+%5Cdocumentclass%5Ba4paper%5D%7Bletter%7D+%25Produces+one+page+%28based+on+A4+paper+size%29%0A%25+%5Cdocumentclass%5Btwoside%2C+a4paper%5D%7Bletter%7D+%25Produces+two+pages+%28based+on+A4+paper+size%29%0A%5Cdocumentclass%5Btwoside%2Ca4paper%5D%7Barticle%7D+%25Produces+two+pages+%28based+on+A4+paper+size%29%0A%5Cusepackage%7Blayout%7D%0A%5Cbegin%7Bdocument%7D%0A%5Clayout%0A%5Cend%7Bdocument%7D)

此範例會產生如下圖所示的圖形。請注意，下方圖片已為了本文章的呈現清晰度而裁切／編輯。

![顯示 LaTeX 文件版面配置的圖片](/files/2030ebb404d9aa8e005549952650cc40e97664d8)

## 延伸閱讀

* [`geometry` 套件說明文件](https://ctan.org/pkg/geometry?lang=en)
* [LaTeX 頁面版面參數視覺指南](/latex/zh-tw/shen-ru-wen-zhang/04-a-visual-guide-to-latex-s-page-layout-parameters.md)
* [頁面大小與邊界](/latex/zh-tw/ge-shi-hua/07-page-size-and-margins.md)
* [腳註](/latex/zh-tw/ge-shi-hua/14-footnotes.md)
* [邊界註記](/latex/zh-tw/ge-shi-hua/15-margin-notes.md)
* [頁首與頁尾](/latex/zh-tw/ge-shi-hua/02-headers-and-footers.md)
* [章節](/latex/zh-tw/wen-jian-jie-gou/01-sections-and-chapters.md)
* [大型專案中的管理](/latex/zh-tw/wen-jian-jie-gou/07-management-in-a-large-project.md)
* [多檔案 LaTeX 專案](/latex/zh-tw/wen-jian-jie-gou/08-multi-file-latex-projects.md)
* [文字對齊](/latex/zh-tw/ge-shi-hua/06-text-alignment.md)
* [字型大小、字族與樣式](/latex/zh-tw/zi-xing/01-font-sizes-families-and-styles.md)
* [插入圖片](/latex/zh-tw/geng-duo-zhu-ti/27-inserting-images.md)
* [圖片與表格的定位](/latex/zh-tw/tu-biao-yu-biao-ge/02-positioning-images-and-tables.md)


---

# 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/zh-tw/ge-shi-hua/08-single-sided-and-double-sided-documents.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.
