My question builds upon this one. Namely, I wish to have the following structure:
APPENDIX (Part)
First part of the appendix (Chapter)
A.1 First section of the first part (Section)
Here is an MWE:
\documentclass[11pt,twoside]{report}
\usepackage[hypertexnames=false]{hyperref}
\begin{document}
\tableofcontents
\phantomsection
\chapter*{Preface}
\addcontentsline{toc}{chapter}{Preface}
%===
\phantomsection
\part*{APPENDIX}
\addcontentsline{toc}{part}{APPENDIX}
%
\setcounter{chapter}{0}
\renewcommand{\thechapter}{\Alph{chapter}}
%
\chapter*{First chapter of the appendix}
\addcontentsline{toc}{chapter}{\numberline{A}First chapter of the appendix}
%
\setcounter{section}{0}
\renewcommand{\thesection}{\Alph{chapter} . \arabic{section}}
\section{First section of the first chapter}
\end{document}
For part and chapter this works allright, but for section I get
. 1 First part of the first chapter
That is, the counter chapter in \thesection gets lost. What's wrong?
Also, interestingly enough, without \setcounter{section}{0} I get . 3, where 3 is the value of \thesection from the previous chapter. Why wasn't it reinitialized?
Since I started to ask, there is another little issue. In TOC I see APPENDIX on p.4 while in the text it is on p.3.
ADDON: here is the desired TOC that I managed to produce thanks to your answers.





\thesectionmacro – Mar 06 '17 at 13:37\phantomsectionis not necessary here. – Skillmon Mar 06 '17 at 19:22