Choose singular or plural form of Appendix in the subappendices environment

by WZhao   Last Updated September 11, 2019 09:23 AM - source

I am using subappendices environment from appendix package to add appendices at the end of each chapter. What I want is to choose singular or plural form of Appendix in the ToC based on the number of sections in the appendix part. The figures and tables also need to be added in the ToC.

I tried the solution in here. But, he forgot to add the figures and tables in the appendix to the ToC.


\documentclass[11pt, a4paper, twoside]{book}


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

\section{First appendix}

\chapter{Second section}
\section{A subsection}

\section{First appendix}
\section{Second appendix}


Related Questions

Remove appendix page numbers in TOC

Updated April 15, 2015 21:10 PM

Add a chapter and the bibliography to the maintoc

Updated June 20, 2015 23:10 PM

How to have separate list of Appendix figures?

Updated January 27, 2017 14:09 PM