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.

\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 in line 38 \pstart[\centering] is closed by \pend in line 42. But, it affects next paragraph and makes it centered. The next paragraph was created by \autopar.

What may be creating problem?

marquinho
  • 1,721

1 Answers1

1

Write \pstart\centering instead of \pstart[\centering]. (\stanza requires a different approach, see below).

The problem arises from using the declaration \centering in the optional argument of \pstart[].

A declaration needs to be enclosed in a group to delimit its scope. Otherwise, it will trail to the rest of the document, as in your example (note that it's not just the next paragraph).

Usually you form a group with braces: {\itshape Text}. Also, environments form their own group. This is the case with \pstart...\pend (compare \pstart \itshape Italic text \pend Normal text). Accordingly, this would solve your example:

    \pstart\centering
        Morbi commodo,\\
        ligula vel consectetur\\
        accumsa
    \pend

This way, only the paragraph is affected by \centering.

So why the problem with \pstart[\centering]? According to the reledmac documentation, §5.2.3, the optional argument in brackets adds content "before the beginning of \pstart". Thus, your code

    \pstart[\centering]
        Morbi commodo,\\
        ligula vel consectetur\\
        accumsa
    \pend

resolves to (basically)

\centering
    \pstart
        Morbi commodo,\\
        ligula vel consectetur\\
        accumsa
    \pend

The declaration is not within the paragraph group. This is why it spills over to the rest of the text. For this reason, you should use \pstart\centering.

Also good to know, regarding \centering (I quote from this answer):

First of all, \centering needs a \par (or an empty line) before the closing brace

{\centering
 contents\par
}

The usage with \pstart and \pend already fulfills this condition.

A note on \stanza: the workaround here is a bit different from \pstart, in that you must insert the brackets and the \par-break yourself, like this:

{\centering\stanza
Morbi commodo,&
ligula vel consectetur&
accumsa\&
\par}

Finally, in future, please provide a minimal example (the M in MWE) that contains only what is strictly needed to reproduce your error. This helps the community help you. Oftentimes, in the process of simplifying the example, you will discover the source of the error yourself!

marquinho
  • 1,721