0

My university wants figures in Appendix to be mentioned separately in TOC. Like this:

LIST OF APPENDIX TABLES..............................................................................ix

LIST OF APPENDIX FIGURES............................................................................ x

All this in Table of Contents. How do I do that ?

I want list of figures and tables in appendix to be printed separately.

Following is the minimal working example using a template:

\documentclass[letterpaper,12pt,times,authoryear,print,index,oneside,custombib]{Classes/PhDThesisPSnPDF}

\ifdefineAbstract
\pagestyle{empty}
\includeonly{Declaration/declaration, Abstract/abstract}
\fi


\ifdefineChapter
\includeonly{Chapter3/chapter3}
\fi

\begin{document} \frontmatter

\begin{titlepage}   \maketitle \end{titlepage}


\include{Abstract/abstract}

\tableofcontents

\listoffigures

\listoftables


%\printnomenclature

\include{Chapter1/chapter1} \include{Chapter2/chapter2}
\include{Chapter3/chapter3} %\include{Chapter4/chapter6}
%\include{Chapter5/chapter5} %\include{Chapter6/chapter6}
%\include{Chapter7/chapter7}


\begin{appendices} % Using appendices environment for more
functunality

\include{Appendix1/appendix1} \include{Appendix2/appendix2}
\listoffigures

\end{appendices}

% *************************************** Index
******************************** \printthesisindex % If index is present

\end{document}

EDIT

How can I split the List fo figures? I want all figures that appear in the appendix to be in a separate list of figures.

\documentclass{book}
\usepackage{capt-of}
\begin{document} 
\tableofcontents
\listoffigures% List only the entries of the main part

\captionof{figure}{Wombat}
\captionof{figure}{Capybara}
\captionof{figure}{Duck}

\appendix
\listoffigures% List of only the entries of the appendix
\captionof{figure}{Ant}
\captionof{figure}{Biever}
\captionof{figure}{Cockroach}

\end{document}
6
  • Your 'code' does not work of course
    – user31729
    Commented Jan 25, 2017 at 14:46
  • Similar, but no duplicate: tex.stackexchange.com/questions/345979/…
    – user31729
    Commented Jan 25, 2017 at 14:49
  • @ChristianHupfer. I checked it out. I know now how to print out list of appendices seperately. But still how do I have separate figures in Appendix from the rest ?
    – Shaheer
    Commented Jan 25, 2017 at 17:51
  • 1
    Shaheer: Using such an class with a lot of issues ... I don't try it...
    – user31729
    Commented Jan 25, 2017 at 18:50
  • github.com/kks32/phd-thesis-template/issues/117
    – Johannes_B
    Commented Jan 26, 2017 at 8:29

1 Answer 1

3

This solution adds separate \listofappendixfigures and \listofappendixtables commands and a relevant entry to the ToC.

It changes the \tf@lof etc. file handles after the appendix such that no patching of \caption is needed.

Please note that the file handles are not restored afterwards! Any usage of \caption or \captionof will still write to the new .apt and .apf ToC files.

I used the MWE added by Johannes_B.

The code uses some adapted lines from my answer to this question: Printing a separate list of appendices.

\documentclass{book}
\usepackage{capt-of}
\usepackage{tocloft}
\usepackage{xpatch}

\usepackage{hyperref}

% Just in case we're not using hyperref
\providecommand{\phantomsection}{}

% Generate the separate list of commands for appendix figures and tables
\newcommand{\listofappendixfiguresname}{List of Figures in Appendix}
\newlistof{appendixfigures}{apf}{\listofappendixfiguresname}
\newcommand{\listofappendixtablesname}{List of Tables in Appendix}
\newlistof{appendixtables}{apt}{\listofappendixtablesname}

\renewcommand{\cftafterapftitle}{\phantomsection\addcontentsline{toc}{chapter}{\listofappendixfiguresname}}
\renewcommand{\cftafterapttitle}{\phantomsection\addcontentsline{toc}{chapter}{\listofappendixtablesname}}

\xpretocmd{\listofappendixfigures}{\clearpage}{}{}
\xpretocmd{\listofappendixtables}{\clearpage}{}{}


\makeatletter
\xapptocmd{\appendix}{%
  \write\@auxout{%
    \string\let\string\latex@tf@lof\string\tf@lof% Store the original `\tf@lof` file handle
    \string\let\string\tf@lof\string\tf@apf% 
    \string\let\string\latex@tf@lof\string\tf@lot% Store the original `\tf@lot` file handle
    \string\let\string\tf@lot\string\tf@apt% 
  }%
}{}{}
\makeatother

\begin{document} 
\tableofcontents
\listoffigures% List only the entries of the main part

\captionof{figure}{Wombat}
\captionof{figure}{Capybara}
\captionof{figure}{Duck}

\appendix
\listofappendixfigures% List of only the entries of the appendix
\listofappendixtables% List of only the entries of the appendix


\captionof{figure}{Ant}
\captionof{figure}{Beever}
\captionof{figure}{Cockroach}

\clearpage
\captionof{table}{Methods how to learn \LaTeXe\ and providing a MWE!}

\end{document}

enter image description here

enter image description here

3
  • This solved my problem. I cant thank you enough Christian !
    – Shaheer
    Commented Feb 1, 2017 at 7:27
  • Applying your code shows the List of Figures of Appendix in the ToC. But the main List of Figures as well as List of Tables do not show up in the ToC anymore. How can I change it that both list of figures and list of tables are shown in the ToC?
    – Flo
    Commented Dec 5, 2020 at 12:28
  • The solution works nicely, but it creates another problem for me: I use \pagestyle{headings} in combination with twoside, and after calling \listofappendixfigures, all the headers in the appendix show "List of appendix figures", instead of the correct chapter and section names. Does anyone know, how to fix that?
    – Nico
    Commented Apr 10, 2022 at 10:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .