3

I'm trying to evaluate the feasibility of moving an older project which I had begun still using ledmac to reledmac. One crucial requirement is the labelling of footnotes with stanza and line number, for which in the ledmac package there was the example A.7, Irish verse, ledbraonain.tex which I had just slightly adapted to my needs.

As was to be expected, my file didn't compile anymore after just changing to \usepackage{ledmac}, and it looks as if the modifications necessary are not trivial. Also, skimming the reledmac documentation, I didn't find any example which does what I want.

In the following a rather simplified, but surely not minimal file, my real project features two commentaries to the verses, and four registers of apparatus.

\documentclass{memoir}
\usepackage{fontspec}
\usepackage{reledmac}
\usepackage{amssymb}%For Sigma and friends.

\newcommand{\sn}{SN757}

\newcounter{stanzanum}
\setcounter{stanzanum}{4}
%\newlength{\stanzaindentbase} Obviously already defined.
\setlength{\stanzaindentbase}{20pt} %Play with it later.
\setstanzaindents{4,1,2,1,2,3,3,1,2,1}


%%% Want to label the footnotes with the stanza and line number
%%% We'll use \linenum to replace the sub-line number
%%% with the stanza number, redefining \edtext to do this
%%% automatically for us.
%%%%%%%%%%%%%%%%%%%%%%%%%%
%\makeatletter
%
%\renewcommand{\edtext}[2]{\leavevmode
%  \begingroup
%    \no@expands
%    \xdef\@tag{#1}%
%    \set@line
%    \global\insert@count=0
%    \ignorespaces \linenum{||\the\c@stanzanum}#2\relax
%    \flag@start
%  \endgroup
%  #1%
%  \ifx\end@lemmas\empty \else
%    \gl@p\end@lemmas\to\x@lemma
%    \x@lemma
%    \global\let\x@lemma=\relax
%  \fi
%  \flag@end}
%
%%% We need only a very simple macro for footnote numbers,
%%% to produce the stanza number (sub-line) then the line number.
%\def\printstanzalines#1|#2|#3|#4|#5|#6|#7|{\begingroup
%%  #3\fullstop \linenumrep{#2} % Got rid of the full stop
%#3\linenumrep{#2}
%  \endgroup}
%\let\oldprintlines\printlines
%
%\makeatother



\begin{document}

\beginnumbering
\linenumberstyle{alph}
{\large 
\stanza 

kim akāṇḍa eva jagatāṃ \edtext{viparyayād}{\Bfootnote{$\Sigma$; viparyād \sn}} &
iva śūnyatām \edtext{upagatāḥ}{\Bfootnote{E$_{DR}$\sn D$_{BC^{pc}DE}$; upagatā Ś$_C$JD$_{AC^{ac}}$.}} stha śuṣmiṇaḥ | &
kathayanti vo hṛdaya\edtext{śalyaduḥkhitām}{\Bfootnote{E$_D$\sn Ś$_{CD}D_{BCD}$; śalyaduḥkhatām JD$_{AF}$; duḥkhaśalyatām D$_E$ }} &
adhunā mukhacchavaya eva dhūsarāḥ || 5 || \&

}
\endnumbering


\end{document}
  • After all it does look easy, only one line in the definition of \edtext needs to be changed. A first test now looks positive, still testing a bit. – muk.li Aug 1 '15 at 14:53
  • The aim of o (r)eledmac is to avoid redefining internal command of ledmac. However, for now, there is no tools which correspond to the example ledbraonain.tex. – Maïeul Aug 2 '15 at 12:23
  • 1
    I have open a new issue for this github.com/maieul/ledmac/issues/373. It should be quite easy to implement it. I will try to do it this afternoon, and will send you a message when I will need test. – Maïeul Aug 2 '15 at 12:24
  • The main part is encoded. I have just to make some little change for parallel typesetting + to add option after the stanza separator. I hope to do it tomorrow night. – Maïeul Aug 2 '15 at 16:09
  • I have posted a tutorial to make test. github.com/maieul/ledmac/issues/373#issuecomment-127175165 could do them and report ? – Maïeul Aug 3 '15 at 9:24
2

The version 2.1.0 of reledmac, now dowloaded at https://github.com/maieul/ledmac/archive/2.1.0-2.2.0.zip and, I hope, send in CTAN next week, provides tools to do what you need.

  1. \numberstanzatrue enable automatically stanza numbering.
  2. \Xstanza add this number in notes.
  3. \Xstanzaseparator{.} changes the separator between stanza number and line number.

Here a MWE

\documentclass{memoir}
\usepackage{fontspec}
\usepackage{reledmac}

\usepackage{amssymb}%For Sigma and friends.

\newcommand{\sn}{SN757}

\setlength{\stanzaindentbase}{20pt} %Play with it later.
\setstanzaindents{4,1,2,1,2,3,3,1,2,1}


\numberstanzatrue
\Xstanza
\Xstanzaseparator{.}
\begin{document}

\beginnumbering
\linenumberstyle{alph}
{\large 
\stanza 
 kim akāṇḍa eva jagatāṃ \edtext{viparyayād}{\Bfootnote{$\Sigma$; viparyād \sn}} &
iva śūnyatām \edtext{upagatāḥ}{\Bfootnote{E$_{DR}$\sn D$_{BC^{pc}DE}$; upagatā Ś$_C$JD$_{AC^{ac}}$.}} stha śuṣmiṇaḥ | &
kathayanti vo hṛdaya\edtext{śalyaduḥkhitām}{\Bfootnote{E$_D$\sn Ś$_{CD}D_{BCD}$; śalyaduḥkhatām JD$_{AF}$; duḥkhaśalyatām D$_E$ }} &
adhunā mukhacchavaya eva dhūsarāḥ || 5 || \&

\stanza 
 kim akāṇḍa eva jagatāṃ \edtext{viparyayād}{\Bfootnote{$\Sigma$; viparyād \sn}} &
iva śūnyatām \edtext{upagatāḥ}{\Bfootnote{E$_{DR}$\sn D$_{BC^{pc}DE}$; upagatā Ś$_C$JD$_{AC^{ac}}$.}} stha śuṣmiṇaḥ | &
kathayanti vo hṛdaya\edtext{śalyaduḥkhitām}{\Bfootnote{E$_D$\sn Ś$_{CD}D_{BCD}$; śalyaduḥkhatām JD$_{AF}$; duḥkhaśalyatām D$_E$ }} &
adhunā mukhacchavaya eva dhūsarāḥ || 5 || \&

}
\endnumbering


\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.