[Tex/LaTex] Fixing section numbers to alphabet letters with \theHsection

hyperrefnumberingsectioning

I researched, and I am having a similar trouble to this one:
Reset section numbering between unnumbered chapters

My problem is the following. I am using koma-script book class. I want to use \chapter* for Appendices, so that it doesn't say Chapter 7 after having six chapters. In particular, after the end of Chapter 6, I have the following.

\newpage
\phantomsection
\addcontentsline{toc}{chapter}{Appendices}
\chapter*{Appendices}
\setcounter{section}{0}
\renewcommand{\thesection}{\Alph{section}}
\section{Title of appendix A}
\section{Title of appendix B}
\section{Title of appendix C}

Now, the above code allows me to put A, B, C for each appendix, but hyperref bookmarks are messed up (same as the issue of the link). So instead of

\renewcommand{\thesection}{\Alph{section}}

I tried with

\renewcommand{\theHsection}{\Alph{section}}

This fixes hyperref links, but it puts 6.1, 6.2, 6.3 instead of A, B, C for each of my appendix. How can I use the alphabet instead of numbers together with \theHsection?

Edited:

Please look at the following code:

\documentclass[paper=letter, fontsize=11pt, chapterprefix=on, oneside]{scrbook}
\usepackage{hyperref}
\renewcommand{\thesection}{\thechapter.\arabic{section}}

\begin{document}
\tableofcontents

\chapter{First numbered chapter}
\section{AB}
\section{BC}
\section{DE}

\newpage
\phantomsection
\addcontentsline{toc}{chapter}{Appendices}
\chapter*{Appendices}
\setcounter{section}{0}
\renewcommand{\thesection}{\Alph{section}}
\section{Title of appendix A}
\section{Title of appendix B}
\section{Title of appendix C}
\end{document}

With this, bookmarks of "Title of appendix A", for example, is at the wrong location. It refers to "1.1 AB" when I want it to refer to "A. Title of appendix A."

So I change \renewcommand{\thesection}{\Alph{section}} to \renewcommand{\theHsection}{\Alph{section}}. Then bookmarks are all correct, but it now puts "1.1 Title of appendix A."

Best Answer

The problem is that after the section values occur again and the current chapter value is still 1 (in this document version here).

This confuses hyperref, since it uses again section. as prefix for the anchors. Changing \theHsection to apply another prefix, say appendixsection. cures the problem.

\documentclass[paper=letter, fontsize=11pt, chapterprefix=on, oneside]{scrbook}
\renewcommand{\thesection}{\thechapter.\arabic{section}}
\usepackage{hyperref}

\usepackage{blindtext}

\begin{document}
\tableofcontents

\chapter{First numbered chapter}
\section{AB}
\section{BC}
\section{DE}

\newpage
\phantomsection
\addcontentsline{toc}{chapter}{Appendices}
\chapter*{Appendices}
\setcounter{section}{0}
\renewcommand{\thesection}{\Alph{section}}
\renewcommand{\theHsection}{appendixsection.\Alph{section}}
\section{Title of appendix A}
\blindtext[5]
\section{Title of appendix B}
\blindtext[5]
\section{Title of appendix C}
\blindtext[5]
\end{document}