> 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/vi/dinh-dang/08-single-sided-and-double-sided-documents.md).

# Tài liệu một mặt và hai mặt

## Giới thiệu

LaTeX đi kèm với một số lớp “chuẩn” có thể được dùng để tạo các loại tài liệu khác nhau, bao gồm: `article`, `book`, `báo cáo`, `letter`, `trình chiếu` và `proc` (dành cho kỷ yếu hội nghị). LaTeX cũng cung cấp lớp `minimal` dành cho mục đích gỡ lỗi hoặc làm nền tảng để viết tệp lớp riêng của bạn. Nhiều lớp tài liệu bổ sung được đăng trong [Thư viện mẫu Overleaf](https://www.overleaf.com/latex/templates), hoặc có thể được [tải xuống từ CTAN](https://ctan.org/topic/class).

## Tạo tài liệu hai mặt

Để tạo một tài liệu hai mặt, hãy truyền `twoside` tùy chọn `\documentclass` cho khai báo lớp; ví dụ:

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

**Lưu ý**:

* Tính năng `book` lớp này mặc định là hai mặt nên bạn không cần thêm `twoside` tùy chọn.
* Tính năng `trình chiếu` lớp này không hỗ trợ `twoside` tùy chọn này—có lẽ vì việc đó sẽ không hợp lý đối với các trang trình chiếu.

### Ví dụ Overleaf để khám phá bố cục tài liệu

Ví dụ sau cung cấp một dự án Overleaf nhỏ sử dụng gói `bố cục` để tạo đồ họa hiển thị bố cục tài liệu ban đầu (*mặc định*) cho lớp tài liệu bạn chọn. Các giá trị mặc định đó có thể được thay đổi bằng cách tải các gói, chẳng hạn như `geometry`, gói này thay đổi các giá trị mặc định của các tham số bố cục trang của LaTeX. Xem các bài viết [Kích cỡ trang và lề](/latex/vi/dinh-dang/07-page-size-and-margins.md) và [Hướng dẫn trực quan về các tham số bố cục trang của LaTeX](/latex/vi/bai-viet-chuyen-sau/04-a-visual-guide-to-latex-s-page-layout-parameters.md) để biết thêm thông tin.

Đối với tài liệu hai mặt, `book` lớp, và các lớp khác sử dụng tùy chọn `twoside` này, ví dụ sẽ tạo các đồ họa riêng cho các trang bên trái và bên phải. Khi mở dự án, bạn sẽ thấy các trang bên trái và bên phải cho `\documentclass[twoside]{article}`.

```latex
% Chọn lớp tài liệu mà bạn muốn trực quan hóa bố cục: bỏ chú thích
% lớp bạn muốn, và chú thích các lớp còn lại.
% \documentclass[a4paper]{article} %Tạo ra một trang (dựa trên khổ giấy A4)
% \documentclass[a4paper]{report} %Tạo ra một trang (dựa trên khổ giấy A4)
% \documentclass[twoside,a4paper]{report} %Tạo ra hai trang (dựa trên khổ giấy A4)
% \documentclass[a4paper]{book} %Tạo ra hai trang (dựa trên khổ giấy A4)
% \documentclass[a4paper]{letter} %Tạo ra một trang (dựa trên khổ giấy A4)
% \documentclass[twoside, a4paper]{letter} %Tạo ra hai trang (dựa trên khổ giấy A4)
\documentclass[twoside,a4paper]{article} %Tạo ra hai trang (dựa trên khổ giấy A4)
\usepackage{layout}
\begin{document}
\layout
\end{document}
```

[Mở dự án này để khám phá bố cục của các lớp tài liệu LaTeX chuẩn.](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)

Ví dụ này tạo ra các hình ảnh như những hình được hiển thị trong ảnh sau. Lưu ý rằng ảnh bên dưới đã được cắt/chỉnh sửa để trình bày rõ hơn trong bài viết này.

![Ảnh minh họa bố cục tài liệu LaTeX](/files/d8ec076b82d20cc6de9391c1d1a8cd3b6ed3a332)

## Đọc thêm

* [`geometry` tài liệu gói](https://ctan.org/pkg/geometry?lang=en)
* [Hướng dẫn trực quan về các tham số bố cục trang của LaTeX](/latex/vi/bai-viet-chuyen-sau/04-a-visual-guide-to-latex-s-page-layout-parameters.md)
* [Kích cỡ trang và lề](/latex/vi/dinh-dang/07-page-size-and-margins.md)
* [Chú thích cuối trang](/latex/vi/dinh-dang/14-footnotes.md)
* [Ghi chú lề](/latex/vi/dinh-dang/15-margin-notes.md)
* [Đầu trang và chân trang](/latex/vi/dinh-dang/02-headers-and-footers.md)
* [Các phần và chương](/latex/vi/cau-truc-tai-lieu/01-sections-and-chapters.md)
* [Quản lý trong một dự án lớn](/latex/vi/cau-truc-tai-lieu/07-management-in-a-large-project.md)
* [Các dự án LaTeX nhiều tệp](/latex/vi/cau-truc-tai-lieu/08-multi-file-latex-projects.md)
* [Căn chỉnh văn bản](/latex/vi/dinh-dang/06-text-alignment.md)
* [Kích thước phông chữ, họ phông và kiểu chữ](/latex/vi/phong-chu/01-font-sizes-families-and-styles.md)
* [Chèn hình ảnh](/latex/vi/chu-de-khac/27-inserting-images.md)
* [Định vị hình ảnh và bảng](/latex/vi/hinh-va-bang/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/vi/dinh-dang/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.
