maieul / ledmac

package reledmac for latex
http://www.ctan.org/tex-archive/macros/latex/contrib/reledmac
54 stars 28 forks source link

Line number annotations spanning multiple lines appear twice in footnote #790

Closed fpsvogel closed 5 years ago

fpsvogel commented 5 years ago

Version of reledmac

2.29.0

Description of the problem

Using line number annotations to mark verse numbers in the margin of a biblical text, when the text within \edtext of a footnote spans multiple lines within the same verse (verse 6 in the MWE), the footnote displays two numbers (6-6), as if there were a start and end line, rather than simply 6.

Is it possible to modify the behavior of footnotes so that if the end line number is the same as the start line number, only one number is shown?

Minimal Working Example

\documentclass[12pt]{article}
\usepackage[total={2in, 3in}]{geometry}
\usepackage[series={A},noresetlinenumannotation]{reledmac}
\newcommand{\bv}[1]{\linenumannotation{#1}}
\makeatletter
\Xwraplinenumannotation{\@firstofone}
\renewcommand{\linenumrep}[1]{}
\makeatother
\firstlinenum{1}
\linenumincrement{1}

\begin{document}
    \beginnumbering
    \pstart
        \bv{6} Erat autem Ioannes indutus camelinis pilis, lateribus pelliceo cingulo cinctis, vescebaturque locustis et \edtext{melle silvestri}{\Afootnote{mel quod Ioannes non in horto vel apiario colebat, sed in locis desertis inveniebat.}}, atque huiusmodi verbis publice docebat:\bv{7} “Venit quidam post me, adeo me praestantior, ut ego non sim dignus qui eius calceorum corrigiam pronus solvam.”
    \pend
    \endnumbering
\end{document}
maieul commented 5 years ago

The branch "issue790" add a new hook \Xnoidenticallinenumannotation. Please try it.

fpsvogel commented 5 years ago

Perfect! It works. Thank you.

maieul commented 5 years ago

nice, depending of the advancement on #792, I will publish this week-end or later