目录
1、介绍
2、章节的等级
3、取消编号章节
4、章节引用
1、介绍
命令\section{}标志着一个新章的开始,大括号内的文字为章的标题。章的编号是自动生成的,你也可以使用没有编号的章。
\documentclass[]{article}
\begin{document}
\section{Introduction} \label{introduction}
This is an introductory paragraph with some dummy text. This section will be referenced later.
You can reference images; for instance, shows the \textit{Overleaf} logo.
\vspace{0.5cm}
\section{Math references} \label{mathrefs}
As mentioned in section \ref{introduction}, different elements can be referenced within a document.
\end{document}

2、章节的等级
| 等级 | 命令 |
|---|---|
| -1 | \part{part} |
| 0 | \chapter{chapter} |
| 1 | \section{section} |
| 2 | \subsection{subsection} |
| 3 | \subsubsection{subsubsection} |
| 4 | \paragraph{paragraph} |
| 5 | \subparagraph{subparagraph} |
一般来说,\section是最高的等级。对于 report、book等类型,\chapter和\part是最高的等级。
3、取消编号章节
取消某个章节的编号,在命令的大括号前加一个星号 “ * ” 即可。(这些章节不会显示在目录中)
\documentclass[]{article}
\begin{document}
\section*{Introduction} \label{introduction}
This is an introductory paragraph with some dummy text. This section will be referenced later.
You can reference images; for instance, shows the \textit{Overleaf} logo.
\vspace{0.5cm}
\section{Math references} \label{mathrefs}
As mentioned in section \ref{introduction}, different elements can be referenced within a document.
\end{document}

4、章节引用
使用\label和\ref命令来创建引用。在\section命令之后使用\label命令(即应该在章的编号被创建之后来使用\label命令)。这个方法对chapters、subsections 以及 subsubsections 都有效。
\documentclass[]{article}
\begin{document}
\section{Introduction} \label{introduction}
This is an introductory paragraph with some dummy text. This section will be referenced later.
You can reference images; for instance, shows the \textit{Overleaf} logo.
\vspace{0.5cm}
\section{Math references} \label{mathrefs}
As mentioned in section \ref{introduction}, different elements can be referenced within a document.
\end{document}

注:命令\pageref会插入元素(对应所使用的\label)所在的页数,即引用元素所在页。



![内网穿透[让你在家里也能榨干学校的服务器]Yep!](https://img-blog.csdnimg.cn/direct/2f4ea18b50184bbcb6efc8c6acb6f839.png)















