texlive[58027] Master/texmf-dist: reledmac (1mar21)

commits+karl at tug.org commits+karl at tug.org
Mon Mar 1 23:39:53 CET 2021


Revision: 58027
          http://tug.org/svn/texlive?view=revision&revision=58027
Author:   karl
Date:     2021-03-01 23:39:52 +0100 (Mon, 01 Mar 2021)
Log Message:
-----------
reledmac (1mar21)

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/tex/latex/reledmac/reledmac.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	2021-03-01 22:39:19 UTC (rev 58026)
+++ trunk/Master/texmf-dist/source/latex/reledmac/reledmac.dtx	2021-03-01 22:39:52 UTC (rev 58027)
@@ -573,7 +573,10 @@
 % \changes{v2.35.1}{2020/12/20}{Fix a bug when printing ending page number in endnotes and using the \protect\package{hyperref} package.}
 % \changes{v2.36.0}{2021/01/21}{Fix bug with sublineation on right side of parallel typesetting.}
 % \changes{v2.36.0}{2021/01/21}{Add \protect\cs{Xnonote} and \protect\cs{nonoteX}.}
-% \changes{v2.36.0}{2021/02/14}{Fix bug with crossreferecing in parallel typesetting (added in v2.34.4)}
+% \changes{v2.36.1}{2021/02/14}{Fix bug with crossreferencing in parallel typesetting (added in v2.34.4)}
+% \changes{v2.37.0}{2021/02/28}{Fix incompatibility between \protect\cs{eledsection} (and related) and \protect\package{hyperref}. Incompatibility was introduced by some changes in \protect\package{hyperref} package.}
+% \changes{v2.37.0}{2021/02/28}{Fix bug with \protect\cs{Xnonote}}
+% \changes{v2.37.0}{2021/02/28}{Improve syntaxis check.}
 %      Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename)
 % has version number \fileversion, last revised \filedate.}}
 %
@@ -4460,7 +4463,7 @@
 %    \begin{macrocode}
 %<*code>
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2021/02/14 v2.36.1 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2021/02/28 v2.37.0 typesetting critical editions]%
 %    \end{macrocode}
 %
 % \subsection{Package options}
@@ -5019,10 +5022,10 @@
 }%
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\led at err@EdtextWithoutFootnote}
+% \begin{macro}{\led at err@EdtextWithoutNote}
 %    \begin{macrocode}
-\newcommand{\led at err@EdtextWithoutFootnote}{%
-  \reledmac at error{edtext without Xfootnote. Check syntaxis}{\@ehc}%
+\newcommand{\led at err@EdtextWithoutNote}[1]{%
+  \reledmac at error{edtext `\unexpanded{#1}` without Xfootnote or Xendnote. Check syntaxis.}{\@ehc}%
 }%
 %    \end{macrocode}
 % \end{macro}
@@ -5029,7 +5032,7 @@
 % \begin{macro}{\led at err@FootnoteNotInSecondArgEdtext}
 %    \begin{macrocode}
 \newcommand{\led at err@FootnoteNotInSecondArgEdtext}[1]{%
-  \reledmac at error{#1footnote outside of the second argument of an edtext. Check syntax}{\@ehc}%
+  \reledmac at error{#1footnote outside of the second argument of an edtext. Check syntaxis.}{\@ehc}%
 }%
 %    \end{macrocode}
 % \end{macro}
@@ -7593,8 +7596,6 @@
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
-% \begin{macro}{\if at noneed@Footnote}
-% \protect\cs{if at noneed@Footnote} is a boolean to check if we have to print a error message when a \protect\cs{edtext} is called without any critical notes.
 %
 % \begin{macro}{\flag at start}
 % \begin{macro}{\flag at end}
@@ -7607,28 +7608,17 @@
 % setting the value of \protect\cs{insert at count} appropriately; it
 % actually gets done by the various footnote macros.
 %    \begin{macrocode}
-\newif\if at noneed@Footnote%
 
 \newcommand*{\flag at start}{%
   \ifledRcol%
     \edef\next{\write\linenum at outR{%
                   \string\@ref[\the\insert at countR][}}%
-    \next%
-    \ifnum\insert at countR<1%
-      \if at noneed@Footnote\else%
-        \led at err@EdtextWithoutFootnote%
-      \fi%
-    \fi%
   \else%
     \edef\next{\write\linenum at out{%
                   \string\@ref[\the\insert at count][}}%
-    \next%
-    \ifnum\insert at count<1%
-      \if at noneed@Footnote\else%
-        \led at err@EdtextWithoutFootnote%
-      \fi%
-    \fi%
-  \fi}%
+  \fi%
+  \next%
+}%
 
 \newcommand*{\flag at end}{%
   \ifledRcol%
@@ -7635,13 +7625,13 @@
     \write\linenum at outR{]}%
   \else%
     \write\linenum at out{]}%
-  \fi}%
+  \fi%
+}%
 
 
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
-% \end{macro}
 % \begin{macro}{\flag at start@RTL}
 % \begin{macro}{\flag at end@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.}
@@ -8133,6 +8123,24 @@
 \renewcommand{\theedtext}{edtxt@\the\c at edtext}%
 %    \end{macrocode}
 % \end{macro}
+% \begin{macro}{\edtext at notes}
+% \begin{macro}{\edtext at notes@start}
+% The \cs{edtext at notes} is increased each time we have a footnote required in the second argument of \cs{edtext}, that is a \cs{Xfootnote} or a \cs{Xendfootnote}.
+%
+% The \cs{edtext at notes@start} is let to \cs{edtext at notes} at the beginning of a \cs{edtext}
+%
+%    \begin{macrocode}
+\newcount\edtext at notes%
+\newcount\edtext at notes@start%
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\if at noneed@notes}
+% The \cs{if at noneed@notes} macro is (locally) set to true when we read a critical note for a series with \Xnonote set to true.
+%    \begin{macrocode}
+\newif\if at noneed@notes%
+%    \end{macrocode}
+% \end{macro}
 % \begin{macro}{\edtext}
 % \changes{v0.4.0}{2004/02/29}{Added \protect\cs{showlemma} to \protect\cs{edtext}}
 % \changes{v1.4.0}{2012/11/16}{Compatibility of \protect\cs{edtext} with the right-to-left direction (with Polyglossia).}
@@ -8154,6 +8162,10 @@
 %    \begin{macrocode}
       \global\advance\@edtext at level by 1%
 %    \end{macrocode}
+% We let \cs{edtext at notes@start} equal to \cs{edtext at notes} to check later the number of notes associated to the edtext.
+%    \begin{macrocode}
+      \global\edtext at notes@start=\edtext at notes%
+%    \end{macrocode}
 % We also increase the \verb+edtext+ \LaTeX\ counter to insert a hypertarget if the \package{hyperref} package is loaded, and also works with \cs{edtext} on right-to-left typesetting with \XeLaTeX.
 %
 % We store the value for the current level in a global macro. So we have one macro by level of \cs{edtext}. That is required, because \cs{edtext} can contain \cs{edtext}.
@@ -8227,6 +8239,14 @@
         \ignorespaces #2\relax%
         \@edtext at secondarg@false%
 %    \end{macrocode}
+% Check if we inded insert footnotes or critical notes.
+%    \begin{macrocode}
+        \ifnum\edtext at notes=\edtext at notes@start%
+          \unless\if at noneed@notes%
+            \led at err@EdtextWithoutNote{#1}%
+          \fi%
+        \fi%
+%    \end{macrocode}
 % With \XeLaTeX, you must track whether the language reads left to right (English) or right to left (Arabic). \reledmac defines an \cs{if at RTL} boolean test is not already defined.
 %    \begin{macrocode}
         \if at RTL%
@@ -8292,7 +8312,6 @@
 %    \item The one that says we are inside a \protect\cs{@lemma}.
 % \end{itemize}
 %    \begin{macrocode}
-      \global\@noneed at Footnotefalse%
       \global\advance\@edtext at level by -1%
       \global\@lemmacommand at false%
 %    \end{macrocode}
@@ -12923,7 +12942,10 @@
 %    \begin{macrocode}
 \pretocmd{\@footnotetext}{%
   \ifnumberedpar@
-    \edtext{}{\l at dbfnote{#1}}%
+    \edtext{}{%
+      \advance \edtext at notes by 1%
+      \l at dbfnote{#1}%
+    }%
   \else
   }{}{}
 \apptocmd{\@footnotetext}{\fi}{}{}%
@@ -13360,7 +13382,10 @@
 
 \newcommand{\vnumfootnoteX}[3]{%
   \ifnumberedpar@
-    \edtext{}{\normalbfnoteX{#1}{#2}{#3}}%
+    \edtext{}{%
+      \advance\edtext at notes by 1%
+      \normalbfnoteX{#1}{#2}{#3}%
+    }%
   \else
     \def\this at footnoteX@reading{\the\csname footnote#1 at reading\endcsname}%
     \get at thisfootnoteX{#1}%
@@ -15074,6 +15099,7 @@
 %    \begin{macrocode}
       \global\notbool{parapparatus@}{\expandafter\newcommand\expandafter *}{\expandafter\newcommand}\csname #1footnote\endcsname[2][]{%
           \nottoggle{Xnonote@#1}{%
+          \advance \edtext at notes by 1%
           \if at edtext@secondarg@%
             \ifledRcol%
               \ifcsstring{Xonlyside@#1}{L}{\led at error@note at called@onrightside{#1footnote}}{}%
@@ -15170,7 +15196,7 @@
           \else%
             \led at err@FootnoteNotInSecondArgEdtext{#1}%
           \fi%
-        }{\@noneed at Footnotetrue}% End of \nottoggle{Xnonote@#1}{%
+        }{\@noneed at notestrue}% End of \nottoggle{Xnonote@#1}{%
    \ignorespaces%
           }
 %    \end{macrocode}
@@ -15377,9 +15403,9 @@
 %    \begin{macrocode}
 
       \global\expandafter\newcommandx\csname #1endnote\endcsname[2][1,usedefault]{%
+         \advance \edtext at notes by 1%
          \bgroup%
          \newlinechar='40%
-         \global\@noneed at Footnotetrue%
          \newcommand{\content}{##2}%
          \stepcounter{labidx}%
          \expandafter\immediate\expandafter\write\csname l at d@#1end\endcsname{%
@@ -17619,16 +17645,35 @@
 % \begin{macro}{\ledinnernote}
 % \begin{macro}{\ledouternote}
 % \begin{macro}{\ledsidenote}
+% \begin{macro}{\ledsidenote@}
 % \protect\cs{ledleftnote}, \protect\cs{ledrightnote}, \protect\cs{ledinnernote}, \protect\cs{ledouternote} are the
 % user commands for left, right, inner and outer sidenotes.
 % The two last ones are just alias for the two first ones, depending on the page number.
 % \protect\cs{ledsidenote}\marg{text} is the command for a moveable sidenote.
+%
+% All these macro call the macro \cs{ledsidenote@}, as they have the same structure.
 %    \begin{macrocode}
-\newcommand*{\ledleftnote}[1]{\edtext{}{\l at dlsnote{#1}}}
-\newcommand*{\ledrightnote}[1]{\edtext{}{\l at drsnote{#1}}}
-\newcommand*{\ledsidenote}[1]{\edtext{}{\l at dcsnote{#1}}}%
-\newcommand*{\ledinnernote}[1]{\edtext{}{\l at disnote{#1}}}%
-\newcommand*{\ledouternote}[1]{\edtext{}{\l at dosnote{#1}}}%
+\newcommand*{\ledleftnote}[1]{%
+  \ledsidenote@{\l at dlsnote{#1}}%
+}%
+\newcommand*{\ledrightnote}[1]{%
+  \ledsidenote@{\l at drsnote{#1}}%
+}%
+\newcommand*{\ledsidenote}[1]{%
+  \ledsidenote@{\l at dcsnote{#1}}%
+}%
+\newcommand*{\ledinnernote}[1]{%
+  \ledsidenote@{\l at disnote{#1}}%
+}%
+\newcommand*{\ledouternote}[1]{%
+  \ledsidenote@{\l at dosnote{#1}}%
+}%
+\newcommand*{\ledsidenote@}[1]{%
+  \edtext{}{%
+    \advance\edtext at notes@start by 1%
+    #1%
+  }%+
+}%
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -17635,6 +17680,7 @@
 % \end{macro}
 % \end{macro}
 % \end{macro}
+% \end{macro}
 %
 %
 % \begin{macro}{\l at dlsnote}
@@ -21505,11 +21551,11 @@
 
 %    \end{macrocode}
 % \changes{v1.14.1}{2014/12/15}{Debug sectioning commands when using both \protect\package{handout} and \protect\package{hyperref} package.}
-% \protect\package{hyperref} also redefines  \protect\cs{@sect}. That is why, when manipulating arguments, we patch \protect\cs{@sect} and the same only if \protect\package{hyperref} is not used. If it is, we patch the \protect\cs{NR} commands.
+% \protect\package{hyperref} also redefines  \protect\cs{@sect}. That is why, when manipulating arguments, we patch \protect\cs{@sect} and the same only if \protect\package{hyperref} is not used. If it is, we patch the \protect\cs{H at old} commands.
 %    \begin{macrocode}
-\@ifpackageloaded{nameref}{
+\ifdef{\H at old@sect}{%
 
-  \patchcmd{\NR at sect}
+  \patchcmd{\H at old@sect}%
     {#8}
     {#8%
     \print at rightmargin@eledsection%
@@ -21517,7 +21563,7 @@
     {}
     {}
 
-  \patchcmd{\NR at sect}
+  \patchcmd{\H at old@sect}%
     {\hskip #3\relax}
     {\hskip #3\relax%
     \print at leftmargin@eledsection%
@@ -21525,7 +21571,7 @@
     {}
     {}
 
-  \patchcmd{\NR at ssect}
+  \patchcmd{\H at old@@sect}%
     {#5}
     {#5%
     \print at rightmargin@eledsection%
@@ -21533,7 +21579,7 @@
     {}
     {}
 
-  \patchcmd{\NR at ssect}
+  \patchcmd{\H at old@@sect}%
     {\hskip #1}
     {\hskip #1%
     \print at leftmargin@eledsection%

Modified: trunk/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/reledmac/reledmac.sty	2021-03-01 22:39:19 UTC (rev 58026)
+++ trunk/Master/texmf-dist/tex/latex/reledmac/reledmac.sty	2021-03-01 22:39:52 UTC (rev 58027)
@@ -37,7 +37,7 @@
 %%
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2021/02/14 v2.36.1 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2021/02/28 v2.37.0 typesetting critical editions]%
 \RequirePackage{xkeyval}
 \newif\ifparledgroup
 \newif\ifsameparallelpagenumber%
@@ -310,11 +310,11 @@
 \newcommand{\led at err@toendnotes at outsidenumbering}{%
   \reledmac at error{\string\toendnotes\space and related commands must be called inside a numbered texte (\string\beginnumbering\space ...\space\string\endnumbering)}{\@ehc}%
 }%
-\newcommand{\led at err@EdtextWithoutFootnote}{%
-  \reledmac at error{edtext without Xfootnote. Check syntaxis}{\@ehc}%
+\newcommand{\led at err@EdtextWithoutNote}[1]{%
+  \reledmac at error{edtext `\unexpanded{#1}` without Xfootnote or Xendnote. Check syntaxis.}{\@ehc}%
 }%
 \newcommand{\led at err@FootnoteNotInSecondArgEdtext}[1]{%
-  \reledmac at error{#1footnote outside of the second argument of an edtext. Check syntax}{\@ehc}%
+  \reledmac at error{#1footnote outside of the second argument of an edtext. Check syntaxis.}{\@ehc}%
 }%
 \newcommand{\led at error@PackageAfterEledmac}[1]{%
   \reledmac at error{#1 must be loaded before reledmac}{\@ehc}%
@@ -1445,28 +1445,17 @@
   {\global\@this at c@page=\c at par@page}%
   {\global\@this at c@page=\c at page}%
 }%
-\newif\if at noneed@Footnote%
 
 \newcommand*{\flag at start}{%
   \ifledRcol%
     \edef\next{\write\linenum at outR{%
                   \string\@ref[\the\insert at countR][}}%
-    \next%
-    \ifnum\insert at countR<1%
-      \if at noneed@Footnote\else%
-        \led at err@EdtextWithoutFootnote%
-      \fi%
-    \fi%
   \else%
     \edef\next{\write\linenum at out{%
                   \string\@ref[\the\insert at count][}}%
-    \next%
-    \ifnum\insert at count<1%
-      \if at noneed@Footnote\else%
-        \led at err@EdtextWithoutFootnote%
-      \fi%
-    \fi%
-  \fi}%
+  \fi%
+  \next%
+}%
 
 \newcommand*{\flag at end}{%
   \ifledRcol%
@@ -1473,7 +1462,8 @@
     \write\linenum at outR{]}%
   \else%
     \write\linenum at out{]}%
-  \fi}%
+  \fi%
+}%
 
 \newcommand{\flag at start@RTL}{%
   \edlabel{edtext:start:\csuse{thisedtext@\the\@edtext at level}}%
@@ -1633,10 +1623,14 @@
 \newif\if at edtext@secondarg@%
 \newcounter{edtext}
 \renewcommand{\theedtext}{edtxt@\the\c at edtext}%
+\newcount\edtext at notes%
+\newcount\edtext at notes@start%
+\newif\if at noneed@notes%
 \newcommand{\edtext}[2]{\leavevmode%
   \ifnumberedpar@%
       \@check at edtext@args{#1}{#2}%
       \global\advance\@edtext at level by 1%
+      \global\edtext at notes@start=\edtext at notes%
       \stepcounter{edtext}%
       \csxdef{thisedtext@\the\@edtext at level}{\theedtext}%
       \global\@lemmacommand at false%
@@ -1659,6 +1653,11 @@
         \@edtext at secondarg@true%
         \ignorespaces #2\relax%
         \@edtext at secondarg@false%
+        \ifnum\edtext at notes=\edtext at notes@start%
+          \unless\if at noneed@notes%
+            \led at err@EdtextWithoutNote{#1}%
+          \fi%
+        \fi%
         \if at RTL%
           \flag at start@RTL%
         \else%
@@ -1691,7 +1690,6 @@
       \else%
         \flag at end%
       \fi%
-      \global\@noneed at Footnotefalse%
       \global\advance\@edtext at level by -1%
       \global\@lemmacommand at false%
       \global\let\@beforeinsertofthisedtext\relax%
@@ -4046,7 +4044,10 @@
 
 \pretocmd{\@footnotetext}{%
   \ifnumberedpar@
-    \edtext{}{\l at dbfnote{#1}}%
+    \edtext{}{%
+      \advance \edtext at notes by 1%
+      \l at dbfnote{#1}%
+    }%
   \else
   }{}{}
 \apptocmd{\@footnotetext}{\fi}{}{}%
@@ -4330,7 +4331,10 @@
 
 \newcommand{\vnumfootnoteX}[3]{%
   \ifnumberedpar@
-    \edtext{}{\normalbfnoteX{#1}{#2}{#3}}%
+    \edtext{}{%
+      \advance\edtext at notes by 1%
+      \normalbfnoteX{#1}{#2}{#3}%
+    }%
   \else
     \def\this at footnoteX@reading{\the\csname footnote#1 at reading\endcsname}%
     \get at thisfootnoteX{#1}%
@@ -5476,6 +5480,7 @@
       \fi%
       \global\notbool{parapparatus@}{\expandafter\newcommand\expandafter *}{\expandafter\newcommand}\csname #1footnote\endcsname[2][]{%
           \nottoggle{Xnonote@#1}{%
+          \advance \edtext at notes by 1%
           \if at edtext@secondarg@%
             \ifledRcol%
               \ifcsstring{Xonlyside@#1}{L}{\led at error@note at called@onrightside{#1footnote}}{}%
@@ -5572,7 +5577,7 @@
           \else%
             \led at err@FootnoteNotInSecondArgEdtext{#1}%
           \fi%
-        }{\@noneed at Footnotetrue}% End of \nottoggle{Xnonote@#1}{%
+        }{\@noneed at notestrue}% End of \nottoggle{Xnonote@#1}{%
    \ignorespaces%
           }
       \expandafter\newcount\csname #1prevpage at num\endcsname%
@@ -5688,9 +5693,9 @@
       \expandafter\newif\csname ifl at dend@#1\endcsname%
 
       \global\expandafter\newcommandx\csname #1endnote\endcsname[2][1,usedefault]{%
+         \advance \edtext at notes by 1%
          \bgroup%
          \newlinechar='40%
-         \global\@noneed at Footnotetrue%
          \newcommand{\content}{##2}%
          \stepcounter{labidx}%
          \expandafter\immediate\expandafter\write\csname l at d@#1end\endcsname{%
@@ -7074,11 +7079,27 @@
 \newcommand*{\ledlsnotefontsetup}{\raggedleft\footnotesize}
 \newcommand*{\ledrsnotefontsetup}{\raggedright\footnotesize}
 
-\newcommand*{\ledleftnote}[1]{\edtext{}{\l at dlsnote{#1}}}
-\newcommand*{\ledrightnote}[1]{\edtext{}{\l at drsnote{#1}}}
-\newcommand*{\ledsidenote}[1]{\edtext{}{\l at dcsnote{#1}}}%
-\newcommand*{\ledinnernote}[1]{\edtext{}{\l at disnote{#1}}}%
-\newcommand*{\ledouternote}[1]{\edtext{}{\l at dosnote{#1}}}%
+\newcommand*{\ledleftnote}[1]{%
+  \ledsidenote@{\l at dlsnote{#1}}%
+}%
+\newcommand*{\ledrightnote}[1]{%
+  \ledsidenote@{\l at drsnote{#1}}%
+}%
+\newcommand*{\ledsidenote}[1]{%
+  \ledsidenote@{\l at dcsnote{#1}}%
+}%
+\newcommand*{\ledinnernote}[1]{%
+  \ledsidenote@{\l at disnote{#1}}%
+}%
+\newcommand*{\ledouternote}[1]{%
+  \ledsidenote@{\l at dosnote{#1}}%
+}%
+\newcommand*{\ledsidenote@}[1]{%
+  \edtext{}{%
+    \advance\edtext at notes@start by 1%
+    #1%
+  }%+
+}%
 \newif\ifrightnoteup
   \rightnoteuptrue
 
@@ -9351,9 +9372,9 @@
   {}
   {}
 
-\@ifpackageloaded{nameref}{
+\ifdef{\H at old@sect}{%
 
-  \patchcmd{\NR at sect}
+  \patchcmd{\H at old@sect}%
     {#8}
     {#8%
     \print at rightmargin@eledsection%
@@ -9361,7 +9382,7 @@
     {}
     {}
 
-  \patchcmd{\NR at sect}
+  \patchcmd{\H at old@sect}%
     {\hskip #3\relax}
     {\hskip #3\relax%
     \print at leftmargin@eledsection%
@@ -9369,7 +9390,7 @@
     {}
     {}
 
-  \patchcmd{\NR at ssect}
+  \patchcmd{\H at old@@sect}%
     {#5}
     {#5%
     \print at rightmargin@eledsection%
@@ -9377,7 +9398,7 @@
     {}
     {}
 
-  \patchcmd{\NR at ssect}
+  \patchcmd{\H at old@@sect}%
     {\hskip #1}
     {\hskip #1%
     \print at leftmargin@eledsection%



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