LateX在目录中不显示某个章节,但仍然对章节编号

本文介绍了如何在LaTeX文档中使用tocvsec2包来控制目录结构,避免某些子部分(如subsections和subsubsections)在目录中显示,导致编号不连续的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

不希望我的目录中出现某些 subsections/ sub subsections,使得目录过于庞大
使用tocvsec2 包用于更改目录中单元深度,可以做到编号的部分单元不出现在目录中

\documentclass{article}
\usepackage{tocvsec2}

\begin{document}

\tableofcontents
\section{Test section in ToC}
\subsection{Test subsection in ToC}
\settocdepth{part}
\subsection{Test subsection not in ToC}
\resettocdepth
\section{Another test section in ToC}

\settocdepth{part}
\section{Test section not in ToC}
\resettocdepth

\section{Yet another test section in ToC}

\end{document}

ToC效果但请注意,现在目录看起来很奇怪,因为编号不连续。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值