1

I'm preparing my dissertation template and I'm running into this problem.

Basically here's the desired output:

Table of Contents
   First
   Second
   List of Appendices % Note that I still want that to appear here
   EXTRA

% Chapter 1
... Content ...
% Chapter 2
... Content ...

List of Appendices
   First Appendix
   Second Appendix

% First Appendix
... Content ... 

% Second Appendix
... Content ...    

% That Extra Page Which is NOT a Chapter
... Content ...

Here's my MWE:

\documentclass[letterpaper,oneside,12pt]{memoir}

\usepackage{titletoc}

\begin{document}

\pagestyle{plain}

\startcontents[tocmain]
\printcontents[tocmain]{l}{0}{\chapter*{Table of Contents}\setcounter{tocdepth}{1}}

    \chapter{First}
    \section{A}
    \subsection{foo}

    \chapter{Second}
    \section{B}

\stopcontents[tocmain]

    \appendix

\startcontents[appendices]

\printcontents[appendices]{l}{0}{\chapter*{List of Appendices}\setcounter{tocdepth}{1}}

\chapter{First Appendix}


\chapter{Second Appendix}

\backmatter
\resumecontents[tocmain]

\clearpage
\addcontentsline{toc}{chapter}{EXTRA}
{\LARGE Extra page I want to add to main TOC}

\end{document}

Which gives me this output:

Table of Contents
   First
   Second

% Chapter 1
... Content ...
% Chapter 2
... Content ...

List of Appendices
   First Appendix
   Second Appendix

% First Appendix
... Content ... 

% Second Appendix
... Content ...    

% That Extra Page Which is NOT a Chapter
... Content ...

Thank you for your help.

Bonus question : depending on where I place the \startcontents and \stopcontents command I get weird output or errors, is there a best practice with those commands?

Thanks.

1 Answer 1

1

Is this the output you are looking for?

\documentclass[letterpaper,oneside,12pt]{memoir}

\usepackage{titletoc}

\begin{document}

\pagestyle{plain}

\startcontents[tocmain]
\printcontents[tocmain]{l}{0}{\chapter*{Table of Contents}\setcounter{tocdepth}{1}}

    \chapter{First}
    \section{A}
    \subsection{foo}

    \chapter{Second}
    \section{B}

\clearpage
\addcontentsline{toc}{chapter}{List of Appendices}
\stopcontents[tocmain]
    \appendix
\startcontents[appendices]

\printcontents[appendices]{l}{0}{\chapter*{List of Appendices}\setcounter{tocdepth}{1}}

\chapter{First Appendix}


\chapter{Second Appendix}

\backmatter
\stopcontents[appendices]
\resumecontents[tocmain]

\clearpage
\addcontentsline{toc}{chapter}{EXTRA}
{\LARGE Extra page I want to add to main TOC}

\end{document}

enter image description here enter image description here

1
  • Yes it's exactly what I was looking for: Thanks! I was close but not quite :) Jan 18, 2017 at 23:49

You must log in to answer this question.

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