I have started including appendices in my thesis to collate common information for each separate \part
section so as to make the script concise and to the point. I am using a KOMA-Script
document class: scrreprt
, using the appendix
package together with the minitoc
package for my chapter format style has been giving me a real headache, though it is solved (in my previously asked question) for the most part, the result was unsatisfactory as I cannot include a \minitoc
inside the appendix.
My solution was to go manual and simply change \chaptername
name to appendix and the and \thechapter
numbering to \Alph{chapter}
and subsequently also change the \setcounter
so as to get the chapter lettering to start where desired.
This of course meant I had to put it all back at the end of the appendix chapter so that all following chapters would continue unaffected. I was wondering whether there is a way to simply define an environment that sets these parameters (chapter > appendix, chapter numbering > letter, chapter counter) and that allows for the chapter counter to continue between the instances of each repeated environment such that when I put my first environment at the end of the first part it will be called Appendix A
and once I put the next one at the end of the second part it will automatically continue form the numbering of the previous environment resulting in Appendix B
.
If there is a relatively simple way to do this by defining an environment I would gladly implement that over the manual approach I employed in the below MWE.
\documentclass[
bibliography=totoc,
headings=big,
captions=tableheading,
chapterprefix=true% like in standard class "report"
]{scrreprt}
\usepackage[left=2cm,right=2cm,top=2.5cm,bottom=3cm]{geometry}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{minitoc}
\usepackage{setspace}
\usepackage{lmodern}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\begin{document}
\dominitoc
\tableofcontents
\addtokomafont{chapterprefix}{\raggedleft}
\addtokomafont{chapter}{\fontsize{30}{38}\selectfont}
\addtokomafont{section}{\huge}
\addtokomafont{subsection}{\Large}
\addtokomafont{subsubsection}{\large}
\renewcommand*{\chapterformat}{%
\mbox{\scalebox{1.5}{\chapappifchapterprefix{\nobreakspace}}%
\scalebox{4}{\color{gray}\thechapter}\enskip}}
\setcounter{chapter}{6}\setcounter{page}{199}
\newpage\setcounter{page}{212}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\part{Introduction}
%%%%%%%%%%%%%%%%%%%%
\chapter{Conclusions}
\dictum[Sun Tzu]{If you know the enemy and you know yourself %\\
you need not fear the results of a hundred battles.}
\minitoc
\section{Summary of Achievements}
\blindtext
\subsection{Papers Submitted}
\blindtext
\subsubsection{I want to go into the TOC}
\blindtext
%%%%%%%%%%%%%%%%%%%% APPENDIX
% Chapter style change for Appendix
\addcontentsline{toc}{part}{Experimental Appendices}
\setcounter{chapter}{0}
\renewcommand{\thechapter}{\Alph{chapter}}
\renewcommand{\chaptername}{Appendix}
\chapter{Test}
\minitoc
Here goes nothing
\section{Adding it all in}
Done
% Chapter style reset for following chapters
\setcounter{chapter}{7}
\renewcommand{\thechapter}{\arabic{chapter}}
\renewcommand{\chaptername}{Chapter}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\part{Introduction}
%%%%%%%%%%%%%%%%%%%%
\chapter{The No MiniTOC Chapter}
\dictum[Sun Tzu]{If you know the enemy and you know yourself %\\
you need not fear the results of a hundred battles.}
\minitoc
\section{Unfortunate Problems}
This chapter does not have a minitoc for some reason
\subsection{Still no minitoc}
\blindtext
\subsubsection{I want to go into the TOC}
\blindtext
%%%%%%%%%%%%%%%%%%%%
\chapter{Conclusions}
\dictum[Sun Tzu]{If you know the enemy and you know yourself %\\
you need not fear the results of a hundred battles.}
\minitoc
\section{Summary of Achievements}
\blindtext
\subsection{Papers Submitted}
\blindtext
\end{document}