6

次のような2つの目次を含むLaTeXドキュメントを作成したいと思います。

コンテンツの概要

  • 1-はじめに
  • 2-解決策

詳細内容

  • 1-はじめに
    • 1.1-問題
    • 1.2-なぜですか?
  • 2-解決策
    • 2.1-フェーズA
    • 2.2-フェーズB

で試してみました

\setcounter{tocdepth}{1}
\tableofcontents

\setcounter{tocdepth}{2}
\tableofcontents

ただし、これは必要に応じて最初の目次のみを表示します。2番目の目次は空です...(2番目の目次は2\setcounter行がなくても実際には空です。)

(関連する質問:目次のタイトルを(デフォルトの目次とは異なるものに)変更するにはどうすればよいですか?)

4

2 に答える 2

7

shorttocパッケージを試しましたか?

于 2009-05-02T19:03:55.253 に答える
0

\renewcommand で ToC の名前を変更できます。

\renewcommand{\contentsname}{My New Table Of Contents}

例:

\documentclass{amsart}
\usepackage{hyperref}
\renewcommand{\contentsname}{My New Table of Contents}
\begin{document}

\setcounter{tocdepth}{3}
\tableofcontents
\newpage

\newpage
\section{Section a}
Some a text.
\subsection{Subsection b}
Some b text.
\subsubsection{Subsubsection c}
Some c text.

\newpage
\section{Section d}
Some d text.
\subsection{Subsection e}
Some e text.

\end{document}

\renewcommand を使用して \maketitle コマンドの外観をカスタマイズしたので、\tableofcontents の更新を検討することをお勧めします。

于 2009-05-02T19:08:58.487 に答える