I am using the package utdiss2.sty in a paper. When I use the package like this example:
\documentclass[12pt]{book}
\usepackage{lipsum}
\usepackage{bookmark}
\usepackage{utdiss2}
\usepackage{hyperref}
%\usepackage{appendix}
\begin{document}
\chapter{Ch1}
\lipsum
\chapter{Ch2}
\lipsum
%\bookmarksetupnext{level=part}
\begin{appendices}
\chapter{Hello}
\lipsum
\chapter{World}
\lipsum
\end{appendices}
\end{document}
Eveything's OK, but the PDF does not have a correct matching in bookmark. The first appendix matches to Chapter 1, not the first appendix.
I looked into the appendices environment in the utdiss2.sty package and commented out \setcounter{chapter}{0}.
\def\appendices{\clearpage
\typeout{Appendices.}
\short@page \setcounter{regular@short}{1} % <- 9/13/96 (MAL)
\markboth{}{}\pagestyle{myheadings} % <- The appendices must
\thispagestyle{plain} % <- be numbered.
\vspace*{\fill}
\centerline{\large\bf Appendices}
\vspace*{\fill}
\addcontentsline{toc}{chapter}{Appendices} % <-
\setcounter{chapter}{0} % <---
\setcounter{section}{0}
\def\@chapapp{\appendixname}
\chap@or@app=2
\def\thechapter{\Alph{chapter}}}
Now, the bookmark works fine, but the numbering is wrong; Appendix C and D instead of Appendix A and B.
Without the utdiss2.sty package, there is no problem, so there is something changed in this package.
What might be wrong? What might be causing this kind of issue (wrong bookmark mapping) when redefining appendices or chapters?



utdiss2beforehyperref(which should be loaded last anyway in 99.9% of all cases. – Jun 27 '16 at 14:03does really solve in your bookmark issue? What is the issue? Do you want to have individual appendix chapters grouped belowAppendices`, i.e. indented in the bookmarks? Or is the hyperlink wrong? – Jun 27 '16 at 16:12