texlive[74931] Master/texmf-dist: reledmac (13apr25)

commits+karl at tug.org commits+karl at tug.org
Sun Apr 13 22:28:00 CEST 2025


Revision: 74931
          https://tug.org/svn/texlive?view=revision&revision=74931
Author:   karl
Date:     2025-04-13 22:27:59 +0200 (Sun, 13 Apr 2025)
Log Message:
-----------
reledmac (13apr25)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/reledmac/doc-more/page-typesetting-columns.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalendnotes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalnotes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-sidenotes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-tabular.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses-doublenumbering.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-antilabe.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-footnote_spacing.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-glossaries.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-lemma_disambigution.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-line_numbers_in_header.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-linespacing.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-manuscript-apparatus.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-notes-width.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-one_series_per_pstart.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-performances.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-reledmac-right-to-left.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-subdivision-number-in-header.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_not_in_line_numbering.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_columns_different_languages.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_mwe.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_default.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nosync.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_shifted.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column-continuous-numbering.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_alignment.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_inside-outside-columns.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_one_series_per_pstart.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_long_notes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_titles_in_line_numbering_with_notes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_verse_text_between.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/migration.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/reledmac.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/reledpar.pdf
    trunk/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
    trunk/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
    trunk/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
    trunk/Master/texmf-dist/tex/latex/reledmac/reledpar.sty

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/doc-more/page-typesetting-columns.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalendnotes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalnotes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-sidenotes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-tabular.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses-doublenumbering.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-antilabe.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-footnote_spacing.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-glossaries.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-lemma_disambigution.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-line_numbers_in_header.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-linespacing.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-manuscript-apparatus.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-notes-width.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-one_series_per_pstart.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-performances.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-reledmac-right-to-left.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-subdivision-number-in-header.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_not_in_line_numbering.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_columns_different_languages.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_mwe.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_default.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nosync.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_shifted.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column-continuous-numbering.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_alignment.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_inside-outside-columns.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_one_series_per_pstart.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_long_notes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_titles_in_line_numbering_with_notes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_verse_text_between.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/migration.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/reledmac.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/reledpar.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/reledmac/reledmac.dtx	2025-04-13 20:27:35 UTC (rev 74930)
+++ trunk/Master/texmf-dist/source/latex/reledmac/reledmac.dtx	2025-04-13 20:27:59 UTC (rev 74931)
@@ -607,6 +607,7 @@
 % \changes{v2.40.1}{2024/05/11}{Dealing with direction in \protect\cs{footnoteXtxt} when using LuaLaTeX}
 % \changes{v2.40.2}{2025/02/07}{Bug with right pstart number with continuousnumberingwithcolumns}
 % \changes{v2.40.3}{2025/03/25}{Fix arithmetic overflow when using paragraphed footnote with high baselineskip value}
+% \changes{v2.40.4}{2025/04/13}{Fix bug with \protect\cs{lockon} immediately following a (explicit or implicit) \protect\cs{lockoff}.}
 %      Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename)
 % has version number \fileversion, last revised \filedate.}}
 %
@@ -4533,7 +4534,7 @@
 %    \begin{macrocode}
 %<*code>
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2025/03/25 v2.40.3 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2025/04/13 v2.40.4 typesetting critical editions]%
 %    \end{macrocode}
 %
 % \subsection{Loading packages}
@@ -7739,6 +7740,7 @@
 % \end{macro}
 % \begin{macro}{\flag at start@RTL}
 % \begin{macro}{\flag at end@RTL}
+%\label{flag:start:RTL}
 % With \XeLaTeX, there is a problem when using RTL: the writing of a command in the numbered auxiliary files (\verb+.1+, \verb+.2+ etc) is reversed when the first argument of \cs{edtext} is typset in one line, but it is \textbf{not} reversed when this first argument is typset in two lines or more.\footnote{This problem is caused by the way \XeTeX\ manages right-to-left typsetting. David Carlisle explains it on \url{http://tex.stackexchange.com/a/333373/7712} and provides a potential solution, using \cs{vadjust}. However in some cases this adds spurious vertical spaces in reledmac. That is why we are using the solution explained below.}
 %
 % To solve this problem, we use a crossref mechanism. At the first run, we put a label, but we do not write any \cs{@ref} command. When the value of the label can be tested, that is after three runs, we're doing:
@@ -9894,7 +9896,11 @@
   \or%                     % 1002 = ending sublineation
     \global\sublines at false
   \or%                     % 1003 = starting locking number
-      \global\@lock=\@ne
+    \ifnum\@lock=\thr@@%  If there was a \endlock (implicit or explicit) just before
+      \global\@lock=\tw@%
+    \else%
+      \global\@lock=\@ne%
+    \fi%
   \or%                     % 1004 = ending locking number
     \ifnum\@lock=\tw@
       \global\@lock=\thr@@
@@ -19482,7 +19488,7 @@
 }%
 
 \def\stanza at hang{%
-  \leavevmode\startlock%
+  \leavevmode\stanzastartlock%
   \hangindent\if at RTL-\fi\expandafter%
   \csname sza at 0@\endcsname\stanzaindentbase%
   \hangafter\@ne%
@@ -19570,7 +19576,7 @@
 
 \newcommandx{\@stopstanza}[2][1,2,usedefault]{%
   \unskip%
-  \endlock%
+  \stanzaendlock%
   \ifboolexpr{%
     not test{\ifdefvoid{\at at every@stop at stanza}}%
     and test{\ifstrempty{#1}}%
@@ -19623,7 +19629,7 @@
 
 \newcommandx*{\newverse}[4][1,2,3,4,usedefault]{%
   \unskip%
-  \endlock\pend[#1][#3]\sza at penalty\global%
+  \stanzaendlock\pend[#1][#3]\sza at penalty\global%
   \advance\stanza at count\@ne\stanza at line[#2][#4]%
   }
 
@@ -19647,6 +19653,63 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% In order to avoid increasing line number when a line of verse is typeset on two typographical line, we use \protect\cs{startlock} and \protect\cs{endlock} inserted automatically at the begin / end (respectivly) of a verse. But when using \XeTeX\ to typeset RTL text, the result are not good in the auxiliary numbered file\footnote{It is a \enquote{bug} of \XeTeX\ model of RTL, see\url{https://tex.stackexchange.com/questions/333365/bidi-rtl-and-write}.}, we must inverse in some case.
+% That is why we use auxiliary macros, in order to fix this issue.
+% The mechanism used is similar to \protect\cs{flag at start@RTL} and \protect\cs{flag at end@RTL}, described on §~\ref{flag:start:RTL} (p.~\pageref{flag:start:RTL}).
+% \begin{macro}{\stanzastartlock}
+% \begin{macro}{\stanzaendlock}
+% \begin{macro}{\stanza at startlock@RTL}
+% \begin{macro}{\stanza at endlock@RTL}
+%    \begin{macrocode}
+\newcommand{\stanzastartlock}{%
+  \ifboolexpr{%
+    bool{xetex}%
+    and bool {@RTL}%
+  }{%
+    \stanza at startlock@RTL% RTL with xetex : first endlock for auxiliary file
+  }%
+  {%
+    \startlock%
+  }%
+}%
+\newcommand{\stanzaendlock}{%
+  \ifboolexpr{%
+    bool{xetex}%
+    and bool {@RTL}%
+  }{%
+    \stanza at endlock@RTL% RTL with xetex : finally starlock for auxiliary file
+  }%
+  {%
+    \endlock%
+  }%
+}%
+\newcount\stanza at lock@RTL at count%
+\newcommand{\stanza at startlock@RTL}{%
+  \global\advance\stanza at lock@RTL at count\@ne%
+  \edlabel{stanza at startlock@\the\stanza at lock@RTL at count}%
+  \ifnumequal{\xabslineref{stanza at startlock@\the\stanza at lock@RTL at count}}{0}%
+    {}%
+    {%
+      \ifnumequal{\xabslineref{stanza at startlock@\the\stanza at lock@RTL at count}}{\xabslineref{stanza at endlock@\the\stanza at lock@RTL at count}}%
+        {\endlock}% If in same typographical line, we start by \endlock, in order to write \end at lock in last position in the numbered auxiliary file
+        {\startlock}%
+    }%
+}%
+\newcommand{\stanza at endlock@RTL}{%
+  \edlabel{stanza at endlock@\the\stanza at lock@RTL at count}%
+  \ifnumequal{\xabslineref{stanza at startlock@\the\stanza at lock@RTL at count}}{0}%
+    {}%
+    {%
+      \ifnumequal{\xabslineref{stanza at startlock@\the\stanza at lock@RTL at count}}{\xabslineref{stanza at endlock@\the\stanza at lock@RTL at count}}%
+        {\startlock}% If in same typographical line, we finish by \startlock, in order to write \start at lock in first position in the numbered auxiliary file
+        {\endlock}%
+    }%
+}%
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
 % \subsection{Restore catcode and penalties}
 % The ampersand \& is used to mark the end of each stanza line, except the
 % last, which is marked with \verb+\&+. This means that \verb+\halign+ may

Modified: trunk/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/reledmac/reledpar.dtx	2025-04-13 20:27:35 UTC (rev 74930)
+++ trunk/Master/texmf-dist/source/latex/reledmac/reledpar.dtx	2025-04-13 20:27:59 UTC (rev 74931)
@@ -355,6 +355,7 @@
 % \changes{v2.25.5}{2023/07/20}{Fix bug with hyperlink when using \protect\cs{footnoteXnomk}}
 % \changes{v2.25.6}{2024/02/26}{Make \protect\cs{doinsidethislinehook} working on right side}
 % \changes{v2.25.8}{2025/02/09}{Fix compatibility with \protect\package{polyglossia} 2.4}
+% \changes{v2.25.9}{2025/04/13}{Fix bug with \protect\cs{lockon} immediately following a (explicit or implicit) \protect\cs{lockoff}.}
 % ^^A PW added following as the definitions are at some unknown elsewhere
 %
 % \newcommand{\egstart}{%
@@ -1411,7 +1412,7 @@
 %    \begin{macrocode}
 %<*code>
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2025/02/09 v2.25.8 reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2025/04/13 v2.25.9 reledmac extension for parallel texts]%
 
 %    \end{macrocode}
 % \subsection{Package's requirement}
@@ -4468,7 +4469,11 @@
   \or%                     % 1002 = ending sublineation
     \global\sublines at Rfalse
   \or%                     % 1003 = starting locking number
-    \global\@lockR=\@ne
+    \ifnum\@lockR=\thr@@%  If there was a \endlock (implicit or explicit) just before
+      \global\@lockR=\tw@%
+    \else%
+      \global\@lockR=\@ne%
+    \fi%
   \or%                     % 1004 = ending locking number
     \ifnum\@lockR=\tw@
       \global\@lockR=\thr@@

Modified: trunk/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/reledmac/reledmac.sty	2025-04-13 20:27:35 UTC (rev 74930)
+++ trunk/Master/texmf-dist/tex/latex/reledmac/reledmac.sty	2025-04-13 20:27:59 UTC (rev 74931)
@@ -37,7 +37,7 @@
 %%
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2025/03/25 v2.40.3 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2025/04/13 v2.40.4 typesetting critical editions]%
 \RequirePackage{xargs}%
 \RequirePackage{xparse}[2017/03/07]%
 \RequirePackage{etoolbox}%
@@ -2429,7 +2429,11 @@
   \or%                     % 1002 = ending sublineation
     \global\sublines at false
   \or%                     % 1003 = starting locking number
-      \global\@lock=\@ne
+    \ifnum\@lock=\thr@@%  If there was a \endlock (implicit or explicit) just before
+      \global\@lock=\tw@%
+    \else%
+      \global\@lock=\@ne%
+    \fi%
   \or%                     % 1004 = ending locking number
     \ifnum\@lock=\tw@
       \global\@lock=\thr@@
@@ -8210,7 +8214,7 @@
 }%
 
 \def\stanza at hang{%
-  \leavevmode\startlock%
+  \leavevmode\stanzastartlock%
   \hangindent\if at RTL-\fi\expandafter%
   \csname sza at 0@\endcsname\stanzaindentbase%
   \hangafter\@ne%
@@ -8262,7 +8266,7 @@
 
 \newcommandx{\@stopstanza}[2][1,2,usedefault]{%
   \unskip%
-  \endlock%
+  \stanzaendlock%
   \ifboolexpr{%
     not test{\ifdefvoid{\at at every@stop at stanza}}%
     and test{\ifstrempty{#1}}%
@@ -8313,7 +8317,7 @@
 
 \newcommandx*{\newverse}[4][1,2,3,4,usedefault]{%
   \unskip%
-  \endlock\pend[#1][#3]\sza at penalty\global%
+  \stanzaendlock\pend[#1][#3]\sza at penalty\global%
   \advance\stanza at count\@ne\stanza at line[#2][#4]%
   }
 
@@ -8320,6 +8324,50 @@
 \newcommand*{\flagstanza}[2][\stanzaindentbase]{%
   \hskip -#1\llap{#2}\hskip #1\ignorespaces}
 
+\newcommand{\stanzastartlock}{%
+  \ifboolexpr{%
+    bool{xetex}%
+    and bool {@RTL}%
+  }{%
+    \stanza at startlock@RTL% RTL with xetex : first endlock for auxiliary file
+  }%
+  {%
+    \startlock%
+  }%
+}%
+\newcommand{\stanzaendlock}{%
+  \ifboolexpr{%
+    bool{xetex}%
+    and bool {@RTL}%
+  }{%
+    \stanza at endlock@RTL% RTL with xetex : finally starlock for auxiliary file
+  }%
+  {%
+    \endlock%
+  }%
+}%
+\newcount\stanza at lock@RTL at count%
+\newcommand{\stanza at startlock@RTL}{%
+  \global\advance\stanza at lock@RTL at count\@ne%
+  \edlabel{stanza at startlock@\the\stanza at lock@RTL at count}%
+  \ifnumequal{\xabslineref{stanza at startlock@\the\stanza at lock@RTL at count}}{0}%
+    {}%
+    {%
+      \ifnumequal{\xabslineref{stanza at startlock@\the\stanza at lock@RTL at count}}{\xabslineref{stanza at endlock@\the\stanza at lock@RTL at count}}%
+        {\endlock}% If in same typographical line, we start by \endlock, in order to write \end at lock in last position in the numbered auxiliary file
+        {\startlock}%
+    }%
+}%
+\newcommand{\stanza at endlock@RTL}{%
+  \edlabel{stanza at endlock@\the\stanza at lock@RTL at count}%
+  \ifnumequal{\xabslineref{stanza at startlock@\the\stanza at lock@RTL at count}}{0}%
+    {}%
+    {%
+      \ifnumequal{\xabslineref{stanza at startlock@\the\stanza at lock@RTL at count}}{\xabslineref{stanza at endlock@\the\stanza at lock@RTL at count}}%
+        {\startlock}% If in same typographical line, we finish by \startlock, in order to write \start at lock in first position in the numbered auxiliary file
+        {\endlock}%
+    }%
+}%
   \catcode`\&=\next
   \catcode`\@=\body
   \setstanzavalues{szp}{0}

Modified: trunk/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/reledmac/reledpar.sty	2025-04-13 20:27:35 UTC (rev 74930)
+++ trunk/Master/texmf-dist/tex/latex/reledmac/reledpar.sty	2025-04-13 20:27:59 UTC (rev 74931)
@@ -28,7 +28,7 @@
 
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2025/02/09 v2.25.8 reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2025/04/13 v2.25.9 reledmac extension for parallel texts]%
 
 \RequirePackage{xspace}%
 \RequirePackage{xkeyval}
@@ -1597,7 +1597,11 @@
   \or%                     % 1002 = ending sublineation
     \global\sublines at Rfalse
   \or%                     % 1003 = starting locking number
-    \global\@lockR=\@ne
+    \ifnum\@lockR=\thr@@%  If there was a \endlock (implicit or explicit) just before
+      \global\@lockR=\tw@%
+    \else%
+      \global\@lockR=\@ne%
+    \fi%
   \or%                     % 1004 = ending locking number
     \ifnum\@lockR=\tw@
       \global\@lockR=\thr@@



More information about the tex-live-commits mailing list.