論文に付録を追加しようとしており、次のコマンドを使用しました。
\begin{appendices}
\chapter{Performance Tables of ABCD}
\input{tab1}
\input{tab2}
\input{tab3}
\input{tab4}
\input{realworld}
\end{appendices}
そして、私は次のパッケージを使用しました:
\usepackage[titletoc]{appendix}
問題は、次のことが表示されることです。
付録 A だけを表示するにはどうすればいいでしょうか? 愚かな質問でしたら申し訳ありません。
答え1
あなたは目次の章の設定方法については、すでに序文でいくつかの定義が示されています。そのため、以下に挙げるいくつかの小さな変更により、Chapter
付録の挿入をオフにすることができます。
\documentclass{report}
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\makeatletter
\newcommand{\frontmatternumberline}{%
\renewcommand{\numberline}[1]{\@chapapp~##1\hfill\mbox{}\par\nobreak}}
\newcommand{\appendixnumberline}{%
\renewcommand{\numberline}[1]{##1\hfill\mbox{}\par\nobreak}}
\patchcmd{\l@chapter}% <cmd>
{#1}% <search>
{\frontmatternumberline #1}% <replace>
{}{}% <success><failure>
\AtBeginEnvironment{appendices}{% Do the following when you hit \begin{appendices}
\addtocontents{toc}{\string\let\string\frontmatternumberline\string\appendixnumberline}}
\makeatother
\usepackage[titletoc]{appendix}
\begin{document}
\tableofcontents
\chapter{Introduction}
\chapter{Preliminaries}
\section{Problem definition}
\section{Genetic algorithms}
\section{Ant algorithms}
\section{Previous work}
\begin{appendices}
\chapter{An appendix}
\section{First appendix}
\section{Second appendix}
\section{Last appendix}
\end{appendices}
\end{document}
\string
この場合と同様に、を使用するのは\protect
、ToC へのマクロ挿入が拡張されないようにするためです。
答え2
章は\chapter*
目次に表示されません。
\begin{appendices}
\chapter*{Performance Tables of ABCD}
...
\end{appendices}