我的文档中有额外的目录

我的文档中有额外的目录

我怎样才能制作额外的目录?

我想添加目录来描述另一个文档的内容,可以用简单的方法实现吗?我知道我可以编写样式和所有内容,但我希望其中包含新部分的一些迷你页面。

(编辑:我使用 LaTeX)

答案1

目录由一组\contentsline宏生成,这些宏由分段宏写入.toc文件。您可以使用该宏生成自己的目录。如果您的其他文档也是 LaTeX 文档,那么您可以使用其.toc文件作为基础。

\contentsline(with loaded)的格式hyperref为:

\contentsline {<type>}{<content, may include \numberline>}{<page>}{<label>}

例子:

\contentsline {chapter}{\numberline {1}Chapter text}{1}{chapter.1}
\contentsline {section}{\numberline {1.1}Section text}{1}{section.1}
\contentsline {subsubsection}{Subsubsection text}{8}{section*.3}

您可能不需要为标签提供任何内容,因为该目录很可能不会被超链接。

如果您希望 ToC 比正常情况小,请将其放入\scalebox{<factor>}{<content>}并缩小。如果您将其放置在环境中,{minipage}{<width>}它将以给定的宽度绘制。您需要自己添加 ToC 标题,\chapter*或者更好的方法是\section*

\begin{minipage}{8cm}
\section*{Some other ToC}
\contentsline {chapter}{\numberline {1}Chapter text}{1}{}
\contentsline {section}{\numberline {1.1}Section text}{1}{}
\contentsline {subsubsection}{Subsubsection text}{8}{}
\end{minipage}

相关内容