I want to create a document with the following structure:
- Part 1 (English Version):
- Section 1
- Section 2 etc.
- Appendix A
- Appendix B
- Part 2 (German Version):
- Section 1
- Section 2 etc.
- Appendix A
- Appendix B
I don't want the document to show the "Part 1" headings. This is why I introduced an "invisiblepart" which restarts the numbering of sections.
Unfortunately, the hyperrefs all lead into Part 1 (see code below).
How can I fix this hyperref-Problem?
\documentclass{amsart}
\makeatletter
\@addtoreset{section}{part}
\makeatother
\newcommand\invisiblepart[1]{%
\refstepcounter{part}%
\addcontentsline{toc}{part}{#1}%
}
\usepackage{hyperref}
\begin{document}
\invisiblepart{English Version}
\section{First English section}
\label{sec11} Goto English Appendix \ref{app11}\pagebreak
{\appendix\section{First English Appendix}
\label{app11} Goto English Chapter \ref{sec11}\pagebreak}
\invisiblepart{German Version}
\section{First German Section}
\label{sec21} Goto German Appendix \ref{app21}\pagebreak
{\appendix\section{First German Appendix}
\label{app21}Goto German Section \ref{sec21}}
\end{document}