# Reledmac: how to use modified stanza lables as footnotes?

I would like to achieve a specific way of having my critical apparatus arranged using xelatex and reledmac. First of all I'd like to give each stanza of my text a certain numbering, which should not be displayed like line numbers. The following example is one stanza that I would like to critically edit.

candraḥ sūryas tathā vahniḥ śarīre daśa nāḍikāḥ |

pañcasthā vāyavaḥ pañca mano bindus tathaiva ca ||1||

It consists of two hemistiches. Each of them having 16 syllables. Each hemistich should be divided in two parts, 8 syllables each. So each stanza with its respective stanza number, in the example "1", I'd like to have marked and counted into four parts "a-d", to utilize this scheme in my critical footnotes.

So instead of having each line number counted, or each word marked with a normal arabic footnote or underlined, the footnotes shall be automatically labelled according to the scheme stanza number and the letter of one of the respective parts.

Here is an example of an edition that uses this arrangement.

I am just not able to figure out how to implement this myself. I spend already some ours and my XelateX skillz are not sufficient enough yet, to find a sollution. Can anyone please help me with this?

See current code below.

Thanks!

Best wishes, Nils Jacob.

\documentclass[a4paper,11pt]{article}

\title{\textit{Mūlasāra}}

\usepackage{lscape}

\usepackage{polyglossia}
\setmainlanguage{german}
\setotherlanguage{sanskrit}

\usepackage{fontspec}
\setmainfont{TeX Gyre Termes}
\setmonofont{TeX Gyre Termes}
\newfontfamily\devanagarifont[Script=Devanagari]{Chandas}
\newfontfamily\devnag[Script=Devanagari]{Chandas}

\newfontface\dejlight{DejaVu Sans}

\DeclareTextFontCommand{\textding}{\dejlight}

\usepackage[backend=biber,bibstyle=authortitle,citestyle=authoryear,sorting=nyt]{biblatex}

\DeclareFieldFormat{postnote}{#1}
\renewcommand{\postnotedelim}{:}

\usepackage[draft]{reledmac}
\arrangementX[A]{paragraph}
\Xarrangement[B]{paragraph}

\firstlinenum{1}
\linenumincrement{2}
\setcounter{stanzaindentsrepetition}{2}
\setstanzaindents{8,2,2}

\makeatletter
\renewcommandx{\stanza}[1][1,usedefault]{\@startstanza[#1~]}
\makeatother

\tolerance=2000
\frenchspacing

\usepackage{hyperref}
\usepackage{cleveref}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{setspace}

\geometry{verbose,a4paper,tmargin=25mm,bmargin=25mm,lmargin=20mm,rmargin=25mm}

\usepackage{tikz}

\usepackage[hang,flushmargin]{footmisc}

\begin{document}

\section{Critical Edition}

\begingroup
\beginnumbering
\autopar

\stanza
namo ādināthāya ||\&

\stanza
\edtext{īśvara}{\Bfootnote{em. (\textit{īśvara} Pts): \textit{iśvara} Ms}}\footnoteA{\textbf{Ci} Pts Z. 5100} uvāca ||\&

\stanza
\edtext{candraḥ}{\Bfootnote{em. (\textit{candraḥ} Pts): \textit{candra} Ms}}\footnoteA{\textbf{Ci} Pts Z. 5102} sūryas tathā \edtext{vahniḥ}{\Bfootnote{em. (\textit{vahniḥ} Pts): \textit{vahni} Ms}}\footnoteA{\textbf{Ci} Pts Z. 5102} śarīre daśa nāḍikāḥ |&
\edtext{pañcasthā}{\Bfootnote{(\textit{pañcasthā} Ms): \textit{dehasthā} Pts}}\footnoteA{\textbf{Ci} Pts Z. 5104} \edtext{vāyavaḥ}{\Bfootnote{em. (\textit{vāyavaḥ} Pts): \textit{vāyava} Ms}}\footnoteA{\textbf{Ci} Pts Z. 5104} pañca mano bindus tathaiva ca ||1||\&

\endgroup
\endnumbering

\clearpage
\end{document}


Now, I received the answer for the problem. But unfortunately without explanation I don't understand what is happening there and how I would use and implement it in my text. Can anyone tell me?

\newcount\verseno
\newcount\choice
%Set the counters to 1 to begin with
\verseno=1
\choice=1
%
%A verse can have 16 pādas
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
%
%These are the markup commands
%
\def\chandas{\enskip\textrm{\the\verseno}}
%
\makeatletter
\newcommand\lfootfmt[3]{\normal@pars \rightskip=0pt \leftskip=0pt       \parindent=0pt \parfillskip=0pt plus 1fil{#3}\penalty-20}
\makeatother
%
\def\mynewrule{\kern4pt
\hrule width.245\textwidth height0.5pt depth0.0pt\kern 3pt}
%
\let\Afootnoterule=\mynewrule
\let\Bfootnoterule=\mynewrule
\let\Cfootnoterule=\mynewrule
\let\Dfootnoterule=\mynewrule
\let\Efootnoterule=\mynewrule
%
\footparagraph{A}
\footparagraph{B}
\footparagraph{C}
\footparagraph{D}
\footparagraph{E}
%
\let\Afootfmt=\lfootfmt
\let\Bfootfmt=\lfootfmt
\let\Cfootfmt=\lfootfmt
\let\Dfootfmt=\lfootfmt
\let\Efootfmt=\lfootfmt
%
%
\def\vstrut{\hbox{\vrule height4pt depth3pt width0pt}}
\def\strut{\hbox{\vrule height2pt depth2pt width0pt}}
%
\def\locspace{\hskip.8em plus .2em minus .2em}
\def\loc#1{\textrm{#1}\hskip.8em plus .2em minus .2em}                                % lemma           location
\def\incipitloc#1{\textrm{Incipit #1}\hskip.8em plus .2em minus .2em}             % lemma location
\def\explicitloc#1{\textrm{Explicit #1}\hskip.8em plus .2em minus .2em}          % lemma location
%
\def\codices#1{\edtext{}{\Afootnote{\strut #1}}}
\def\testim#1{\edtext{}{\Bfootnote{\strut\loc{\sthana}#1\strut}}}
\def\notestim#1{\edtext{}{\Bfootnote{#1}}}
\def\var#1{\edtext{}{\Cfootnote{\strut\loc{\sthana}#1\strut}}}
\def\novar#1{\edtext{}{\Cfootnote{#1}}}
\def\nocom#1{\edtext{}{\Dfootnote{\rm#1}}}
\def\com#1{\edtext{}{\Dfootnote{\strut\loc{\sthana}#1\strut}}}
\def\remark#1{\edtext{}{\Efootnote{\strut\loc{\sthana}#1\strut}}}
%
%

• Actually my code does not result in the issue, but it shows what I got so far. The text and picture above explains how I would like to have it. – NIls Jacob Sep 26 '17 at 14:53
• Actually, there is no easy way to have double numbering in stanza with reledmac. I am working on such feature, but I need time, which I have not get since many time. – Maïeul Sep 27 '17 at 9:01
• I know the guy who created my example .pdf which I posted did it with reledmac. But im not able to reach him. – NIls Jacob Sep 27 '17 at 9:10
• It's possible that the footnotes were added manually, in the example image you showed. (The author manually typed 10a etc., or maybe \num a or whatever.) – ShreevatsaR Sep 28 '17 at 15:47
• Maybe. I received an answer from the scholar whom the example .pdf belongs to, but I don't really get it. Can anyone explain to me what is happening in this code and how toi utilize it? – NIls Jacob Sep 30 '17 at 9:28

Thanks to Maïeul for this easy and efficient sollution.

\documentclass[a4paper,11pt]{article}

\usepackage{lscape}

\usepackage{polyglossia}
\setmainlanguage{german}
\setotherlanguage{sanskrit}

\usepackage{fontspec}
\setmainfont{TeX Gyre Termes}
\setmonofont{TeX Gyre Termes}
\newfontfamily\devanagarifont[Script=Devanagari]{Chandas}
\newfontfamily\devnag[Script=Devanagari]{Chandas}

\newfontface\dejlight{DejaVu Sans}

\DeclareTextFontCommand{\textding}{\dejlight}

\usepackage[hang,flushmargin]{footmisc}

\usepackage[noend,noeledsec]{reledmac}
\usepackage{libertineotf}
\arrangementX[A]{paragraph}
\Xarrangement[B]{paragraph}
\Xarrangement[A]{paragraph}

\setstanzaindents{3,1}
\setcounter{stanzaindentsrepetition}{1}
\linenumincrement{1}
\firstlinenum{1}

\begin{document}

\section{Edition}

\beginnumbering
\setline{1}
\stanza
\linenumannotation{a}\edtext{candraḥ}{\Bfootnote{em. : \textit{candra} Ms}{\lemma{\textbf{Ci}}\Afootnote[nosep]{Vgl. Pts S.84, Z. 5102-5104: candraḥ sūryas tathā vahniḥ śarīre daśa nāḍikāḥ | dehasthā vāyavaḥ pañca mano bindus tathaiva ca |}}} sūryas tathā \edtext{vahniḥ}{\Bfootnote{em. : \textit{vahni} Ms}} \linenumannotation{b}śarīre daśa nāḍikāḥ | &
\setline{2}
\linenumannotation{c}\edtext{pañca sthā}{\Bfootnote{\textit{dehasthā} Pts}} \edtext{vāyavaḥ}{\Bfootnote{em. : \textit{vāyava} Ms}} pañca \linenumannotation{d}mano bindus tathaiva \edtext{ca}{\Bfootnote{\textit{fa} Pts}} ||1|| \&

\clearpage

\end{document}

• As I have told you, I am currently working on such native feature for reledmac. Please wait a little time… – Maïeul Oct 1 '17 at 13:17
• This should probably be edited into the question, as it's part of the question (now) and not an answer to the question. – ShreevatsaR Oct 2 '17 at 5:41