maieul/ledmac

Printing verse number in the footnote

Fitisa opened this issue · 5 comments

Version

reledmac 2023/07/08 v2.39.3

TeX Engine

XeLateX (I am using cyrillic font and it works only with XeLateX)

Description

I am preparing a bilingual edition of a text in which it is vital to number sentences, not lines or paragraphs. After I found here information on how to enter counter ‘verse’, I was able to automatically number sentences (however, for some reason, this function doesn’t work on the right page, so I had to duplicate the command). However, it is very important for me to print verse numbers in the footnotes, not line ones which I would like to remove altogether. In the documentation file I only found information on how to print paragraph and stanza numbers in the footnotes (7.4.8–9). As far as I understand, there is no option to print the verse number so far. Perhaps you could introduce such an option? I would be very grateful.

Minimal Working Example

\documentclass[oneside,final,12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{microtype}
\usepackage[osf,p]{libertinus}
\usepackage[pdfusetitle,hidelinks]{hyperref}
\usepackage[russian]{babel}

\usepackage[noresetlinenumannotation,series={A, D},noend,noeledsec,noledgroup]{reledmac}
\Xarrangement[D]{paragraph}
\usepackage[normalem]{ulem}
\usepackage[advancedshiftedpstarts]{reledpar}
\maxhnotesX{0.2\textheight}
\beforenotesX{5pt}
\setgoalfraction{0.95}

\newcounter{verse}
\renewcommand{\theverse}{\Roman{verse}}
\newcommand{\autoversenumber}{
  \refstepcounter{verse}
  \edef\tmp{\noexpand\markboth{\the\value{verse}}{\the\value{verse}}}
  \expandafter\doinsidethislinehook\expandafter{\tmp}
  {\textbf{\Roman{verse}}}.\space
}
\Xnumberonlyfirstinline
\newcounter{verseright}
\newcommand{\autoversenumberright}{
  \refstepcounter{verseright}
  \edef\tmp{\noexpand\markboth{\the\value{verseright}}{\the\value{verseright}}}
  \expandafter\doinsidethislinehook\expandafter{\tmp}
  {\textbf{\Roman{verseright}}}.\space
}

\begin{document}

\begin{pages}
\begin{Leftside}
\beginnumbering
\autopar

\autoversenumber Morbi \edtext{commodo}{\Dfootnote{Footnote Footnote Footnote}}, ligula vel consectetur accumsan, massa metus egestas velit, eu fringilla leo ante in turpis.

\autoversenumber Vivamus ut tellus sollicitudin, facilisis ipsum sit amet, tincidunt odio. \autoversenumber Maecenas \edtext{tincidunt}{\Dfootnote{Footnote Footnote Footnote Footnote}} dolor sed ante blandit tincidunt. Etiam vulputate ultricies facilisis.

\endnumbering
\end{Leftside}

\begin{Rightside}
\beginnumbering
\autopar

\autoversenumberright Morbi commodo, ligula vel consectetur accumsan, massa metus egestas velit, eu fringilla leo ante in turpis.

\autoversenumberright Vivamus ut tellus sollicitudin, facilisis ipsum sit amet, tincidunt odio. \autoversenumberright Maecenas tincidunt dolor sed ante blandit tincidunt. Etiam vulputate ultricies facilisis.

\endnumbering
\end{Rightside}
\end{pages}
\Pages
\end{document}

Thank you! Would you be so kind to give me an example of how one can use \stanza to count sentences in a single paragraph?

Here you can see that footnotes are related to the number of a verse (i.e. a sentence). It is also vital to print the number of a verse only once, in the first footnote related to this verse.

Screenshot_20240406_115443

Oh, is see. "Verse" is a false friend for french people like me, as it can meaning either verset (as for you) either vers (in poetry, with old meaning). What you want is not related at all to poetry, so not to stanza.

Well, what I said previously is always true : you must use line number annotation. Please read §5.5 of the handbook.