I got a lil question regarding the chapters in the appendix. Already read many entries but couldn't find a satisfying solution.
In my document I have two sidewaysfigures in the appendix. As this is the whole content of the appendix and there is no text in it I do not want to squander a whole page for the heading of the chapter. As a sidewaysfigure is a minipage of the width \textheight
it won't fit under the heading but starts on a new page. I tried to clear the chapterhead by redefining it:
\def\@makechapterhead#1{}
This works exactly the way I want it to, the only problem, the part "Appendix" does not get shown in the ToC anymore although I define it explicitly. Somehow the chapterhead needs an entry to be shown in the ToC. When I just put a blank command into the chapterhead
\def\@makechapterhead#1{\ }
it is shown in the ToC. Moreover the entry of the chapter appears (which is actually not desired). But the sidewaysfigure does not fit on the same page anymore and there's the problem again. Anybody any idea how to fix this? I'd appreciate any advice solving this little annoying problem.
In the following a small example:
\documentclass[listof=totoc]{scrreprt} %technical report
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{blindtext}
% --- Pictures: ---
\usepackage[pdftex]{graphicx}
\graphicspath{{elements/}} % path, where the pictures are stored
\usepackage[list=true,format=hang,justification=justified]{subcaption}
\usepackage{rotating}
\usepackage{pdfpages}
\usepackage{float}
\makeatletter
\makeindex
\makeatother
%----------------------------------------------------------
\begin{document}
\tableofcontents{}
\newpage
\listoffigures
\begingroup
\let\clearpage\relax
\listoftables
\endgroup
\newpage
\chapter{First chapter}
\blindtext
\chapter{last chapter}
\blindtext
\pagestyle{plain}
\appendix
\clearpage
\newpage
\part*{Appendix}\label{prt:appendix}
\addcontentsline{toc}{part}{Appendix}
\makeatletter
\def\@makechapterhead#1{}
\makeatother
\chapter{Heading that should not be visible}
\begin{sidewaysfigure}[htb]
\centering
\includegraphics*[trim=0mm 0mm 0mm 0mm,width=0.9\textwidth]{dummy.pdf}
\caption{caption of the sidewaysfigure}
\end{sidewaysfigure}
\end{document}
My table of contents shold look like this:
Contents
First chapter
last chapter
Appendix
\addpart{\appendixname}\label{prt:appendix}
for the unnumbered part with ToC entry and\stepcounter{chapter}
to get chapter numberA
in the captions of the appendix.\addpart
adds the partname to the ToC but when I explicitly define it by\addcontentsline{toc}{part}{Appendix}
(for the starred part in my first MWE) it does not get added? it seems to me that a part if there is no chapter in it but just content like figures etc. does not get treated as a proper part... any explanation for this?