LaTeX 中将 \section*{}
加入 TOC
\section{}
和\section*{}
区别在于前者会被编号(编号+section内容),
而后者不会. 同时, 前者会被加入\tableofcontents
的内容中,
而后者默认情况下是不会的.
e.g.
\documentclass{article}
\begin{document}
\tableofcontents
\section*{About this Article} % 不会被加入toc
\section*{About this Author} % 不会被加入toc
\section{First Step}
\section{Second Step}
\end{document}
我们可以使用\addcontentsline
改变这一行为:
\documentclass{article}
\begin{document}
\tableofcontents
\section*{About this Article}
\addcontentsline{toc}{section}{About this Article}
\section*{About this Author}
\addcontentsline{toc}{section}{About this Author}
\section{First Step}
\section{Second Step}
\end{document}
Reference: tex.stackexchange.com