maieul/ledmac — Issue #7: Incorrect interaction between hyperref and numberpstarttrue
Author: Doc73
Created: 2012-01-05 11:14:31+00:00
State: open

I would like to report a strange behavior (I dont't know if it's a bug!) of the new command numberpstarttrue.

I am preparing a critical edition with a series of numbered paragraphs. The apparatus references are often based on these numbers.

So, I put in the preamble:
\newcounter{para}\setcounter{para}{0}
\newcommand{\newpara}{%
\refstepcounter{para}%
\noindent\llap{\thepstart}}
\newcommand{\oldpara}[1]{%
\noindent\llap{\ref{#1}}}

The paragraph numbering begins at every chapter, each of which has the following structure:
\beginnumbering
\numberpstarttrue
\pstart\newpara \label{ex1}...... \pend
\pstart\newpara \label{ex2}\edtext{\abb{}}{\killnumber\Afootnote{{\textbf{\ref{ex2}}}\enspace ......}}...... \pend
...
\numberpstartfalse
\endnumbering

The strange thing is that while the numbering of paragraphs actually started at each \beginnumbering, the numbers of cross-references in apparatus continue from the previous chapters!

So, I inserted at the beginning of each chapter:
\setcounter{para}{0}

This method, however, creates a conflict with hyperref, which is no longer able to create correct hyperlinks: in fact, if, for example, in Chapter 3 there is a paragraph 81, the hyperlink in apparatus will refer back to paragraph 81 of Chapter 1!

Thank you in advance and I hope I was clear.

P.S.: Sorry for my bad English!