ifthenelse - Normales Kapitel, Anhang oder sonst
Hallo Miteinander,
Ist es möglich zu testen, ob man sich gerade in einem normalen Kapitel oder im Anhang befindet?
Dies würde ich gerne wissen, um meine Kopf-Zeilen anzupassen.
Hier ein Minimalbeispiel:
Code:
\documentclass
[
a4paper,
11pt,
notitlepage,
twoside = true,
onecolumn,
headsepline,
footsepline,
chapterprefix,
numbers = noenddot,
]{scrreprt}
\usepackage[english]{babel}
\usepackage{fancyhdr}
\usepackage{ifthen}
\begin{document}
% Header Preferences
\pagestyle{headings}
\fancypagestyle{plain}{
\fancyhf{}
\fancyhead[LE, RO]{\ifthenelse{\equal{\chaptername}{Appendix}}{Appendix - Plain Style}{\ifthenelse{\thechapter=0}{Zero Chapter - Plain Style}{\chaptername \ \thechapter}}}
}
\fancypagestyle{empty}{
\fancyhf{}
\fancyhead[LE, RO]{\ifthenelse{\equal{\chaptername}{Appendix}}{Appendix - Empty Style}{\ifthenelse{\thechapter=0}{Zero Chapter - Empty Style}{\chaptername \ \thechapter}}}
}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE, RO]{\ifthenelse{\equal{\chaptername}{Appendix}}{Appendix - Fancy Style}{\ifthenelse{\thechapter=0}{Zero Chapter - Fancy Style}{\chaptername \ \thechapter}}}
% Title Page
\begin{titlepage}
Title page.
\end{titlepage}
% TOC, LOF, LOT
\cleardoublepage
\newpage
\tableofcontents
\listoffigures
\listoftables
% Chapters
\newpage
\cleardoublepage
\newpage
\chapter{First Chapter}
Text chapter 1.
\chapter{Second Chapter}
Text chapter 2.
% Appendices
\newpage
\appendix
\chapter{First Appendix}
Text appendix 1.
\chapter{Second Appendix}
Text appendix 2.
\end{document}
Die Frage bezieht sich auf den rot/fett markierten Text.
Code:
\equal{\chaptername}{Appendix}
scheint aber nicht so zu funktionieren.
Der Eintrag http://tex.stackexchange.com/questio...dix-or-chapter konnte mir auch nicht helfen.
Besten Dank im Voraus,
Grüsse