1

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}
L. Milla
  • 153

2 Answers2

2

I found the solution here:

Hyperref is just too clever sometimes. Make it dumber, and hence more robust:

\usepackage[hypertexnames=false]{hyperref}
L. Milla
  • 153
1

Page 39 of the hyperref manual says for the amsrefs:

Package loading order:
\usepackage{hyperref}
\usepackage{amsrefs}

It may be the same for amsart :)

Superuser27
  • 1,312