Sections and titles · Các mục và tiêu đề
Organising with sections
- Real documents are split into sections so readers can follow them.
- The command is simple:
- LaTeX numbers it automatically (1, 2, 3 …) — you never count by hand.
Sắp xếp với các mục
- Các tài liệu thực tế được chia thành các mục để độc giả dễ theo dõi.
- Lệnh rất đơn giản:
\section{Introduction}
- LaTeX tự động đánh số (1, 2, 3 …) — bạn không bao giờ phải đếm tay.
Smaller pieces
- Inside a section you can add subsections:
- These become 2.1, 2.2, and so on. Add or remove one and everything renumbers itself.
Các phân đoạn nhỏ hơn
- Bên trong một mục, bạn có thể thêm phụ đề:
\section{Methods}
\subsection{Materials}
\subsection{Procedure}
- Chúng sẽ trở thành 2.1, 2.2, v.v. Thêm hoặc xóa một cái và tất cả sẽ tự động đánh số lại.
A title block
- A report usually starts with a title, an author, and a date.
- You declare them in the preamble, then print them with
\maketitle:
\maketitlemust go inside the body, as its first line.
Khung tiêu đề
- Một báo cáo thường bắt đầu bằng tiêu đề, tác giả và ngày tháng.
- Bạn khai báo chúng trong preamble, sau đó in chúng ra bằng
\maketitle:
\documentclass{article}
\title{My First Report}
\author{Pat Lee}
\begin{document}
\maketitle
...
\end{document}
\maketitlephải nằm bên trong thân bài, như dòng đầu tiên.
Common mistakes
\section{...}numbers automatically; use\section*{...}for no number.\maketitleneeds\title{...}and\author{...}set first.
Lỗi thường gặp
\section{...}tự động đánh số; hãy dùng\section*{...}nếu không muốn đánh số.\maketitlecần\title{...}và\author{...}được đặt trước.
Organise this report by adding a section heading. Put \section{Introduction} at the start of the body, then Run. Notice LaTeX numbers it for you. · Sắp xếp báo cáo này bằng cách thêm tiêu đề mục. Đặt \section{Introduction} ở đầu thân bài, sau đó Chạy. Notice LaTeX đánh số tự động cho bạn.
Give the document a title block. Add \title{...} and \author{...} in the preamble, then \maketitle as the first line of the body. · Cấp cho tài liệu một mục tiêu đề. Thêm \title{...} và \author{...} vào phần mở đầu, sau đó \maketitle là dòng đầu tiên của thân bài.