LaTeX中的多个目录

Ole*_*nge 4 latex tableofcontents

我想制作一个包含两个目录的LaTeX文档,例如:

内容概述

  • 1 - 简介
  • 2 - 解决方案

详细内容

  • 1 - 简介
    • 1.1 - 问题
    • 1.2 - 为什么?
  • 2 - 解决方案
    • 2.1 - 阶段A.
    • 2.2 - 阶段B.

我试过了

\setcounter{tocdepth}{1}
\tableofcontents

\setcounter{tocdepth}{2}
\tableofcontents
Run Code Online (Sandbox Code Playgroud)

但这只会根据需要显示第一个目录.第二个目录是空的......(即使没有两\setcounter行,第二个目录实际上也是空的.)

(一个相关的问题:如何更改目录的标题(与默认内容不同的东西)?)

hao*_*hao 7

你试过shorttoc包吗?