Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reledmac + lettrine #912

Open
baem2 opened this issue Apr 26, 2021 · 4 comments
Open

reledmac + lettrine #912

baem2 opened this issue Apr 26, 2021 · 4 comments

Comments

@baem2
Copy link
Contributor

baem2 commented Apr 26, 2021

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.

@maieul
Copy link
Owner

maieul commented Apr 26, 2021 via email

@maieul
Copy link
Owner

maieul commented Apr 27, 2021 via email

@maieul
Copy link
Owner

maieul commented Apr 27, 2021

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}}{}{}{}{}

  1. Create a boolean macro to store if we are after a lettrine
  2. In the hanging symbol, test if you we are after a lettrine or not
  3. In the lettrine macro, set "at this line, we should change the value of the boolean"

@baem2
Copy link
Contributor Author

baem2 commented May 2, 2021

Dear maieul,

sorry for my late reply – thank you very much for your answers. I will check that workaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants