質問

次のような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行目の \ setcounter 行がない場合でも、2番目の目次は実際には空です。)

(関連する質問:目次のタイトルを(デフォルトの内容とは異なるものに)変更する方法?)

役に立ちましたか?

解決

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

他のヒント

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

\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の更新を検討することをお勧めします。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top