6

EDIT (SOLVED) The below answer by LaRiFaRi successfully allowed me to introduce appendicies where desired, however they have a serious issue with the minitoc. After the first appendix the next chapter loses its minitoc. This does not happen if the appendix is included as \appendix however this does cause every successive chapter to be an appendix (unless there is a known way to stop this command?). Please could you help fix the interaction between the two? The updated MWE from the original one is included at the bottom of this post.

Original post

I have subdivided my thesis into several parts since they are based on different methods employed. To make things more readable and light I want to move certain common information within each part to an appendix.

How can I insert appendices that show up just at the end of the part section rather than at the end of the entire document?

I know I could add a chapter rather than an appendix for this, however an appendix makes much more sense. Please find my MWE below with my customised chapter heading style with a TOC, Part and Chapter.

\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} % number subsubsections
\setcounter{tocdepth}{3} % list subsubsections

\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}
Text goes here

\subsection{Papers Submitted}
Text

\subsubsection{I want to go into the TOC}
Testing stuff out

\bibliographystyle{plain}
\bibliography{bibliography}

\end{document} 

UPDATED 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}
\usepackage[toc]{appendix}

\setcounter{secnumdepth}{3} % number subsubsections
\setcounter{tocdepth}{3} % list subsubsections

\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}
Text goes here

\subsection{Papers Submitted}
Text

\subsubsection{I want to go into the TOC}
Testing stuff out


%%%%% APPENDIX
\begin{appendices}

\chapter{Some Appendix}
The contents...
\end{appendices}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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}
Text

\subsubsection{I want to go into the TOC}
Testing stuff out

%%%%%%%%%%%%%%%%%%%%
\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}
Text goes here

\subsection{Papers Submitted}
Text



\bibliographystyle{plain}
\bibliography{bibliography}

\end{document} 
4

With help of the package appendix you can add an appendix whenever you want. When using this package and when using one of the KOMA-classes, minitoc writes the following into the .log-file:

Package minitoc(hints) Info: I0042
(minitoc(hints)) --- The appendix package is loaded.

(minitoc(hints)) See the minitoc package documentation

(minitoc(hints)) for specific precautions.

Package minitoc(hints) Info: I0043

(minitoc(hints)) --- The KOMAScript scrreprt class is loaded.

(minitoc(hints)) See the minitoc package documentation

(minitoc(hints)) for specific precautions.

I looked in the minitoc package documentation and adapted the code for you. But you should definitely read the chapters 1.5.5, 2.20, and 2.35 as you will run in several other problems when adding lof, lot, bib, and so on.

% arara: pdflatex

\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}
\usepackage{appendix}
\let\oldappendices\appendices
\def\appendices{\oldappendices\addtocontents{toc}{\chapterend}} % <----------   set a chapter end mark after each appendix.
\usepackage{blindtext} % <----------   for demo.

\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
\begin{appendices}
\chapter{Some Appendix}
\blindtext
\end{appendices}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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} 
  • Thank you. Ah that certainly works, I didn't realise this package wasn't the same as the functions within scrreprt! Do you know whether there is a way to remove the Appendices page as a package setting by any chance? – Fiztban Jul 7 '14 at 15:35
  • Ah figured it out, just had to change the command to \usepackage[toc]{appendix} – Fiztban Jul 7 '14 at 15:51
  • 1
    @Fiztban: I do not want to diminish LaRiFaRi's answer, but an appendix is basically nothing more than additional chapter or section with corresponding subsection(s) – user31729 Jul 7 '14 at 19:52
  • 1
    @Fiztban see my last version. This should work fine. If you comment \mtcaddchapter in my previous solution, you won't get the minitoc of chapter 7. – LaRiFaRi Jul 8 '14 at 10:32
  • 1
    @LaRiFaRi thank you, it works well now, it seems that having the [toc] in \usepackage[toc]{appendix} is also an element that is responsible for messing up the minitoc. Thank you very much for your help – Fiztban Jul 8 '14 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.