Sections and titles
หน้านี้ต้องใช้เบราว์เซอร์ล่าสุด (รองรับ SharedArrayBuffer) กรุณาอัปเดต Chrome, Edge, Firefox หรือ Safari เป็นเวอร์ชันล่าสุด
English
Organising with sections
- Real documents are split into sections so readers can follow them.
- The command is simple:
\section{Introduction}
- LaTeX numbers it automatically (1, 2, 3 …) — you never count by hand.

English
Smaller pieces
- Inside a section you can add subsections:
\section{Methods}
\subsection{Materials}
\subsection{Procedure}
- These become 2.1, 2.2, and so on. Add or remove one and everything renumbers itself.
English
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:
\documentclass{article}
\title{My First Report}
\author{Pat Lee}
\begin{document}
\maketitle
...
\end{document}
\maketitlegoes inside the body, usually as its first line.
English
Common mistakes
\maketitlewithout\title{...}. LaTeX stops with! LaTeX Error: No \title given.Without\author{...}it only warns and leaves the author line empty.\section Introductionwithout braces. Only the first letter,I, becomes the heading. Write\section{Introduction}.- Numbering headings by hand.
\section{1 Introduction}prints1 1 Introduction. LaTeX numbers them; use\section*{...}for no number.
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
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.
คลิก Run เพื่อคอมไพล์และดูตัวอย่าง PDF
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
Give the document a title block. Add \title{...} และ \author{...} in the preamble, then \maketitle as the first line of the body.
คลิก Run เพื่อคอมไพล์และดูตัวอย่าง PDF
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
Inside the Results section, add a subsection ถูกเรียกใช้ Accuracy with \subsection{Accuracy}. LaTeX numbers it 1.1, under section 1.
คลิก Run เพื่อคอมไพล์และดูตัวอย่าง PDF