maieul / ledmac

package reledmac for latex
http://www.ctan.org/tex-archive/macros/latex/contrib/reledmac
54 stars 28 forks source link

Problems with one series of critical notes per \pstart on reledpar #973

Open aresum96 opened 4 months ago

aresum96 commented 4 months ago

Version

2023/08/21 v2.39.7

TeX Engine

pdfLaTeX

Regression

Description

Good morning! I am working on my dissertation on LyX and I am using reledpar to have the translation of the text on the right pages and the text itself on the left pages. The text is composed of approximately 90 different poems and because of that, I needed an apparatus criticus for each poem. I managed to do so and the series of critical notes renews itself every five series (A, B, C, D, E), so it starts back at series A following this process here. The only problem I have (or at least the only problem I am noticing so far) is that the series sometimes flow regularly, sometimes they don't (it typically happens with the apparatus of a poem between two pages or when the series restart from A). There are no other error messages.

Minimal Working Example

\RequirePackage{fixltx2e}
\documentclass[12pt,italian]{book}
\usepackage{setspace}
\onehalfspacing

\makeatletter

\usepackage[series={A,B,C,D,E},parapparatus,noend,noeledsec]{reledmac}
\lineation{pstart}
\linenummargin{outer}
\Xarrangement{paragraph}

\Xparafootsep{$\parallel$}
\Xafterrule{0pt}

\usepackage{reledpar}
\AtEveryPend{\vskip1\baselineskip}

\makeatletter
  \newcounter{mynotelevel}
    \renewcommand{\themynotelevel}{\Alph{mynotelevel}}
  \AtEveryPstartCall{
          \addtocounter{mynotelevel}{1}
          \ifnumequal{\arabic{mynotelevel}}{6}{
            \setcounter{mynotelevel}{1}
          }{}
            \global\letcs{\nota}{\themynotelevel footnote}
  }
  \AtEveryPstart{
        \addtocounter{mynotelevel}{1}
        \ifnumequal{\arabic{mynotelevel}}{6}{
          \setcounter{mynotelevel}{1}}{}
          \seriesatend{\themynotelevel}
   }
\makeatother

\makeatother

\usepackage{babel}
\begin{document}
\begin{pages}\begin{Leftside}\beginnumbering\pstart\textbf{\edtext{1}{\lemma{}\nota[nonum]{\textbf{1}}} – First poem (A notes)}\skipnumbering

Line \edtext{one}{\nota{note oneA}} 

Line \edtext{two}{\nota{note twoA}}

Line \edtext{three}{\nota{note threeA}} 

Line \edtext{four}{\nota{note fourA}} 

Line \edtext{five}{\nota{note fiveA}} 

\pend 

\pstart\textbf{\edtext{2}{\lemma{}\nota[nonum]{\textbf{2}}} – Second poem (B notes)}\skipnumbering 

Line \edtext{one}{\nota{note oneB}} 

Line \edtext{two}{\nota{note twoB}} 

Line \edtext{three}{\nota{note threeB}} 

Line \edtext{four}{\nota{note fourB}} 

Line \edtext{five}{\nota{note fiveB}}

\pend 

\pstart\textbf{\edtext{3}{\lemma{}\nota[nonum]{\textbf{3}}} – Third poem (C notes)}\skipnumbering 

Line \edtext{one}{\nota{note oneC}} 

Line \edtext{two}{\nota{note twoC}} 

Line \edtext{three}{\nota{note threeC}} 

Line \edtext{four}{\nota{note fourC}} 

Line \edtext{five}{\nota{note fiveC}} 

\pend 

\pstart\textbf{\edtext{4}{\lemma{}\nota[nonum]{\textbf{4}}} – Fourth poem (D notes)}\skipnumbering 

Line \edtext{one}{\nota{note oneD}} 

Line \edtext{two}{\nota{note twoD}} 

Line \edtext{three}{\nota{note threeD}} 

Line \edtext{four}{\nota{note fourD}} 

Line \edtext{five}{\nota{note fiveD}} 

\pend 

\pstart\textbf{\edtext{5}{\lemma{}\nota[nonum]{\textbf{5}}} – Fifth poem (E notes)}\skipnumbering 

Line \edtext{one}{\nota{note oneE}} 

Line \edtext{two}{\nota{note twoE}} 

Line \edtext{three}{\nota{note threeE}} 

Line \edtext{four}{\nota{note fourE}} 

Line \edtext{five}{\nota{note fiveE}} 

\pend 

\pstart\textbf{\edtext{6}{\lemma{}\nota[nonum]{\textbf{6}}} – Sixth poem (A\textsuperscript{2} notes)}\skipnumbering 

Line \edtext{one}{\nota{note oneA\textsuperscript{2}}} 

Line \edtext{two}{\nota{note twoA\textsuperscript{2}}} 

Line \edtext{three}{\nota{note threeA\textsuperscript{2}}} 

Line \edtext{four}{\nota{note fourA\textsuperscript{2}}} 

Line \edtext{five}{\nota{note fiveA\textsuperscript{2}}} 

\pend 

\pstart\textbf{\edtext{7}{\lemma{}\nota[nonum]{\textbf{7}}} – Seventh poem (B\textsuperscript{2} notes)}\skipnumbering 

Line \edtext{one}{\nota{note oneB\textsuperscript{2}}} 

Line \edtext{two}{\nota{note twoB\textsuperscript{2}}} 

Line \edtext{three}{\nota{note threeB\textsuperscript{2}}} 

Line \edtext{four}{\nota{note fourB\textsuperscript{2}}} 

Line \edtext{five}{\nota{note fiveB\textsuperscript{2}}} 

\pend 

\pstart\textbf{\edtext{8}{\lemma{}\nota[nonum]{\textbf{8}}} – Eighth poem (C\textsuperscript{2} notes)}\skipnumbering 

Line \edtext{one}{\nota{note oneC\textsuperscript{2}}} 

Line \edtext{two}{\nota{note twoC\textsuperscript{2}}} 

Line \edtext{three}{\nota{note threeC\textsuperscript{2}}} 

Line \edtext{four}{\nota{note fourC\textsuperscript{2}}} 

Line \edtext{five}{\nota{note fiveC\textsuperscript{2}}}

\pend 

\pstart\textbf{\edtext{9}{\lemma{}\nota[nonum]{\textbf{9}}} – Ninth poem (D\textsuperscript{2} notes)}\skipnumbering 

Line \edtext{one}{\nota{note oneD\textsuperscript{2}}} 

Line \edtext{two}{\nota{note twoD\textsuperscript{2}}} 

Line \edtext{three}{\nota{note threeD\textsuperscript{2}}} 

Line \edtext{four}{\nota{note fourD\textsuperscript{2}}} 

Line \edtext{five}{\nota{note fiveD\textsuperscript{2}}}

\pend 

\pstart\textbf{\edtext{10}{\lemma{}\nota[nonum]{\textbf{10}}} – Tenth poem (E\textsuperscript{2} notes)}\skipnumbering 

Line \edtext{one}{\nota{note oneE\textsuperscript{2}}} 

Line \edtext{two}{\nota{note twoE\textsuperscript{2}}} 

Line \edtext{three}{\nota{note threeE\textsuperscript{2}}} 

Line \edtext{four}{\nota{note fourE\textsuperscript{2}}} 

Line \edtext{five}{\nota{note fiveE\textsuperscript{2}}}

\pend 

\pstart\textbf{\edtext{11}{\lemma{}\nota[nonum]{\textbf{11}}} – Eleventh poem (A\textsuperscript{3} notes)}\skipnumbering 

Line \edtext{one}{\nota{note oneA\textsuperscript{3}}} 

Line \edtext{two}{\nota{note twoA\textsuperscript{3}}} 

Line \edtext{three}{\nota{note threeA\textsuperscript{3}}} 

Line \edtext{four}{\nota{note fourA\textsuperscript{3}}} 

Line \edtext{five}{\nota{note fiveA\textsuperscript{3}}} 

\pend 

\endnumbering\end{Leftside}

\begin{Rightside}\beginnumbering\numberlinefalse

\pstart \textbf{1 – First translation} 

First translation \pend 

\pstart \textbf{2 – Second translation} 

Second translation \pend 

\pstart \textbf{3 – Third translation} 

Third translation \pend 

\pstart \textbf{4 – Fourth translation} 

Fourth translation \pend 

\pstart \textbf{5 – Fifth translation} 

Fifth translation \pend 

\pstart \textbf{6 – Sixth poem} 

Sixth translation \pend 

\pstart \textbf{7 – Seventh poem} 

Seventh translation \pend 

\pstart \textbf{8 – Eighth poem} 

Eighth translation \pend 

\pstart \textbf{9 – Ninth poem} 

Ninth translation \pend 

\pstart \textbf{10 – Tenth poem} 

Tenth translation \pend 

\pstart \textbf{11 – Eleventh poem} 

Eleventh translation \pend 

\endnumbering \end{Rightside} \end{pages} \Pages 
\end{document}

Workaround

I don't know how to avoid the problem, but I guess in case there isn't a solution I could just have all the critical notes for all the poems in a single apparatus and highlight (for example with bold and italics text) the beginning of the notes for each poem.

maieul commented 4 months ago

I don't reproduce. But I need to make 7 run, using latexmk. Do you use latemk? When using reledmac/reledpar, it is very strongly encouraged. toto.pdf

aresum96 commented 4 months ago

No, I don't. I'm new to all this and I'm basically learning as I go (I resorted to LyX/LaTeX because I couldn't figure out a way to create an apparatus criticus the way I needed it in any other way). I'll try and understand what latexmk is, though. Anyway, the file you attached still shows the same problem (pages 1-5 are ok, but then on page 6 the second B series, so the apparatus for poem 7, is at the bottom of the apparatus instead of at the top, and the order is 8, 9, 7).

marquinho78 commented 4 months ago

I have been active on this same question on TeX.SX https://tex.stackexchange.com/questions/720559/one-series-per-pstart-in-reledmac-reledpar and if I may add some useful data points...

I have compiled your (@maieul) example included with the manual (https://mirrors.ctan.org/macros/latex/contrib/reledmac/examples/4-reledpar_one_series_per_pstart.tex). The example itself is buggy, not just @aresum96's document – as you can see on p. 2 here: 4-reledpar_one_series_per_pstart.pdf

I have simply removed all the calls of \lipsum so as to have all 12 paragraphs on the same page. The intended order of the footnotes should be A B C D E, A2 B2 C2 D2 E2, A3 B3. However, the apparatus actually prints this order C C2, D D2, E E2, A A2 A3, B B2 B3.

It bunches all the notes from homonymous series together.

Interestingly, the order is determined by which series was called last; here it is series A and B because the paragraphs # 11 and # 12 use those series.

It appears that when your (@maieul) code says \seriesatend{\themynotelevel}, this is applied globally. The intended way would be to apply serially to every single paragraph and its batch of footnotes. This way, the order of footnotes is the same as the order of paragraphs. But because \seriesatend has a global scope here, it affects all the B notes, not just B3, and these are sent to the end.