LaTeX 记录 —— LaTeX文档基本结构
下面是一个LaTeX最基本的结构:
\documentclass[options]{class}
...
\begin{document}
    ...
\end{document}
参数意义
- 
options参数: 选项参数(options parameter)。些参数为可选参数,主要用于定义文档的主字体大小、文档排版、文档纸张等信息。如:\documentclass[12pt, a4paper]{article}表示文档主字体大小为12pt,纸张为A4纸。
- 
class参数: 文档类型。用以定义文档的类型,主要包括article,report,letter,book等类型。
- 在\documentclass[options]{class}与\begin{document}之间的部分被称为前言(preamble)部分,在这一部分中主要用于添加宏包(使用\usepackage语句)、预定义标题(title)、目录等信息。
- 在\begin{document}与\end{document}之间的部分为文档正文。此部分用于书写文档主要内容。其中,可以使用\begin{name}、\end{name}语句的组合与嵌套来组织文档内容。例:
\documentclass[12pt]{article}
...
\begin{document}
    ...
    \begin{math}
        ...
    \end{math}
    ...
    \begin{math}
        ...
    \end{math}
    ...
\end{document}