0

Here is MWE:

\documentclass{article}
\usepackage[T1]{fontenc}

\usepackage[series={A,B,C,D},noend,noeledsec,nofamiliar,noledgroup]{reledmac}
\firstlinenum{1}
\linenumincrement{1}
\Xarrangement[B]{twocol}
\Xarrangement[C]{threecol}
\Xarrangement[D]{paragraph}

\setstanzaindents{3,1,2,1,2,1}

\begin{document}
    \beginnumbering
    \autopar
%   \AtEndEveryPend{\vspace{30pt}}
    
    \edtext{Lorem}{
        \Afootnote{A critical note}
        \Bfootnote{Critical note in series B}
        \Cfootnote{Critical note in series C}
        \Dfootnote{loram}}
    \edtext{ipsum}{
        \Afootnote{An other critical note}
        \Bfootnote{Other critical note in series B}
        \Cfootnote{Other critical note in series C}
        \Dfootnote{ipsam}}
    dolor sit amet, consectetur adipiscing elit.
    \edtext{Fusce sed dolor libero. Aenean rutrum vestibulum lacus ut pretium. Fusce et auctor lectus. Ut et commodo quam, quis gravida orci. Nullam at risus elementum, suscipit enim a, pellentesque mi}
    {\lemma{Fusce\ldots mi}
        \Afootnote{A long critical note}
        \Bfootnote{Again B}
        \Cfootnote{Again C}
        \Dfootnote{omit}}.
    Morbi commodo, ligula vel consectetur accumsan, \\massa metus egestas velit, eu fringilla leo ante in turpis. Vivamus ut tellus sollicitudin, facilisis ipsum sit amet, \\tincidunt odio. Maecenas tincidunt dolor sed ante blandit tincidunt. Etiam vulputate ultricies facilisis.\\
    Morbi commodo, ligula vel consectetur accumsan, massa metus egestas velit, eu fringilla leo ante in turpis. Vivamus ut tellus sollicitudin, facilisis ipsum sit amet, tincidunt odio. Maecenas tincidunt dolor sed ante blandit tincidunt. Etiam vulputate ultricies facilisis.
    
    \pstart%[\centering]
        Morbi commodo,\\
        ligula vel consectetur\\
        accumsa
    \pend

    massa metus egestas velit, eu.
    facilisis ipsum sit amet, tincidunt odio. Maecenas tincidunt dolor sed ante blandit tincidunt. Etiam vulputate ultricies facilisis.\par
    \stanza[\centering]
    fringilla leo&
    ante in turpis.&
    \edtext{Vivamus}{%
        \lemma{}%
        \Afootnote{%
            \stanza[\centering]
            ligula vel consectetur accumsan,&
            massa metus egestas velit, eu fringilla leo ante in turpis.&
            Vivamus ut tellus sollicitudin,&
            facilisis ipsum sit amet, tincidunt odio.\&%
        }%
    }
    facilisis ipsum sit&
    ut tellus sollicitudin,\&
    
    facilisis ipsum sit amet, tincidunt odio. Maecenas tincidunt dolor sed ante blandit tincidunt. Etiam vulputate ultricies facilisis.
    
    \endnumbering
\end{document}

Here we have a stanza starting in line 46. The stanza is centered. It has 4 lines. The third line contains a critical footnote. The critical footnote contains a stanza of 4 lines.

Here if I define \setstanzaindents{3,1,2,1,2}, the compilation fails, telling me that indentation of 5th line was not defined. If I define 5th line as \setstanzaindents{3,1,2,1,2,1}, then compilation succeeds. But,after doing multiple runs with latexmk, I've observed that the sometimes the third line of the stanza is not printed and sometimes when it is printed the reference number in footnote is 0 and footnote stanza are numbered as 22, 23, 24, 25 and these line numbers are missing from main text portion.

Please, check attached screenshots of two separate multiple runs with latexmk.

1st Run with latexmk:

enter image description here

2nd Run with latexmk:

enter image description here

5
  • Well, the answer is short and quick. Stanza was never thought to work in footnote. So the only one solution is to a. Open a issue on github b. Wait (I don't know when I would have time for this... but not before many month)
    – Maïeul
    Jul 7, 2021 at 11:58
  • Is there any way to get center aligned section inside critical footnote? Using \pstart\centering makes footnote lines numbered, which is not desired. Using \begin{center}...\end{center} works from my past tests, but creates undesired paragraph separation, which is not needed in my case. So, If there is any way to remove that extra space before and after the begin{center}..\end{center}, that may work for me. Any suggestions? Jul 7, 2021 at 12:20
  • if it is insided critical footnote, just use \centering...
    – Maïeul
    Jul 7, 2021 at 12:22
  • Thanks, I've tried using \centering as {\centering ligula vel consectetur accumsan,\\ massa metus egestas velit, eu fringilla leo ante in turpis.\\ Vivamus ut tellus sollicitudin,\\ facilisis ipsum sit amet, tincidunt odio.%\par% }, but it makes the line reference in footnote centered. Jul 7, 2021 at 17:22
  • Using center env doesn't distort reference in footnote. But, as I said I need to remove parskip with custom command which I don't have any idea how to do. Any help? Jul 7, 2021 at 17:32

1 Answer 1

1

As @Maïeul wrote, reledmac does not allow the use of numbered text within footnotes; this includes \stanza.

Still, you can simulate a stanza with a series of lines with manual line breaks. If it needs to be centered, you can use \centering, which requires braces and some kind of line break at the end. \par is forbidden in critical footnotes, so you want something like

{\centering
...
\\}

As you mentioned in a comment, there are two challenges: unwanted vertical space at the end (because we used \\) and the wrong position of the footnote mark, which is also centered instead of left-aligned. Here's how I would go about it; it's a bit ugly, but it works.

First step:

\edtext{}{%
\lemma{}%
\Afootnote{%
\flushleft
{\centering
ligula vel consectetur accumsan,\\
massa metus egestas velit.\\}%
}}

\flushleft makes the whole footnote left-aligned and fixes the position of the line number. And within the left-aligned footnote, we insert a block of centered text via {\centering ... \\}. Like this:

simulated stanza with too much whitespace

Notice the correct alignment of the line reference.

But we've still got one line of unwanted whitespace at the end, plus an additional "empty" line right after the line reference. Here's a solution to remove these lines:

\edtext{}{%
\lemma{}%
\Afootnote{%
\flushleft\vspace{-\baselineskip}
{\centering
ligula vel consectetur accumsan,\\
massa metus egestas velit.\\[-\baselineskip]}%
}}    

(\\[<length>] exploits the optional argument of \\. \baselineskip is a scalable length that gives the current height of a line. We're telling the program: "print the next line exactly on top of this one".) Here's the result:

simulated stanza with the correct whitespace

This solves both issues.

Finally, you need to set the individual line indents manually, using appropriate \hspace{}s according to your preferred scheme. The integers in \setstanzaindents are multiples of 20pt, but you should choose a smaller value because of the text size in the footnotes (\footnotesize). How much smaller depends on your document class.

6
  • Thanks for providing solution with explanation. I'll ask small questions based on my actual scenario now. Jul 7, 2021 at 21:52
  • 1
    Observations: 1. \\[-\baselineskip] is needed in those cases where this stanza is last element in the footnote. If there are more lines after that, I don't need to remove baselineskip, since it causes line overlap. 2. If I want to not use stanza in main text and instead use your solution with a macro, I don't need to flushleft. Although \vspace{-baselineskip} is needed. And at the end \\` is needed without [-baselineskip]`, since next line may overlap otherwise. Jul 7, 2021 at 22:00
  • I was testing usage of your solution in more scenarios. Here I observed that if I want to use {\centering{\bfseries Some Text}\par} Some Non Bold non-centered Text, then it works fine in main text area, but in critical footnote the non-bold line becomes bold. Any suggestions there? Here is the actual command used in critical footnote \newcommand{\shlokaHC}[1]{\flushleft\vspace{-\baselineskip}{\centering\bfseries #1\par}}% and here is it's variation used in main text area \newcommand{\shlokaH}[1]{{\centering{\bfseries #1\\}}}%. Jul 8, 2021 at 1:15
  • I just tested a little more. I can confirm that if have a bold centered stanza and then we have critical footnote for any word of that stanza, then it works correctly. But, if we try to change critical footnote to critical endnote then although the alignment stays correct(left aligned), the whole critical endnote inherits bold from the stanza which is undesired. This must be a bug inside reledmac, since same works well with critical footnote. Jul 8, 2021 at 10:14
  • Thanks for your follow-up observations 1 and 2 you're right. As for the issues with bold style spreading to text outside the group, I could not reproduce your issue. All the examples you provide work correctly for me including your two custom commands, which seem to work as intended (no spread of bold style, no extra whitespace). Maybe some other factor is interfering...
    – marquinho
    Jul 8, 2021 at 15:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .