2

I work in the book class on my thesis, and I add appendices directly after individual chapters through use of subappendices environment. For the main text, I am using a format that labels section numbers within chapters without the chapter number in front. i.e. instead of "II.2 Title Section 2", I have "2 Title section 2". See code below (section headings part and also in toc).

I want the same for my appendices. I have tried many things, such as counterwithout within the \AtBeginEnvironment{subappendices} and also the same code that changes the sectionheading as used for the ordinary sections. But the subappendices environment seems blind to such commands. The result is that my appendix starts with the chapternumber (both in the mainbody and in the toc): "I.A Appendix title" instead of what I want, just "A Appendix title".

Any help would be much appreciated.

\documentclass[a4paper,twoside,12pt,openany]{book}

%subappendices
\usepackage{appendix}
\usepackage{chngcntr}
\usepackage{etoolbox}

\AtBeginEnvironment{subappendices}{%
%\counterwithout{section}{chapter}
%\titleformat{\section}{\bfseries\large}{\thesection}{20pt}{\bfseries\large}
\chapter*{Appendix}
\addcontentsline{toc}{section}{Appendix}
\counterwithin{figure}{section}
\counterwithin{table}{section}
\counterwithin{equation}{section}
\renewcommand\theequation{\maybe{ 
\arabic{chapter}}\Alph{section}.\arabic{equation}}
\renewcommand\thechapter{\Roman{chapter}}
\DeclareRobustCommand\maybe[1] 
{\ifnum#1=\value{chapter}\relax\else\thechapter.\fi}
}

%table of contents
\usepackage{tocloft}
\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesubsection}{\thesection.\arabic{subsection}}
\renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}}



%chapter/section headings
\usepackage{titlesec}
\titleformat{\chapter}{\scshape\rmfamily\huge}{\thechapter}{20pt} 
{\centering\scshape\rmfamily\huge}
\titleformat{\section}{\bfseries\large}{\thesection}{20pt}{\bfseries\large}

\begin{document}

\tableofcontents

\chapter{Chapter 1}

\begin{subappendices}

\section{Title Appendix}

\end{subappendices}

\end{document}
2

0

Browse other questions tagged .