text-formatting-lists
Text Formatting and Lists
Text formatting and lists handle the "flesh and blood" of the body: how to switch font styles, adjust font sizes, use the three list environments, and control alignment. The principle remains the same: these are semantic commands. You tell LaTeX "this is emphasis," and the document class decides exactly how it looks.
Font Styles
There are five commonly used styles, all in the form of "command + braces," acting on the text inside the braces.
| Effect | Command | Description |
|---|---|---|
| Bold | \textbf{...} | bold face |
| Italic | \textit{...} | Chinese is automatically mapped to Kai typeface |
| Underline | \underline{...} | Use with caution in formal typesetting; Western convention prefers italics |
| Monospace | \texttt{...} | typewriter, for code, commands, and file names |
| Emphasis | \emph{...} | Smart emphasis: italic in normal text, upright in italic text |
Example: Font styles
\documentclass{ctexart}
\begin{document}
\textbf{Bold text}、\textit{Italic text}、\underline{Underlined text}、\texttt{Monospace text}.
Chinese emphasis uses \emph{key point}, English emphasis uses \emph{emphasis}.
Combined use: \textbf{bold and \textit{italic}}, \texttt{code can also be \textbf{bold}}.
\end{document}

Note a detail in the output: Chinese "italics" actually display as Kai typeface—Chinese characters have no italic tradition, so ctex automatically uses Kai to take on the emphasis role. This is the correct localized handling.
The difference between \emph and \textit lies in "intelligence": inside text that is already italic, \emph automatically switches back to upright to create contrast. Prefer \emph when writing papers.
Do not use underlines for emphasis—that is a relic of the typewriter era. In academic typesetting, italics or bold are sufficient.
Font Size Adjustment
Western font sizes are a set of "declarative" commands, ten levels from \tiny to \Huge, scaled proportionally from \normalsize.
| From small to large | Command |
|---|---|
| 1–5 (small) | \tiny, \scriptsize, \footnotesize, \small, \normalsize |
| 6–10 (large) | \large, \Large, \LARGE, \huge, \Huge |
Example: Font sizes and Chinese font sizes
\documentclass{ctexart}
\begin{document}
{\tiny tiny footnote-level}、{\scriptsize scriptsize}、{\footnotesize footnotesize}、{\small small}、body default \normalsize.
{\large large}、{\Large Large}、{\LARGE LARGE}、{\huge huge}、{\Huge Huge}.
% Chinese theses more commonly use "hao" numbers directly: \zihao{number}
Chinese font sizes: {\zihao{5} size 5 (commonly used for body)}、{\zihao{-4} small 4 (thesis body)}、{\zihao{4} size 4 (section headings)}.
\end{document}

Font size commands are "switches," not "scopes"—after writing \large, all subsequent text grows until the group ends. So always wrap them in braces: {\large large text}, so the following small text is not affected.
For Chinese documents, it is recommended to use \zihao{size} directly; a minus sign before the number means "small size," so \zihao{-4} is the famous "small 4"—the standard font size for Chinese university thesis bodies.
Three List Environments
Lists are the most commonly used "environments" in LaTeX (paired \begin and \end); the three environments correspond to three semantics.
| Environment | Purpose | Label |
|---|---|---|
| itemize | Parallel points, unordered | Dots, dashes, etc. |
| enumerate | Ordered steps | 1. 2. 3. numbering |
| description | Term definitions | Custom term names |
Example: The three list environments and nesting
\documentclass{ctexart}
\begin{document}
Unordered list itemize:
\begin{itemize}
\item First item
\item Second item
\begin{itemize}
\item Nested sub-item, symbol changes automatically
\item Another sub-item
\end{itemize}
\end{itemize}
Ordered list enumerate:
\begin{enumerate}
\item Install the distribution
\item Choose an editor
\item Compile your first document
\end{enumerate}
Description list description:
\begin{description}
\item[LaTeX] A typesetting system based on TeX
\item[Package] A plug-and-play functional extension
\end{description}
\end{document}
Unordered list itemize:
- First item
- Second item
- Nested sub-item, symbol changes automatically
- Another sub-item
Ordered list enumerate:
- Install the distribution
- Choose an editor
- Compile your first document
Description list description:
LaTeX A typesetting system based on TeX
Package A plug-and-play functional extension
Default lists require no extra setup; deep levels automatically indent and symbols change level by level (dots, dashes, stars...), up to four levels.
Default list line spacing is loose; the enumitem package provides fine control for compact versions often needed in papers.
Example: Customizing lists with enumitem
\documentclass{ctexart}
\usepackage{enumitem} % Load package
\begin{document}
\begin{itemize}[label=\textsquare, noitemsep] % Square label + remove extra space between items
\item Compact unordered list
\end{itemize}
\begin{enumerate}[label=(\alph*)] % Numbering style changed to (a) (b) (c)
\item First point
\item Second point
\end{enumerate}
\end{document}
- □ Compact unordered list
- (a) First point
- (b) Second point
Alignment
The body is justified by default, which is the standard for typesetting long documents; no setting is required.
When local alignment changes are needed, use the three environments: center, flushleft, and flushright.
Example: Center and right alignment
\documentclass{ctexart}
\begin{document}
The body is justified by default, with the last line aligned to the left—this is the standard typographic practice.
\begin{center}
Centered text\\
The second line is also centered
\end{center}
\begin{flushright}
Right-aligned text\\
Signatures often use right alignment
\end{flushright}
\end{document}

| Usage | Characteristics | Applicable Occasions |
|---|---|---|
\begin{center}...\end{center} | Environment form, adds vertical spacing | Independent centered paragraphs in the body |
\centering | Declarative command, no extra spacing | Inside float environments, see Chapter 8 |
\begin{flushright}...\end{flushright} | Right-aligned environment | Signatures, dates |
Summary
| Need | Command | Common Mistake |
|---|---|---|
| Bold / italic / monospace | \textbf / \textit / \texttt | Command only acts within braces |
| Emphasis | \emph | Chinese is mapped to Kai typeface |
| Change font size | \large ... or \zihao{n} | Forgetting braces causes everything afterward to grow |
| Lists | itemize / enumerate / description | \begin and \end must be paired when nesting |
| Centering | center environment or \centering | Different inter-line behavior |