reledmac + lettrine
Version
v2.36.0, last revised 2021/01/21.
TeX Engine
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/Debian)
Regression
It has been working with reledmac 2.32.8
Description
If I use \lettrine within a \stanza, there's a spurious ] appearing in the text (and in more complex environments, pdflatex does not run through for me).
Minimal Working Example
The MWE is based on examples/1-verses.tex
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[osf,p]{libertinus}
\usepackage{microtype}
\usepackage[pdfusetitle,hidelinks]{hyperref}
\usepackage[english, main=latin]{babel}
\babeltags{english = english}
\usepackage{lettrine}
\usepackage[series={A,B},nofamiliar,noend,noeledsec,noledgroup]{reledmac}
\sethangingsymbol{[\,}
\setcounter{stanzaindentsrepetition}{2}
\setstanzaindents{8,0,1}
\begin{document}
\beginnumbering
\stanza
\edlabel{begin:1}\edtext{Lorem}{\lemma{Lorem\ldots nisis}\xxref{begin:1}{end:1}\Afootnote{A note on two verses}} ipsum dolor sit amet, consectetur adipisicing elit,&
sed do eiusmod tempor incididunt ut labore et dolore&
\lettrine{m}{agna} aliqua. Ut enim ad minim veniam, quis nostrud&
exercitation ullamco laboris nisi\edlabel{end:1}&
\edtext{ut aliquip}{\Afootnote{ut aliliquip}} consequat ut aliquip consequat irure dolor in reprehenderit irure dolor in reprehenderit&
\edtext{Duis aute}{\Bfootnote{Some comments}} irure dolor in reprehenderit&
in voluptate velit esse cillum dolore eu ur. Excepteur sint occaecat&
cupidatat non proident, sunt in culpa qui officia deserunt&
\edlabel{begin:2}\edtext{Duis}{\xxref{begin:2}{end:2}\lemma{Duis\ldots occaecat}\Afootnote{Another note on two verses}} aute irure dolor in reprehenderit&
in voluptate velit esse cillum dolore eu fugiat nulla&
pariatur. Excepteur sint occaecat\edlabel{end:2}\&
\endnumbering
\end{document}
Workaround
Nope, sorry.
I tried with reledmac 2.32.8, it's does not work.
But lettrine was upgraded on 2020/03/24.
Are you sur the bug is not related to any change in lettrine ?
well, this brackets is for line break...
I look for a solution, but won't beasy, I am afraid
Well, I don't think it is to reledmac to support all packages, especially when these package change lineskip and related.
So, what you can do is to add this in your premable
\newif\ifafterlettrine
\sethangingsymbol{\unexpanded{\ifafterlettrine\global\afterlettrinefalse\else[\,\fi}}
\pretocmd{\lettrine}{\doinsidethislinehook{\global\afterlettrinetrue}}{}{}{}{}
- Create a boolean macro to store if we are after a lettrine
- In the hanging symbol, test if you we are after a lettrine or not
- In the lettrine macro, set "at this line, we should change the value of the boolean"
Dear maieul,
sorry for my late reply – thank you very much for your answers. I will check that workaround!