
現在、book クラスを使用して論文を書いています。次のように目次を表示しようとしています。
各章は次のように表示されます。
私は LaTeX を使い始めたばかりで、論文を書くのも初めてなので、この形式でフォーマットする方法がよくわかりません。何かアイデアがあれば教えてください。
ありがとう!
答え1
次のパッチ\l@chapter
はetoolbox
十分なものです:
\documentclass{report}
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\makeatletter
\patchcmd{\l@chapter}% <cmd>
{#1}% <search>
{\def\numberline##1{\@chapapp~##1\hfill\mbox{}\par\nobreak}#1}% <replace>
{}{}% <success><failure>
\makeatother
\begin{document}
\tableofcontents
\chapter{Introduction}
\chapter{Preliminaries}
\section{Problem definition}
\section{Genetic algorithms}
\section{Ant algorithms}
\section{Previous work}
\end{document}