summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/README2
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/eledmac.pdfbin1013076 -> 1053599 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/eledpar.pdfbin546584 -> 553625 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/columns-alignment.pdfbin21172 -> 21172 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/cross-referencing.pdfbin16318 -> 17618 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/cross-referencing.tex15
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/indexing.pdfbin19897 -> 19898 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/lemma-disambiguation.pdfbin16776 -> 16781 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/line-numbers-in-header.pdfbin31491 -> 31486 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/lualatex-parallel-rtl.pdfbin39757 -> 39757 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/minimal-parallels.pdfbin12221 -> 12222 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/minimal-verses.pdfbin17124 -> 17126 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/mixing-columns-and-not-columns.pdfbin18783 -> 18784 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/one-series-per-pstart-eledpar.pdfbin0 -> 36472 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/one-series-per-pstart-eledpar.tex245
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/one-series-per-pstart.pdfbin0 -> 25872 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/one-series-per-pstart.tex129
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/parallel-column-two-languages.pdfbin26312 -> 26065 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/parallel-pages-longnotes.pdfbin59021 -> 59040 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/parallel-pages-notes-on-leftpage.pdfbin22722 -> 22723 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/sections-not-in-line-numbering.pdfbin17152 -> 17149 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/sections-parallel-not-in-line-numbering.pdfbin22223 -> 22223 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-columns.pdfbin29655 -> 29341 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-pages.pdfbin31807 -> 31615 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes.pdfbin22785 -> 22711 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/separator-between-paragraphs.pdfbin18924 -> 18718 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/side-notes.pdfbin19969 -> 20143 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/spaces-around-footnote-rule.pdfbin20962 -> 20762 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/tabular.pdfbin20886 -> 20637 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/examples/text-between-verses-in-parallel.pdfbin16241 -> 16240 bytes
-rw-r--r--Master/texmf-dist/source/latex/eledmac/eledmac.dtx2210
-rw-r--r--Master/texmf-dist/source/latex/eledmac/eledpar.dtx618
-rw-r--r--Master/texmf-dist/tex/latex/eledmac/eledmac.sty1450
-rw-r--r--Master/texmf-dist/tex/latex/eledmac/eledpar.sty508
34 files changed, 3473 insertions, 1704 deletions
diff --git a/Master/texmf-dist/doc/latex/eledmac/README b/Master/texmf-dist/doc/latex/eledmac/README
index e547e964d47..9dddabf3da8 100644
--- a/Master/texmf-dist/doc/latex/eledmac/README
+++ b/Master/texmf-dist/doc/latex/eledmac/README
@@ -99,7 +99,7 @@ Maïeul Rouquette is the only one maintainer. To help him in his work,
please follow these rules:
- Go to the [issues page](https://github.com/maieul/ledmac/issues).
-- Open *one issue by problem*, even if problems are similar.
+- Open *one issue for each problem*, even if problems are similar.
- Add a [minimal working
example](http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl).
- If your report is really a bug, Maïeul Rouquette will open a
diff --git a/Master/texmf-dist/doc/latex/eledmac/eledmac.pdf b/Master/texmf-dist/doc/latex/eledmac/eledmac.pdf
index 9869d68f11d..caf6962801a 100644
--- a/Master/texmf-dist/doc/latex/eledmac/eledmac.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/eledmac.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/eledpar.pdf b/Master/texmf-dist/doc/latex/eledmac/eledpar.pdf
index 912ec55d410..5d2fea44436 100644
--- a/Master/texmf-dist/doc/latex/eledmac/eledpar.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/eledpar.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/columns-alignment.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/columns-alignment.pdf
index 4f1b31d92fd..3c8abfcde92 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/columns-alignment.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/columns-alignment.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/cross-referencing.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/cross-referencing.pdf
index 0c8fcab0d05..4af62d1162a 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/cross-referencing.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/cross-referencing.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/cross-referencing.tex b/Master/texmf-dist/doc/latex/eledmac/examples/cross-referencing.tex
index b0f3f4157ed..5ab6529b320 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/cross-referencing.tex
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/cross-referencing.tex
@@ -3,10 +3,10 @@
\usepackage{libertineotf}
\setmainlanguage{latin}
\setotherlanguage{english}
-\usepackage[series={}]{eledmac}
+\usepackage[series={A}]{eledmac}
\usepackage{hyperref}
-
+\renewcommand{\apprefprefixsingle}{l.~}
\begin{document}
@@ -16,16 +16,21 @@
\maketitle
\begin{abstract}
This file provides a MWE of cross-referencing with eledmac, with reference to line number.
-The \verb+\edlabel+, \verb+\edpageref+ and \verb+\lineref+ commands are used.
+The \verb+\edlabel+, \verb+\edpageref+ and \verb+\lineref+ commands are used.
+
+We also use \verb+\applabel+, \verb+\appref+ and \verb+\apprefprefixsingle+.
-See p.~\edpageref{ultrices} l.~\lineref{ultrices}.
\end{abstract}
\end{english}
+See p.~\edpageref{ultrices} l.~\lineref{ultrices}.
+
+Read the variant in \appref{variant}.
+
\beginnumbering
\pstart
-Pellentesque non orci dui. Donec a libero eu nisl sollicitudin lobortis eget nec lacus. Nulla pellentesque, neque ut tincidunt vestibulum, ante mi varius purus, nec cursus neque orci ut orci. Donec bibendum ligula bibendum nisl aliquet auctor. Nam luctus lorem mauris, ac venenatis felis posuere non. Quisque ultricies ante magna, facilisis pellentesque nibh placerat at. Aliquam sit amet ante varius, vestibulum augue condimentum, scelerisque turpis. Proin at nibh vulputate, tincidunt tellus vel, vehicula libero. Praesent venenatis, turpis nec feugiat sodales, risus sapien tempus odio, at vehicula ipsum nisl a nisl. Nunc pretium elit tellus, \edlabel{ultrices}ultrices facilisis odio interdum non. Donec et condimentum quam, id ullamcorper nisl.
+Pellentesque non orci dui. Donec a libero eu nisl sollicitudin lobortis eget nec lacus. Nulla pellentesque, neque ut tincidunt vestibulum, ante mi varius purus, nec cursus neque orci ut orci. \edtext{Donec bibendum ligula bibendum nisl aliquet auctor. Nam luctus lorem mauris, ac venenatis felis posuere non. Quisque ultricies ante magna, facilisis pellentesque nibh placerat at}{\applabel{variant}\Afootnote{omit}}. Aliquam sit amet ante varius, vestibulum augue condimentum, scelerisque turpis. Proin at nibh vulputate, tincidunt tellus vel, vehicula libero. Praesent venenatis, turpis nec feugiat sodales, risus sapien tempus odio, at vehicula ipsum nisl a nisl. Nunc pretium elit tellus, \edlabel{ultrices}ultrices facilisis odio interdum non. Donec et condimentum quam, id ullamcorper nisl.
\pend
\end{document}
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/indexing.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/indexing.pdf
index 6c61e2ac658..476e9a5f9d8 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/indexing.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/indexing.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/lemma-disambiguation.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/lemma-disambiguation.pdf
index 05e59026740..bb9d8d462e6 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/lemma-disambiguation.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/lemma-disambiguation.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/line-numbers-in-header.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/line-numbers-in-header.pdf
index 17171dded69..65498e0831b 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/line-numbers-in-header.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/line-numbers-in-header.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/lualatex-parallel-rtl.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/lualatex-parallel-rtl.pdf
index 58962d479f8..cad5b756f1d 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/lualatex-parallel-rtl.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/lualatex-parallel-rtl.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/minimal-parallels.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/minimal-parallels.pdf
index 0919bdf4694..1c88dc2df30 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/minimal-parallels.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/minimal-parallels.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/minimal-verses.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/minimal-verses.pdf
index 2d8a8baf487..4f0e2d1e45a 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/minimal-verses.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/minimal-verses.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/mixing-columns-and-not-columns.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/mixing-columns-and-not-columns.pdf
index 4cebbf2549f..0395a10934e 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/mixing-columns-and-not-columns.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/mixing-columns-and-not-columns.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/one-series-per-pstart-eledpar.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/one-series-per-pstart-eledpar.pdf
new file mode 100644
index 00000000000..1497b6e19a9
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/one-series-per-pstart-eledpar.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/one-series-per-pstart-eledpar.tex b/Master/texmf-dist/doc/latex/eledmac/examples/one-series-per-pstart-eledpar.tex
new file mode 100644
index 00000000000..7b0015a92ee
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/one-series-per-pstart-eledpar.tex
@@ -0,0 +1,245 @@
+\documentclass{article}
+\usepackage{lipsum}
+\usepackage[series={A,B,C,D,E,F,G,H,I,J}]{eledmac}%Declare series to be used
+\usepackage{eledpar}
+\usepackage{polyglossia}
+\setmainlanguage{english}
+\usepackage{libertine}
+
+
+% Here is the loop system:
+\makeatletter% We need to use command with @
+ % Two counters: one for left and one for right
+ \newcounter{mynotelevel}%
+ \renewcommand{\themynotelevel}{\Alph{mynotelevel}}% Print the counter as a letter
+ \newcounter{mynotelevelR}%
+ \renewcommand{\themynotelevelR}{\Alph{mynotelevelR}}% Print the counter as a letter
+ \setcounter{mynotelevelR}{5}
+
+ % Following lines are called at each \pstart
+ \AtEveryPstartCall{%
+ \ifledRcol%If it's a right pstart
+ \addtocounter{mynotelevelR}{1}%Step counter
+ \ifnumequal{\arabic{mynotelevelR}}{11}{%No more than J series (10)
+ \setcounter{mynotelevelR}{6}% If more than J => restart to F (6)
+ }{}%
+ \global\letcs{\mynote}{\themynotelevelR footnote}% And let mynote equal to <X>footnote, where <X> is the current level \letcs is defined by etoolbox which is called by eledmac
+ \else% If it's a left page
+ \addtocounter{mynotelevel}{1}%Step counter
+ \ifnumequal{\arabic{mynotelevel}}{6}{%No more than E series (5)
+ \setcounter{mynotelevel}{1}%If more than J => restart to A (1)
+ }{}%
+ \global\letcs{\mynote}{\themynotelevel footnote}%And let mynote equal to <X>footnote, where <X> is the current level \letcs is defined by etoolbox which called by eledmac
+ \fi%
+ }
+ % This code is called when beginnings of each pstart are printed
+ \AtEveryPstart{%
+ \ifodd\c@page%If we are on a left page
+ \addtocounter{mynotelevelR}{1}%Step counter
+ \ifnumequal{\arabic{mynotelevelR}}{11}{%No more than J series (10)
+ \setcounter{mynotelevelR}{6}}{}% If more than J => restart to F (6)
+ \seriesatend{\themynotelevelR}% The series should be at the end
+ \else%
+ \addtocounter{mynotelevel}{1}%Step counter
+ \ifnumequal{\arabic{mynotelevel}}{6}{%No more than E series (5)
+ \setcounter{mynotelevel}{1}}{}%% If more than E => restart to A (1)
+ \seriesatend{\themynotelevel}% The series should be at the end
+ \fi%
+ }
+
+\makeatother
+\begin{document}
+
+\title{One series per \textbackslash pstart with eledmac}
+\author{}
+\maketitle
+\begin{abstract}
+This file provides examples of features that allow one series of notes by \verb+\pstart+…\verb+pend+, when typesetting parallel pages.
+
+We suppose there is no more than five \verb+\pstart+…\verb+pend+ by page. The series A, B, C, D and E are for left pages, while the series F, G, H, I, J are for right notes.
+
+\subsection*{In the left page}
+Instead of using \verb+\Afootnote+, \verb+\Bfootnote+ etc., we use \verb+\mynote+, which we let equal to \verb+\Afootnote+ at the first \verb+pstart+, \verb+\Bfootnote+ at the second \verb+\pstart+, \verb+\Cfootnote+ at the third, \verb+\Dfootnote+ at the fourth, \verb+\Efootnote+ at the fifth, and we restart at \verb+\Afootnote+ at the sixth \verb+\pstart+.
+
+To do that, we increment the counter \verb+mynotelevel+ at every \verb+pstart+ and reset it to~1 when it becomes equal to~6.
+
+
+
+\subsection*{In the right page}
+
+We do the same thing, but use the \verb+mynotelevelR+ counter, rotating its values between 6 and 10, and, consequently, rotating between F, G, H, I, J series.
+
+\subsection*{Series position}
+We use \verb+\seriesatend+ to ensure that a \verb+pstart+ series between two pages will be printed on the first page at the end of the series, but on the second page at the beginning of the series.
+However, we need to do this when the \verb+pstart+s are printed, not when they are called. So we use:
+\begin{description}
+ \item[\textbackslash AtEveryPstartCall] to set the footnote series.
+ \item[\textbackslash AtEveryPstart] to set the footnote position.
+\end{description}
+\end{abstract}
+
+
+
+\begin{pages}
+\begin{Leftside}
+ \beginnumbering
+
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel first}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[1]
+ \pend
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]\edtext{on therpage}{\mynote{on otherpage}}
+ \pend
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel first}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[1]
+ \pend
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]\edtext{on therpage}{\mynote{on otherpage}}
+ \pend
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+ % Many more \pstart ... \pend to follow.
+
+ \endnumbering
+\end{Leftside}
+
+\begin{Rightside}
+ \beginnumbering
+
+ \pstart
+ \edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the
+ \edtext{\themynotelevelR first}{\mynote{Second footnote in \themynotelevelR.}} paragraph:
+ \lipsum[1]
+ \pend
+
+ \pstart
+ \edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the
+ \edtext{\themynotelevelR second}{\mynote{Second footnote in \themynotelevelR.}} paragraph:
+ \lipsum[2]
+ \pend
+
+ \pstart
+ \edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the
+ \edtext{\themynotelevelR second}{\mynote{Second footnote in \themynotelevelR.}} paragraph:
+ \lipsum[2]
+ \pend
+
+ \pstart
+ \edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the
+ \edtext{\themynotelevelR second}{\mynote{Second footnote in \themynotelevelR.}} paragraph:
+ \lipsum[2]
+ \pend
+ \pstart
+ \edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the
+ \edtext{\themynotelevelR second}{\mynote{Second footnote in \themynotelevelR.}} paragraph:
+ \lipsum[2]\edtext{on therpage}{\mynote{on otherpage}}
+ \pend
+
+ \pstart sss\themynotelevelR
+ \edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the
+ \edtext{\themynotelevelR second}{\mynote{Second footnote in \themynotelevelR.}} paragraph:
+ \lipsum[2]
+ \pend
+
+ \pstart
+ \edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the
+ \edtext{\themynotelevelR first}{\mynote{Second footnote in \themynotelevelR.}} paragraph:
+ \lipsum[1]
+ \pend
+
+ \pstart
+ \edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the
+ \edtext{\themynotelevelR second}{\mynote{Second footnote in \themynotelevelR.}} paragraph:
+ \lipsum[2]
+ \pend
+
+ \pstart
+ \edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the
+ \edtext{\themynotelevelR second}{\mynote{Second footnote in \themynotelevelR.}} paragraph:
+ \lipsum[2]
+ \pend
+
+ \pstart
+ \edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the
+ \edtext{\themynotelevelR second}{\mynote{Second footnote in \themynotelevelR.}} paragraph:
+ \lipsum[2]
+ \pend
+ \pstart
+ \edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the
+ \edtext{\themynotelevelR second}{\mynote{Second footnote in \themynotelevelR.}} paragraph:
+ \lipsum[2]\edtext{on therpage}{\mynote{on otherpage}}
+ \pend
+
+ \pstart sss\themynotelevelR
+ \edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the
+ \edtext{\themynotelevelR second}{\mynote{Second footnote in \themynotelevelR.}} paragraph:
+ \lipsum[2]
+ \pend
+
+ % Many more \pstart ... \pend to follow.
+
+ \endnumbering
+\end{Rightside}
+\setcounter{mynotelevel}{0}%Restart the left counter
+\setcounter{mynotelevelR}{5}% And restart the right counter
+\Pages
+\end{pages}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/one-series-per-pstart.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/one-series-per-pstart.pdf
new file mode 100644
index 00000000000..e9163b07dbc
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/one-series-per-pstart.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/one-series-per-pstart.tex b/Master/texmf-dist/doc/latex/eledmac/examples/one-series-per-pstart.tex
new file mode 100644
index 00000000000..e4d792b4032
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/one-series-per-pstart.tex
@@ -0,0 +1,129 @@
+\documentclass{article}
+\usepackage{lipsum,eledmac,eledpar,polyglossia}
+\setmainlanguage{english}
+\usepackage{libertine}
+
+
+\newcounter{mynotelevel}%A counter to dump the note level
+\renewcommand{\themynotelevel}{\Alph{mynotelevel}}% The counter is seen as a letter
+\AtEveryPstart{%
+ \addtocounter{mynotelevel}{1}%Step counter
+ \ifnumequal{\value{mynotelevel}}{6}{%No more than 5
+ \setcounter{mynotelevel}{1}%
+ }{}%
+ \global\letcs{\mynote}{\themynotelevel footnote}%Change the mynote
+ \seriesatend{\themynotelevel}%And place current series at the end
+}
+\begin{document}
+
+\title{One series per \textbackslash pstart with eledmac}
+\author{}
+\maketitle
+\begin{abstract}
+This file provides examples of features that allow one series of notes by \verb+\pstart+…\verb+pend+.
+
+We suppose there is no more than five \verb+\pstart+…\verb+pend+ by page.
+
+Instead of using \verb+\Afootnote+, \verb+\Bfootnote+ etc., we use \verb+\mynote+, which we set to \verb+\Afootnote+ at the first \verb+pstart+, \verb+\Bfootnote+ at the second \verb+\pstart+, \verb+\Cfootnote+ at the third, \verb+\Dfootnote+ at the fourth, \verb+\Efootnote+ at the fifth. And we restart at \verb+\Afootnote+ at the sixth \verb+\pstart+.
+
+To do this, we increment the counter \verb+mynotelevel+ at every \verb+pstart+ and reset it to~1 when it becomes equal to~6.
+
+We use \verb+\seriesatend+ to ensure that a \verb+pstart+ series between two pages will be printed on the first page at the end of the series, but on the second page at the beginning of the series.
+\end{abstract}
+
+ \beginnumbering
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel first}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[1]
+ \pend
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]\edtext{on therpage}{\mynote{on otherpage}}
+ \pend
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+
+
+ \pstart
+ \edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the
+ \edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph:
+ \lipsum[2]
+ \pend
+ \endnumbering
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/parallel-column-two-languages.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/parallel-column-two-languages.pdf
index eade7104909..95128e4d88b 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/parallel-column-two-languages.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/parallel-column-two-languages.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/parallel-pages-longnotes.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/parallel-pages-longnotes.pdf
index b02022c9391..6bb937de2e7 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/parallel-pages-longnotes.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/parallel-pages-longnotes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/parallel-pages-notes-on-leftpage.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/parallel-pages-notes-on-leftpage.pdf
index 757692abab6..cb33dc2d686 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/parallel-pages-notes-on-leftpage.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/parallel-pages-notes-on-leftpage.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/sections-not-in-line-numbering.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/sections-not-in-line-numbering.pdf
index 6eb2b4936d6..b533cc2456e 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/sections-not-in-line-numbering.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/sections-not-in-line-numbering.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/sections-parallel-not-in-line-numbering.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/sections-parallel-not-in-line-numbering.pdf
index 41ff75056b8..394496208f5 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/sections-parallel-not-in-line-numbering.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/sections-parallel-not-in-line-numbering.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-columns.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-columns.pdf
index 772417346bf..0b82092649d 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-columns.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-columns.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-pages.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-pages.pdf
index 4f76f8352b9..6af49dc6e77 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-pages.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-pages.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes.pdf
index b26e57290db..56c312550ca 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/separator-between-paragraphs.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/separator-between-paragraphs.pdf
index 116070ef090..fd299da0e25 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/separator-between-paragraphs.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/separator-between-paragraphs.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/side-notes.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/side-notes.pdf
index e9eb27b9903..4e96433a827 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/side-notes.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/side-notes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/spaces-around-footnote-rule.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/spaces-around-footnote-rule.pdf
index 5d296707c39..27f3f3dffcf 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/spaces-around-footnote-rule.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/spaces-around-footnote-rule.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/tabular.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/tabular.pdf
index f87f03a135f..cba57d995a1 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/tabular.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/tabular.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/text-between-verses-in-parallel.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/text-between-verses-in-parallel.pdf
index c20e33c3b76..e3a500e07c4 100644
--- a/Master/texmf-dist/doc/latex/eledmac/examples/text-between-verses-in-parallel.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/examples/text-between-verses-in-parallel.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/eledmac/eledmac.dtx b/Master/texmf-dist/source/latex/eledmac/eledmac.dtx
index 02faa9a3688..a4497cb1601 100644
--- a/Master/texmf-dist/source/latex/eledmac/eledmac.dtx
+++ b/Master/texmf-dist/source/latex/eledmac/eledmac.dtx
@@ -51,7 +51,8 @@
%
% \fi
%
-% \CheckSum{10716}
+% \newcommand{\reff}[1]{\ref{#1} p.~\pageref{#1}}
+% \CheckSum{11453}
%
% \makeatletter
% \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters
@@ -138,6 +139,7 @@
% \newcommand{\Lpack}[1]{\textsf{#1}}
% \newcommand{\Lclass}[1]{\textsf{#1}}
% \newcommand{\file}[1]{\texttt{#1}}
+% \newcommand{\Eledpar}{\Lpack{eledpar}}
% \newcommand{\eledmac}{eledmac}
% \newcommand{\Eledmac}{\Lpack{\eledmac}}
% \newcommand{\edmac}{\texttt{EDMAC}}
@@ -206,7 +208,7 @@
% \changes{v1.12.3}{2014/08/15}{Correct bug with side and familiar notes in tabular environments.}
% \changes{v1.12.3}{2014/08/15}{Debug left and right notes (bugs added by 1.12.0)}
% \changes{v1.12.3}{2014/08/15}{Debug \cs{eledxxx} with some paper size}
-% \changes{v1.12.4}{2014/08/25}{Debug spurious page breaks before \cs{chapter} (bug added by 1.12.0)}
+% \changes{v1.12.4}{2014/08/25}{Debug spurious page breaks before \cs{chapter} (bug added in 1.12.0)}
% \changes{v1.13.1}{2014/09/25}{Debug quotation environment inside of a \cs{pstart} preceded by a sectioning command.}
% \changes{v1.13.1}{2014/09/25}{Coming back of page and line breaking penalties's management, deleted by error in v0.17.}
% \changes{v1.13.2}{2014/09/30}{Fix bug with normal footnotes, added by v1.13.0.}
@@ -225,6 +227,20 @@
% \changes{v1.20.0}{2015/03/22}{The \cs{newif}s are not followed by boolean values set to false, because it is the \TeX\ default setting.}
% \changes{v1.20.0}{2015/03/22}{Explicit error message when calling \cs{Xfootnote} outside of \cs{edtext}.}
% \changes{v1.20.0}{2015/03/22}{Fix bug with line number typesetting direction when using \cs{eledsection} and similar commands for RTL texts with \LuaLaTeX.}
+% \changes{v1.21.0}{2015/04/13}{\cs{AtEveryPstart} and \cs{AtEveryPend} are now compatible with \cs{autopar}}
+% \changes{v1.21.0}{2015/04/13}{Fix bug with space between columns with notes in two columns (bug added in v1.13.0).}
+% \changes{v1.21.0}{2015/04/13}{Add nocritical, noend, nofamiliar and noledgroup options.}
+% \changes{v1.21.0}{2015/04/13}{Fix bug with \cs{maxhnotesX} when using \cs{foottwocolX} or \cs{footthreecolX}.}
+% \changes{v1.21.0}{2015/04/13}{Add \cs{twolinesbutnotmore} and \cs{twolinesonlyinsamepage}.}
+% \changes{v1.21.0}{2015/04/13}{Fix bug when a \cs{Xfootnote} follows a \cs{Xendnote} in the second argument of \cs{edtext} (bug added in eledmac 1.0.0 !).}
+% \changes{v1.21.0}{2015/04/13}{Add noeledsec package option}
+% \changes{v1.21.0}{2015/04/13}{parapparatus option works now with familiar footnotes.}
+% \changes{v1.21.0}{2015/04/13}{Add \cs{beforenotesX} and \cs{beforeXnotes} features for notes set in two and three column.}
+% \changes{v1.21.0}{2015/04/13}{Debug \cs{beforenotesX} \cs{maxhnotesX} \cs{notesXwidthliketwocolumns} and \cs{afterruleX} with footnotes set in two and three columns.}
+% \changes{v1.21.0}{2015/04/13}{\cs{afterXrule} and \cs{afterruleX} features no longer create problems of overflowing at the bottom of the page.}
+% \changes{v1.21.0}{2015/04/13}{\cs{preXnotes} and \cs{prenotesX} features no longer create problems of overflowing at the bottom of the page.}
+% \changes{v1.21.0}{2015/04/13}{Fix spurious space after first page number in \cs{doendnotes}. oldprintnpnumspace option allows to come back to previous setting}
+% \changes{v1.21.0}{2015/04/13}{\cs{chapter} inside optional argument of \cs{pstart} works when typesetting parallel pages}
% \hyphenation{man-u-script man-u-scripts}
%
%
@@ -244,17 +260,16 @@
% \end{minipage}\par\endgroup}
%
% \title{\Lpack{\eledmac} \\
-% A presumptuous attempt to port \\
-% \edmac, \tabmac{} and \edstanza{} to LaTeX\thanks{This file (\dtxfilename)
+% Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename)
% has version number \fileversion, last revised \filedate.}}
%
% \author{%
-% Peter Wilson \\
-% Herries Press\thanks{%
-% \texttt{herries dot press at earthlink dot net}} \\
% Ma\"ieul Rouquette\thanks{\texttt{maieul at maieul dot net}} \\
-% {\small based on the original work by} \\
-% John Lavagnino, Dominik Wujastyk, Herbert Breger and Wayne Sullivan
+% {\small based on the original \Lpack{ledmac} by} \\
+% Peter Wilson \\
+% Herries Press \\
+% {\small which was based on the original \edmac, \tabmac{} and \edstanza{} by} \\
+% John Lavagnino, Dominik Wujastyk, Herbert Breger and Wayne Sullivan.
% }
%
% \date{}
@@ -584,9 +599,9 @@
%
% Since July~2011, ledmac is maintained by Ma\"ieul Rouquette.
%
-% Important changes were put in version 1.0, to make eledmac more easily extensible (see \ref{displayoptions} p.\pageref{displayoptions}).
+% Important changes were put in version 1.0, to make eledmac more easily extensible (see \reff{displayoptions}).
% These changes can trigger small problems with the old customization.
-% That is why a new name was selected: \emph{eledmac}. To migrate from ledmac to eledmac, please read Appendix \ref{migration} (p.\pageref{migration}).
+% That is why a new name was selected: \emph{eledmac}. To migrate from ledmac to eledmac, please read Appendix \ref{migration} (p.~\pageref{migration}).
%
% \subsubsection{List of works edited with (e)ledmac}
% A collaborative list of works edited with (e)ledmac is available on \url{https://www.zotero.org/groups/critical_editions_typeset_with_edmac_ledmac_and_eledmac/items}. Please add your own edition made with (e)ledmac.
@@ -621,15 +636,24 @@
% The package can be loaded with a number of global options which are listed here.
% It is advised to read the relevant parts of the handbook before reading this section.
% \begin{description}
-% \item[draft], if called, underline lemmas in the main text.
+% \item[draft] underlines lemmas in the main text.
% \item[ledsecnolinenumber] is deprecated.
-% \item[nopbinverse] prevent page break inside verses.
-% \item[noquotation] by default, the quotation environment is redefined inside numbered text. You can disable this redefinition with \verb|noquotation| (see \ref{noquotation} p.~\pageref{noquotation}).
-% \item[parapparatus] by default, the appparatus cannot contain paragraph breaks; this option enables paragraphing inside the apparatus.
+% \item[nocritical] disables tools for critical footnotes (\cs{Afootnote}, \cs{Bfootnote} etc.). If you do not need critical footnotes, this option lets \eledmac\ run faster.
+% It will also preserve room for other packages.
+% \item[noeledsec] disables tools for \cs{eledsection} and related commands (\reff{eledsection}).
+% \item[noend] disables tools for end footnotes (\cs{Aendnote}, \cs{Bendnote} etc.). If you do not need endnotes, this option lets \eledmac\ run faster.
+% It will also preserve room for other packages.
+% \item[nofamiliar] disables tools for familiar footnotes (\cs{footnoteA}, \cs{footnoteB} etc.). If you do not need familiar footnotes, this option lets \eledmac\ run faster.
+% It will also preserve room for other packages.
+% \item[noledgroup] \eledmac{} allows to use of (two or more) critical series of notes and (two or more) new series of normal notes inside minipage and ledgroup environments (see~\reff{ledgroup}). However, such features use up computer memory, at the expense of other processing needs. So if you do not need this feature, use \verb+noledgroup+ option. This should make \eledmac{} faster.
+% \item[nopbinverse] prevents page break inside verses.
+% \item[noquotation] by default, the quotation environment is redefined inside numbered text. You can disable this redefinition with \verb|noquotation| (see \reff{noquotation}).
+% \item[oldprintnpnumspace] is only to be used if you want to have the (bugged) behavior of \cs{doendnotes} of \Eledmac{} versions prior to v.1.21.0 (see \reff{oldprintnpnumspace})
+% \item[parapparatus] by default, the apparatus cannot contain paragraph breaks; this option enables paragraphing inside the apparatus.
% \item[series] \Lpack{eledmac} defines six levels of notes: A, B, C, D, E, Z.
% Using all these levels consumes memory space and processing speed.
% This is why, if your work does not require all of the A-E, Z series, you can narrow down the available number of series.
-% For example, if you only need A and B series, call the package with verb+series={A,B}+ option.
+% For example, if you only need A and B series, call the package with \verb+series={A,B}+ option.
% \item[widthliketwocolumns] set the width of the text disposed on one column to be the same as the width of the text disposed on two parallel columns with \Lpack{eledpar}. This is useful when alternating between normal and parallel typesetting.
% \end{description}
% \section{Text lines and paragraphs numbering}
@@ -734,15 +758,15 @@
% \AtEveryPend{\vskip\parskip}% Apply after every \Pend
% \end{verbatim}
-%. This feature is also useful when typesetting verses (see~\ref{verse} p.~\pageref{verse}) or \Lpack{eledpar} (see~\ref{eledpar} p.~\pageref{eledpar}).
+%. This feature is also useful when typesetting verses (see~\reff{verse}) or \Lpack{eledpar} (see~\reff{eledpar}).
%
% A \cs{noindent} is automatically added before this argument.
% \subsubsection{Content before every \cs{pstart} and after every \cs{pend}}
% \changes{v1.15.0}{2015/01/12}{New commands \cs{AtEveryPstart} and \cs{AtEveryPend}.}
-% \DescribeMacro{\AtEveryPstart}\DescribeMacro{\AtEveryPend}
+% \label{AtEveryPstart} \DescribeMacro{\AtEveryPstart}\DescribeMacro{\AtEveryPend}
% You can use both \cs{AtEveryPstart} and \cs{AtEveryPend}.
% Their arguments will be printed before every \cs{pstart} begins / after every \cs{pend} ends.
-% \subsubsection{Producting automatically \cs{pstart}…\cs{pend}}
+% \subsubsection{Producting automatically \cs{pstart}\ldots{}\cs{pend}}
% \DescribeMacro{\autopar}
% You can use \cs{autopar} to avoid the nuisance of this paragraph markup
% and still have every paragraph automatically numbered. The scope of the
@@ -817,7 +841,7 @@
% with this is that your line numbering will start again at zero
% with each new section. To avoid this problem, we provide
% \cs{pausenumbering} and \cs{resumenumbering} which are just
-% like \cs{endnumbering} \ldots \cs{beginnumbering}, except that
+% like \cs{endnumbering} \ldots\ \cs{beginnumbering}, except that
% they arrange for your line numbering to continue across the break.
% Use \cs{pausenumbering} only between numbered paragraphs:
% \egstart
@@ -1012,8 +1036,8 @@
% use \cs{linenumberstyle}\marg{style} to change the numbering style.
% \meta{style} must be one of:
% \begin{itemize}
-% \item[\texttt{Alph}] Uppercase letters (A\ldots Z).
-% \item[\texttt{alph}] Lowercase letters (a\ldots z).
+% \item[\texttt{Alph}] Uppercase letters (A\ldots\ Z).
+% \item[\texttt{alph}] Lowercase letters (a\ldots\ z).
% \item[\texttt{arabic}] Arabic numerals (1, 2, \ldots)
% \item[\texttt{Roman}] Uppercase Roman numerals (I, II, \ldots)
% \item[\texttt{roman}] Lowercase Roman numerals (i, ii, \ldots)
@@ -1028,8 +1052,13 @@
% When inserted into a numbered line the macro \cs{skipnumbering} causes
% the numbering of that particular line to be skipped; that is, the line
% number is unchanged and no line number will be printed.
+% Note that if you use it in \cs{stanza}, you must call it at the beginning of the verse.
%
-%
+% \DescribeMacro{\hidenumbering}
+% \changes{v1.21.0}{2015/04/13}{Add \cs{hidenumbering}}
+% When inserted into a numbered line the macro \cs{hidenumbering} causes
+% the number for that particular line to be hidden; namely, no line number will print.
+% Note that if you use it in \cs{stanza}, you must call it at the beginning of the verse.
% \section{The apparatus}
% \subsection{Commands}
% \DescribeMacro{\edtext}
@@ -1107,10 +1136,11 @@
% \DescribeMacro{\Cfootnote}
% \DescribeMacro{\Dfootnote}
% \DescribeMacro{\Efootnote}
-% Five separate series of the footnotes are maintained; each macro
-% taking one argument like \cs{Afootnote}\marg{text}. When all five
+% \DescribeMacro{\Zfootnote}
+% Six separate series of the footnotes are maintained; each macro
+% takes one argument like \cs{Afootnote}\marg{text}. When all of the five
% are used, the \texttt{A} notes appear in a layer just below the main
-% text, followed by the rest in turn, down to the \texttt{E} notes at
+% text, followed by the rest in turn, down to the \texttt{Z} notes at
% the bottom. These are the main macros that you will use to construct
% the critical apparatus of your text. The package provides five
% layers of notes in the belief that this will be adequate for
@@ -1122,7 +1152,7 @@
%An optional argument can be added before the text of the footnote. Its value is a comma separated list of options.
% \label{fulllines}The available options are:
% \begin{itemize}
-% \item \verb|fulllines| to disable \cs{twolines} and \cs{morethantwolines} features for this note (cf. \ref{twolines} p.~\pageref{twolines}).
+% \item \verb|fulllines| to disable \cs{twolines} and \cs{morethantwolines} features for this note (cf. \reff{twolines}).
% \item \verb|nonum| to disable line numbering for this note.
% \item \verb|nosep| to disable the lemma separator for this note.
% \end{itemize}
@@ -1134,12 +1164,13 @@
% \DescribeMacro{\Cendnote}
% \DescribeMacro{\Dendnote}
% \DescribeMacro{\Eendnote}
-% The package also maintains five separate series of endnotes.
+% \DescribeMacro{\Zendnote}
+% The package also maintains six separate series of endnotes.
% Like footnotes each macro takes a single argument like
% \cs{Aendnote}\marg{text}.
% Normally, none of them are printed: you must use the
% \cs{doendnotes} macro described below
-% (p.\,\pageref{doendnotes}) to call for their
+% (\reff{doendnotes}) to call for their
% output at the appropriate point in your document.
%
% By default, no paragraph can be made in the notes of critical apparatus.
@@ -1200,7 +1231,7 @@
% specify a note with an abbreviated lemma using \cs{lemma} and
% \cs{linenum}. The numbers used in \cs{linenum} need not be
% entered manually; you can use the `\texttt{x-}' symbolic cross-referencing
-% commands below (p.\,\pageref{crossref}) to compute them
+% commands below (\reff{crossref}) to compute them
% automatically.
%
% Similarly, being able to manually change the lemma's font specifier
@@ -1302,19 +1333,21 @@
% \changes{v1.0}{2012/09/15}{New generic commands to customize footnote display.}
% Since version 1.0, some commands can be used to change the display of the footnotes. All can have an optional argument \oarg{s}, which is the letter of the series --- or a list of letters separated by comma --- depending on which option is applied.
%
-% When a length, noted \meta{l}, is used, it can be stretchable: \verb|a plus b minus c|. The final length |m| is calculated by \LaTeX{} to have: $a-c \leq m \leq a+b$. If you use relative unity\footnote{Like \verb|em| which is the width of a M.}, it will be relative to fontsize of the footnote.
+% When a length, noted \meta{l}, is used, it can be stretchable: \verb|a plus b minus c|. The final length |m| is calculated by \LaTeX{} to have: $a-c \leq m \leq a+b$. If you use some relative unity\footnote{Like \verb|em| which is the width of a mg.}, it will be relative to fontsize of the footnote, except for commands concerning the place kept by the notes --- including blank space.
%
% \subsubsection{Control line number printing}
% \DescribeMacro{\numberonlyfirstinline}
% \changes{v1.0.1}{2012/09/16}{Correction on \cs{numberonlyfirstinline} with lineation by pstart or by page.}
-% By default, the line number is printed in every note. If you want to print it only the first time for a value (i.e one time for line 1, one time for line 2 etc.), you can use \cs{numberonlyfirstinline}\oarg{s}. Use \cs{numberonlyfirstinline}\oarg{s}\verb+[false]+ to cancel it (\verb|<s>| can be empty if you want to disable it for every series).
+% By default, the line number is printed in every note. If you want to print it only the first time for a given line number (i.e one time for line 1, one time for line 2 etc.), you can use \cs{numberonlyfirstinline}\oarg{s}.
+%
+% Use \cs{numberonlyfirstinline}\oarg{s}\verb+[false]+ to disable this (\verb|<s>| can be empty if you want to disable it for every series).
%
% \DescribeMacro{\numberonlyfirstintwolines}
% \changes{v1.1}{2012/09/25}{Add \cs{numberonlyfirstintwolines}}
% Suppose you have a lemma on line~2 and a lemma between line~2 and line~3.
% With \cs{numberonlyfirstinline}, the second lemma is considered to be on the same line as the first lemma.
% But if you use both \cs{numberonlyfirstinline}\oarg{s} and \cs{numberonlyfirstintwolines}\oarg{s}, the distinction is made.
-% Use \cs{numberonlyfirstintwolines}\oarg{s}\verb+[false]+ to cancel it (\verb|<s>| can be empty if you want to disable it for every series).
+% Use \cs{numberonlyfirstintwolines}\oarg{s}\verb+[false]+ to disable this (\verb|<s>| can be empty if you want to disable it for every series).
%
% \changes{v1.20.0}{2015/03/22}{Add \cs{twolines} and \cs{morethantwolines} hooks}
% \label{twolines}
@@ -1331,11 +1364,30 @@
% \end{verbatim}
% Will print ``1sq.'' for a lemma which falls on lines 1-2 and ``1sqq.'' for a lemma which falls on lines 1-4.
%
-% If you use \cs{twolines} without setting \cs{morethantwolines}, the \verb|<text>| argument of \cs{twolines} will be used for lemmas which fall on three and more lines.
+% \DescribeMacro{\morethantwolines} If you use \cs{twolines} without setting \cs{morethantwolines}, the \verb|<text>| argument of \cs{twolines} will be used for lemmas which fall on three or more lines.
+%
+% However, if you want to use a short form (when the lemma overlaps two lines, but not more than two), use \cs{twolinesbutnotmore}\oarg{series}.
+%
+% It is possible to disable \cs{twolinesbutnotmore}\oarg{series} with \cs{twolinesbutnotmore}\oarg{series}\verb+[false]+.
+%
+% When you use lineation by page, the final page number, if different from the initial page number,
+% will not be printed, because the final page number is included in the \cs{Xendtwolines} symbol.
+%
+% \DescribeMacro{\twolinesonlyinsamepage}
+% However, you can force print the final page number with\\
+% \cs{twolinesonlyinsamepage}\oarg{series}.
+%
+% Use \cs{twolinesonlyinsamepage}\oarg{series}\verb+[false]+ to disable this.
+%
+% You can disable \cs{twolines} and related for a specific note by using the `[fulllines]` argument in the note macro cf.~\reff{fulllines}.
+%
+% \label{Xendtwolines}\changes{v1.21.0}{2015/04/13}{Add \cs{Xendtwolines}, \cs{Xendmorethantwolines}, \cs{Xendtwolinesbutnotmore} and \cs{Xendtwolinesonlyinsamepage}.}
+% \DescribeMacro{\Xendtwolines}\DescribeMacro{\Xendmorethantwolines}\DescribeMacro{\Xendtwolinesbutnotmore}
+% For endnotes, use \cs{Xendtwolines}; \cs{Xendmorethantwolines}; \cs{Xendtwolinesbutnotmore}; \cs{Xendtwolinesonlyinsamepage} instead of \cs{twolines}; \cs{morethantwolines}; \cs{twolinesbutnotmore}; \cs{twolinesonlyinsamepage}.
+%
%
-% You can disable this option for a specific note by using the `[fulllines]` argument in the note macro cf.~\ref{fulllines} p.~\pageref{fulllines}.
% \DescribeMacro{\symlinenum}
-% For setting a particular symbol in place of the line number, you can use \cs{symlinenum}\oarg{s}\marg{symbol} in combination with \cs{numberonlyfirstinline}\oarg{s}. From the second lemma of the same line, the symbol will be used instead of line number.
+% For setting a particular symbol in place of the line number, you can use \cs{symlinenum}\oarg{s}\marg{symbol} in combination with \cs{numberonlyfirstinline}\oarg{s}. From the second lemma of the same line, the symbol will be used instead of the line number.
%
% \DescribeMacro{\nonumberinfootnote}
% You can use \cs{nonumberinfootnote}\oarg{s} if you don't want to have the line number in a footnote. To cancel it, use \cs{nonumberinfootnote}\oarg{s}\verb+[false]+.
@@ -1449,12 +1501,20 @@
%
%
% \subsubsection{Styles of notes content}
+% \changes{v1.21.0}{2015/04/13}{Add \cs{Xparindent} and \cs{hangindentX}}
+% \DescribeMacro{\Xparindent}
+% By default, \Eledmac{} does not add indentation before the paragraphs inside critical footnotes.
+% Use \cs{Xparindent}\oarg{series} to enable indentation.
+%
+% \DescribeMacro{\parindentX}
+% By default, \Eledmac{} does not add indentation before the paragraphs inside familiar footnotes.
+% Use \cs{parindentX}\oarg{series} to enable indentation.
%
% \DescribeMacro{\Xhangindent}
% For critical notes NOT paragraphed you can define an indent with \cs{Xhangindent}\oarg{s}\marg{l}, which will be applied in the second line of notes. It can help to make distinction between a new note and a break in a note. The default value is 0~pt.
%
% \DescribeMacro{\hangindentX}
-% For familiar notes NOT paragraphed you can define an indent with \cs{Xhangindent}\oarg{s}\marg{l}, which will be applied in the second line of notes. It can help to make a distinction between a new note and a break in anote.
+% For familiar notes NOT paragraphed you can define an indentation with \cs{Xhangindent}\oarg{s}\marg{l}, which will be applied in the second line of notes. It can help to make a distinction between a new note and a break in a note.
%
% \subsubsection{Arbitrary code at the beginninging of notes}
% \changes{v1.1}{2012/09/25}{New hook to add arbitrary code at the beginning of the notes}
@@ -1476,7 +1536,24 @@
% \DescribeMacro{\bhookXendnote}
% \cs{bhookXendnote}\oarg{series}\marg{code} is to be used at the beginning of the endnotes.
%
-% \subsubsection{Options for notes in columns}
+% \subsubsection{Options for footnotes in columns}
+% \paragraph{Alignement}
+% \changes{v1.21.0}{2015/04/13}{Add \cs{Xcolalign} and \cs{colalignX} hooks}
+% By default, texts in footnotes in two or three columns are flushed left without hyphenation.
+% However, you can change this with \cs{Xcolalign}\oarg{s}\marg{code}, for critical footnotes, and \cs{colalignX}\oarg{s}\marg{code}, for familiar footnotes.
+%
+% \verb+<code>+ must be one of the following command:
+% \begin{description}
+% \item[\cs{justifying}] to have text justified, as usual with \LaTeX. You can also let \verb+<code>+ empty.
+% \item[\cs{raggedright}] to have text left aligned, but \emph{without hyphenation}. That is the default \Lpack{eledmac} setting.
+% \item[\cs{RaggedRight}] to have text left aligned \emph{with hyphenation}.
+% \item[\cs{raggedleft}] to have text right aligned, but \emph{without hyphenation}.
+% \item[\cs{RaggedLeft}] to have text right aligned \emph{with hyphenation}.
+% \item[\cs{centering}] to have text centered, but \emph{without hyphenation}.
+% \item[\cs{Centering}] to have text centered \emph{with hyphenation}.
+% \end{description}
+%
+% \paragraph{Size of the columns}
% For the following four macros, be careful that the columns are made from right to left.
%
% \DescribeMacro{\hsizetwocol}
@@ -1529,7 +1606,6 @@
%
% \textbf{Be careful, the standard \LaTeX\ footnote rule, which is used by \Lpack{eledmac}, adds 2.6pt. These 2.6pt are not changed by this command.}
%
-% Be careful with this setting: it can place notes by the page number, at the bottom of the page.
%
% \DescribeMacro{\afterruleX}
% You can change the vertical space printed after the rule of the familiar notes with \cs{beforenotesX}\oarg{s}\marg{l}.
@@ -1537,7 +1613,6 @@
%
% \textbf{Be careful, the standard \LaTeX\ footnote rule, which is used by \Lpack{eledmac}, adds 2.6pt. These 2.6pt are not changed by this command.}
%
-% Be careful with this setting: it can place notes by the page number, at the bottom of the page.
%
% \DescribeMacro{\preXnotes}
% You can set the space before the first series of critical notes printed on each page
@@ -1546,7 +1621,6 @@
% You can disable this feature by setting the length to 0pt.
%
%
-% Be careful with this setting: it can place notes by the page number, at the bottom of the page.
%
% \DescribeMacro{\prenotesX}
% You can want the space before the first printed (in a page) series of familiar notes not to be the same as before other series. Default value is \verb+0pt+.
@@ -1554,7 +1628,6 @@
% You can disable this feature by setting the length to 0~pt.
%
%
-% Be careful with this setting: it could make the notes be written on the bottom pages number.
% \DescribeMacro{\maxhXnotes}\label{maxhXnotes}
% By default, one series of critical notes can take 80\% of the page size, before being broken to the next page.
% If you want to change the size use \cs{maxhXnotes}\oarg{s}\marg{l}.
@@ -1582,7 +1655,7 @@
% {\tt \bslash break}, or {\tt \bslash penalty=-10000}. If
% you must have a line-break for some obscure reason, just suggest
% the break very strongly: {\tt \bslash penalty=-9999} will do
-% the trick. Page \pageref{nobreak} explains why this restriction
+% the trick. \reff{nobreak} explains why this restriction
% is necessary.}
%
% \changes{v1.13.0}{2014/09/16}{Add \cs{Xnoteswidthliketwocolumns} and \cs{notesXwidthliketwocolumns}}
@@ -1681,12 +1754,26 @@
% formatted in the same way.
%
%
+% \subsection{Changing series}
+% \subsubsection{Create a new series}\label{newseries}
%
-% \subsection{Create a new series}\label{newseries}
-%
-% If you need more than 5 series of critical footnotes you can
+% If you need more than six series of critical footnotes you can
% create extra series, using \cs{newseries} command. For example to create G and H series \cs{newseries}\verb+G,H+.
+%
+% \subsubsection{Delete series}
+% As the number of series which are defined increases, \Eledmac{} gets slower.
+% If you do not need all of the six standard series (A, B, C, D, E, Z),
+% you can load the package with the \verb+series+ option.
+% For example if you need only series~A and~B, use:
+% \begin{verbatim}
+% \usepackage[series={A,B}]{eledmac}
+% \end{verbatim}
+% \subsubsection{Series order}
+% The default series order is the one called with the \verb+series+ option of the package, or, if this option is not used, A, B, C, D, E, Z.
+% Series order determines footnotes order.
%
+% \DescribeMacro{seriesatbegin}\DescribeMacro{seriesatend} However in some specific cases, you need to change the series order at some point inside the document.
+% You can use \cs{seriesatbegin}\marg{<s>} to pull up a given series \verb+<s>+ to the beginning, or \cs{seriesatend}\marg{<s>} to push it down to the end.
% \section{Verse}\label{verse}
%
%
@@ -1737,7 +1824,7 @@
% 0 but is never used.
%
% If you want the hanging verse to be flush right,
-% you can use \cs{hanginsymbol}: see p.~\pageref{hfillhanging}.
+% you can use \cs{hanginsymbol}: see p.~\reff{hfillhanging}.
%
% Enumeration is by stanza lines, not by print lines.
% In the above example the lines are indented one unit, two units, one unit,
@@ -1757,7 +1844,7 @@
%\setstanzaindents{0,1,0,1,0,1,0,1,0,1,0}
% \end{verbatim}
%
-% \textbf{Be careful: the feature change in eledmac 1.5.1. See \ref{change151} p.~\pageref{change151}.}
+% \textbf{Be careful: the feature is changed in eledmac 1.5.1. See \reff{change151}.}
%
%If you don't use the \verb+stanzaindentsrepetition+ counter, make sure you have at least one more numerical
% entry in \verb+\setstanzavalues+ than the number of lines in the stanza.
@@ -1821,7 +1908,7 @@
% \end{verbatim}
% \subsection{Long verse and page break}
% If you want to prevent page breaks inside long verses, use the option \verb+nopbinverse+ when loading package, or use \cs{lednopbinversetrue}.
-% Read \ref{lednopbinversetrue} p.~\pageref{lednopbinversetrue} for further details.
+% Read \reff{lednopbinversetrue} for further details.
% \subsection{Various tools}
% \DescribeMacro{\ampersand}
% If you need to print an \& symbol in a stanza, use the \verb?\ampersand?
@@ -1884,7 +1971,7 @@
% in a minipage but unlike with \verb?\footnote? the numbering scheme is
% unaltered.
%
-% \DescribeEnv{ledgroup}
+% \DescribeEnv{ledgroup}\label{ledgroup}
% Minipages, of course, aren't broken across pages. Footnotes in a \verb?ledgroup?
% environment are typeset at the end of the environment, as with minipages,
% but the environment includes normal page breaks. The environment makes no
@@ -1933,7 +2020,7 @@
% macro that's called to print each note. It uses
% \cs{select@lemmafont}
% to select fonts, just as the footnote
-% macros do (see p.\,\pageref{notefonts} above).
+% macros do (see \reff{notefonts} above).
%
% As endnotes may be printed at any point in the document they always
% start with the page number of where they were specified. The
@@ -1941,10 +2028,7 @@
% Its default definition is: \\
% \verb?\newcommand*{\printnpnum}[1]{p.#1) }?
%
-% \DescribeMacro{\noendnotes}
-% If you aren't going to have any endnotes, you can say \cs{noendnotes}
-% in your file, before the first \cs{beginnumbering}, to suppress the
-% generation of an unneeded \file{.end} file.
+% If you do not use endnotes, you should use \verb+noend+ option when loading \Lpack{eledpar}.
%
% \section{Cross referencing}
% \changes{v1.12.0}{2014/08/05}{Add hyperlink to crossref (needs \Lpack{hyperref} package).}
@@ -1954,8 +2038,8 @@
% line number references to those places elsewhere
% using those labels.
%
-%
-%
+% \subsection{Basic use}
+%
% \DescribeMacro{\edlabel}
% First you place a label in the text using the command
% \cs{edlabel}\marg{lab}. \meta{lab} can be almost anything you like, including
@@ -2001,6 +2085,14 @@
% unafraid}{\Afootnote{Of the mouse, that is.}}
% \end{verbatim}
%
+% If you add the \cs{edlabel} inside some \cs{Xfootnote} command,
+% it will refer to that note, and a suffix \emph{n} will be added to the reference.
+% You can redefine this suffix by redefining the command \cs{ledinnotemark}.
+% Its actual definition is:
+% \begin{verbatim}
+% \newcommand{\ledinnotemark}[1]{#1\emph{n}}
+% \end{verbatim}
+% Where \verb+#1+ stands for the reference.
% \DescribeMacro{\xpageref}
% \DescribeMacro{\xlineref}
% \DescribeMacro{\xsublineref}
@@ -2024,7 +2116,7 @@
% do the necessary processing of the \file{.aux} file, and the \cs{x...}
% ones cannot.
% \item When \Lpack{hyperref} is loaded, the hyperref link won't be added. (Indeed,
-% it's not a limitation, but a feature.
+% it's not a limitation, but a feature.)
% \end{itemize}
%
% \DescribeMacro{\xxref}
@@ -2037,7 +2129,7 @@
% lines, for use in the second argument of \cs{edtext}.
% It takes two arguments, both of which are
% labels: e.g., \verb"\xxref{mouse}{elephant}". It calls \cs{linenum}
-% (q.v., p.\,\pageref{linenum} above) and sets the beginning page,
+% (q.v., \reff{linenum} above) and sets the beginning page,
% line, and sub-line numbers to those of the place where
% \verb"\edlabel{mouse}" was placed, and the ending numbers to those where
% \verb"\edlabel{elephant}" occurs.
@@ -2055,17 +2147,82 @@
% number here is zero. It is usually best to collect your
% \cs{edmakelabel} statements near the top of your document, so that
% you can see them at a glance.
-%
+% \subsection{Normal \LaTeX\ cross-referencing}
% \DescribeMacro{\label}
% \DescribeMacro{\ref}
% \DescribeMacro{\pageref}
% \changes{v0.2.1}{2003/08/25}{Added text about normal labeling}
% The normal \cs{label}, \cs{ref} and \cs{pageref} macros may be used
% within numbered text, and operate in the familiar fashion.
+% \subsection{References to lines commented in the apparatus}
+% \changes{v1.21.0}{2015/03/09}{Add \cs{applabel} and related}
+% You may want to make a cross-reference to a passage that is referred to by \cs{edtext}.
+% \Eledmac{} provides specific tools for this scenario.
+%
+% \DescribeMacro{\applabel}
+% If you use \cs{applabel}\marg{label} inside the second argument of a \cs{edtext},
+% \Eledmac\ will add a \cs{edlabel} at the beginning and end of the marked passage.
+% The label at the beginning of the passage will have the title \verb+<label>:start+, while the label at the end will have the title \verb+<label>:end+.
+%
+% If you use \cs{linenum} (\reff{linenum}) to
+% refer to these labels, \Eledmac\ will use your line settings to refer
+% to the passage.
+%
+% \DescribeMacro{\appref}\DescribeMacro{\apprefwithpage}
+% You can also use \cs{appref}\marg{label} and
+% \cs{apprefwithpage}\marg{label} to refer to these lines.
+% The first one will print the lines as they are printed in the critical footnotes,
+% while the second will print the lines as they are printed in endnotes.
+%
+% \DescribeMacro{\apprefprefixsingle}\DescribeMacro{\apprefprefixmore}
+% If you redefine \cs{apprefprefixsingle}, its content will be printed
+% before the line numbers of a \cs{appref}-reference.
+% If you redefine \cs{apprefprefixmore}, its content will be printed
+% before the line numbers, if you refer to more than one line.
+%
+% For example, you may use:
+% \begin{verbatim}
+% \renewcommand{\apprefprefixsingle}{line~}
+% \renewcommand{\apprefprefixmore}{lines~}
+% \end{verbatim}
+%
+% Note that if \cs{apprefprefixmore} is empty, \cs{apprefprefixsingle} will used in any case.
+%
+% \DescribeMacro{\twolinesappref}
+% \DescribeMacro{\morethantwolinesappref}
+% \DescribeMacro{\twolinesbutnotmoreappref}
+% \DescribeMacro{\twolinesonlyinsamepage}
+% If you use \cs{twolines}, \cs{morethantwolines}, \cs{twolinesbutnotmore} and/or \cs{twolinesonlyinsamepage}
+% (\reff{twolines}) \emph{without the optional
+% series argument}, the setting will also be available for \cs{appref}.
+%
+% The commands \cs{twolinesappref}\marg{text},
+% \cs{morethantwolinesappref}\marg{text}, \cs{twolinesbutnotmoreappref} \cs{twolinesonlyinsamepageappref} can also be used, if you
+% only want to change the reference style of \cs{appref}.
%
+% It is possible to disable this setting for a specific \cs{appref} command by
+% using \cs{appref}\verb+[fulllines]+\marg{label}.
%
+%
+% \DescribeMacro{\Xendtwolinesapprefwithpage}
+% \DescribeMacro{\Xendmorethantwolinesapprefwithpage}
+% \DescribeMacro{\Xendtwolinesbutnotmoreapprefwithpage}
+% \DescribeMacro{\Xendtwolinesonlyinsamepageapprefwithpage}
+% If you use one of \cs{Xendtwolines}, \cs{Xendmorethantwolines}, \cs{Xendtwolinesbutnotmore},
+% \cs{Xendtwolinesonlyinsamepage})
+% (\reff{Xendtwolines}) \emph{without the optional
+% series argument}, the setting will also be available for \cs{apprefwithpage}.
+%
+% The commands \cs{Xendtwolinesappref}\marg{text},
+% \cs{Xendmorethantwolinesappref}\marg{text}, \cs{Xendtwolinesbutnotmoreappref}, \cs{Xendtwolinesonlyinsamepageappref} can also be used, if you
+% only want to change the reference style of \cs{apprefwithpage}.
+%
+% It is possible to disable this setting for a specific \cs{apprefwithpage} command by
+% using \cs{apprefwithpage}\verb+[fulllines]+\marg{label}.
+%
% \section{Side notes}
%
+%
% The \cs{marginpar} command does not work in numbered text. Instead
% the package provides for non-floating sidenotes in either margin.
%
@@ -2150,10 +2307,11 @@
% \DescribeMacro{\footnoteC}
% \DescribeMacro{\footnoteD}
% \DescribeMacro{\footnoteE}
+% \DescribeMacro{\footnoteZ}
% As well as the standard \LaTeX\ footnotes generated via \cs{footnote},
% the package also provides
-% five series of additional footnotes called \cs{footnoteA} through
-% \cs{footnoteE}. These have the familiar marker in the text, and
+% six series of additional footnotes called \cs{footnoteA} through
+% \cs{footnoteZ}. These have the familiar marker in the text, and
% the marked text at the foot of the page can be formated using
% any of the styles described for the critical footnotes. Note that
% the `regular' footnotes have the series letter at the end of the macro
@@ -2166,9 +2324,9 @@
% \DescribeMacro{\footthreecolX}
% Each of the \verb?\foot...X? macros takes one argument which is the
% series letter (e.g., \texttt{B}). \cs{footnormalX} is the typical
-% footnote format. With \cs{footparagraphX} the series is typeset a one
-% paragraph, with \cs{foottwocolX} the notes are in two columns, and are in
-% three columns with \cs{foothreecolX}.
+% footnote format. With \cs{footparagraphX} the series is typeset as one
+% paragraph, with \cs{foottwocolX} the notes are set in two columns, and are
+% set in three columns with \cs{footthreecolX}.
%
% \DescribeMacro{\thefootnoteA}
% \DescribeMacro{\bodyfootmarkA}
@@ -2188,7 +2346,7 @@
%
% There are similar command triples for the other series.
%
-% Additional footnote series can be easily defined: you just have to use \cs{newseries}, defined above (see \ref{newseries} p.\pageref{newseries}).
+% Additional footnote series can be easily defined: you just have to use \cs{newseries}, defined above (see \reff{newseries}).
%
% \subsection{Position of the familiar footnotes}
% \DescribeMacro{\fnpos}\DescribeMacro{\mpfnpos}
@@ -2229,10 +2387,18 @@
% The page \& linenumber combination is written as |page\pagelinesep line|,
% where the default definition is |\newcommand{\pagelinesep}{-}| so that
% an item on page 3, line 5 will be noted as being at |3-5|. You can
-% renew |\pagelinesep| to get a different separator (but it just so happens
-% that |-| is the default
-% separator used by the \textsc{MakeIndex} program).
+% renew |\pagelinesep| to get a different separator.
+%
+% |-| is the default
+% separator used by the \textsc{MakeIndex} program.
+%
+% Consequently, if you want to use an other \cs{pagelinesep}, you have to configure your \verb+.ist+ index style file. For example if you use \verb+:+ as separator\footnote{For further detail, you can read \url{http://tex.stackexchange.com/a/32783/7712}.}.
+% \begin{verbatim}
+% page_compositor ":"
+% delim_r ":
+% \end{verbatim}
%
+% Read the \textsc{MakeIndex} program's handbook about the \verb+.ist+ file.
% \DescribeMacro{\edindexlab}
% The |\edindex| process uses a |\label|/|\ref| mechanism to get
% the correct line number. It automatically generates labels
@@ -2516,7 +2682,7 @@
% \changes{v1.12.0}{2014/08/05}{New sectioning commands.}\label{eledsection}
% \subsection{Sectioning commands without line numbers or critical notes}
% The standard sectioning commands (\cs{chapter}, \cs{section} etc.) can be used inside numbered text.
-% In this case, you must call them as optional argument of \cs{pstart} (\ref{pstart:optionalarg} p.~\pageref{pstart:optionalarg}:
+% In this case, you must call them as an optional argument of \cs{pstart} (\reff{pstart:optionalarg}):
% \begin{verbatim}
% \pstart[\section{section}]
% Pstart content.
@@ -2536,7 +2702,7 @@
% \item \cs{ledsubsubsection}\oarg{text}\marg{critical text}
% \item \cs{ledsubsubsection*}
% \end{itemize}
-% These commands are deprecated, and won't be maintened anymore, because of a bad conception.
+% \label{eledsection} These commands are deprecated, and won't be maintened anymore, because of a bad concept.
% Since version 1.12.0, you have to use the following commands:
% \begin{itemize}
% \item \cs{eledchapter}\oarg{text}\marg{critical text}
@@ -2566,9 +2732,8 @@
%
% For technical reasons, the page break before \cs{elechapter} can't be added automatically. You have to insert it manually via \cs{beforeeledchapter}, which must be called outside of a numbering section.
% \DescribeMacro{\noeledsec}
-% If you aren't going to have any \cs{eledxxx} commands, you can say \cs{noeledsec}
-% in your file, before the first \cs{beginnumbering}, to suppress the
-% generation of unneeded \file{.eledsec} file.
+% If you aren't going to have any \cs{eledxxx} commands, then load \Eledmac{} with \cs{noeledsec} option.
+% That will suppress the generation of unneeded \file{.eledsec} file, keep memory and make \Lpack{eledmac} faster.
% \section{Quotation environments}
% The \verb+quotation+ and \verb+quote+ environment can be used so that same definition/note appears both inside and outside a numbered section.
% The typographical consequences will resemble the outside numbered sections, based on the styles of the \emph{book} class.
@@ -2669,9 +2834,9 @@
% doesn't crop up at all often.
%
% The restriction on explicit line-breaking in paragraphed footnotes,
-% mentioned in a footnote \ref{nobreaks}, p.\,\pageref{nobreaks}, and
-% described in more detail on p.\,\pageref{nobreaks-detail}, really is a
-% nuisance if that's something you need to do. There are some possible
+% mentioned in a footnote \reff{nobreaks}, and
+% described in more detail on \reff{nobreaks-detail}, really is a
+% nuisance if that is something you need to do. There are some possible
% solutions, described by Michael Downes\index{Downes, Michael},
% but this area remains unsatisfactory.
%
@@ -2850,7 +3015,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{eledmac}[2015/03/22 v1.20.0 LaTeX port of EDMAC]%
+\ProvidesPackage{eledmac}[2015/04/13 v1.21.0 LaTeX port of EDMAC]%
% \end{macrocode}
%
% Generally, these are the modifications to the original.
@@ -2869,6 +3034,12 @@
%
% \subsection{Package options}
% \begin{macro}{\ifledfinal}
+% \begin{macro}{\ifoldprintnpnumspace@}
+% \begin{macro}{\ifnocritical@}
+% \begin{macro}{\if@noeled@sec}
+% \begin{macro}{\ifnoend@}
+% \begin{macro}{\ifnofamiliar@}
+% \begin{macro}{\ifnoledgroup@}
% \begin{macro}{\ifparapparatus@}
% \begin{macro}{\ifnoquotation@}
% \begin{macro}{\iflednopbinverse}
@@ -2881,6 +3052,12 @@
% \changes{v1.13.0}{2014/09/16}{Added widthliketwocolumns option}
% \begin{macrocode}
\newif\ifledfinal
+\newif\ifoldprintnpnumspace@
+\newif\ifnocritical@%
+\newif\if@noeled@sec%
+\newif\ifnoend@%
+\newif\ifnofamiliar@%
+\newif\ifnoledgroup@%
\newif\ifparapparatus@
\newif\ifnoquotation@
\newif\iflednopbinverse
@@ -2890,7 +3067,20 @@
\parapparatus@false
\RequirePackage{xkeyval}
\DeclareOptionX{series}[A,B,C,D,E,Z]{\xdef\default@series{#1}}
+\DeclareOptionX{noeledsec}{\@noeled@sectrue}
+\DeclareOptionX{nocritical}{\nocritical@true}%
+\DeclareOptionX{nofamiliar}{\nofamiliar@true}%
+\DeclareOptionX{noledgroup}{\noledgroup@true}%
+\DeclareOptionX{noend}{%
+ \let\l@dend@open\@gobble%
+ \let\l@d@end\relax
+ \let\l@dend@close\relax%
+ \global\let\l@dend@stuff=\relax%
+ \global\chardef\l@d@end=16%
+ \noend@true%
+}%
\DeclareOptionX{noquotation}{\noquotation@true}
+\DeclareOptionX{oldprintnpnumspace}{\oldprintnpnumspace@true}
\DeclareOptionX{final}{\ledfinaltrue}
\DeclareOptionX{draft}{\ledfinalfalse}
\DeclareOptionX{parapparatus}{\parapparatus@true}
@@ -2916,6 +3106,12 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% Loading package \emph{xargs} to declare commands with optional arguments.
% \emph {Etoolbox} is also used to make code clearer - for example, in dynamic command names (which can replace \cs{csname} etc.).
% Use \emph{suffix} to declare commands with a starred version, \Lpack{xstring} to work with strings and \emph{iflutex} to test if LuaLaTeX is running, and \Lpack{ragged2e} to manage ragging for paragraphed notes.
@@ -3042,7 +3238,7 @@
% \begin{macro}{\led@err@edtextoutsidepstart}
% \begin{macrocode}
\newcommand*{\led@err@edtextoutsidepstart}{%
- \eledmac@error{\string\edtext\space outside numbered paragraph (\pstart…\pend)}{\@ehc}}%
+ \eledmac@error{\string\edtext\space outside numbered paragraph (\pstart\ldots\pend)}{\@ehc}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\led@mess@NotesChanged}
@@ -3159,16 +3355,20 @@
% \end{macro}
%
% \begin{macro}{\led@warn@DuplicateLabel}
+% \begin{macro}{\led@warn@AppLabelOutEdtext}
% \begin{macro}{\led@warn@RefUndefined}
% \begin{macrocode}
\newcommand*{\led@warn@DuplicateLabel}[1]{%
\eledmac@warning{Duplicate definition of label `#1' on page \the\pageno.}}
+\newcommand*{\led@warn@AppLabelOutEdtext}[1]{%
+ \eledmac@warning{\string\applabel\space outside of \string\edtext\space `#1' on page \the\pageno.}}%
\newcommand*{\led@warn@RefUndefined}[1]{%
\eledmac@warning{Reference `#1' on page \the\pageno\space undefined.
Using `000'.}}
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\led@warn@NoMarginpars}
% \begin{macrocode}
@@ -3238,18 +3438,30 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \begin{macro}{\led@war@ledsetnormalparstuffDeprecated}
+% \begin{macro}{\led@war@noeledsecDeprecated}
% \begin{macro}{\led@war@FalseverseDeprecated}
% \begin{macro}{\led@war@ledxxxDeprecated}
+% \begin{macro}{\led@war@noendnotesDeprecated}
% \begin{macrocode}
-\newcommand{\led@war@FalseverseDeprecated}{%
- \eledmac@warning{\string\falseverse\space deprecated. Look at \string\newverse\space instead.}%
+\newcommand{\led@war@noeledsecDeprecated}[0]{%
+ \eledmac@warning{\string\noeledsec\space deprecated. Use `noeledsec` option instead.}%
+}%
+\newcommand{\led@war@ledsetnormalparstuffDeprecated}{%
+ \eledmac@warning{\string\ledsetnormalparstuff\space deprecated. Look at \string\Xledsetnormalparstuff\space and \ledsetnormalparstuffX\space instead.}%
}%
\newcommand{\led@war@ledxxxDeprecated}[1]{%
\eledmac@warning{\string\led#1\space deprecated. Look at \string\e#1 instead.}%
}%
+\newcommand{\led@war@noendnotesDeprecated}[0]{%
+ \eledmac@warning{\string\noendnotes\space deprecated. Use `noend` option instead.}%
+}%
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \begin{macro}{\led@err@TooManyColumns}
% \begin{macro}{\led@err@UnequalColumns}
% \begin{macro}{\led@err@LowStartColumn}
@@ -3306,6 +3518,7 @@
% \subsection{Gobbling}
% \changes{v1.14.0}{2014/10/27}{Provide \cs{@gobblefour}}
% \changes{v1.14.0}{2014/10/27}{Moves gobbling command}
+% \changes{v1.21.0}{2015/04/13}{Provide \cs{@gobblefive}}
% \changes{v0.2.2}{2003/11/05}{Used \cs{providecommand} for \cs{@gobblethree}
% to avoid clash with the amsfonts package}
% \begin{macro}{\@gobblethree}
@@ -3313,6 +3526,7 @@
% \begin{macrocode}
\providecommand*{\@gobblethree}[3]{}
\providecommand*{\@gobblefour}[4]{}
+\providecommand*{\@gobblefive}[5]{}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -3685,19 +3899,25 @@
\ifx\@tempa\@tempb
\global\bypage@true
\global\bypstart@false
- \pstartinfootnote[][false]
+ \unless\ifnocritical@%
+ \pstartinfootnote[][false]%
+ \fi%
\else
\def\@tempb{pstart}%
\ifx\@tempa\@tempb
\global\bypage@false
\global\bypstart@true
- \pstartinfootnote
+ \unless\ifnocritical@%
+ \pstartinfootnote%
+ \fi%
\else
\def\@tempb{section}
\ifx\@tempa\@tempb
\global\bypage@false
\global\bypstart@false
- \pstartinfootnote[][false]
+ \unless\ifnocritical@%
+ \pstartinfootnote[][false]%
+ \fi%
\else
\led@warn@BadLineation
\fi
@@ -4475,7 +4695,7 @@
% retained this slower approach to avoid that sort of hacking
% about, but have provided the \cs{pausenumbering} and
% \cs{resumenumbering} macros to help you if you run into
-% macro memory limitations (see p.\,\pageref{pause} above).
+% macro memory limitations (see \reff{pause} above).
%
% \subsection{Commands within the line-list file}
%
@@ -4604,6 +4824,7 @@
\ifnum #1=\last@page@num
\else
\ifbypage@
+ \csxdef{lastlinenumberon@\the\last@page@num}{\the\line@num}%
\line@num=\z@ \subline@num=\z@
\fi
\page@num=#1\relax
@@ -4842,20 +5063,66 @@
% \end{macro}
%
% \begin{macro}{\n@num}
-% \begin{macro}{\n@num@reg}
-% This macro implements the \cs{skipnumbering} command. It uses
-% a new action code, namely 1007.
+% These macros implement the \cs{skipnumbering} command.
+% They use a new action code, namely 1007.
% \changes{v0.7}{2005/02/22}{Added \cs{n@num}}
+% \changes{v1.21.0}{2015/04/13}{\cs{n@num} defined only one time for both \Eledmac{} and \Eledpar{}}
+% \changes{v1.21.0}{2015/04/13}{\cs{n@num@ref} deleted}
% \begin{macrocode}
-\newcommand*{\n@num}{\n@num@reg}
-\newcommand*{\n@num@reg}{%
- \xright@appenditem{\the\absline@num}\to\actionlines@list
- \xright@appenditem{-1007}\to\actions@list}
+\newcommand*{\n@num}{%
+ \ifledRcol%
+ \xright@appenditem{\the\absline@numR}\to\actionlines@listR
+ \xright@appenditem{-1007}\to\actions@listR
+ \else%
+ \xright@appenditem{\the\absline@num}\to\actionlines@list%
+ \xright@appenditem{-1007}\to\actions@list%
+ \fi%
+}%
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\n@num@stanza}
+% This macro implements the \cs{skipnumbering} for stanza command.
+% It uses a new action code, namely 1008.
+% \begin{macrocode}
+\newcommand*{\n@num@stanza}{%
+ \ifledRcol%
+ \xright@appenditem{\the\absline@numR}\to\actionlines@listR%
+ \xright@appenditem{-1008}\to\actions@listR%
+ \else%
+ \xright@appenditem{\the\absline@num}\to\actionlines@list%%
+ \xright@appenditem{-1008}\to\actions@list%
+ \fi%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ifl@dhidenumber}
+% \begin{macro}{\hidenumbering}
+% \cs{hidenumbering} hides number in margin.
+% It uses action code 1009.
+% \begin{macro}{\h@num}
+% \begin{macrocode}
+\newif\ifl@dhidenumber
+\newcommand*{\hidenumbering}{
+ \ifledRcol%
+ \write\linenum@outR{\string\hide@num}%
+ \else%
+ \write\linenum@out{\string\hide@num}%
+ \fi%
+}%
+\newcommand*{\hide@num}{%
+ \ifledRcol%
+ \xright@appenditem{\the\absline@numR}\to\actionlines@listR%
+ \xright@appenditem{-1009}\to\actions@listR%
+ \else%
+ \xright@appenditem{\the\absline@num}\to\actionlines@list%%
+ \xright@appenditem{-1009}\to\actions@list%
+ \fi%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% \end{macro}
-%
% \begin{macro}{\@ref}
% \begin{macro}{\insert@count}
% \cs{@ref}
@@ -5213,19 +5480,36 @@
% \end{macro}
%
% \begin{macro}{\ifl@dskipnumber}
+% \begin{macro}{\ifl@dskipversenumber}
% \begin{macro}{\l@dskipnumbertrue}
% \begin{macro}{\l@dskipnumberfalse}
% \begin{macro}{\skipnumbering}
-% \begin{macro}{\skipnumbering@reg}
% In numbered text \cs{skipnumbering} will suspend the numbering
% for that particular line.
% \changes{v0.7}{2005/02/22}{Added \cs{skipnumbering} and supports}
+% \changes{v1.21.0}{2015/04/13}{\cs{skipnumbering} defined only one time for both \Eledmac{} and \Eledpar{}.}
+% \changes{v1.21.0}{2015/04/13}{Correct \cs{skipnumbering} for stanza.}
+% \changes{v1.21.0}{2015/04/13}{Delete \cs{skipnumbering@reg}.}
% \begin{macrocode}
\newif\ifl@dskipnumber
-\newcommand*{\skipnumbering}{\skipnumbering@reg}
-\newcommand*{\skipnumbering@reg}{%
- \write\linenum@out{\string\n@num}%
- \advanceline{-1}}
+\newif\ifl@dskipversenumber%
+\newcommand*{\skipnumbering}{
+ \ifledRcol%
+ \ifinstanza%
+ \write\linenum@outR{\string\n@num@stanza}%
+ \else%
+ \write\linenum@outR{\string\n@num}%
+ \fi%
+ \advanceline{-1}%
+ \else%
+ \ifinstanza%
+ \write\linenum@out{\string\n@num@stanza}%
+ \else%
+ \write\linenum@out{\string\n@num}%
+ \fi%
+ \advanceline{-1}%
+ \fi%
+}%
% \end{macrocode}
% \end{macro}
@@ -5305,7 +5589,7 @@
% Side effects of our line-numbering code make it impossible to use
% the usual footnote macros directly within a paragraph whose lines are
% numbered (see comments to
-% \cs{do@line}, p.\,\pageref{doline}).
+% \cs{do@line}, \reff{doline}).
% Instead, the appropriate note-generating command
% is appended to the list macro \cs{inserts@list}, and when \cs{pend}
% completes the paragraph it inserts all the notes at the proper places.
@@ -5515,7 +5799,7 @@
% \begin{macrocode}
\newcommand{\edtext}[2]{\leavevmode%
% \end{macrocode}
-% Then, check if we are in a numbered paragraph (\cs{pstart}…\cs{pend})..
+% Then, check if we are in a numbered paragraph (\cs{pstart}\ldots\cs{pend})..
% \begin{macrocode}
\ifnumberedpar@%
% \end{macrocode}
@@ -5710,7 +5994,7 @@
%
% As argument \cs{linenum} takes a set of seven parameters
% separated by vertical bars, in the format used internally for
-% \cs{l@d@nums} (see p.\,\pageref{linenumbers}): the starting page,
+% \cs{l@d@nums} (see \reff{linenumbers}): the starting page,
% line, and sub-line numbers, followed by the ending page, line, and
% sub-line numbers, and then the font specifier for the lemma.
% However, you can omit any parameters you don't want to change, and
@@ -6015,7 +6299,11 @@
\newif\iflabelpstart
\labelpstartfalse
\newcommandx*{\pstart}[1][1]{%
+ \normal@pars%
\ifstrempty{#1}{\at@every@pstart}{\noindent#1}%
+ \ifautopar%
+ \autopar%
+ \fi%
\ifluatex%
\edef\l@luatextextdir@L{\the\luatextextdir}%
\fi%
@@ -6070,6 +6358,7 @@
\newcommandx*{\pend}[1][1]{\ifnumbering \else%
\led@err@PendNotNumbered%
\fi%
+ \global\l@dskipversenumberfalse%
\ifnumberedpar@ \else%
\led@err@PendNoPstart%
\fi%
@@ -6109,7 +6398,11 @@
\fi%
\@oldnobreak%
\addtocounter{pstart}{1}%
+ \normal@pars%
\ifstrempty{#1}{\at@every@pend}{\noindent#1}%
+ \ifautopar%
+ \autopar%
+ \fi%
}
% \end{macrocode}
@@ -6239,7 +6532,12 @@
\inserthangingsymbolfalse
\fi
\check@pb@in@verse
- \affixline@num
+ \ifl@dhidenumber%
+ \global\l@dhidenumberfalse%
+ \f@x@l@cks%
+ \else%
+ \affixline@num%
+ \fi%
% \end{macrocode}
% \changes{v1.12.0}{2014/08/05}{\cs{do@line} is split in more little commands.}
% Depending wether a sectioning command is called at this pstart or not
@@ -6429,22 +6727,22 @@
% send to the vertical list.
% \begin{macrocode}
\newcommand*{\getline@num}{%
- \global\advance\absline@num \@ne
+ \global\advance\absline@num \@ne%
\do@actions
\do@ballast
\ifnumberline
- \ifsublines@
- \ifnum\sub@lock<\tw@
- \global\advance\subline@num \@ne
- \fi
- \else
- \ifnum\@lock<\tw@
- \global\advance\line@num \@ne
- \global\subline@num \z@
- \fi
- \fi
+ \ifsublines@
+ \ifnum\sub@lock<\tw@
+ \global\advance\subline@num \@ne
+ \fi
+ \else
+ \ifnum\@lock<\tw@
+ \global\advance\line@num \@ne
+ \global\subline@num \z@
+ \fi
+ \fi
\fi
- }
+}
% \end{macrocode}
% \end{macro}
%
@@ -6459,7 +6757,7 @@
% by the amount of \verb"ballast". This means, in practice, that when
% \cs{add@penalties} assigns penalties at this point, \TeX\ will be
% given extra encouragement to break the page here (see
-% p.\,\pageref{add@penalties}).
+% \reff{add@penalties}).
%
% \begin{macro}{\ballast@count}
% \begin{macro}{\c@ballast}
@@ -6604,6 +6902,10 @@
\fi
\or% % 1007
\l@dskipnumbertrue
+ \or% % 1008
+ \l@dskipversenumbertrue%
+ \or% % 1009
+ \l@dhidenumbertrue
\else
\led@warn@BadAction
\fi}
@@ -6655,21 +6957,22 @@
% No number is attached if \cs{ifnumberline} is FALSE (the normal value is TRUE).
% \changes{v0.15}{2012/06/11}{Line numbering can be disabled.}
% \begin{macrocode}
-\ifledgroupnotesL@\else\ifnumberline
-\ifl@dskipnumber
- \global\l@dskipnumberfalse
-\else
- \ifsublines@
- \@l@dtempcntb=\subline@num
- \ifnum\subline@num>\c@firstsublinenum
- \@l@dtempcnta=\subline@num
- \advance\@l@dtempcnta by-\c@firstsublinenum
- \divide\@l@dtempcnta by\c@sublinenumincrement
- \multiply\@l@dtempcnta by\c@sublinenumincrement
- \advance\@l@dtempcnta by\c@firstsublinenum
- \else
- \@l@dtempcnta=\c@firstsublinenum
- \fi
+ \ifledgroupnotesL@\else
+ \ifnumberline
+ \ifl@dskipnumber
+ \global\l@dskipnumberfalse
+ \else
+ \ifsublines@
+ \@l@dtempcntb=\subline@num
+ \ifnum\subline@num>\c@firstsublinenum
+ \@l@dtempcnta=\subline@num
+ \advance\@l@dtempcnta by-\c@firstsublinenum
+ \divide\@l@dtempcnta by\c@sublinenumincrement
+ \multiply\@l@dtempcnta by\c@sublinenumincrement
+ \advance\@l@dtempcnta by\c@firstsublinenum
+ \else
+ \@l@dtempcnta=\c@firstsublinenum
+ \fi
% \end{macrocode}
%
% That takes care of computing the values for comparison, but if line
@@ -6677,52 +6980,55 @@
% check fails, then we disable the line-number display by setting the
% counters to arbitrary but unequal values.
% \begin{macrocode}
- \ch@cksub@l@ck
+ \ch@cksub@l@ck
% \end{macrocode}
%
% Now the line number case, which works the same way.
% \begin{macrocode}
- \else
- \@l@dtempcntb=\line@num
+ \else
+ \@l@dtempcntb=\line@num
% \end{macrocode}
% Check on the \verb?\linenumberlist? If it's \verb?\empty? use the standard
% algorithm.
% \begin{macrocode}
- \ifx\linenumberlist\empty
- \ifnum\line@num>\c@firstlinenum
- \@l@dtempcnta=\line@num
- \advance\@l@dtempcnta by-\c@firstlinenum
- \divide\@l@dtempcnta by\c@linenumincrement
- \multiply\@l@dtempcnta by\c@linenumincrement
- \advance\@l@dtempcnta by\c@firstlinenum
- \else
- \@l@dtempcnta=\c@firstlinenum
- \fi
- \else
+ \ifx\linenumberlist\empty
+ \ifnum\line@num>\c@firstlinenum
+ \@l@dtempcnta=\line@num
+ \advance\@l@dtempcnta by-\c@firstlinenum
+ \divide\@l@dtempcnta by\c@linenumincrement
+ \multiply\@l@dtempcnta by\c@linenumincrement
+ \advance\@l@dtempcnta by\c@firstlinenum
+ \else
+ \@l@dtempcnta=\c@firstlinenum
+ \fi
+ \else
% \end{macrocode}
% The \verb?\linenumberlist? wasn't \verb?\empty?, so here's Wayne's
% numbering mechanism. This takes place in TeX's mouth.
% \begin{macrocode}
- \@l@dtempcnta=\line@num
- \edef\rem@inder{,\linenumberlist,\number\line@num,}%
- \edef\sc@n@list{\def\noexpand\sc@n@list
- ####1,\number\@l@dtempcnta,####2|{\def\noexpand\rem@inder{####2}}}%
- \sc@n@list\expandafter\sc@n@list\rem@inder|%
- \ifx\rem@inder\empty\advance\@l@dtempcnta\@ne\fi
- \fi
+ \@l@dtempcnta=\line@num
+ \edef\rem@inder{,\linenumberlist,\number\line@num,}%
+ \edef\sc@n@list{\def\noexpand\sc@n@list
+ ####1,\number\@l@dtempcnta,####2|{\def\noexpand\rem@inder{####2}}}%
+ \sc@n@list\expandafter\sc@n@list\rem@inder|%
+ \ifx\rem@inder\empty%
+ \advance\@l@dtempcnta\@ne
+ \fi
+ \fi
% \end{macrocode}
%
%
% A locking check for lines, just like the version for sub-line
% numbers above.
% \begin{macrocode}
- \ch@ck@l@ck
- \fi
+ \ch@ck@l@ck
+ \fi
% \end{macrocode}
%
-% The following test is true if we need to print a line number.
+% The following tests are true if we need to print a line number.
% \begin{macrocode}
- \ifnum\@l@dtempcnta=\@l@dtempcntb
+ \ifnum\@l@dtempcnta=\@l@dtempcntb
+ \ifl@dskipversenumber\else
% \end{macrocode}
%
% If we got here,
@@ -6745,37 +7051,32 @@
% \cs{l@drd@ta}.
%
% \begin{macrocode}
- \if@twocolumn
- \if@firstcolumn
- \gdef\l@dld@ta{\llap{{\leftlinenum}}}%
- \else
- \gdef\l@drd@ta{\rlap{{\rightlinenum}}}%
- \fi
- \else
+ \if@twocolumn
+ \if@firstcolumn
+ \gdef\l@dld@ta{\llap{{\leftlinenum}}}%
+ \else
+ \gdef\l@drd@ta{\rlap{{\rightlinenum}}}%
+ \fi
+ \else
% \end{macrocode}
% Continuing the original code \ldots
% \begin{macrocode}
- \@l@dtempcntb=\line@margin
- \ifnum\@l@dtempcntb>\@ne
- \advance\@l@dtempcntb \page@num
- \fi
+ \@l@dtempcntb=\line@margin
+ \ifnum\@l@dtempcntb>\@ne
+ \advance\@l@dtempcntb \page@num
+ \fi
% \end{macrocode}
%
% Now print the line (\verb"#1") with its page number.
% \begin{macrocode}
- \ifodd\@l@dtempcntb
- \gdef\l@drd@ta{\rlap{{\rightlinenum}}}%
- \else
- \gdef\l@dld@ta{\llap{{\leftlinenum}}}%
- \fi
- \fi
- \else
-% \end{macrocode}
-%
-% As no line number is to be appended, we just print the line as is.
-% \begin{macrocode}
-%% #1%
- \fi
+ \ifodd\@l@dtempcntb
+ \gdef\l@drd@ta{\rlap{{\rightlinenum}}}%
+ \else
+ \gdef\l@dld@ta{\llap{{\leftlinenum}}}%
+ \fi
+ \fi
+ \fi
+ \fi
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -6784,10 +7085,10 @@
% A value of $1$ is advanced to
% $2$; $3$ advances to $0$; other values are unchanged.
% \begin{macrocode}
- \f@x@l@cks
-\fi
-\fi
-\fi
+ \f@x@l@cks
+ \fi
+ \fi
+ \fi
}
% \end{macrocode}
@@ -7027,7 +7328,7 @@
% moment. The count \cs{@l@dtempcnta} is used to calculate and
% accumulate the penalty; it is initially set to the value of
% \cs{ballast@count}, which has been worked out in \cs{do@ballast}
-% above (p.\,\pageref{do@ballast}). Finally, the penalty is
+% above (\reff{do@ballast}). Finally, the penalty is
% checked to see that it doesn't go below $-10000$.
% \begin{macrocode}
\newcommand*{\add@penalties}{\@l@dtempcnta=\ballast@count
@@ -7307,12 +7608,15 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\ledsetnormalparstuff@common}
% \begin{macro}{\ledsetnormalparstuff}
+% \begin{macro}{\Xledsetnormalparstuff}
+% \begin{macro}{\ledsetnormalparstuffX}
% \begin{macro}{\normalfootfmt}
% \phantomsection\label{normalfootfmt}\relax
% \cs{normalfootfmt} is a `normal' macro
% to take the footnote line and page
-% number information (see p.\,\pageref{linenumbers}), and the
+% number information (see \reff{linenumbers}), and the
% desired text, and output what's to be printed.
% Argument \verb"#1" contains the line and page number information
% and lemma font specifier;
@@ -7330,18 +7634,39 @@
% \cs{autopar}, for example).
%
% \changes{v1.4}{2012/11/16}{Direction of footnotes with polyglossia.}
+% \changes{v1.21.0}{2015/04/13}{\cs{ledsetnormalparstuff} is deprecated and becomes \cs{ledsetnormalparstuffX} and \cs{Xledsetnormalparstuff}.}
% \begin{macrocode}
\newcommand*{\ledsetnormalparstuff}{%
+ \led@war@ledsetnormalparstuffDeprecated%
\ifluatex%
\luatextextdir\footnote@luatextextdir%
\luatexpardir\footnote@luatexpardir%
\fi%
\csuse{\csuse{footnote@dir}}%
\normal@pars%
- \noindent \parfillskip \z@ \@plus 1fil}
+ \noindent \parfillskip \z@ \@plus 1fil}%
+
+\newcommand*{\ledsetnormalparstuff@common}{%
+ \ifluatex%
+ \luatextextdir\footnote@luatextextdir%
+ \luatexpardir\footnote@luatexpardir%
+ \fi%
+ \csuse{\csuse{footnote@dir}}%
+ \normal@pars%
+ \parfillskip \z@ \@plus 1fil}%
+
+\newcommand*{\Xledsetnormalparstuff}[1]{%
+ \ledsetnormalparstuff@common%
+ \nottoggle{Xparindent@#1}{\noindent}{}%\noindent and and not \parindent=0pt to avoid to break the (bad) change made when moving from ledmac to eledmac
+}%
+
+\newcommand*{\ledsetnormalparstuffX}[1]{%
+ \ledsetnormalparstuff@common%
+ \nottoggle{parindentX@#1}{\noindent}{}%\noindent and and not \parindent=0pt to avoid to break the (bad) change made when moving from ledmac to eledmac
+}%
\notbool{parapparatus@}{\newcommandx*}{\newcommandx}{\normalfootfmt}[4][4=Z]{% 4th arg is optional, for backward compatibility
- \ledsetnormalparstuff%
+ \Xledsetnormalparstuff{#4}%
\hangindent=\csuse{Xhangindent@#4}
\strut{\printlinefootnote{#1}{#4}}%
{\nottoggle{Xlemmadisablefontselection@#4}{\select@lemmafont#1|#2}{#2}}%
@@ -7353,6 +7678,9 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\endashchar}
% \begin{macro}{\fullstop}
@@ -7415,7 +7743,7 @@
% general case, is a rather complicated task.
% The seven parameters of the
% argument are the line numbers as stored in \cs{l@d@nums}, in the
-% form described on page \pageref{linenumbers}: the starting
+% form described on \reff{linenumbers}: the starting
% page, line, and sub-line numbers, followed by the ending page,
% line, and sub-line numbers, and then the font specifier for
% the lemma.
@@ -7509,8 +7837,47 @@
% \end{macro}
% \end{macro}
%
+%
+% \begin{macro}{\setistwofollowinglines}
+% The \cs{ifistwofollowinglines} boolean, used by the \cs{twolines} and related tools, is set to true by \cs{setistwofollowinglines}.
+% This command takes the following arguments:
+% \begin{itemize}
+% \item \verb+#1+ First page number.
+% \item \verb+#2+ First line number.
+% \item \verb+#3+ Last page number.
+% \item \verb+#4+ Last line number.
+% \end{itemize}
+% If \verb+#3+-\verb+#2+ = 1, then that means the two lines are subsequent, and consequently \cs{ifistwofollowinglines} is set to true.
+% However, if we use lineation by page, two given lines can be subsequent if:
+% \begin{itemize}
+% \item The first line number is equal to the last line number of the first page.
+% \item The last line number is equal to 1.
+% \item \verb+#3+-\verb+#1+ is equal to 1.
+% \end{itemize}
+% \begin{macrocode}
+\newif\ifistwofollowinglines@%
+\newcommand{\setistwofollowinglines}[4]{%
+ \ifcsdef{lastlinenumberon@#1}%
+ {\numdef{\tmp}{\csuse{lastlinenumberon@#1}}}%
+ {\numdef{\tmp}{0}}%
+ \istwofollowinglines@false%
+ \ifnumequal{#4-#2}{1}%
+ {\istwofollowinglines@true}%
+ {\ifbypage@%
+ \ifnumequal{#3-#1}{1}%
+ {%
+ \ifnumequal{#2}{\tmp}%
+ {\ifnumequal{#4}{1}{\istwofollowinglines@true}{}}%
+ {}%
+ }%
+ {}%
+ }%
+}%
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\setprintlines}
-% First of all, we print the page numbers only if\/: 1)~we're doing
+% We print the page numbers only if\/: 1)~we're doing
% the lineation by page, and 2)~the ending page number is different
% from the starting page number.\phantomsection\label{printlines}
%
@@ -7567,10 +7934,24 @@
% However, if the \cs{twolines} is set for the current series, we don't print the last line number.
% \begin{macrocode}
\ifl@d@dash%
- \iftoggle{fulllines@}%
+ \ifboolexpr{togl{fulllines@} or test{\ifcsempty{twolines@\@currentseries}}}%
{}%
{%
- \ifcsempty{twolines@\@currentseries}%
+ \setistwofollowinglines{#1}{#2}{#4}{#5}%
+ \ifboolexpr{%
+ (%
+ togl {twolinesbutnotmore@\@currentseries}%
+ and not%
+ (%
+ bool {istwofollowinglines@}%
+ )%
+ )%
+ or%
+ (%
+ (not test{\ifnumequal{#1}{#4}})%
+ and togl{twolinesonlyinsamepage@\@currentseries}%
+ )%
+ }%
{}%
{%
\l@d@dashfalse%
@@ -7579,7 +7960,7 @@
\l@d@eslfalse%
\ifcsempty{morethantwolines@\@currentseries}%
{}%
- {\ifnum\numexpr #5-#2>1\relax%
+ {\ifistwofollowinglines@\else%
\l@d@morethantwolinestrue%
\fi%
}%
@@ -7617,16 +7998,17 @@
% \changes{v1.20.0}{2015/03/22}{Added \cs{ifl@d@morethantwolines} and \cs{ifl@d@morethantwolines} to \cs{printlines}}
% \begin{macrocode}
\ifl@d@ssub \fullstop \sublinenumrep{#3}\fi
- \ifl@d@dash \ifl@d@twolines\else\endashchar\fi\fi
- \ifl@d@pnum #4\fullstop\fi
- \ifl@d@elin \linenumrep{#5}\fi
- \ifl@d@esl \ifl@d@elin \fullstop\fi \sublinenumrep{#6}\fi
\ifl@d@twolines%
\ifl@d@morethantwolines%
\csuse{morethantwolines@\@currentseries}%
\else%
\csuse{twolines@\@currentseries}%
\fi%
+ \else%
+ \ifl@d@dash \endashchar\fi%
+ \ifl@d@pnum #4\fullstop\fi%
+ \ifl@d@elin \linenumrep{#5}\fi%
+ \ifl@d@esl \ifl@d@elin \fullstop\fi \sublinenumrep{#6}\fi%
\fi%
\endgroup}
% \end{macrocode}
@@ -7664,7 +8046,10 @@
\ifdimequal{0pt}{\preXnotes@}{}%
{%
\iftoggle{preXnotes@}{%
- \togglefalse{preXnotes@}\skip\csname #1footins\endcsname=\csuse{preXnotes@}}%
+ \togglefalse{preXnotes@}%
+ \skip\csname #1footins\endcsname=%
+ \dimexpr\csuse{preXnotes@}+\csuse{afterXrule@#1}\relax%
+ }%
{}%
}%
\vskip\skip\csname #1footins\endcsname%
@@ -7674,8 +8059,7 @@
\fi%
\setXnoteswidthliketwocolumns@{#1}%
\setXnotespositionliketwocolumns@{#1}%
- \print@Xfootnoterule{#1}%%
- \vskip\csuse{afterXrule@#1}%
+ \print@Xfootnoterule{#1}%
\noindent\leavevmode}
% \end{macrocode}
% \end{macro}
@@ -7721,13 +8105,11 @@
\setXnoteswidthliketwocolumns@{#1}%
\setXnotespositionliketwocolumns@{#1}%
\print@Xfootnoterule{#1}%%
- \vskip\csuse{afterXrule@#1}%
\fi%
\else%
\setXnoteswidthliketwocolumns@{#1}%
\setXnotespositionliketwocolumns@{#1}%
\print@Xfootnoterule{#1}%%
- \vskip\csuse{afterXrule@#1}%
\fi%
\setlength{\parindent}{0pt}
{\csuse{Xnotefontsize@#1}\csuse{txtbeforeXnotes@#1}}
@@ -7739,7 +8121,7 @@
% \subsection{Standard footnote definitions}
%
% \begin{macro}{\footnormal}
-% We can now define all the parameters for the five series of
+% We can now define all the parameters for the six series of
% footnotes; initially they use the `normal' footnote formatting,
% which is set up by calling \cs{footnormal}.
% You can switch to another type of formatting by using
@@ -7821,17 +8203,21 @@
\count\csname #1footins\endcsname=1000
\csxdef{default@#1footins}{1000}%Use this to confine the notes to one side only
\dimen\csname #1footins\endcsname=\csuse{maxhXnotes@#1}
- \skip\csname #1footins\endcsname=\csuse{beforeXnotes@#1}
+ \skip\csname #1footins\endcsname=\csuse{beforeXnotes@#1}%
+ \advance\skip\csname #1footins\endcsname by\csuse{afterXrule@#1}%
% \end{macrocode}
% Now do the setup for minipage footnotes. We use as much as possible of the
% normal setup as we can (so the notes will have a similar layout).
% \changes{v0.4}{2004/02/29}{Added minpage footnote setup to \cs{footnormal}}
% \begin{macrocode}
- \expandafter\let\csname mpv#1footnote\endcsname=\mpnormalvfootnote
- \expandafter\let\csname mp#1footgroup\endcsname=\mpnormalfootgroup
- \count\csname mp#1footins\endcsname=1000
- \dimen\csname mp#1footins\endcsname=\csuse{maxhXnotes@#1}
- \skip\csname mp#1footins\endcsname=\csuse{beforeXnotes@#1}
+ \ifnoledgroup@\else%
+ \expandafter\let\csname mpv#1footnote\endcsname=\mpnormalvfootnote
+ \expandafter\let\csname mp#1footgroup\endcsname=\mpnormalfootgroup
+ \count\csname mp#1footins\endcsname=1000
+ \dimen\csname mp#1footins\endcsname=\csuse{maxhXnotes@#1}
+ \skip\csname mp#1footins\endcsname=\csuse{beforeXnotes@#1}%
+ \advance\skip\csname mp#1footins\endcsname by\csuse{afterXrule@#1}%
+ \fi
}
% \end{macrocode}
@@ -7883,16 +8269,20 @@
\count\csname #1footins\endcsname=1000
\csxdef{default@#1footins}{1000}%Use this to confine the notes to one side only
\dimen\csname #1footins\endcsname=\csuse{maxhXnotes@#1}
- \skip\csname #1footins\endcsname=\csuse{beforeXnotes@#1}
+ \skip\csname #1footins\endcsname=\csuse{beforeXnotes@#1}%
+ \advance\skip\csname #1footins\endcsname by\csuse{afterXrule@#1}%
\para@footsetup{#1}
% \end{macrocode}
% And the extra setup for minipages.
% \begin{macrocode}
- \expandafter\let\csname mpv#1footnote\endcsname=\mppara@vfootnote
- \expandafter\let\csname mp#1footgroup\endcsname=\mppara@footgroup
- \count\csname mp#1footins\endcsname=1000
- \dimen\csname mp#1footins\endcsname=\csuse{maxhXnotes@#1}
- \skip\csname mp#1footins\endcsname=\csuse{beforeXnotes@#1}
+ \ifnoledgroup@\else
+ \expandafter\let\csname mpv#1footnote\endcsname=\mppara@vfootnote
+ \expandafter\let\csname mp#1footgroup\endcsname=\mppara@footgroup
+ \count\csname mp#1footins\endcsname=1000
+ \dimen\csname mp#1footins\endcsname=\csuse{maxhXnotes@#1}
+ \skip\csname mp#1footins\endcsname=\csuse{beforeXnotes@#1}%
+ \advance\skip\csname mp#1footins\endcsname by\csuse{afterXrule@#1}%
+ \fi
}
% \end{macrocode}
% \end{macro}
@@ -7951,14 +8341,16 @@
\ifdimequal{0pt}{\preXnotes@}{}%
{%
\iftoggle{preXnotes@}{%
- \togglefalse{preXnotes@}\skip\csname #1footins\endcsname=\csuse{preXnotes@}}%
+ \togglefalse{preXnotes@}%
+ \skip\csname #1footins\endcsname=%
+ \dimexpr\csuse{preXnotes@}+\csuse{afterXrule@#1}\relax%
+ }%
{}%
}%
\vskip\skip\csname #1footins\endcsname%
\setXnoteswidthliketwocolumns@{#1}%
\setXnotespositionliketwocolumns@{#1}%
\print@Xfootnoterule{#1}%%
- \vskip\csuse{afterXrule@#1}%
\noindent\leavevmode}
% \end{macrocode}
% \end{macro}
@@ -8036,7 +8428,7 @@
%
% One more thing; we set \cs{leftskip} and \cs{rightskip} to zero.
% This has the effect of neutralizing any such skips which may
-% apply to the main text (cf.\ p.\,\pageref{footskips} above).
+% apply to the main text (cf.~\reff{footskips} above).
% We need to do this, since \verb"footfudgefactor" is calculated on
% the assumption that the notes are \cs{hsize} wide.
%
@@ -8139,7 +8531,7 @@
% \begin{macrocode}
\newcommandx*{\parafootfmt}[4][4=Z]{%
\insertparafootsep{#4}%
- \ledsetnormalparstuff%
+ \Xledsetnormalparstuff{#4}%
\printlinefootnote{#1}{#4}%
{\nottoggle{Xlemmadisablefontselection@#4}{\select@lemmafont#1|#2}{#2}}%
\iftoggle{nosep@}{\hskip\csuse{inplaceoflemmaseparator@#4}}{\ifcsempty{lemmaseparator@#4}%
@@ -8196,13 +8588,11 @@
\setXnoteswidthliketwocolumns@{#1}%
\setXnotespositionliketwocolumns@{#1}%
\print@Xfootnoterule{#1}%%
- \vskip\csuse{afterXrule@#1}%
\fi%
\else%
\setXnoteswidthliketwocolumns@{#1}%
\setXnotespositionliketwocolumns@{#1}%
- \print@Xfootnoterule{#1}%%
- \vskip\csuse{afterXrule@#1}%
+ \print@Xfootnoterule{#1}%
\fi%
\unvbox\csname mp#1footins\endcsname
\ifcsstring{Xragged@#1}{L}{\RaggedLeft}{}%
@@ -8307,18 +8697,24 @@
\expandafter\let\csname #1footfmt\endcsname=\threecolfootfmt
\expandafter\let\csname #1footgroup\endcsname=\threecolfootgroup
\dimen\csname #1footins\endcsname=\csuse{maxhXnotes@#1}%
+ \skip\csname #1footins\endcsname=\csuse{beforeXnotes@#1}%
+ \advance\skip\csname #1footins\endcsname by\csuse{afterXrule@#1}%
\threecolfootsetup{#1}
% \end{macrocode}
% The additional setup for minipages.
% \begin{macrocode}
- \expandafter\let\csname mpv#1footnote\endcsname=\mpnormalvfootnote
- \expandafter\let\csname mp#1footgroup\endcsname=\mpthreecolfootgroup
- \mpthreecolfootsetup{#1}
+ \ifnoledgroup@\else
+ \expandafter\let\csname mpv#1footnote\endcsname=\mpnormalvfootnote
+ \expandafter\let\csname mp#1footgroup\endcsname=\mpthreecolfootgroup
+ \skip\csname mp#1footins\endcsname=\csuse{beforeXnotes@#1}%
+ \advance\skip\csname mp#1footins\endcsname by\csuse{afterXrule@#1}%
+ \mpthreecolfootsetup{#1}
+ \fi
}
% \end{macrocode}
% The \cs{footstart} and \cs{footnoterule} macros for these notes assume
-% the normal values (p.\,\pageref{normalvalues} above).
+% the normal values (\reff{normalvalues} above).
% \end{macro}
%
% \begin{macro}{\threecolfootsetup}
@@ -8399,11 +8795,11 @@
\notbool{parapparatus@}{\newcommandx*}{\newcommandx}{\threecolfootfmt}[4][4=Z]{%
\normal@pars
\hsize \csuse{hsizethreecol@#4}
- \parindent=0pt
+ \nottoggle{Xparindent@#4}{\parindent=\z@}{}
\tolerance=5000
- \raggedright
\hangindent=\csuse{Xhangindent@#4}
\leavevmode
+ \csuse{Xcolalign@#4}%
\strut{\printlinefootnote{#1}{#4}}%
{\nottoggle{Xlemmadisablefontselection@#4}{\select@lemmafont#1|#2}{#2}}%
\iftoggle{nosep@}{\hskip\csuse{inplaceoflemmaseparator@#4}}{\ifcsempty{lemmaseparator@#4}%
@@ -8452,14 +8848,12 @@
\else%
\setXnoteswidthliketwocolumns@{#1}%
\setXnotespositionliketwocolumns@{#1}%
- \print@Xfootnoterule{#1}%%
- \vskip\csuse{afterXrule@#1}%
+ \print@Xfootnoterule{#1}%
\fi%
\else%
\setXnoteswidthliketwocolumns@{#1}%
\setXnotespositionliketwocolumns@{#1}%
- \print@Xfootnoterule{#1}%%
- \vskip\csuse{afterXrule@#1}%
+ \print@Xfootnoterule{#1}%
\fi%
{\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par
\splittopskip=\ht\strutbox
@@ -8482,13 +8876,19 @@
\expandafter\let\csname #1footfmt\endcsname=\twocolfootfmt
\expandafter\let\csname #1footgroup\endcsname=\twocolfootgroup
\dimen\csname #1footins\endcsname=\csuse{maxhXnotes@#1}%
+ \skip\csname #1footins\endcsname=\csuse{beforeXnotes@#1}%
+ \advance\skip\csname #1footins\endcsname by\csuse{afterXrule@#1}%
\twocolfootsetup{#1}
% \end{macrocode}
% The additional setup for minipages.
% \begin{macrocode}
- \expandafter\let\csname mpv#1footnote\endcsname=\mpnormalvfootnote
- \expandafter\let\csname mp#1footgroup\endcsname=\mptwocolfootgroup
- \mptwocolfootsetup{#1}
+ \ifnoledgroup@\else
+ \expandafter\let\csname mpv#1footnote\endcsname=\mpnormalvfootnote
+ \expandafter\let\csname mp#1footgroup\endcsname=\mptwocolfootgroup
+ \skip\csname mp#1footins\endcsname=\csuse{beforeXnotes@#1}%
+ \advance\skip\csname mp#1footins\endcsname by\csuse{afterXrule@#1}%
+ \mptwocolfootsetup{#1}
+ \fi
}
% \end{macrocode}
@@ -8520,11 +8920,11 @@
\notbool{parapparatus@}{\newcommandx*}{\newcommandx}{\twocolfootfmt}[4][4=Z]{% 4th arg is optional, for backward compatibility
\normal@pars
\hsize \csuse{hsizetwocol@#4}
- \parindent=0pt
+ \nottoggle{Xparindent@#4}{\parindent=\z@}{}
\tolerance=5000
- \raggedright
\hangindent=\csuse{Xhangindent@#4}
\leavevmode
+ \csuse{Xcolalign@#4}%
\strut{\printlinefootnote{#1}{#4}}%
{\nottoggle{Xlemmadisablefontselection@#4}{\select@lemmafont#1|#2}{#2}}%
\iftoggle{nosep@}{\hskip\csuse{inplaceoflemmaseparator@#4}}{\ifcsempty{lemmaseparator@#4}%
@@ -8567,14 +8967,12 @@
\else%
\setXnoteswidthliketwocolumns@{#1}%
\setXnotespositionliketwocolumns@{#1}%
- \print@Xfootnoterule{#1}%%
- \vskip\csuse{afterXrule@#1}%
+ \print@Xfootnoterule{#1}%
\fi%
\else%
\setXnoteswidthliketwocolumns@{#1}%
\setXnotespositionliketwocolumns@{#1}%
- \print@Xfootnoterule{#1}%%
- \vskip\csuse{afterXrule@#1}%
+ \print@Xfootnoterule{#1}%
\fi%
{\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par
\splittopskip=\ht\strutbox
@@ -8591,7 +8989,7 @@
% \subsection{Generality}
% The original \edmac{} provided users with five series of critical footnotes (\cs{Afootnote} \cs{Bfootnote} \cs{Cfootnote} \cs{Dfootnote} \cs{Efootnote}),
% and \LaTeX\ provides a single numbered footnote. The \Eledmac{} package
-% uses the \edmac{} mechanism to provide five series of numbered footnotes.
+% uses the \edmac{} mechanism to provide six series of numbered footnotes.
%
% First, though, the \Lpack{footmisc} package has an option whereby
% two or more consecutive \cs{footnote}s have their marks separated
@@ -8772,7 +9170,7 @@
% the \meta{series} and calls the series' \cs{footfmt...} to format the
% \meta{text}.
% \begin{macrocode}
-\newcommand*{\normalvfootnoteX}[2]{%
+\notbool{parapparatus@}{\newcommand*}{\newcommand}{\normalvfootnoteX}[2]{%
\insert\@nameuse{footins#1}\bgroup
\csuse{bhooknoteX@#1}
\csuse{notefontsizeX@#1}
@@ -8782,7 +9180,7 @@
\fi\fi%
\setnotesXpositionliketwocolumns@{#1}%
\spaceskip=\z@skip \xspaceskip=\z@skip
- \csuse{\csuse{footnote@dir}}\if@RTL\else\noindent\leavevmode\fi\@nameuse{footfmt#1}{#1}{#2}\egroup}
+ \csuse{\csuse{footnote@dir}}\@nameuse{footfmt#1}{#1}{#2}\egroup}
% \end{macrocode}
% \end{macro}
@@ -8807,7 +9205,7 @@
% \cs{normalfootfmtX}\marg{series}\marg{text} typesets the footnote text,
% prepended by the marker.
% \begin{macrocode}
-\newcommand*{\normalfootfmtX}[2]{%
+\notbool{parapparatus@}{\newcommand*}{\newcommand}{\normalfootfmtX}[2]{%
\ifluatex%
\luatextextdir\footnote@luatextextdir%
\luatexpardir\footnote@luatexpardir%
@@ -8816,9 +9214,9 @@
\protected@edef\@currentlabel{%
\@nameuse{@thefnmark#1}%
}%
- \ledsetnormalparstuff
+ \ledsetnormalparstuffX{#1}%
\hangindent=\csuse{hangindentX@#1}%
- {{\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}}\strut%\enspace
+ {{\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}}\strut%
#2\strut\par}}
% \end{macrocode}
@@ -8842,7 +9240,10 @@
\ifdimequal{0pt}{\prenotesX@}{}%
{%
\iftoggle{prenotesX@}{%
- \togglefalse{prenotesX@} \skip\csname footins#1\endcsname=\csuse{prenotesX@}}%
+ \togglefalse{prenotesX@}%
+ \skip\csname footins#1\endcsname=%
+ \dimexpr\csuse{prenotesX@}+\csuse{afterruleX@#1}\relax%
+ }%
{}%
}%
\vskip\skip\csname footins#1\endcsname%
@@ -8854,7 +9255,7 @@
\setnotesXwidthliketwocolumns@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
- \vskip\csuse{afterruleX@#1}}
+}%
% \end{macrocode}
% \end{macro}
@@ -8895,13 +9296,11 @@
\setnotesXwidthliketwocolumns@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
- \vskip\csuse{afterruleX@#1}%
\fi%
\else%
\setnotesXwidthliketwocolumns@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
- \vskip\csuse{afterruleX@#1}%
\fi%
\unvbox\@nameuse{mpfootins#1}}
@@ -8969,15 +9368,19 @@
\count\csname footins#1\endcsname=1000
\csxdef{default@footins#1}{1000}%Use to have note only for one side
\dimen\csname footins#1\endcsname=\csuse{maxhnotesX@#1}
- \skip\csname footins#1\endcsname=\csuse{beforenotesX@#1}
-% \end{macrocode}
-% Aditions for minipages.
-% \begin{macrocode}
- \expandafter\let\csname mpvfootnote#1\endcsname=\mpnormalvfootnoteX
- \expandafter\let\csname mpfootgroup#1\endcsname=\mpnormalfootgroupX
- \count\csname mpfootins#1\endcsname=1000
- \dimen\csname mpfootins#1\endcsname=\csuse{maxhnotesX@#1}
- \skip\csname mpfootins#1\endcsname=\csuse{beforenotesX@#1}
+ \skip\csname footins#1\endcsname=\csuse{beforenotesX@#1}%
+ \advance\skip\csname footins#1\endcsname by\csuse{afterruleX@#1}%
+% \end{macrocode}
+% Additions for minipages.
+% \begin{macrocode}
+ \ifnoledgroup@\else%
+ \expandafter\let\csname mpvfootnote#1\endcsname=\mpnormalvfootnoteX
+ \expandafter\let\csname mpfootgroup#1\endcsname=\mpnormalfootgroupX
+ \count\csname mpfootins#1\endcsname=1000
+ \dimen\csname mpfootins#1\endcsname=\csuse{maxhnotesX@#1}
+ \skip\csname mpfootins#1\endcsname=\csuse{beforenotesX@#1}%
+ \advance\skip\csname mpfootins#1\endcsname by\csuse{afterruleX@#1}%
+ \fi
}
% \end{macrocode}
@@ -8992,15 +9395,22 @@
% \cs{foottwocolX}\marg{series}
% \begin{macrocode}
\newcommand*{\foottwocolX}[1]{%
- \csgdef{series@displayX#1}{twocol}
+ \csgdef{series@displayX#1}{twocolX}
\expandafter\let\csname regvfootnote#1\endcsname=\twocolvfootnoteX
\expandafter\let\csname footfmt#1\endcsname=\twocolfootfmtX
\expandafter\let\csname footgroup#1\endcsname=\twocolfootgroupX
- \dimen\csname #1footins\endcsname=\csuse{maxhnotesX@#1}%
+ \dimen\csname footins#1\endcsname=\csuse{maxhnotesX@#1}%
+ \skip\csname footins#1\endcsname=\csuse{beforenotesX@#1}%
+ \advance\skip\csname footins#1\endcsname by \csuse{afterruleX@#1}\relax%
\twocolfootsetupX{#1}
- \expandafter\let\csname mpvfootnote#1\endcsname=\mpnormalvfootnoteX
- \expandafter\let\csname mpfootgroup#1\endcsname=\mptwocolfootgroupX
- \mptwocolfootsetupX{#1}}
+ \ifnoledgroup@\else%
+ \expandafter\let\csname mpvfootnote#1\endcsname=\mpnormalvfootnoteX
+ \expandafter\let\csname mpfootgroup#1\endcsname=\mptwocolfootgroupX
+ \skip\csname mpfootins#1\endcsname=\csuse{beforenotesX@#1}%
+ \advance\skip\csname mpfootins#1\endcsname by\csuse{afterruleX@#1}
+ \mptwocolfootsetupX{#1}
+ \fi%
+}
% \end{macrocode}
% \end{macro}
@@ -9024,7 +9434,7 @@
% \begin{macro}{\twocolvfootnoteX}
% \cs{twocolvfootnoteX}\marg{series}
% \begin{macrocode}
-\newcommand*{\twocolvfootnoteX}[2]{%
+\notbool{parapparatus@}{\newcommand*}{\newcommand}{\twocolvfootnoteX}[2]{%
\insert\csname footins#1\endcsname\bgroup
\csuse{notefontsizeX@#1}
\footsplitskips
@@ -9037,19 +9447,18 @@
% \begin{macro}{\twocolfootfmtX}
% \cs{twocolfootfmtX}\marg{series}
% \begin{macrocode}
-\newcommand*{\twocolfootfmtX}[2]{%
+\notbool{parapparatus@}{\newcommand*}{\newcommand}{\twocolfootfmtX}[2]{%
\protected@edef\@currentlabel{%
\@nameuse{@thefnmark#1}%
}%
\normal@pars
\hangindent=\csuse{hangindentX@#1}%
\hsize \csuse{hsizetwocolX@#1}
- \parindent=\z@
-%%% \parfillskip=0pt \@plus 1fil
+ \nottoggle{parindentX@#1}{\parindent=\z@}{}
\tolerance=5000\relax
- \raggedright
\leavevmode
- {\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}\strut%\enspace
+ \csuse{colalignX@#1}%
+ {\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}\strut%
#2\strut\par}\allowbreak}
% \end{macrocode}
@@ -9076,13 +9485,11 @@
\setnotesXwidthliketwocolumns@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
- \vskip\csuse{afterruleX@#1}%
\fi%
\else%
\setnotesXwidthliketwocolumns@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
- \vskip\csuse{afterruleX@#1}%
\fi%
\splittopskip=\ht\strutbox
\expandafter
@@ -9102,15 +9509,22 @@
% \cs{footthreecolX}\marg{series}
% \begin{macrocode}
\newcommand*{\footthreecolX}[1]{%
- \csgdef{series@displayX#1}{threecol}
+ \csgdef{series@displayX#1}{threecolX}
\expandafter\let\csname regvfootnote#1\endcsname=\threecolvfootnoteX
\expandafter\let\csname footfmt#1\endcsname=\threecolfootfmtX
\expandafter\let\csname footgroup#1\endcsname=\threecolfootgroupX
- \dimen\csname #1footins\endcsname=\csuse{maxhnotesX@#1}%
+ \dimen\csname footins#1\endcsname=\csuse{maxhnotesX@#1}%
+ \skip\csname footins#1\endcsname=\csuse{beforenotesX@#1}%
+ \advance\skip\csname footins#1\endcsname by \csuse{afterruleX@#1}\relax%
\threecolfootsetupX{#1}
- \expandafter\let\csname mpvfootnote#1\endcsname=\mpnormalvfootnoteX
- \expandafter\let\csname mpfootgroup#1\endcsname=\mpthreecolfootgroupX
- \mpthreecolfootsetupX{#1}}
+ \ifnoledgroup@\else%
+ \expandafter\let\csname mpvfootnote#1\endcsname=\mpnormalvfootnoteX
+ \expandafter\let\csname mpfootgroup#1\endcsname=\mpthreecolfootgroupX
+ \skip\csname mpfootins#1\endcsname=\csuse{beforenotesX@#1}%
+ \advance\skip\csname mpfootins#1\endcsname by\csuse{afterruleX@#1}
+ \mpthreecolfootsetupX{#1}
+ \fi%
+}
% \end{macrocode}
% \end{macro}
@@ -9134,7 +9548,7 @@
% \begin{macro}{\threecolvfootnoteX}
% \cs{threecolvfootnoteX}\marg{series}\marg{text}
% \begin{macrocode}
-\newcommand*{\threecolvfootnoteX}[2]{%
+\notbool{parapparatus@}{\newcommand*}{\newcommand}{\threecolvfootnoteX}[2]{%
\insert\csname footins#1\endcsname\bgroup
\csuse{notefontsizeX@#1}
\footsplitskips
@@ -9146,19 +9560,18 @@
% \begin{macro}{\threecolfootfmtX}
% \cs{threecolfootfmtX}\marg{series}
% \begin{macrocode}
-\newcommand*{\threecolfootfmtX}[2]{%
+\notbool{parapparatus@}{\newcommand*}{\newcommand}{\threecolfootfmtX}[2]{%
\protected@edef\@currentlabel{%
\@nameuse{@thefnmark#1}%
}%
\hangindent=\csuse{hangindentX@#1}%
\normal@pars
\hsize \csuse{hsizethreecolX@#1}
- \parindent=\z@
-%%% \parfillskip=0pt \@plus 1fil
+ \nottoggle{parindentX@#1}{\parindent=\z@}{} %
\tolerance=5000\relax
- \raggedright
\leavevmode
- {\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}\strut%\enspace
+ \csuse{colalignX@#1}%
+ {\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}\strut%
#2\strut\par}\allowbreak}
% \end{macrocode}
@@ -9185,13 +9598,11 @@
\setnotesXwidthliketwocolumns@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
- \vskip\csuse{afterruleX@#1}%
\fi%
\else%
\setnotesXwidthliketwocolumns@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
- \vskip\csuse{afterruleX@#1}%
\fi%
\splittopskip=\ht\strutbox
\expandafter
@@ -9220,13 +9631,18 @@
\count\csname footins#1\endcsname=1000
\csxdef{default@footins#1}{1000}%Use this to confine the notes to one side only
\dimen\csname footins#1\endcsname=\csuse{maxhnotesX@#1}
- \skip\csname footins#1\endcsname=\csuse{beforenotesX@#1}
- \expandafter\let\csname mpvfootnote#1\endcsname=\mppara@vfootnoteX
- \expandafter\let\csname mpfootgroup#1\endcsname=\mppara@footgroupX
- \count\csname mpfootins#1\endcsname=1000
- \dimen\csname mpfootins#1\endcsname=\csuse{maxhnotesX@#1}
- \skip\csname mpfootins#1\endcsname=\csuse{beforenotesX@#1}
- \para@footsetupX{#1}}
+ \skip\csname footins#1\endcsname=\csuse{beforenotesX@#1}%
+ \advance\skip\csname footins#1\endcsname by\csuse{afterruleX@#1}%
+ \para@footsetupX{#1}
+ \ifnoledgroup@\else
+ \expandafter\let\csname mpvfootnote#1\endcsname=\mppara@vfootnoteX
+ \expandafter\let\csname mpfootgroup#1\endcsname=\mppara@footgroupX
+ \count\csname mpfootins#1\endcsname=1000
+ \dimen\csname mpfootins#1\endcsname=\csuse{maxhnotesX@#1}
+ \skip\csname mpfootins#1\endcsname=\csuse{beforenotesX@#1}%
+ \advance\skip\csname mpfootins#1\endcsname by\csuse{afterruleX@#1}%
+ \fi
+ }
% \end{macrocode}
% \end{macro}
@@ -9255,7 +9671,10 @@
\ifdimequal{0pt}{\prenotesX@}{}%
{%
\iftoggle{prenotesX@}{%
- \togglefalse{prenotesX@}\skip\csname footins#1\endcsname=\csuse{prenotesX@}}%
+ \togglefalse{prenotesX@}%
+ \skip\csname footins#1\endcsname=%
+ \dimexpr\csuse{prenotesX@}+\csuse{afterruleX@#1}\relax%
+ }%
{}%
}%
\vskip\skip\csname footins#1\endcsname%
@@ -9266,7 +9685,6 @@
\setnotesXwidthliketwocolumns@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
- \vskip\csuse{afterruleX@#1}%
}
% \end{macrocode}
@@ -9316,8 +9734,8 @@
\@nameuse{@thefnmark#1}%
}%
\insertparafootsep{#1}%
- \ledsetnormalparstuff
- {\csuse{notenumfontX@#1}\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}\strut%\enspace
+ \ledsetnormalparstuffX{#1}%
+ {\csuse{notenumfontX@#1}\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}\strut%
#2\penalty-10}}
% \end{macrocode}
@@ -9350,13 +9768,11 @@
\setnotesXwidthliketwocolumns@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
- \vskip\csuse{afterruleX@#1}%
\fi%
\else%
\setnotesXwidthliketwocolumns@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
- \vskip\csuse{afterruleX@#1}%
\fi%
\unvbox\csname mpfootins#1\endcsname
\ifcsstring{raggedX@#1}{L}{\RaggedLeft}{}%
@@ -9381,11 +9797,11 @@
% \begin{macrocode}
\newdimen\old@hsize%
-\old@hsize=\linewidth%
+\AtBeginDocument{\old@hsize=\hsize}%
\newcommand{\setXnoteswidthliketwocolumns@}[1]{%
- \global\let\hsize@fornote=\linewidth%
- \global\old@hsize=\linewidth%
+ \global\let\hsize@fornote=\hsize%
+ \global\old@hsize=\hsize%
\iftoggle{Xnoteswidthliketwocolumns@#1}%
{%
\csuse{setwidthliketwocolumns@\columns@position}%
@@ -9398,7 +9814,7 @@
\newcommand{\setnotesXwidthliketwocolumns@}[1]{%
\global\let\hsize@fornote=\hsize%
- \global\old@hsize=\linewidth%
+ \global\old@hsize=\hsize%
\iftoggle{notesXwidthliketwocolumns@#1}%
{%
\csuse{setwidthliketwocolumns@\columns@position}%
@@ -9456,23 +9872,104 @@
%
% \begin{macro}{\print@Xfootnoterule}
% \begin{macro}{\print@footnoteXrule}
+% \changes{v1.21.0}{2015/04/13}{Code refactoring: the spaces after the footnote rules are directly managed in \cs{print@Xfootnoterule} and \cs{print@footnoteXrule}}
% \begin{macrocode}
\newcommand{\print@Xfootnoterule}[1]{%
+ \vskip-\csuse{afterXrule@#1}%Because count in \dimen\csuse{#1footins}
\nointerlineskip%
\moveleft-\leftskip\vbox{\csuse{#1footnoterule}}%
\nointerlineskip%
+ \vskip\csuse{afterXrule@#1}%
}%
\newcommand{\print@footnoteXrule}[1]{%
+ \vskip-\csuse{afterruleX@#1}%Because count in \dimen\csuse{footins#1}
\nointerlineskip%
\moveleft-\leftskip\vbox{\csuse{footnoterule#1}}%
\nointerlineskip%
+ \vskip\csuse{afterruleX@#1}%
}%
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \section{Specific skip for first series of footnotes}
+% \cs{beforeXnotes} insert a specific skip for the first series of notes in a page.
+% As we can know in advance which series will be the first, we call \cs{prepare@preXnotes} before inserting any critical notes, in order to prevent page number overlapping.
+% \begin{enumerate}
+% \item If it is the first note of the current page, it changes the footnote skip for the series to the value specified to \cs{beforeXnotes}. Keeps the series of the note as the first one of the current page.
+% \item If it is not the first note of the current page:
+% \begin{itemize}
+% \item If the current series is printed after the series kept as the first of the current page, then nothing happens.
+% \item If the current series is printed before the series kept as the first of the current page, then it changes the footnote of the current series to the value normally used by the series which was marked as the first of the page. Keeps the current series as the new first one of the current page.
+% \end{itemize}
+% \end{enumerate}
+%
+%
+% For example, suppose the series order is A,B. We call first a \cs{Bfootnote} and a \cs{Afootnote}. The only skips used are, finally, the skip specific to the first series of the page, and the skip for the B series. If we have not called \cs{Afootnote}, the only skip used is the skip specific to the first series of the page.
+%
+% That is perfect.
+%
+%
+% The series skip and the first series of the current page are reset before the footnotes are printed. Then, the footstart macros manage the problem of the first series of the page.
+%
+% After the rule, the space which is defined by \cs{afterXrule} does not depend on whether the series is the first one of the page or not. So we use its normal value for each series.
+% \begin{macro}{firstXseries@}
+% \begin{macro}{prepare@preXnotes}
+% \begin{macrocode}
+\gdef\firstXseries@{}
+\newcommand{\prepare@preXnotes}[1]{%
+ \ifdimequal{0pt}{\preXnotes@}%
+ {}%
+ {%
+ \IfStrEq{\firstXseries@}{}{%
+ \global\skip\csuse{#1footins}=\preXnotes@%
+ \global\advance\skip\csname #1footins\endcsname by\csuse{afterXrule@#1}%
+ \gdef\firstXseries@{#1}%
+ }%
+ {%
+ \ifseriesbefore{#1}{\firstXseries@}%
+ {%
+ \global\skip\csuse{#1footins}=\csuse{beforeXnotes@\firstXseries@}%
+ \global\advance\skip\csname #1footins\endcsname by\csuse{afterXrule@#1}%
+ \gdef\firstXseries@{#1}%
+ }%
+ {}%
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
%
+% The same thing is required for familiar notes and \cs{prenotesX}.
+% \begin{macro}{firstseriesX@}
+% \begin{macro}{prepare@prenotesX}
+% \begin{macrocode}
+\gdef\firstseriesX@{}
+\newcommand{\prepare@prenotesX}[1]{%
+ \ifdimequal{0pt}{\prenotesX@}%
+ {}%
+ {%
+ \IfStrEq{\firstseriesX@}{}{%
+ \global\skip\csuse{footins#1}=\prenotesX@%
+ \global\advance\skip\csname footins#1\endcsname by\csuse{afterruleX@#1}%
+ \gdef\firstseriesX@{#1}%
+ }%
+ {%
+ \ifseriesbefore{#1}{\firstseriesX@}%
+ {%
+ \global\skip\csuse{footins#1}=\csuse{beforenotesX@\firstseriesX@}%
+ \global\advance\skip\csname footins#1\endcsname by\csuse{afterruleX@#1}%
+ \gdef\firstXseries@{#1}%
+ }%
+ {}%
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% \section{Footnotes' output}
% \begin{macro}{\print@notesX}
% \begin{macro}{\doxtrafeeti}
@@ -9491,20 +9988,33 @@
% We check before printing them that they are not voided.
% \begin{macrocode}
\newcommand*{\doxtrafeeti}{%
- \setbox\@outputbox \vbox{%
- \unvbox\@outputbox%
- \def\do##1{%
- \ifvoid\csuse{footins##1}\else%
- \print@notesX{##1}%
- \fi%
- }%
- \dolistloop{\@series}}%
- }%
+ \unless\ifnofamiliar@%
+ \gdef\firstseriesX@{}%
+ \setbox\@outputbox \vbox{%
+ \unvbox\@outputbox%
+ \def\do##1{%
+ \ifvoid\csuse{footins##1}\else%
+ \global\skip\csuse{footins##1}=\csuse{beforenotesX@##1}%
+ \global\advance\skip\csuse{footins##1} by\csuse{afterruleX@##1}%
+ \print@notesX{##1}%
+ \fi%
+ }%
+ \dolistloop{\@series}}%
+ \fi%
+}%
\newcommand{\doreinxtrafeeti}{%
- \def\do##1{\ifvoid\csuse{footins##1}\else\insert\csuse{footins##1}{\unvbox\csuse{footins##1}}\fi}%
- \dolistloop{\@series}%
- }
+ \unless\ifnofamiliar@%
+ \def\do##1{%
+ \ifvoid\csuse{footins##1}\else
+ \insert%
+ \csuse{footins##1}
+ {\unvbox\csuse{footins##1}}%
+ \fi%
+ }%
+ \dolistloop{\@series}%
+ \fi%
+}%
% \end{macrocode}
% \end{macro}
@@ -9538,6 +10048,10 @@
% \changes{v1.14.0}{2014/10/20}{Debug spurious characters before endnotes.}
% \label{endnotes}\relax
%
+% First, check the noend option.
+% \begin{macrocode}
+\ifbool{noend@}{}{%Used instead of \ifnoend@ to prevent expansion problem
+% \end{macrocode}
% \begin{macro}{\l@d@end}
% \begin{macro}{\ifl@dend@}
% \begin{macro}{\l@dend@true}
@@ -9596,8 +10110,21 @@
% nothing with this information, but it's there if you want to write
% custom macros to do something with it.
% \changes{v1.18.0}{2015/02/23}{Option parapparatus works for endnotes.}
+% \changes{v1.21.0}{2015/04/13}{\cs{endnotes} take five arguments.}
+% Arguments are:
+% \begin{itemize}
+% \item \verb+#1+ Line numbers and font selection.
+% \item \verb+#2+ Lemma.
+% \item \verb+#3+ Note content.
+% \item \verb+#4+ Series.
+% \item \verb+#5+ Optional argument of \cs{Xendnote}.
+% \end{itemize}
% \begin{macrocode}
-\global\notbool{parapparatus@}{}{\long}\def\endprint#1#2#3#4{{%
+\global\notbool{parapparatus@}{}{\long}\def\endprint#1#2#3#4#5{{%
+ \xdef\@currentseries{#4}%
+ \IfStrEq{#5}{fulllines}%
+ {\toggletrue{fulllines@}}%
+ {}%
\csuse{bhookXendnote@#4}%
\csuse{Xendnotefontsize@#4}%
{%
@@ -9612,6 +10139,7 @@
{#2}%
}%
\enskip#3\par%
+ \togglefalse{fulllines@}%
}}%
\let\l@d@section=\@gobble
@@ -9676,7 +10204,47 @@
\l@d@esltrue
\l@d@dashtrue
\fi
- \fi}
+ \fi%
+% \end{macrocode}
+% \begin{macrocode}
+ \ifl@d@dash%
+ \ifboolexpr{togl{fulllines@} or test{\ifcsempty{Xendtwolines@\@currentseries}}}%
+ {}%
+ {%
+ \setistwofollowinglines{#1}{#2}{#4}{#5}%
+ \ifboolexpr{%
+ (%
+ togl {Xendtwolinesbutnotmore@\@currentseries}%
+ and not%
+ (%
+ bool {istwofollowinglines@}%
+ )%
+ )%
+ or%
+ (%
+ (not test{\ifnumequal{#1}{#4}})%
+ and togl{Xendtwolinesonlyinsamepage@\@currentseries}%
+ )%
+ }%
+ {}%
+ {%
+ \l@d@dashfalse%
+ \l@d@twolinestrue%
+ \l@d@elinfalse%
+ \l@d@eslfalse%
+ \ifcsempty{Xendmorethantwolines@\@currentseries}%
+ {}%
+ {\ifistwofollowinglines@\else%
+ \l@d@morethantwolinestrue%
+ \fi%
+ }%
+ }%
+ }%
+ \fi%
+% \end{macrocode}
+% End of \cs{setprintendlines}.
+% \begin{macrocode}
+}%
% \end{macrocode}
% \end{macro}
%
@@ -9694,12 +10262,22 @@
% sub-line number (in which case we want only the dash) or after an
% ending line number (in which case we need to insert a period).
% \begin{macrocode}
- \printnpnum{#1} \linenumrep{#2}%
+ \printnpnum{#1}%
+ \ifoldprintnpnumspace@\space\fi%
+ \linenumrep{#2}%
\ifl@d@ssub \fullstop \sublinenumrep{#3}\fi
- \ifl@d@dash \endashchar\fi
- \ifl@d@pnum \printnpnum{#4}\fi
- \ifl@d@elin \linenumrep{#5}\fi
- \ifl@d@esl \ifl@d@elin \fullstop\fi \sublinenumrep{#6}\fi
+ \ifl@d@twolines%
+ \ifl@d@morethantwolines%
+ \csuse{Xendmorethantwolines@\@currentseries}%
+ \else%
+ \csuse{Xendtwolines@\@currentseries}%
+ \fi%
+ \else%
+ \ifl@d@dash \endashchar\fi%
+ \ifl@d@pnum \printnpnum{#4}\fi%
+ \ifl@d@elin \linenumrep{#5}\fi%
+ \ifl@d@esl \ifl@d@elin \fullstop\fi \sublinenumrep{#6}\fi%
+ \fi%
\endgroup}
% \end{macrocode}
@@ -9730,17 +10308,21 @@
% \end{macro}
%
% \begin{macro}{\noendnotes}
-% You can say \cs{noendnotes} before the first
-% \cs{beginnumbering} in your file if if you will not use
-% any of the endnote commands: this will suppress the creation of
-% an \file{.end} file. If you do have some lingering endnote
-% commands in your file,
-% the notes will be written to your terminal and to the log file.
-% \begin{macrocode}
-\newcommand*{\noendnotes}{\global\let\l@dend@stuff=\relax
- \global\chardef\l@d@end=16 }
+% \changes{v1.21.0}{2015/04/13}{\cs{noendnotes} deprecated, prefer noend option.}
+% The \cs{noendnotes} command is deprecated.
+% You should prefer \verb+noend+ options.
+% \begin{macrocode}
+\newcommand*{\noendnotes}{%
+ \led@war@noendnotesDeprecated%
+ \global\let\l@dend@stuff=\relax%
+ \global\chardef\l@d@end=16%
+}%
% \end{macrocode}
% \end{macro}
+% End of section for end notes
+% \begin{macrocode}
+}%
+% \end{macrocode}
% \section{Generate series}%
% In this section, X means the name of the series (A, B etc.)
% \begin{macro}{\series}
@@ -9775,153 +10357,196 @@
\newseries@eledpar{#1}%
\fi%
% \end{macrocode}
-% \subsection{Create all commands to memorize display options}
-% \begin{macrocode}
- \newtoggle{Xlemmadisablefontselection@#1}
- \newtoggle{Xendlemmadisablefontselection@#1}
- \csgdef{Xhangindent@#1}{0pt}%
- \csgdef{hangindentX@#1}{0pt}%
- \csgdef{Xragged@#1}{}%
- \csgdef{raggedX@#1}{}%
- \csgdef{hsizetwocol@#1}{0.45 \hsize}%
- \csgdef{hsizetwocolX@#1}{0.45 \hsize}%
- \csgdef{hsizethreecol@#1}{.3 \hsize}%
- \csgdef{hsizethreecolX@#1}{.3 \hsize}%
- \csgdef{Xnotenumfont@#1}{\notenumfont}%
- \csgdef{Xendnotenumfont@#1}{\notenumfont}%
- \csgdef{notenumfontX@#1}{\notenumfont}%
- \csgdef{Xnotefontsize@#1}{\notefontsetup}%
- \csgdef{notefontsizeX@#1}{\notefontsetup}%
- \csgdef{Xendnotefontsize@#1}{\notefontsetup}%
- \csgdef{bhooknoteX@#1}{}%
- \csgdef{bhookXnote@#1}{}%
- \csgdef{bhookXendnote@#1}{}%
- \csgdef{boxlinenum@#1}{0pt}%
- \csgdef{boxXendlinenum@#1}{0pt}%
- \csgdef{boxsymlinenum@#1}{0pt}%
- \newtoggle{numberonlyfirstinline@#1}%
- \newtoggle{numberonlyfirstintwolines@#1}%
- \csgdef{twolines@#1}{}%
- \csgdef{morethantwolines@#1}{}%
- \newtoggle{onlypstartinfootnote@#1}%
- \newtoggle{pstartinfootnoteeverytime@#1}%
- \newtoggle{pstartinfootnote@#1}%
- \csgdef{symlinenum@#1}{\symplinenum}%
- \newtoggle{nonumberinfootnote@#1}%
- \csgdef{beforenumberinfootnote@#1}{0pt}%
- \csgdef{afternumberinfootnote@#1}{0.5em}%
- \newtoggle{nonbreakableafternumber@#1}%
- \csgdef{beforesymlinenum@#1}{\csuse{beforenumberinfootnote@#1}}%
- \csgdef{aftersymlinenum@#1}{\csuse{afternumberinfootnote@#1}}%
- \csgdef{inplaceofnumber@#1}{1em}%
- \global\cslet{lemmaseparator@#1}{\rbracket}%
- \csgdef{beforelemmaseparator@#1}{0em}%
- \csgdef{afterlemmaseparator@#1}{0.5em}%
- \csgdef{inplaceoflemmaseparator@#1}{1em}%
- \csgdef{afternote@#1}{1em plus.4em minus.4em}%
- \csgdef{parafootsep@#1}{\parafootftmsep}%
- \csgdef{beforeXnotes@#1}{1.2em \@plus .6em \@minus .6em}
- \csgdef{beforenotesX@#1}{1.2em \@plus .6em \@minus .6em}
- \csgdef{afterXrule@#1}{0pt}
- \csgdef{afterruleX@#1}{0pt}
- \csgdef{txtbeforeXnotes@#1}{}
- \csgdef{maxhnotesX@#1}{\ledfootinsdim}%
- \csgdef{maxhXnotes@#1}{\ledfootinsdim}
- \newtoggle{Xnoteswidthliketwocolumns@#1}%
- \newtoggle{notesXwidthliketwocolumns@#1}%
-% \end{macrocode}
-% \subsection{Create inserts, needed to add notes in foot}
-% As regards inserts, see chapter 15 of the TeXBook by D. Knuth
-% \begin{macrocode}
-
- \expandafter\newinsert\csname footins#1\endcsname%
- \expandafter\newinsert\csname #1footins\endcsname%
- \expandafter\newinsert\csname mpfootins#1\endcsname%
- \expandafter\newinsert\csname mp#1footins\endcsname%
-% \end{macrocode}
-% \subsection{Create commands for critical apparatus, \cs{Xfootnote}}
+% \subsection{For critical footnotes}
+% Critical footnotes are those which start with letters.
+% We look for the \cs{nocritical} option of \Eledmac{}.
+% \begin{macrocode}
+ \unless\ifnocritical@
+% \end{macrocode}
+% \subsubsection{Options}
+% \begin{macrocode}
+ \newtoggle{Xparindent@#1}
+ \newtoggle{Xlemmadisablefontselection@#1}
+ \csgdef{Xhangindent@#1}{0pt}%
+ \csgdef{Xragged@#1}{}%
+ \csgdef{hsizetwocol@#1}{0.45 \hsize}%
+ \csgdef{hsizethreecol@#1}{.3 \hsize}%
+ \csgdef{Xcolalign@#1}{\raggedright}%
+ \csgdef{Xnotenumfont@#1}{\notenumfont}%
+ \csgdef{Xnotefontsize@#1}{\notefontsetup}%
+ \csgdef{bhookXnote@#1}{}%
+ \csgdef{boxlinenum@#1}{0pt}%
+ \csgdef{boxsymlinenum@#1}{0pt}%
+ \newtoggle{numberonlyfirstinline@#1}%
+ \newtoggle{numberonlyfirstintwolines@#1}%
+ \csgdef{twolines@#1}{}%
+ \csgdef{morethantwolines@#1}{}%
+ \newtoggle{twolinesbutnotmore@#1}%
+ \newtoggle{twolinesonlyinsamepage@#1}%
+ \newtoggle{onlypstartinfootnote@#1}%
+ \newtoggle{pstartinfootnoteeverytime@#1}%
+ \newtoggle{pstartinfootnote@#1}%
+ \csgdef{symlinenum@#1}{\symplinenum}%
+ \newtoggle{nonumberinfootnote@#1}%
+ \csgdef{beforenumberinfootnote@#1}{0pt}%
+ \csgdef{afternumberinfootnote@#1}{0.5em}%
+ \newtoggle{nonbreakableafternumber@#1}%
+ \csgdef{beforesymlinenum@#1}{\csuse{beforenumberinfootnote@#1}}%
+ \csgdef{aftersymlinenum@#1}{\csuse{afternumberinfootnote@#1}}%
+ \csgdef{inplaceofnumber@#1}{1em}%
+ \global\cslet{lemmaseparator@#1}{\rbracket}%
+ \csgdef{beforelemmaseparator@#1}{0em}%
+ \csgdef{afterlemmaseparator@#1}{0.5em}%
+ \csgdef{inplaceoflemmaseparator@#1}{1em}%
+ \csgdef{beforeXnotes@#1}{1.2em \@plus .6em \@minus .6em}
+ \csgdef{afterXrule@#1}{0pt}
+ \csgdef{txtbeforeXnotes@#1}{}
+ \csgdef{maxhXnotes@#1}{\ledfootinsdim}
+ \newtoggle{Xnoteswidthliketwocolumns@#1}%
+% \end{macrocode}
+% \subsubsection{Create inserts, needed to add notes in foot}
+% As regards inserts, see chapter 15 of the TeXBook by D. Knuth.
+% \begin{macrocode}
+ \expandafter\newinsert\csname #1footins\endcsname%
+ \unless\ifnoledgroup@%
+ \expandafter\newinsert\csname mp#1footins\endcsname%
+ \fi%
+% \end{macrocode}
+% \subsubsection{Create commands for critical apparatus, \cs{Afootnote}, \cs{Bfootnote} etc.}
% Note the double \# in command: it's because command is made inside another command.
% \changes{v1.4}{2012/11/16}{Remembers the language of the lemma, in order to create a correct direction for the footnote separator.}
% \begin{macrocode}
-
- \global\notbool{parapparatus@}{\expandafter\newcommand\expandafter *}{\expandafter\newcommand}\csname #1footnote\endcsname[2][]{%
- \if@edtext@%
- \begingroup%
- \newcommand{\content}{##2}%
- \ifnumberedpar@%
- \ifledRcol%
- \ifluatex%
- \footnotelang@lua[R]%
- \fi%
- \@ifundefined{xpg@main@language}%if polyglossia
- {}%
- {\footnotelang@poly[R]}%
- \footnoteoptions@[R]{##1}{true}%
- \xright@appenditem{\noexpand\prepare@edindex@fornote{\l@d@nums}%
- \noexpand\csuse{v#1footnote}{#1}%
- {{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}}\to\inserts@listR
- \footnoteoptions@[R]{##1}{false}%
- \global\advance\insert@countR \@ne%
- \else%
+ \global\notbool{parapparatus@}{\expandafter\newcommand\expandafter *}{\expandafter\newcommand}\csname #1footnote\endcsname[2][]{%
+ \if@edtext@%
+ \begingroup%
+ \newcommand{\content}{##2}%
+ \ifnumberedpar@%
+ \ifledRcol%
\ifluatex%
- \footnotelang@lua%
+ \footnotelang@lua[R]%
\fi%
- \@ifundefined{xpg@main@language}%if polyglossia
- {}%
- {\footnotelang@poly}%
- \footnoteoptions@{##1}{true}%
- \xright@appenditem{\noexpand\prepare@edindex@fornote{\l@d@nums}%
- \noexpand\csuse{v#1footnote}{#1}%
- {{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}}\to\inserts@list
- \global\advance\insert@count \@ne%
- \footnoteoptions@{##1}{false}%
- \fi
- \else
- \csuse{v#1footnote}{#1}{{0|0|0|0|0|0|0}{}{##1}}%
+ \@ifundefined{xpg@main@language}%if polyglossia
+ {}%
+ {\footnotelang@poly[R]}%
+ \footnoteoptions@[R]{##1}{true}%
+ \xright@appenditem{%
+ \noexpand\prepare@preXnotes{#1}%
+ \noexpand\prepare@edindex@fornote{\l@d@nums}%
+ \noexpand\csuse{v#1footnote}{#1}%
+ {{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}%
+ }\to\inserts@listR
+ \footnoteoptions@[R]{##1}{false}%
+ \global\advance\insert@countR \@ne%
+ \else%
+ \ifluatex%
+ \footnotelang@lua%
+ \fi%
+ \@ifundefined{xpg@main@language}%if polyglossia
+ {}%
+ {\footnotelang@poly}%
+ \footnoteoptions@{##1}{true}%
+ \xright@appenditem{%
+ \noexpand\prepare@preXnotes{#1}%
+ \noexpand\prepare@edindex@fornote{\l@d@nums}%
+ \noexpand\csuse{v#1footnote}{#1}%
+ {{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}%
+ }\to\inserts@list
+ \global\advance\insert@count \@ne%
+ \footnoteoptions@{##1}{false}%
+ \fi
+ \else
+ \csuse{v#1footnote}{#1}{{0|0|0|0|0|0|0}{}{##1}}%
+ \fi%
+ \ignorespaces%
+ \endgroup%
+ \else%
+ \led@err@FootnoteWithoutEdtext%
\fi%
- \ignorespaces%
- \endgroup%
- \else%
- \led@err@FootnoteWithoutEdtext%
- \fi%
- }
+ }
% \end{macrocode}
-%Set standard display and remember the display.
+% \subsubsection{Set standard display}
% \begin{macrocode}
- \csgdef{series@display#1}{}
- \footnormal{#1}
+ \footnormal{#1}
% \end{macrocode}
-%\subsection{Create tools for familiar footnotes (\cs{footnoteX})}
+% End of for critical footnotes.
+% \begin{macrocode}
+ \fi
+% \end{macrocode}
+% \subsection{For familiar footnotes}
+% Familiar footnotes are those which end with letters.
+% We look for the \cs{nofamiliar} option of \Eledmac{}.
+% \begin{macrocode}
+ \unless\ifnofamiliar@
+% \end{macrocode}
+% \subsubsection{Options}
+% \begin{macrocode}
+ \newtoggle{parindentX@#1}
+ \csgdef{hangindentX@#1}{0pt}%
+ \csgdef{raggedX@#1}{}%
+ \csgdef{hsizetwocolX@#1}{0.45 \hsize}%
+ \csgdef{hsizethreecolX@#1}{.3 \hsize}%
+ \csgdef{colalignX@#1}{\raggedright}%
+ \csgdef{notenumfontX@#1}{\notenumfont}%
+ \csgdef{notefontsizeX@#1}{\notefontsetup}%
+ \csgdef{bhooknoteX@#1}{}%
+ \csgdef{afterruleX@#1}{0pt}
+ \csgdef{beforenotesX@#1}{1.2em \@plus .6em \@minus .6em}
+ \csgdef{maxhnotesX@#1}{\ledfootinsdim}%
+ \newtoggle{notesXwidthliketwocolumns@#1}%
+% End of for familiar footnotes.
+% \subsubsection{Create inserts, needed to add notes in foot}
+% As regards inserts, see chapter 15 of the TeXBook by D. Knuth.
+% \begin{macrocode}
+ \expandafter\newinsert\csname footins#1\endcsname%
+ \unless\ifnoledgroup@%
+ \expandafter\newinsert\csname mpfootins#1\endcsname%
+ \fi%
+% \end{macrocode}
+%\subsubsection{Create tools for familiar footnotes (\cs{footnoteX})}
% First, create the \cs{footnoteX} command.
+% Note the double \# in command: it is because a command is called inside another command.
% \begin{macrocode}
- \global\expandafter\newcommand\csname footnote#1\endcsname[1]{%
- \begingroup%
- \newcommand{\content}{##1}%
- \stepcounter{footnote#1}%
- \protected@csxdef{@thefnmark#1}{\csuse{thefootnote#1}}%
- \nottoggle{nomk@}%Nomk is set to true when using \footnoteXnomk with eledpar
- {\csuse{@footnotemark#1}}%
- {}%
- \ifluatex%
- \xdef\footnote@luatextextdir{\the\luatextextdir}%
- \xdef\footnote@luatexpardir{\the\luatexpardir}%
- \fi%
- \csuse{vfootnote#1}{#1}{\expandonce\content}\m@mmf@prepare%
- \endgroup%
- }
+ \global\expandafter\newcommand\csname footnote#1\endcsname[1]{%
+ \begingroup%
+ \prepare@prenotesX{#1}%
+ \newcommand{\content}{##1}%
+ \stepcounter{footnote#1}%
+ \protected@csxdef{@thefnmark#1}{\csuse{thefootnote#1}}%
+ \nottoggle{nomk@}%Nomk is set to true when using \footnoteXnomk with eledpar
+ {\csuse{@footnotemark#1}}%
+ {}%
+ \ifluatex%
+ \xdef\footnote@luatextextdir{\the\luatextextdir}%
+ \xdef\footnote@luatexpardir{\the\luatexpardir}%
+ \fi%
+ \csuse{vfootnote#1}{#1}{\expandonce\content}\m@mmf@prepare%
+ \endgroup%
+ }
% \end{macrocode}
-% The counters.
+% Then define the counters.
% \begin{macrocode}
- \newcounter{footnote#1}
- \global\expandafter\renewcommand\csname thefootnote#1\endcsname{\arabic{footnote#1}}
+ \newcounter{footnote#1}
+ \global\expandafter\renewcommand\csname thefootnote#1\endcsname{\arabic{footnote#1}}
% \end{macrocode}
% Don't forget to initialize series
% \begin{macrocode}
- \csgdef{series@displayX#1}{}
- \footnormalX{#1}
+ \footnormalX{#1}
+ \fi
+% \end{macrocode}
+% \subsection{Common options to critical and familiar footnotes}
+% For historical reasons, \verb+parafootsep+ and \verb+afternote+ hooks are common to critical and familiar footnotes.
+% \begin{macrocode}
+ \csgdef{parafootsep@#1}{\parafootftmsep}%
+ \csgdef{afternote@#1}{1em plus.4em minus.4em}%
% \end{macrocode}
% \subsection{The endnotes}
+% Endnotes are commands like \cs{Xendnote}, where X is a series letter.
+% First, we check for the \verb+noend+ options.
+% \begin{macrocode}
+ \unless\ifnoend@
+% \end{macrocode}
+% \subsubsection{The main macro}
% The \cs{Xendnote} macro functions to
% write one endnote to the \file{.end} file. We change
% \cs{newlinechar} so that in the file every space becomes the
@@ -9929,35 +10554,58 @@
% exceed restrictions on the length of lines in files.
% \begin{macrocode}
- \global\expandafter\newcommand\csname #1endnote\endcsname[2]{{\newlinechar='40
- \global\@noneed@Footnotetrue%
- \newcommand{\content}{##1}%
- \immediate\write\l@d@end{\expandafter\string\csname #1end\endcsname%
- {\ifnumberedpar@\l@d@nums\fi}%
- {\ifnumberedpar@\expandonce\@tag\fi}{\expandonce\content}{#1}}}\ignorespaces%
- }
+ \global\expandafter\newcommandx\csname #1endnote\endcsname[2][1,usedefault]{%
+ \bgroup%
+ \newlinechar='40%
+ \global\@noneed@Footnotetrue%
+ \newcommand{\content}{##2}%
+ \immediate\write\l@d@end{%
+ \expandafter\string\csname #1end\endcsname%
+ {\ifnumberedpar@\l@d@nums\fi}%
+ {\ifnumberedpar@\expandonce\@tag\fi}%
+ {\expandonce\content}%
+ {#1}%
+ {##1}%
+ }%
+ \egroup%
+ \ignorespaces%
+ }%
% \end{macrocode}
% \cs{Xendnote} commands called \cs{Xend} commands on to the endnote file; these are analogous to the various
% \verb"footfmt" commands above, and they take the same arguments.
-% When we process this file, we'll want to pick out the notes of one
+% When we process this file, we want to pick out the notes of one
% series and ignore all the rest. To do that, we equate the \verb"end"
% command for the series we want to \cs{endprint}, and leave the
-% rest equated to \cs{@gobblethree}, which just skips over its three
-% arguments.\footnote{Christophe Hebeisen (\texttt{christophe.hebeisen@a3.epfl.ch})
-% emailed on 2003/11/05 to say he had found that \cs{@gobblethree} was also
-% defined in the amsfonts package.}
+% rest equated to \cs{@gobblefive}, which just skips over its five
+% arguments.
% \begin{macrocode}
- \global\cslet{#1end}{\@gobblefour}
+ \global\cslet{#1end}{\@gobblefive}
% \end{macrocode}
% We need to be able to modify \Eledmac's footnote macros and restore their
-
- \global\csletcs{#1@@footnote}{#1footnote}
-% \cs{Stock series in \cs{@series}}
% \begin{macrocode}
-
+ \global\csletcs{#1@@footnote}{#1footnote}
+% \end{macrocode}
+% \subsubsection{The options}
+% \begin{macrocode}
+ \csgdef{Xendtwolines@#1}{}%
+ \csgdef{Xendmorethantwolines@#1}{}%
+ \newtoggle{Xendtwolinesbutnotmore@#1}{}%
+ \newtoggle{Xendtwolinesonlyinsamepage@#1}{}%
+ \newtoggle{Xendlemmadisablefontselection@#1}%
+ \csgdef{Xendnotenumfont@#1}{\notenumfont}%
+ \csgdef{Xendnotefontsize@#1}{\notefontsetup}%
+ \csgdef{bhookXendnote@#1}{}%
+ \csgdef{boxXendlinenum@#1}{0pt}%
+% \end{macrocode}
+% End of endnotes declaration
+% \begin{macrocode}
+ \fi%
+% \end{macrocode}
+% Dump series in \cs{@series}
+% \begin{macrocode}
\listxadd{\@series}{#1}
-}
+ }
}% End of \newseries
% \end{macrocode}
% \end{macro}
@@ -9968,42 +10616,61 @@
% \section{Display}
% \subsection{Change series order}
% \changes{v1.1}{2012/09/25}{New tools to change order of series}
-% \begin{macro}{\firstseries}
+% \changes{v1.21.0}{2015/04/13}{\cs{seriesatbegin} and \cs{seriesatbegin} more efficient}
+% \begin{macro}{\seriesatbegin}
% \cs{seriesatbegin}\marg{s} changes the order of series, to put the series \meta{s} at the beginning of the list.
% The series can be the result of a command.
% \begin{macrocode}
-\newcommand{\seriesatbegin}[1]{
- \edef\series{#1}
- \def\new{}
- \listeadd{\new}{\series}
- \def\do##1{\ifcsstring{series}{##1}{}{\listadd{\new}{##1}}}
- \dolistloop{\@series}
- \xdef\@series{\new}
+\newcommand{\seriesatbegin}[1]{%
+ \StrDel{\@series}{#1}[\@series]%
+ \edef\@new{}%
+ \listeadd{\@new}{#1}%
+ \listeadd{\@new}{\@series}%
+ \xdef\@series{\@new}%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\seriesatend}
+% \changes{v1.21.0}{2015/04/13}{Fix spurious space in \cs{seriesatend}}
% And \cs{seriesatend} moves the series to the end of the list.
% \begin{macrocode}
-\newcommand{\seriesatend}[1]{
- \edef\series{#1}
- \def\new{}
- \def\do##1{\ifcsstring{series}{##1}{}{\listadd{\new}{##1}}}
- \dolistloop{\@series}
- \listeadd{\new}{\series}
- \xdef\@series{\new}
+\newcommand{\seriesatend}[1]{%
+ \StrDel{\@series}{#1}[\@series]%
+ \edef\@new{}%
+ \listeadd{\@new}{\@series}%
+ \listeadd{\@new}{#1}%
+ \xdef\@series{\@new}%
+}
+% \end{macrocode}
+% \end{macro}
+% \subsection{Test series order}
+% \begin{macro}{\ifseriesbefore}
+% \cs{ifseriesbefore}\marg{seriesA}\marg{seriesB}\marg{true}\marg{false} expands \verb+<true>+ if \verb+<seriesA+> is printed before \verb+<seriesB>+, expands \verb+<false>+ otherwise.
+% \begin{macrocode}
+\newcommand{\ifseriesbefore}[4]{%
+ \StrPosition{\@series}{#1}[\@first]%
+ \StrPosition{\@series}{#2}[\@second]%
+ \ifnumgreater{\@second}{\@first}{#3}{#4}%
}
% \end{macrocode}
% \end{macro}
% \changes{v1.0}{2012/09/15}{New generic commands to customize footnote display.}
% \subsection{Options}
+% \subsubsection{Tools to set options}
% \begin{macro}{\settoggle@series}
% \changes{v1.1}{2012/09/25}{\cs{settoggle@series} switch the global value of the toggle, not only the local value.}
% \changes{v1.13.0}{2014/09/16}{\cs{settoggle@series} can take an optional arguments to reload series setup.}
% \cs{settoggle@series}\marg{series}\marg{toggle}\marg{value} is a generic command to switch toggles for some series.
-
+% The arguments are:
+% \begin{itemize}
+% \item \verb+#1+ (mandatory): the series for which the hooks should be set. If empty, all the series will be affected.
+% \item \verb+#2+ (mandatory): the name of the hook.
+% \item \verb+#3+ (mandatory): the new value of toggle (true or false).
+% \item \verb+#4+ (optional): if equal to \verb+reload+, reload the footnote setting (call \cs{footnormal} or \cs{footparagraph} or \ldots\ depending of the footnote display).
+% \item \verb+#5+ (optional): if not empty, and if \verb+#1+ is empty, change the hook setting for pseudo-series, as \verb+appref+.
+% \end{itemize}
% \begin{macrocode}
-\newcommandx{\settoggle@series}[4][4]{%
+\newcommandx{\settoggle@series}[5][4,5,usedefault]{%
\def\do##1{%
\global\settoggle{#2@##1}{#3}%
\ifstrequal{#4}{reload}%
@@ -10015,17 +10682,28 @@
}%
\ifstrempty{#1}{%
\dolistloop{\@series}%
+ \ifstrempty{#5}{}{%
+ \docsvlist{#5}%
+ }
}%
- {%
+ {%
\docsvlist{#1}%
}%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\setcommand@series}
-% \cs{setcommand@series}\marg{series}\marg{command}\marg{value} is a generic command to change commands for some series.
+% \cs{setcommand@series}\marg{series}\marg{command}\marg{value} is a generic command to change hooks into form of commands for some series.
+% The arguments are:
+% \begin{itemize}
+% \item \verb+#1+ (mandatory): the series for which the hooks should be set. If empty, all the series will be affected.
+% \item \verb+#2+ (mandatory): the name of the hook.
+% \item \verb+#3+ (mandatory): the new value of the hook/command.
+% \item \verb+#4+ (optional): if equal to \verb+reload+, reload the footnote setting (call \cs{footnormal} or \cs{footparagraph} or \ldots\ depending of the footnote display).
+% \item \verb+#5+ (optional): if not empty, and if \verb+#1+ is empty, change the hook setting for pseudo-series, as \verb+appref+.
+% \end{itemize}
% \begin{macrocode}
-\newcommandx{\setcommand@series}[4][4]{%
+\newcommandx{\setcommand@series}[5][4,5,usedefault]{%
\def\do##1{
\csgdef{#2@##1}{#3}
\ifstrequal{#4}{reload}{
@@ -10034,6 +10712,9 @@
}{}}
\ifstrempty{#1}{%
\dolistloop{\@series}%
+ \ifstrempty{#5}{}{%
+ \docsvlist{#5}
+ }
}%
{%
\docsvlist{#1}%
@@ -10041,150 +10722,162 @@
}%
% \end{macrocode}
% \end{macro}
+% \subsubsection{Tools to generate options commands}
% \begin{macro}{\newhookcommand@series}
% \cs{newhookcommand@series}\cs{command names} is a generic command to add new commands for hooks, like \cs{hsizetwocol}.
+% The first argument is the name of the hook, the second a comma separated list of pseudo-series where the hook can be used, like \verb+appref+ in the case of \cs{twolines}.
+% The second argument is also used to create commands named \cs{<hookname><pseudoseries>},
+% like \cs{twolinesappref}.
+% \changes{v1.21.0}{2015/04/13}{\cs{newhookcommand@series} can take an optional argument.}
% \begin{macrocode}
-\newcommand{\newhookcommand@series}[1]{%
+\newcommandx{\newhookcommand@series}[2][2,usedefault]{%
\global\expandafter\newcommand\expandafter*\csname #1\endcsname[2][]{%
- \setcommand@series{##1}{#1}{##2}%
+ \setcommand@series{##1}{#1}{##2}[][#2]%
}%
-}
-
-\newhookcommand@series{twolines}
-
-\newhookcommand@series{morethantwolines}
-
-\newhookcommand@series{Xhangindent}
-
-\newhookcommand@series{hangindentX}
-
-\newhookcommand@series{Xragged}
-
-\newhookcommand@series{raggedX}
-
-\newhookcommand@series{hsizetwocol}
-
-\newhookcommand@series{hsizethreecol}
-
-\newhookcommand@series{hsizetwocolX}
-
-\newhookcommand@series{hsizethreecolX}
-
-\newhookcommand@series{Xnotenumfont}
-
-\newhookcommand@series{notenumfontX}
-
-\newhookcommand@series{Xendnotenumfont}
-
-\newhookcommand@series{bhooknoteX}
-
-\newhookcommand@series{bhookXnote}
-
-\newhookcommand@series{bhookXendnote}
-
-\newhookcommand@series{Xnotefontsize}
-
-\newhookcommand@series{notefontsizeX}
-
-\newhookcommand@series{Xendnotefontsize}
-
-\newhookcommand@series{boxlinenum}
-
-\newhookcommand@series{boxXendlinenum}%
-
-\newhookcommand@series{boxsymlinenum}
-
-\newhookcommand@series{parafootsep}
-
-\newhookcommand@series{symlinenum}
-
-\newhookcommand@series{beforenumberinfootnote}
-
-\newhookcommand@series{afternumberinfootnote}
-
-\newhookcommand@series{beforesymlinenum}
-
-\newhookcommand@series{aftersymlinenum}
-
-\newhookcommand@series{inplaceofnumber}
-
-\newhookcommand@series{lemmaseparator}
-
-\newhookcommand@series{beforelemmaseparator}
-
-\newhookcommand@series{afterlemmaseparator}
-
-\newhookcommand@series{inplaceoflemmaseparator}
-
-\newhookcommand@series{afternote}
-
-\newhookcommand@series{txtbeforeXnotes}
-
-\newhookcommand@series{afterruleX}
-
-\newhookcommand@series{afterXrule}
-
-
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\newhookcommand@series@reload}
-% \changes{v1.8.0}{2013/11/24}{Debug \cs{beforenotesX} and \cs{maxhnotesX} which didn't work.}
-% \changes{v1.12.0}{2014/08/05}{Debug \cs{beforenotesX} and \cs{maxhnotesX} which didn't work when called after \cs{footparagraphX}.}
-% \changes{v1.12.0}{2014/08/05}{Debug \cs{beforeXnotes} and \cs{maxhXnotes} which didn't work when called after \cs{footparagraph}.}
-% \cs{newhookcommand@series@reload} does the same thing as \cs{newhookcommand@series}
-% but the commands created by this macro also reload the series displaying (normal, paragraph, twocol, threecol).
-% \begin{macrocode}
-\newcommand{\newhookcommand@series@reload}[1]{%
- \global\expandafter\newcommand\expandafter*\csname #1\endcsname[2][]{%
- \setcommand@series{##1}{#1}{##2}[reload]%
+ \ifstrempty{#2}{}{%
+ \def\do##1{%
+ \global\expandafter\newcommand\expandafter*\csname #1##1\endcsname[1]{%
+ \csuse{#1}[##1]{####1}%
+ }%
+ }%
+ \docsvlist{#2}%
}%
}
-\newhookcommand@series@reload{beforeXnotes}
-
-\newhookcommand@series@reload{beforenotesX}
-
-\newhookcommand@series@reload{maxhnotesX}
-
-\newhookcommand@series@reload{maxhXnotes}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\newhooktoggle@series}
-%\cs{newhooktoggle@series}\cs{command names} is a generic command to add new commands for new toggle hook, like \cs{numberonlyfirstinline}.
+%\cs{newhooktoggle@series}\cs{command names} is a generic command to add new commands for a new toggle hook, like \cs{numberonlyfirstinline}.
+% The second argument is also used to create commands named \cs{<hookname><pseudoseries>},
+% like \cs{twolinesbutnotmoreappref}.
+% \changes{v1.21.0}{2015/04/13}{\cs{newhooktoggle@series} can take an optional argument.}
% \begin{macrocode}
-\newcommand{\newhooktoggle@series}[1]{%
+\newcommandx{\newhooktoggle@series}[2][2,usedefault]{%
\global\expandafter\newcommandx\expandafter*\csname #1\endcsname[2][1,2={true},usedefault]{%
- \settoggle@series{##1}{#1}{##2}%
+ \settoggle@series{##1}{#1}{##2}[][#2]%
+ }%
+ \ifstrempty{#2}{}{%
+ \def\do##1{%
+ \global\expandafter\newcommand\expandafter*\csname #1##1\endcsname{%
+ \csuse{#1}[##1]%
+ }%
}%
+ \docsvlist{#2}%
+ }%
}
-\newhooktoggle@series{numberonlyfirstinline}
-\newhooktoggle@series{numberonlyfirstintwolines}
-\newhooktoggle@series{nonumberinfootnote}
-\newhooktoggle@series{pstartinfootnote}
-\newhooktoggle@series{pstartinfootnoteeverytime}%
-\newhooktoggle@series{onlypstartinfootnote}
-\newhooktoggle@series{nonbreakableafternumber}
-\newhooktoggle@series{Xlemmadisablefontselection}
-\newhooktoggle@series{Xendlemmadisablefontselection}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\newhooktoggle@series}
% \changes{v1.13.0}{2014/09/16}{Add \cs{newhookcommand@toggle@reload}}
% \cs{newhookcommand@toggle@reload} does the same thing as \cs{newhooktoggle@series}
-% but the commands created by this macro also reload the series displaying (normal, paragraph, twocol, threecol).
+% but the commands created by this macro also reload the series which is displayed (normal, paragraph, twocol, threecol).
% \begin{macrocode}
\newcommand{\newhooktoggle@series@reload}[1]{%
\global\expandafter\newcommandx\expandafter*\csname #1\endcsname[2][1,2={true},usedefault]{%
\settoggle@series{##1}{#1}{##2}[reload]%
}%
}%
-
-\newhooktoggle@series@reload{Xnoteswidthliketwocolumns}%
-\newhooktoggle@series@reload{notesXwidthliketwocolumns}%
-
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\newhookcommand@series@reload}
+% \changes{v1.8.0}{2013/11/24}{Debug \cs{beforenotesX} and \cs{maxhnotesX} which didn't work.}
+% \changes{v1.12.0}{2014/08/05}{Debug \cs{beforenotesX} and \cs{maxhnotesX} which didn't work when called after \cs{footparagraphX}.}
+% \changes{v1.12.0}{2014/08/05}{Debug \cs{beforeXnotes} and \cs{maxhXnotes} which didn't work when called after \cs{footparagraph}.}
+% \cs{newhookcommand@series@reload} does the same thing as \cs{newhookcommand@series}
+% but the commands created by this macro also reload the series which is displayed (normal, paragraph, twocol, threecol).
+% \begin{macrocode}
+\newcommand{\newhookcommand@series@reload}[1]{%
+ \global\expandafter\newcommand\expandafter*\csname #1\endcsname[2][]{%
+ \setcommand@series{##1}{#1}{##2}[reload]%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{Options for critical notes}
+% Before generating the commands that are used to set the critical notes, such as \verb+\numberonlyfirstinline+, \verb+\lemmaseparator+ and the like, we check the \verb+nocritical+ option.
+% \begin{macrocode}
+\unless\ifnocritical@
+ \newhooktoggle@series{Xparindent}
+ \newhookcommand@series{twolines}[appref]
+ \newhookcommand@series{morethantwolines}[appref]
+ \newhooktoggle@series{twolinesbutnotmore}[appref]
+ \newhooktoggle@series{twolinesonlyinsamepage}[appref]
+ \newhookcommand@series{Xhangindent}
+ \newhookcommand@series{Xragged}
+ \newhookcommand@series{hsizetwocol}
+ \newhookcommand@series{hsizethreecol}
+ \newhookcommand@series{Xcolalign}%
+ \newhookcommand@series{Xnotenumfont}
+ \newhookcommand@series{bhookXnote}
+ \newhookcommand@series{boxsymlinenum}
+ \newhookcommand@series{symlinenum}
+ \newhookcommand@series{beforenumberinfootnote}
+ \newhookcommand@series{afternumberinfootnote}
+ \newhookcommand@series{beforesymlinenum}
+ \newhookcommand@series{aftersymlinenum}
+ \newhookcommand@series{inplaceofnumber}
+ \newhookcommand@series{lemmaseparator}
+ \newhookcommand@series{beforelemmaseparator}
+ \newhookcommand@series{afterlemmaseparator}
+ \newhookcommand@series{inplaceoflemmaseparator}
+ \newhookcommand@series{txtbeforeXnotes}
+ \newhookcommand@series@reload{afterXrule}
+ \newhooktoggle@series{numberonlyfirstinline}
+ \newhooktoggle@series{numberonlyfirstintwolines}
+ \newhooktoggle@series{nonumberinfootnote}
+ \newhooktoggle@series{pstartinfootnote}
+ \newhooktoggle@series{pstartinfootnoteeverytime}%
+ \newhooktoggle@series{onlypstartinfootnote}
+ \newhooktoggle@series{nonbreakableafternumber}
+ \newhooktoggle@series{Xlemmadisablefontselection}
+ \newhookcommand@series@reload{maxhXnotes}
+ \newhookcommand@series@reload{beforeXnotes}
+ \newhooktoggle@series@reload{Xnoteswidthliketwocolumns}%
+ \newhookcommand@series{Xnotefontsize}
+ \newhookcommand@series{boxlinenum}
+\fi
+% \end{macrocode}
+% \subsubsection{Options for familiar notes}
+% Before generating the optional commands for familiar notes, we check the \verb+nofamiliar+ option.
+% \begin{macrocode}
+\unless\ifnofamiliar@
+ \newhooktoggle@series{parindentX}
+ \newhookcommand@series{hangindentX}
+ \newhookcommand@series{raggedX}
+ \newhookcommand@series{hsizetwocolX}
+ \newhookcommand@series{hsizethreecolX}
+ \newhookcommand@series{colalignX}%
+ \newhookcommand@series{notenumfontX}
+ \newhookcommand@series{bhooknoteX}
+ \newhookcommand@series@reload{beforenotesX}
+ \newhookcommand@series@reload{maxhnotesX}
+ \newhooktoggle@series@reload{notesXwidthliketwocolumns}%
+ \newhookcommand@series@reload{afterruleX}
+ \newhookcommand@series{notefontsizeX}
+\fi
+% \end{macrocode}
+% \subsubsection{Common options to critical and familiar footnotes}
+% For historical reasons, \verb+parafootsep+ and \verb+afternote+ hooks are common to critical and familiar footnotes.
+% \begin{macrocode}
+\newhookcommand@series{parafootsep}
+\newhookcommand@series{afternote}
+% \end{macrocode}
+% \subsubsection{Options for endnotes}
+% Before generating the commands that are used to set the endnotes, such as \verb+\numberonlyfirstinline+, \verb+\lemmaseparator+ and the like, we check the \verb+noend+ option.
+% \begin{macrocode}
+\unless\ifnoend@
+ \newhookcommand@series{Xendtwolines}[apprefwithpage]
+ \newhookcommand@series{Xendmorethantwolines}[apprefwithpage]
+ \newhooktoggle@series{Xendtwolinesbutnotmore}[apprefwithpage]
+ \newhooktoggle@series{Xendtwolinesonlyinsamepage}[apprefwithpage]
+ \newhookcommand@series{Xendnotenumfont}
+ \newhookcommand@series{bhookXendnote}
+ \newhookcommand@series{boxXendlinenum}%
+ \newhookcommand@series{Xendnotefontsize}
+ \newhooktoggle@series{Xendlemmadisablefontselection}
+\fi
+% \end{macrocode}
% \subsection{Old commands, kept for backward compatibility}
-% The next commands are kept for ascendant compatibily, but should'nt be used anymore.
+% The next commands are kept for backward compatibility, but should not be used anymore.
% \begin{macro}{\notenumfont}
% \begin{macro}{\notefontsetup}
% \begin{macro}{\ifledplinenum}
@@ -10540,7 +11233,6 @@
% \changes{v0.7}{2005/02/25}{Deleted \cs{page@start} from \cs{l@ddofootinsert}}
% \begin{macrocode}
\newcommand*{\l@ddofootinsert}{%
-%%% \page@start
\ifvoid\footins
\setbox\@outputbox \box\@cclv
\else
@@ -10548,7 +11240,7 @@
\boxmaxdepth \@maxdepth
\@tempdima\dp\@cclv
\unvbox \@cclv
- \ifFN@bottom\vfill\fi\vskip \skip\footins%%% If the option bottom of loadmisc package is loaded
+ \ifFN@bottom\vfill\fi\vskip \skip\footins% If the option bottom of loadmisc package is loaded
\color@begingroup
\normalcolor
\footnoterule
@@ -10618,12 +11310,17 @@
% We check before printing them that they are not voided.
% \begin{macrocode}
\newcommand*{\@opxtrafeetii}{%
- \def\do##1{%
- \ifvoid\csuse{##1footins}\else%
- \print@Xnotes{##1}%
- \fi%
- }%
- \dolistloop{\@series}%
+ \unless\ifnocritical@%
+ \gdef\firstXseries@{}%
+ \def\do##1{%
+ \ifvoid\csuse{##1footins}\else%
+ \global\skip\csuse{##1footins}=\csuse{beforeXnotes@##1}%
+ \global\advance\skip\csuse{##1footins} by\csuse{afterXrule@##1}%
+ \print@Xnotes{##1}%
+ \fi%
+ }%
+ \dolistloop{\@series}%
+ \fi%
}%
% \end{macrocode}
% \end{macro}
@@ -10649,11 +11346,13 @@
% within \cs{@reinserts}. The implementation may well have to change.
% \begin{macrocode}
\newcommand*{\doreinxtrafeetii}{%
- \def\do##1{%
- \ifvoid\csuse{##1footins}\else%
- \insert\csuse{##1footins}{\unvbox\csuse{##1footins}}%
- \fi}%
- \dolistloop{\@series}
+ \unless\ifnocritical@%
+ \def\do##1{%
+ \ifvoid\csuse{##1footins}\else%
+ \insert\csuse{##1footins}{\unvbox\csuse{##1footins}}%
+ \fi}%
+ \dolistloop{\@series}
+ \fi%
}
% \end{macrocode}
@@ -10739,11 +11438,14 @@
% \begin{macro}{\@mem@extranofeet}
% \begin{macrocode}
\g@addto@macro{\@mem@extranofeet}{%
- \def\do#1{\ifvoid\csuse{#1footins}\else\@mem@nofootfalse\fi%
- \ifvoid\csuse{footins#1}\else\@mem@nofootfalse\fi%
- }
- \dolistloop{\@series}%
- \@led@extranofeet}
+ \unless\ifnocritical@%
+ \def\do#1{\ifvoid\csuse{#1footins}\else\@mem@nofootfalse\fi%
+ \ifvoid\csuse{footins#1}\else\@mem@nofootfalse\fi%
+ }
+ \dolistloop{\@series}%
+ \@led@extranofeet
+ \fi%
+ }%
}{%
% \end{macrocode}
% \end{macro}
@@ -10752,12 +11454,25 @@
% \begin{macro}{\@doclearpage}
% \begin{macrocode}
\newcommand*{\@led@testifnofoot}{%
- \@led@nofoottrue
- \ifvoid\footins\else\@led@nofootfalse\fi
- \def\do##1{\ifvoid\csuse{##1footins}\else\@led@nofootfalse\fi%
- \ifvoid\csuse{footins##1}\else\@led@nofootfalse\fi}%
- \dolistloop{\@series}
- \@led@extranofeet}
+ \@led@nofoottrue%
+ \ifvoid\footins\else%
+ \@led@nofootfalse%
+ \fi%
+ \def\do##1{%
+ \unless\ifnocritical@%
+ \ifvoid\csuse{##1footins}\else%
+ \@led@nofootfalse%
+ \fi%
+ \fi%
+ \unless\ifnofamiliar@%
+ \ifvoid\csuse{footins##1}\else%
+ \@led@nofootfalse%
+ \fi%
+ \fi%
+ }%
+ \dolistloop{\@series}%
+ \@led@extranofeet%
+}%
\renewcommand{\@doclearpage}{%
\@led@testifnofoot
@@ -11000,6 +11715,55 @@
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\applabel}
+% \cs{applabel}, if called in \cs{edtext} will insert automatically both a start and an end label for the current edtext lines.
+% \begin{macrocode}
+\newcommand*{\applabel}[1]{%
+ \if@edtext@%
+% \end{macrocode}
+% Label should not be already defined.
+% \begin{macrocode}
+ \ifcsundef{the@label#1}{%
+ \csdef{the@label#1}{applabel}%
+ }%
+ {%
+ \led@warn@DuplicateLabel{#1 (applabel)}%
+ }%
+% \end{macrocode}
+% Parse the edtext line numbers.
+% \begin{macrocode}
+ \expandafter\l@dp@rsefootspec\l@d@nums|%
+% \end{macrocode}% Use the \LaTeX standard hack for label.
+% \begin{macrocode}
+ \@bsphack%
+% \end{macrocode}% And now, write the data in the auxiliary file.
+% \begin{macrocode}
+ \ifledRcol%
+ \protected@write\@auxout{}%
+ {\string\l@dmake@labelsR\space\l@dparsedstartpage|\l@dparsedstartline|\l@dparsedstartsub|\the\c@pstartR|{#1:start}}%
+ \ifdef{\hypertarget}{\hypertarget{#1:start}{}}{}%
+ \protected@write\@auxout{}%
+ {\string\l@dmake@labelsR\space\l@dparsedendpage|\l@dparsedendline|\l@dparsedendsub|\the\c@pstartR|{#1:end}}%
+ \else%
+ \protected@write\@auxout{}%
+ {\string\l@dmake@labels\space\l@dparsedstartpage|\l@dparsedstartline|\l@dparsedstartsub|\the\c@pstart|{#1:start}}%
+ \ifdef{\hypertarget}{\hypertarget{#1:start}{}}{}%
+ \protected@write\@auxout{}%
+ {\string\l@dmake@labels\space\l@dparsedendpage|\l@dparsedendline|\l@dparsedendsub|\the\c@pstart|{#1:end}}%
+ \fi%
+% \end{macrocode}% Use the \LaTeX standard hack for label.
+% \begin{macrocode}
+ \@esphack%
+% \end{macrocode}% Warning if \cs{edlabel} is called outside of edtext.
+% \begin{macrocode}
+ \else%
+ \led@warn@AppLabelOutEdtext{#1}%
+ \fi%
+% \end{macrocode}% End of \cs{applabel}
+% \begin{macrocode}
+}%
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\wrap@edcrossref}
% \changes{v1.12.1}{2014/08/06}{Fix spurious spaces.}
% \changes{v1.12.7}{2014/09/07}{\cs{wrap@edcrossref} is now robust}
@@ -11173,6 +11937,61 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\appref}
+% \begin{macro}{\apprefwithpage}
+% \begin{macro}{\apprefprefixsingle}
+% \begin{macro}{\apprefprefixmore}
+% \cs{appref} prints a crossref to some lines of the apparatus defined by \cs{applabel}.
+% It prints the lines as they should be printed in the apparatus.
+%
+% If \cs{apprefprefixsingle} is not empty, it prints it before the line number.
+% If \cs{apprefprefixsingles} is not empty, it prints it before the line numbers when the first line is not the same as the last line.
+% \cs{apprefwithpage} prints a crossref to some lines of the apparatus defined by \cs{applabel}.
+% It always prints the page number, as it should be printed in the end notes.
+% The \cs{twolinesappref} and \cs{morethantwolinesappref} are similar to the footnote
+% hooks and \cs{twolines} \cs{morethantwolines}.
+% \begin{macrocode}
+\xdef\twolines@appref{}%
+\xdef\morethantwolines@appref{}%
+\newtoggle{twolinesbutnotmore@appref}%
+\newtoggle{twolinesonlyinsamepage@appref}%
+
+\newcommand\apprefprefixsingle{}%
+\newcommand\apprefprefixmore{}%
+
+\newcommandx{\appref}[2][1,usedefault]{%
+ \IfStrEq{#1}{fulllines}%
+ {\toggletrue{fulllines@}}%
+ {}%
+ \xdef\@currentseries{appref}%
+ \ifdefempty{\apprefprefixmore}%
+ {\apprefprefixsingle}%
+ {%
+ \IfEq{\xlineref{#2:start}}{\xlineref{#2:end}}%
+ {\apprefprefixsingle}%
+ {\apprefprefixmore}%
+ }%
+ \printlines\xpageref{#2:start}|\xlineref{#2:start}|\xsublineref{#2:start}|\xpageref{#2:end}|\xlineref{#2:end}|\xsublineref{#2:end}||%
+ \togglefalse{fulllines@}%
+}%
+
+\xdef\Xendtwolines@apprefwithpage{}%
+\xdef\Xendmorethantwolines@apprefwithpage{}%
+\newtoggle{Xendtwolinesbutnotmore@apprefwithpage}%
+\newtoggle{Xendtwolinesonlyinsamepage@apprefwithpage}%
+
+\newcommandx{\apprefwithpage}[2][1,usedefault]{%
+ \IfStrEq{#1}{fulllines}%
+ {\toggletrue{fulllines@}}%
+ {}%
+ \printendlines\xpageref{#2:start}|\xlineref{#2:start}|\xsublineref{#2:start}|\xpageref{#2:end}|\xlineref{#2:end}|\xsublineref{#2:end}||%
+ \togglefalse{fulllines@}%
+}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \begin{macro}{\edmakelabel}
% Sometimes the \cs{edlabel} command cannot be used to specify
% exactly the page and line desired; you can use the \cs{edmakelabel} macro
@@ -11191,8 +12010,8 @@
% \end{macrocode}
% (If you are only going to refer to such a label using
% \cs{xxref}, then you can omit entries in the same way as with
-% \cs{linenum} (see pp.\,\pageref{linenumdef} and
-% \pageref{linenumbers}), since \cs{xxref} makes a call to
+% \cs{linenum} (see \reff{linenumdef} and
+% \reff{linenumbers}), since \cs{xxref} makes a call to
% \cs{linenum} in order to do its work.)
% \end{macro}
%
@@ -11599,6 +12418,7 @@
% \changes{v0.4}{2004/02/29}{Added \cs{l@dfeetbeginmini}, \cs{l@dfeetendmini}
% and all their supporting code}
% \begin{macrocode}
+\ifnoledgroup@\else%
\newcommand*{\l@dfeetbeginmini}{\l@dedbeginmini\l@dfambeginmini}
\newcommand*{\l@dfeetendmini}{%
\IfStrEq{critical-familiar}{\@mpfnpos}%
@@ -11815,6 +12635,10 @@
% \end{macrocode}
% \end{environment}
%
+% Close the \cs{ifnoledgroup@}\cs{else}.
+% \begin{macrocode}
+\fi%
+% \end{macrocode}
% \begin{macro}{\ifledgroupnotesL@}
% \begin{macro}{\ifledgroupnotesR@}
% These boolean tests check if we are in the notes of a ledgroup. If we are, we don't number the lines.
@@ -11927,13 +12751,17 @@
% \end{macro}
% \begin{macro}{\ledinnote}
% \begin{macro}{\ledinnotehyperpage}
+% \begin{macro}{\ledinnotemark}
+% \changes{v1.21.0}{2015/04/13}{Add \cs{ledinnotemark}.}
% These macros are used to specifiy that an index reference points to a note.
% \begin{macrocode}
-\newcommand{\ledinnote}[2]{\csuse{#1}{#2\emph{n}}}
-\newcommand{\ledinnotehyperpage}[2]{\csuse{#1}{\hyperpage{#2}\emph{n}}}
+\newcommand{\ledinnote}[2]{\csuse{#1}{\ledinnotemark{#2}}}%
+\newcommand{\ledinnotehyperpage}[2]{\csuse{#1}{\ledinnotemark{\hyperpage{#2}}}}%
+\newcommand{\ledinnotemark}[1]{#1\emph{n}}%
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
% The \Lpack{memoir} class provides more flexible indexing than the
% standard classes. We need different code if the \Lpack{memoir}
% class is being used, except if \Lpack{imakeidx} or \Lpack{indextools} is used.
@@ -12115,7 +12943,7 @@
{\create@edindex@notfor@memoir}%
% \end{macrocode}
%
-% \subsection{Hyperref compatibility}
+% \subsection{hyperref compatibility}
% \begin{macro}{\hyperlinkformat}
% \cs{hyperlinkformat} command is to be used to have both a internal hyperlink and a format, when indexing.
% \begin{macrocode}
@@ -12148,10 +12976,11 @@
% \begin{macro}{\@edindex@hyperref}
% \changes{v1.12.5}{2014/08/28}{Debug \cs{edindex} when \Lpack{hyperref} is not loaded}
% \cs{get@edindex@hyperref} is to be used to define the \cs{@edindex@hyperref} macro, which, in index, links to the point where the index was called (with \Lpack{hyperref}.
-% \changes{v1.18.0}{2015/08/21}{Fix spurious space with \cs{edindex} when using \Lpack{imakeidx}/\Lpack{indextools} + hyperref.}
+% \changes{v1.18.0}{2014/08/21}{Fix spurious space with \cs{edindex} when using \Lpack{imakeidx}/\Lpack{indextools} + hyperref.}
+% \changes{v1.21.0}{2015/0}{Look at the hyperindex option of hyperref before inserting hyperref}
% \begin{macrocode}
\newcommand{\get@edindex@hyperref}[1]{%
- \ifdef{\hyperlink}%
+ \ifdefequal{\iftrue}{\ifHy@hyperindex}%
% \end{macrocode}
% We have to disable spaces to work with a \Lpack{xstring} bug
% \begin{macrocode}
@@ -12742,20 +13571,24 @@
% Macros to disable and restore familiar notes, to prevent them from printing multiple times in edtabularx and edarrayx environments.
% \begin{macrocode}
\newcommand{\disable@familiarnotes}{%
- \def\do##1{%
- \csletcs{footnote@@##1}{footnote##1}%
- \expandafter\renewcommand \csname footnote##1\endcsname[1]{%
- \protected@csxdef{@thefnmark##1}{\csuse{thefootnote##1}}%
- \csuse{@footnotemark##1}%
- }%
- }%
- \dolistloop{\@series}%
+ \unless\ifnofamiliar@%
+ \def\do##1{%
+ \csletcs{footnote@@##1}{footnote##1}%
+ \expandafter\renewcommand \csname footnote##1\endcsname[1]{%
+ \protected@csxdef{@thefnmark##1}{\csuse{thefootnote##1}}%
+ \csuse{@footnotemark##1}%
+ }%
+ }%
+ \dolistloop{\@series}%
+ \fi%
}%
\newcommand{\restore@familiarnotes}{%
- \def\do##1{%
- \csletcs{footnote##1}{footnote@@##1}%
- }%
- \dolistloop{\@series}%
+ \unless\ifnofamiliar@%
+ \def\do##1{%
+ \csletcs{footnote##1}{footnote@@##1}%
+ }%
+ \dolistloop{\@series}%
+ \fi%
}%
% \end{macrocode}
@@ -14283,8 +15116,13 @@
% \item This last command is called when the pstart is effectively printed.
% \end{enumerate}
%
+% We do not define commands for \cs{eledsection} and related if the \verb+noeledsec+ option is loaded.
+% We use etoolbox tests and not the \verb+\ifxxx…\else…\fi+ structure to prevent problem of expansions with command after the \verb+\ifxxx+ which contains \verb+fi+.
+% \begin{macrocode}
+\notbool{@noeled@sec}{%
+% \end{macrocode}
% \begin{macro}{\beforeeledchapter}
-% For technical reasons, not yet solved, page-breaking before chapters can't be made automatically by eledmac. Users have to us \cs{beforeeledchapter}.
+% For technical reasons, not yet solved, page-breaking before chapters can't be made automatically by eledmac. Users have to use \cs{beforeeledchapter}.
% \begin{macrocode}
\ifl@dmemoir
\newcommand\beforeeledchapter{\clearforchapter}
@@ -14362,7 +15200,9 @@
\AtBeginDocument{%
\patchcmd{\chapter}{\clearforchapter}{%
\if@eled@sectioning\else%
- \clearforchapter
+ \ifl@dprintingpages\else%
+ \clearforchapter%
+ \fi%
\fi%
}
{}
@@ -14414,9 +15254,12 @@
{}
{}
+
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{%
\if@eled@sectioning\else%
- \if@openright\cleardoublepage\else\clearpage\fi%No clearpage inside a \eledsection : will keep critical notes from printing on the title page.
+ \ifl@dprintingpages\else%
+ \if@openright\cleardoublepage\else\clearpage\fi%No clearpage inside a \eledsection: will keep critical notes from printing on the title page.
+ \fi%
\fi%
}%
{}%
@@ -14563,15 +15406,14 @@
% \end{macro}
% \begin{macro}{\noeledsec}
% \changes{v1.12.6}{2014/08/31}{Add \cs{noeledsec} macro.}
-% \begin{macro}{\if@noeled@sec}
-% The boolean \cs{if@noeled@sec} is set to true when \cs{noeledsec} is called.
-% It is used to disable external file creation.
+% The \cs{noeledsec} command is deprecated, people should use the \verb+noeledsec+ package option.
% \begin{macrocode}
-\newif\if@noeled@sec%
-\newcommand{\noeledsec}{\global\@noeled@sectrue}%
+\newcommand{\noeledsec}{%
+ \led@war@noeledsecDeprecated%
+ \global\@noeled@sectrue%
+}%
% \end{macrocode}
% \end{macro}
-% \end{macro}
% \begin{macro}{\eledchapter}
% \begin{macro}{\eledsection}
% \begin{macro}{\eledsubsection}
@@ -14781,6 +15623,10 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% End of the conditional test about \verb+noeledsec+ option.
+% \begin{macrocode}
+}{}
+% \end{macrocode}
% \section{Page breaking or no page breaking depending of specific lines}
% By default, page breaks are automatic. However, the user can define lines which will force page breaks, or prevent page breaks around one specific line.
% On the first run, the line-list file records the line number of where the page break is being changed (either forced, or prevented).
@@ -15040,11 +15886,11 @@
% This can cause problems for people who have made their own customizations. The next sections explain how to correct this.
%
%
-% If you created your own series using \cs{addfootins} and \cs{addfootinsX}, you should instead use the \cs{newseries} command (see \ref{newseries} p.\pageref{newseries}). You must delete your \cs{Xfootnote} command.
+% If you have created your own series using \cs{addfootins} and \cs{addfootinsX}, you should use instead the \cs{newseries} command (see \reff{newseries}). You must remove your \cs{Xfootnote} command.
%
-% If you customized the \cs{XXXXXXfmt} command, you should see if commands for display options (\ref{displayoptions} p.\pageref{displayoptions}) and options in \cs{Xfootnote} (\ref{Xfootnoteopt} p.\pageref{Xfootnoteopt}) can't do the same things. If not, you can add a new ticket in Github to request a new function it\footnote{\url{https://github.com/maieul/ledmac/issues}}.
+% If you have customized the \cs{XXXXXXfmt} command, you should check if commands for display options (\reff{displayoptions}) and options in \cs{Xfootnote} (\reff{Xfootnoteopt}) cannot do the same thing. If not, you can add a new ticket in Github to request a new function for doing this.\footnote{\url{https://github.com/maieul/ledmac/issues}}
%
-% If for some reason you don't want to make the modifications to use eledmac new functions, you can continue to use your own \cs{XXXXXfmt} command, but you must replace:
+% If for some reason you do not want to make the modifications to use eledmac new functions, you can continue using your own \cs{XXXXXfmt} command, but you must replace:
% \begin{verbatim}
% \renewcommand*{XXXXfmt}[3]
% \end{verbatim}
@@ -15056,7 +15902,7 @@
%
% If you used a \cs{protect} command inside a \cs{footnote} command inside a numbered section, you must change the \cs{protect} to \cs{noexpand}. If you don't, the command after the \cs{protect} won't be displayed.
% \subsection{Migration to eledmac 1.5.1}\label{change151}
-% The version 1.5.1 corrects a bug with \verb+stanzaindentsrepetition+ (cf. p.~\pageref{stanzaindentsrepetition}). This bug had two consequences:
+% The version 1.5.1 corrects a bug with \verb+stanzaindentsrepetition+ (cf. \reff{stanzaindentsrepetition}). This bug had two consequences:
% \begin{enumerate}
% \item \verb+stanzaindentsrepetition+ didn't work when its value was greater than 2.
% \item \verb+stanzaindentsrepetition+ worked wrong when its value was equal to 2.
@@ -15088,16 +15934,40 @@
% \item If you have modified \cs{l@reg}, which is not advisable, you must rename it to \cs{@nl@reg}.
% \end{itemize}
%
-% Anyway, there is another problem. If you have text in brackets just after \cs{pstart} or \cs{pend}, the text will be considered an optional argument of \cs{pstart} or \cs{pend} (see \ref{pstart:optionalarg}, p.~\pageref{pstart:optionalarg}).
+% Anyway, there is another problem. If you have text in brackets just after \cs{pstart} or \cs{pend}, the text will be considered an optional argument of \cs{pstart} or \cs{pend} (see \reff{pstart:optionalarg}).
% In this case, just add a \cs{relax} between \cs{pstart}/\cs{pend} and the brackets.
-% The version 1.12.0 adds new best way to manage section title inside numbered text. Please read §~\ref{eledsection} (p.~\pageref{eledsection}).
+% The version 1.12.0 adds a new better way to manage section titles inside numbered text. Please read §~\ref{eledsection} (\reff{eledsection}).
% \subsection{Migration to eledmac 17.1}
% The version change the default behavior of \cs{pstartinfootnote}.
% Henceforth, the pstart will be printed if footnote only for the section of text where you have called \cs{numberpstarttrue}.
% We don't see any reason to print it in other section. However, if you want to print the pstart number in all footnote, with or without \cs{numberpstarttrue}, you can use
% \cs{pstartinfootnoteeverytime}.
+% \subsection{Migration to eledmac 1.21.0}
+% \subsubsection{\cs{Xledsetnormalparstuff} and \cs{ledsetnormalparstuffX}}
+% The \cs{ledsetnormalparstuff} has been split in two different commands:
+% \begin{itemize}
+% \item \cs{Xledsetnormalparstuff} for critical notes;
+% \item \cs{ledsetnormalparstuffX} for familiar notes.
+% \end{itemize}
+% The new commands take an optional argument which is the series letter.
+% If you have redefined \cs{ledsetnormalparstuff} or commands which call them, you must make the appropriate change
+% \subsubsection{Endnotes}
+% In any case, clean the \verb+.end+ file before the next run.
+%
+% \label{oldprintnpnumspace} The previous version of \Eledmac{} had a bug: there were two spaces between the start page number and the start line number, but only one space between the end page number and the end line number.
+%
+% Indeed, a spurious space was added after the first \cs{printnpnum}.
+% This spurious space has been deleted.
+% However, if you want to keep the previous spurious space, just load the package with the \verb+oldprintnpnumspace+ option.
+%
+% If you have redefined \cs{endprint}, you must:
+% \begin{itemize}
+% \item Contact us to ask for the feature that required your hack, in order to avoid such a hack in the future.
+% \item Use the new fifth argument.
+% \item Add \verb+\xdef\@currentseries{#4}+ at the beginning of your own command.
+% \end{itemize}
% \clearpage
% \bibliographystyle{alpha}
% \phantomsection
diff --git a/Master/texmf-dist/source/latex/eledmac/eledpar.dtx b/Master/texmf-dist/source/latex/eledmac/eledpar.dtx
index 76b7303b1ce..46da8f1635e 100644
--- a/Master/texmf-dist/source/latex/eledmac/eledpar.dtx
+++ b/Master/texmf-dist/source/latex/eledmac/eledpar.dtx
@@ -65,7 +65,8 @@
%</driver>
%
% \fi
-% \CheckSum{4968}
+% \newcommand{\reff}[1]{\ref{#1} p.~\pageref{#1}}
+% \CheckSum{4996}
%
% \makeatletter
% \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters
@@ -190,6 +191,9 @@
% \changes{v1.13.0}{2015/03/06}{Fix bug in shiftedpstarts when size difference between pstarts is very important.}
% \changes{v1.14.0}{2015/03/22}{The \cs{newif}s are not followed by boolean values set to false, because it is the \TeX\ default setting.}
% \changes{v1.14.0}{2015/03/22}{Fix bug with line number position when using \cs{eledsection} and similar commands for RTL texts with \LuaLaTeX.}
+% \changes{v1.15.0}{2015/04/13}{Add \cs{AtEveryPstartCall}.}
+% \changes{v1.15.0}{2015/04/13}{Fix vertical spurious space before right \cs{eledchapter} (bug added in v1.13.0).}
+% \changes{v1.15.0}{2015/04/13}{Prevent vertical space when using \cs{AtEveryPstart} or \cs{AtEveryPend} with a command which prints nothing}
% \hyphenation{man-u-script man-u-scripts}
%
%
@@ -212,9 +216,11 @@
% the \Lpack{\eledpar} package\thanks{This file (\dtxfilename)
% has version number \fileversion, last revised \filedate.}}
% \author{%
+% Ma\"ieul Rouquette\thanks{\texttt{maieul at maieul dot net}}
+% {\small based on the original \Lpack{ledpar} by}
% Peter Wilson \\
% Herries Press\thanks{\texttt{herries dot press at earthlink dot net}}\\
-% Ma\"ieul Rouquette\thanks{\texttt{maieul at maieul dot net}}}
+% }
%
% \date{}
%
@@ -486,8 +492,8 @@
% \footnote{The same applies to \LaTeX\ normal notes. Read \url{http://tex.stackexchange.com/a/228283/7712} for technical informations.}
% We have not changed this default setting, because we don't want to break compatibility with older version of \Lpack{eledmac}.
% So, you MUST change the default setting via \cs{maxhXnotes} (for critical notes)\cs{maxhnotesX} (for familiar notes).
-% Both commands are explained in \Lpack handbook (\ref{eledmac-maxhXnotes} p.~\pageref{eledmac-maxhXnotes}).
-% As and advisable setting:
+% Both commands are explained in \Lpack handbook (\reff{eledmac-maxhXnotes}).
+% As an advisable setting:
% \begin{verbatim}
% \maxhXnotes{0.6\textheight}
% \maxhnotesX{0.6\textheight}
@@ -525,7 +531,7 @@
% \end{Rightside}
% \end{verbatim}
% \section{Left and right texts}\label{leftright}
-%
+% \subsection{Environments}
% Parallel texts are divided into Leftside and Rightside. The form of the
% contents of these two are independent of whether they will be set
% in columns or pages.
@@ -535,7 +541,7 @@
% The left text is put within the \verb?Leftside? environment and the
% right text likewise in the \verb?Rightside? environment. The number of
% \verb?Leftside? and \verb?Rightside? environments must be the same.
-%
+% \subsection{Line numbering scheme}
% Within these environments you can designate the line numbering scheme(s)
% to be used.
% \DescribeMacro{\firstlinenum}
@@ -558,6 +564,15 @@
% scheme for sublines.
% The starred versions change both left and right numbering schemes.
%
+% Generally speaking, controls like \cs{firstlinenum} or \cs{linenummargin}
+% apply to sequential and left texts.
+% To effect right texts only, they have
+% to be within a \verb?Rightside? environment.
+% \DescribeMacro{\lineationR}
+% \cs{lineationR} macro is the equivalent of \Lpack{eledmac} \cs{lineation} macro for the right side.
+% \DescribeMacro{\lineation*}
+% \cs{lineation*} macro is the equivalent of \Lpack{eledmac} \cs{lineation} macro for both sides.
+% \subsection{chunk}
% \DescribeMacro{\pstart}
% \DescribeMacro{\pend}
% In a serial (non-parallel) mode, each numbered paragraph, or chunk,
@@ -588,13 +603,16 @@
% Remember, though,
% that the left/right sides are effectively independent of each other.
%
-% Generally speaking, controls like \cs{firstlinenum} or \cs{linenummargin}
-% apply to sequential and left texts. To effect right texts only they have
-% to be within a \verb?Rightside? environment.
-% \DescribeMacro{\lineationR}
-% \cs{lineationR} macro is the equivalent of \Lpack{eledmac} \cs{lineation} macro for the right side.
-% \DescribeMacro{\lineation*}
-% \cs{lineation*} macro is the equivalent of \Lpack{eledmac} \cs{lineation} macro for both sides.
+% \subsection{\cs{AtEveryPstart} and \cs{AtEveryPstartCall}}
+% In general, remember that the moment where a \cs{pstart} is called is different
+% from the moment when the \cs{pstart}\ldots\cs{pend} content is printed, which is when \cs{Pages} or \cs{Columns} is processed.
+%
+% Consequently:
+% \begin{itemize}
+% \item The argument of \cs{AtEveryPstart} (see \reff{eledmac-AtEveryPstart}) is called before every chunk is printed, except if you used an optional argument for the \cs{pstart}.
+% \item The argument of \cs{AtEveryPstartCall} is called before every \cs{pstart}.
+% \end{itemize}
+% \subsection{Language setting}
% If you are using the
% \Lpack{babel} package with different languages
% (via, say, \cs{selectlanguage}) for the left and right texts it is
@@ -608,6 +626,7 @@
% selection for the side. The right side language is also
% applied to the right side line numbers.
%
+% \subsection{Shifting}
% Corresponding left and right sides must have the same number of
% paragraph chunks --- if there are four on the left there must be four
% on the right, even if some are empty. The start of each pair of left and
@@ -925,7 +944,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{eledpar}[2015/03/22 v1.14.0 eledmac extension for parallel texts]%
+\ProvidesPackage{eledpar}[2015/04/13 v1.15.0 eledmac extension for parallel texts]%
% \end{macrocode}
% Few commands use \cs{xspace} command.
@@ -1252,6 +1271,7 @@
% \cs{lineationR}\marg{word} is the macro used to select the
% lineation system for right texts.
% Its argument is a string: either \texttt{page}, \texttt{pstart} or \texttt{section}.
+% \changes{v1.15.0}{2015/04/13}{As \cs{lineation}, \cs{lineationR} automatically set the \cs{pstartinfootnote}.}
% \begin{macrocode}
\newcommand*{\lineationR}[1]{{%
\ifnumbering
@@ -1261,19 +1281,28 @@
\ifx\@tempa\@tempb
\global\bypage@Rtrue
\global\bypstart@Rfalse
+ \unless\ifnocritical@%
+ \pstartinfootnote[][false]%
+ \fi%
\else
\def\@tempb{pstart}%
\ifx\@tempa\@tempb
\global\bypage@Rfalse
\global\bypstart@Rtrue
+ \unless\ifnocritical@%
+ \pstartinfootnote%
+ \fi%
\else
\def@tempb{section}
\ifx\@tempa\@tempb
- \global\bypage@Rfalse
- \global\bypstart@Rfalse
+ \global\bypage@Rfalse%
+ \global\bypstart@Rfalse%
+ \unless\ifnocritical@%
+ \pstartinfootnote[][false]%
+ \fi%
\else
\led@warn@BadLineation
- \fi
+ \fi%
\fi
\fi
\fi}}
@@ -1964,19 +1993,7 @@
% \end{macro}
%
% \begin{macro}{\n@num}
-% This macro implements the \cs{skipnumbering} command. It uses a new
-% action code, namely 1007.
-% \begin{macrocode}
-\providecommand*{\n@num}{}
-\renewcommand*{\n@num}{%
- \ifledRcol
- \xright@appenditem{\the\absline@numR}\to\actionlines@listR
- \xright@appenditem{-1007}\to\actions@listR
- \else
- \n@num@reg
- \fi}
-
-% \end{macrocode}
+% \changes{v1.15.0}{2015/04/13}{\cs{n@num} defined only one time for both \Eledmac{} and \Eledpar{}.}
% \end{macro}
%
% \begin{macro}{\@ref}
@@ -2263,18 +2280,7 @@
% \end{macro}
%
% \begin{macro}{\skipnumbering}
-% In numbered text, \cs{skipnumbering} in a line will suspend the
-% numbering for that particular line. That is, line numbers are unchanged and
-% no line number will be printed.
-% \begin{macrocode}
-\renewcommand*{\skipnumbering}{%
- \ifledRcol \write\linenum@outR{\string\n@num}%
- \advanceline{-1}%
- \else
- \skipnumbering@reg
- \fi}
-
-% \end{macrocode}
+% \changes{v1.15.0}{2015/04/13}{\cs{skipnumbering} defined only one time for both \Eledmac{} and \Eledpar{}}
% \end{macro}
%
%
@@ -2344,74 +2350,83 @@
% \begin{macrocode}
\newcommand{\newseries@eledpar}[1]{%
% \end{macrocode}
-% \subsubsection{Create commands to memorize display options}
-% \begin{macrocode}
- \csgdef{onlysideX@#1}{}%
- \csgdef{onlyXside@#1}{}%
-% \end{macrocode}
-% \subsubsection{Boolean flags for notes to be printed in one side only}
+% \subsubsection{Notes to be printed on one side only}
% \Lpack{eledpar} allows notes to be printed on one side only.
-% We need boolean flags, and set them to true when a note series is not printed in one side
-% evne though it contains something.
+% We need to declare these options.
+% We also need boolean flags, and to set them to true when a note series is not printed on one side.
+% We check the \verb+nofamiliar+ and \verb+nocritical+ \Eledmac{} options.
% \begin{macrocode}
- \global\newbool{keepforXside@#1}%
- \global\newbool{keepforsideX@#1}%
+ \unless\ifnocritical@%
+ \csgdef{onlysideX@#1}{}%
+ \global\newbool{keepforXside@#1}%
+ \fi%
+ \unless\ifnofamiliar@%
+ \global\newbool{keepforsideX@#1}%
+ \csgdef{onlyXside@#1}{}%
+ \fi%
% \end{macrocode}
% \subsubsection{Familiar footnotes without marks}
-% The \cs{footnoteXnomk} commands are for notes which are printed in the left side, while they are called in the right side.
+% The \cs{footnoteXnomk} commands are for notes which are printed on the left side, while they are called in the right side.
% Basically, they set first toggle \cs{nomark@} to true, then call the \cs{footnoteX}.
% and finally add the footnote counter in the footnote counter list.
%
+% First, check the \verb+nofamiliar+ option of \Eledmac{}
+% \begin{macrocode}
+ \unless\ifnofamiliar@%
% So declare the list.
% \begin{macrocode}
- \expandafter\list@create\csname footnote#1@mk\endcsname%
+ \expandafter\list@create\csname footnote#1@mk\endcsname%
% \end{macrocode}
% Then, declare the \cs{footnoteXnomk} command.
% \begin{macrocode}
- \expandafter\newcommand\csname footnote#1nomk\endcsname[1]{%
+ \expandafter\newcommand\csname footnote#1nomk\endcsname[1]{%
% \end{macrocode}
% First step: just call the normal \cs{footnoteX}, saying that we don't want to print the mark.
% \begin{macrocode}
- \toggletrue{nomk@}%
- \csuse{footnote#1}{##1}%
- \togglefalse{nomk@}%
+ \toggletrue{nomk@}%
+ \csuse{footnote#1}{##1}%
+ \togglefalse{nomk@}%
% \end{macrocode}
% Second, and last, step: store the footnote counter in the footnote counters list.
% We use some \cs{let}, because \cs{xright@appenditem} is difficult to use with \cs{expandafter}.
% \begin{macrocode}
- \letcs{\@tmp}{footnote#1@mk}%
- \numdef\@tmpa{\csuse{c@footnote#1}}%
- \global\xright@appenditem{\@tmpa}\to\@tmp%
- \global\cslet{footnote#1@mk}{\@tmp}%
- }%
+ \letcs{\@tmp}{footnote#1@mk}%
+ \numdef\@tmpa{\csuse{c@footnote#1}}%
+ \global\xright@appenditem{\@tmpa}\to\@tmp%
+ \global\cslet{footnote#1@mk}{\@tmp}%
+ }%
% \end{macrocode}
% Then, declare the command which inserts the footnotemark in the right side.
% \begin{macrocode}
- \expandafter\newcommand\csname footnote#1mk\endcsname{%
+ \expandafter\newcommand\csname footnote#1mk\endcsname{%
% \end{macrocode}
% Get the first element of the footnote mark list.
% As \cs{gl@p} is difficult to use with dynamic name macro, we use \cs{let} commands.
% \begin{macrocode}
- \letcs{\@tmp}{footnote#1@mk}%
- \gl@p\@tmp\to\@tmpa%
- \global\cslet{footnote#1@mk}{\@tmp}%
+ \letcs{\@tmp}{footnote#1@mk}%
+ \gl@p\@tmp\to\@tmpa%
+ \global\cslet{footnote#1@mk}{\@tmp}%
% \end{macrocode}
% Set the footnotecounter with it.
% For the sake of security, we make a backup of the previous value.
% \begin{macrocode}
- \letcs{\old@footnote}{c@footnote#1}%
- \setcounter{footnote#1}{\@tmpa}%
+ \letcs{\old@footnote}{c@footnote#1}%
+ \setcounter{footnote#1}{\@tmpa}%
% \end{macrocode}
% Define the footnote mark and print it
% \begin{macrocode}
- \protected@csxdef{@thefnmark#1}{\csuse{thefootnote#1}}%
- \csuse{@footnotemark#1}%
+ \protected@csxdef{@thefnmark#1}{\csuse{thefootnote#1}}%
+ \csuse{@footnotemark#1}%
% \end{macrocode}
% Restore previous footnote counter and finally add space.
% \begin{macrocode}
- \setcounter{footnote#1}{\old@footnote}%
- \xspace%
- }%
+ \setcounter{footnote#1}{\old@footnote}%
+ \xspace%
+ }%
+% \end{macrocode}
+% End of tools for familiar notes without marks
+% \begin{macrocode}
+ \fi
% \end{macrocode}
% End of \cs{newseries@eledpar}.
% \begin{macrocode}
@@ -2422,9 +2437,13 @@
% Read the eledmac code handbook about \cs{newhookcommand@series}.
% Here, we create hooks which are specific to \Lpack{eledpar}.
% \begin{macrocode}
-\newhookcommand@series{onlysideX}%
+\unless\ifnocritical@%
+ \newhookcommand@series{onlyXside}%
+\fi%
+\unless\ifnofamiliar@%
+ \newhookcommand@series{onlysideX}%
+\fi
-\newhookcommand@series{onlyXside}%
% \end{macrocode}
% \subsubsection{Init standards series (A,B,C,D,E,Z)}
@@ -2762,6 +2781,7 @@
\ifstrempty{#1}%
{\csgdef{before@pstartL@\the\l@dnumpstartsL}{\at@every@pstart}}%
{\csgdef{before@pstartL@\the\l@dnumpstartsL}{\noindent#1}}%
+ \at@every@pstart@call%
}
% \end{macrocode}
%
@@ -2812,6 +2832,7 @@
\ifstrempty{#1}%
{\csgdef{before@pstartR@\the\l@dnumpstartsR}{\at@every@pstart}}%
{\csgdef{before@pstartR@\the\l@dnumpstartsR}{\noindent#1}}%
+ \at@every@pstart@call%
}
% \end{macrocode}
% \end{macro}
@@ -2897,6 +2918,14 @@
% \end{macro}
%
%
+% \begin{macro}{\AtEveryPstartCall}
+% The \cs{AtEveryPstartCall} argument is called when the \cs{pstartL} or \cs{pstartR} is called.
+% That is different of \cs{AtEveryPstart} the argument of which is called when the \cs{pstart}s are printed.
+% \begin{macrocode}
+\newcommand{\AtEveryPstartCall}[1]{\xdef\at@every@pstart@call{\unexpanded{#1}}}%
+\gdef\at@every@pstart@call{}%
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\ifprint@last@after@pendL}
% \begin{macro}{\ifprint@last@after@pendR}
% Two booleans set to true, when the time is to print the last optional argument of a \cs{pend}.
@@ -2969,34 +2998,39 @@
% \begin{macrocode}
\newcommand*{\do@lineL}{%
\letcs{\ifnumberpstart}{numberpstart@L\the\l@dpscL}%
- \advance\countLline \@ne
+ \advance\countLline \@ne%
\ifvbox\namebox{l@dLcolrawbox\the\l@dpscL}%
- {\vbadness=10000
- \splittopskip=\z@
- \do@lineLhook
- \l@demptyd@ta
- \global\setbox\one@line=\vsplit\namebox{l@dLcolrawbox\the\l@dpscL}
+ {\vbadness=10000%
+ \splittopskip=\z@%
+ \do@lineLhook%
+ \l@demptyd@ta%
+ \global\setbox\one@line=\vsplit\namebox{l@dLcolrawbox\the\l@dpscL}%
to\baselineskip}%
- \IfStrEq{\splitfirstmarks\parledgroup@}{begin}{\parledgroup@notes@startL}{}
- \unvbox\one@line \global\setbox\one@line=\lastbox
- \getline@numL
+ \IfStrEq{\splitfirstmarks\parledgroup@}{begin}{\parledgroup@notes@startL}{}%
+ \unvbox\one@line \global\setbox\one@line=\lastbox%
+ \getline@numL%
\ifnum\@lock>\@ne%
\inserthangingsymboltrue%
\else%
\inserthangingsymbolfalse%
- \fi
- \setbox\l@dleftbox
+ \fi%
+ \setbox\l@dleftbox%
\hb@xt@ \Lcolwidth{%
- \affixline@num
+ \ifl@dhidenumber%
+ \global\l@dhidenumberfalse%
+ \f@x@l@cks%
+ \else%
+ \affixline@num%
+ \fi%
\xifinlist{\the\l@dpscL}{\eled@sections@@}%
{\add@inserts\affixside@note}%
{\print@lineL}}%
- \add@penaltiesL
- \global\advance\@donereallinesL\@ne
- \global\advance\@donetotallinesL\@ne
-\else
+ \add@penaltiesL%
+ \global\advance\@donereallinesL\@ne%
+ \global\advance\@donetotallinesL\@ne%
+\else%
\setbox\l@dleftbox \hb@xt@ \Lcolwidth{\hspace*{\Lcolwidth}}%
- \global\advance\@donetotallinesL\@ne
+ \global\advance\@donetotallinesL\@ne%
\fi}
@@ -3012,14 +3046,14 @@
\l@dld@ta %space kept for backward compatibility
\add@inserts\affixside@note%
\l@dlsn@te %space kept for backward compatibility
- {\ledllfill\hb@xt@ \wd\one@line{%
+ {\ledllfill\hb@xt@ \Lcolwidth{%
\do@insidelineLhook%
\ifluatex%
\luatextextdir\l@luatextextdir@L%
\fi%
\new@lineL%
\inserthangingsymbolL%
- \l@dunhbox@line{\one@line}}\correcthangingL\ledrlfill\l@drd@ta%
+ \l@dunhbox@line{\one@line}}\ledrlfill\l@drd@ta%
\l@drsn@te}}
% \end{macrocode}
@@ -3104,36 +3138,41 @@
\newcommand*{\do@lineR}{%
\letcs{\ifnumberpstart}{numberpstart@R\the\l@dpscR}%
\ledRcol@true%
- \advance\countRline \@ne
+ \advance\countRline \@ne%
\ifvbox\namebox{l@dRcolrawbox\the\l@dpscR}%
- {\vbadness=10000
- \splittopskip=\z@
- \do@lineRhook
- \l@demptyd@ta
- \global\setbox\one@lineR=\vsplit\namebox{l@dRcolrawbox\the\l@dpscR}
+ {\vbadness=10000%
+ \splittopskip=\z@%
+ \do@lineRhook%
+ \l@demptyd@ta%
+ \global\setbox\one@lineR=\vsplit\namebox{l@dRcolrawbox\the\l@dpscR}%
to\baselineskip}%
- \IfStrEq{\splitfirstmarks\parledgroup@}{begin}{\parledgroup@notes@startR}{}
- \unvbox\one@lineR \global\setbox\one@lineR=\lastbox
- \getline@numR
+ \IfStrEq{\splitfirstmarks\parledgroup@}{begin}{\parledgroup@notes@startR}{}%
+ \unvbox\one@lineR \global\setbox\one@lineR=\lastbox%
+ \getline@numR%
\ifnum\@lockR>\@ne%
- \inserthangingsymbolRtrue
+ \inserthangingsymbolRtrue%
\else%
\inserthangingsymbolRfalse%
\fi%
- \setbox\l@drightbox
+ \setbox\l@drightbox%
\hb@xt@ \Rcolwidth{%
- \affixline@numR%
+ \ifl@dhidenumber%
+ \global\l@dhidenumberfalse%
+ \f@x@l@cksR%
+ \else%
+ \affixline@numR%
+ \fi%
\xifinlist{\the\l@dpscR}{\eled@sectionsR@@}%
{\add@insertsR\affixside@noteR}%
{\print@lineR}%
}%
- \add@penaltiesR
- \global\advance\@donereallinesR\@ne
- \global\advance\@donetotallinesR\@ne
-\else
- \setbox\l@drightbox \hb@xt@ \Rcolwidth{\hspace*{\Rcolwidth}}
- \global\advance\@donetotallinesR\@ne
-\fi
+ \add@penaltiesR%
+ \global\advance\@donereallinesR\@ne%
+ \global\advance\@donetotallinesR\@ne%
+\else%
+ \setbox\l@drightbox \hb@xt@ \Rcolwidth{\hspace*{\Rcolwidth}}%
+ \global\advance\@donetotallinesR\@ne%
+\fi%
\ledRcol@false%
}
@@ -3149,7 +3188,7 @@
\l@dld@ta %space kept for backward compatibility
\add@insertsR\affixside@noteR%
\l@dlsn@te %space kept for backward compatibility
- \correcthangingR\ledllfill\hb@xt@ \wd\one@lineR{%
+ \ledllfill\hb@xt@ \Rcolwidth{%
\do@insidelineRhook%
\new@lineR%
\inserthangingsymbolR%
@@ -3157,7 +3196,7 @@
\luatextextdir\l@luatextextdir@R%
\fi%
\l@dunhbox@line{\one@lineR}}\ledrlfill\l@drd@ta%
- \l@drsn@te
+ \l@drsn@te%
}
\def\print@eledsectionR{%
@@ -3202,37 +3241,39 @@
\global\advance\absline@numR \@ne
\do@actionsR
\do@ballastR
-\ifledgroupnotesR@\else\ifnumberline
- \ifsublines@
- \ifnum\sub@lockR<\tw@
- \global\advance\subline@numR \@ne
- \fi
- \else
- \ifnum\@lockR<\tw@
- \global\advance\line@numR \@ne
- \global\subline@numR \z@
- \fi
+ \ifledgroupnotesR@\else
+ \ifnumberline
+ \ifsublines@
+ \ifnum\sub@lockR<\tw@
+ \global\advance\subline@numR \@ne
+ \fi
+ \else
+ \ifnum\@lockR<\tw@
+ \global\advance\line@numR \@ne
+ \global\subline@numR \z@
+ \fi
+ \fi
+ \fi
\fi
-\fi
-\fi
}
\newcommand*{\getline@numL}{%
- \global\advance\absline@num \@ne
+ \global\advance\absline@num \@ne
\do@actions
\do@ballast
-\ifledgroupnotesL@\else\ifnumberline
- \ifsublines@
- \ifnum\sub@lock<\tw@
- \global\advance\subline@num \@ne
- \fi
- \else
- \ifnum\@lock<\tw@
- \global\advance\line@num \@ne
- \global\subline@num \z@
- \fi
+ \ifledgroupnotesL@\else
+ \ifnumberline
+ \ifsublines@
+ \ifnum\sub@lock<\tw@
+ \global\advance\subline@num \@ne
+ \fi
+ \else
+ \ifnum\@lock<\tw@
+ \global\advance\line@num \@ne
+ \global\subline@num \z@
+ \fi
+ \fi
+ \fi
\fi
-\fi
-\fi
}
@@ -3258,6 +3299,7 @@
% \end{macro}
%
%
+% \begin{macro}{\l@dskipversenumberR}
% \begin{macro}{\do@actionsR}
% \begin{macro}{\do@actions@fixedcodeR}
% \begin{macro}{\do@actions@nextR}
@@ -3269,7 +3311,10 @@
% It may call itself recursively and we use tail recursion, via
% \cs{do@actions@nextR} for this.
% \changes{v0.3}{2005/02/24}{Used \cs{do@actions@fixedcode} in \cs{do@actionsR}}
+% \changes{v1.15.0}{2015/04/13}{Add action 1008 and 1009}
% \begin{macrocode}
+
+\newif\ifl@dskipversenumberR
\newcommand*{\do@actions@fixedcodeR}{%
\ifcase\@l@dtempcnta%
\or% % 1001
@@ -3278,7 +3323,7 @@
\global\sublines@false
\or% % 1003
\global\@lockR=\@ne
- \or% % 1004
+ \or% % 1004%
\ifnum\@lockR=\tw@
\global\@lockR=\thr@@
\else
@@ -3294,9 +3339,14 @@
\fi
\or% % 1007
\l@dskipnumbertrue
- \else
+ \or% % 1008
+ \l@dskipversenumberRtrue%
+ \or% % 1009
+ \l@dhidenumbertrue%
+ \else%
\led@warn@BadAction
- \fi}
+ \fi%
+}
\newcommand*{\do@actionsR}{%
@@ -3337,6 +3387,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \subsection{Line number printing}
%
@@ -3435,21 +3486,23 @@
\ch@ck@l@ckR
\fi
\ifnum\@l@dtempcnta=\@l@dtempcntb
- \if@twocolumn
- \if@firstcolumn
- \gdef\l@dld@ta{\llap{{\leftlinenumR}}}%
- \else
- \gdef\l@drd@ta{\rlap{{\rightlinenumR}}}%
- \fi
- \else
- \@l@dtempcntb=\line@marginR
- \ifnum\@l@dtempcntb>\@ne
- \advance\@l@dtempcntb by\page@numR
- \fi
- \ifodd\@l@dtempcntb
- \gdef\l@drd@ta{\rlap{{\rightlinenumR}}}%
+ \ifl@dskipversenumberR\else
+ \if@twocolumn
+ \if@firstcolumn
+ \gdef\l@dld@ta{\llap{{\leftlinenumR}}}%
+ \else
+ \gdef\l@drd@ta{\rlap{{\rightlinenumR}}}%
+ \fi
\else
- \gdef\l@dld@ta{\llap{{\leftlinenumR}}}%
+ \@l@dtempcntb=\line@marginR
+ \ifnum\@l@dtempcntb>\@ne
+ \advance\@l@dtempcntb by\page@numR
+ \fi
+ \ifodd\@l@dtempcntb
+ \gdef\l@drd@ta{\rlap{{\rightlinenumR}}}%
+ \else
+ \gdef\l@dld@ta{\llap{{\leftlinenumR}}}%
+ \fi
\fi
\fi
\fi
@@ -3682,7 +3735,7 @@
% general case, is a rather complicated task.
% The seven parameters of the
% argument are the line numbers as stored in \cs{l@d@nums}, in the
-% form described on page \pageref{eledmac-linenumbers} of \Eledmac{}' handbook: the starting
+% form described on \reff{eledmac-linenumbers} of \Eledmac{}' handbook: the starting
% page, line, and sub-line numbers, followed by the ending page,
% line, and sub-line numbers, and then the font specifier for
% the lemma.
@@ -4104,55 +4157,38 @@
% \section{Verse}
%\changes{v0.11}{2012/06/11}{New management of hangingsymbol insertion, preventing undesirable insertions.}
-%\changes{v0.12}{2012/08/03}{New new management of hangingsymbol insertion, preventing undesirable insertions.}
+%\changes{v0.12}{2012/08/03}{New management of hangingsymbol insertion, preventing undesirable insertions.}
% Like in eledmac, the insertion of hangingsymbol is base on \cs{ifinserthangingsymbol}, and, for the right side, on \cs{ifinserthangingsymbolR}.
+% Both commands also include the hanging space, to be sure the \cs{one@line} of hanging lines has the same width that the \cs{one@line} of normal lines and to prevent the column separator from shifting.
% \begin{macro}{\inserthangingsymbolL}
% \begin{macro}{\inserthangingsymbolR}
-% \changes{v1.4.3}{2013/10/27}{Hang verse is now not automatically flush right.}
+% \changes{v0.11}{2012/06/11}{Prevent the column separator for hanging verse from shifting}
+% \changes{v1.4.3}{2013/10/27}{Hanging verse is no longer automatically flush right.}
+% \changes{v1.15.0}{2015/04/13}{Prevent more efficiently the column separator from shifting when a verse is hanging}
% \begin{macrocode}
\newif\ifinserthangingsymbolR
\newcommand{\inserthangingsymbolL}{%
-\ifinserthangingsymbol%
+ \ifinserthangingsymbol%
\ifinstanzaL%
+ \hskip \@ifundefined{sza@0@}{0}{\expandafter%
+ \noexpand\csname sza@0@\endcsname}\stanzaindentbase%
\hangingsymbol%
\fi%
-\fi}
+ \fi%
+}%
\newcommand{\inserthangingsymbolR}{%
-\ifinserthangingsymbolR%
+ \ifinserthangingsymbolR%
\ifinstanzaR%
+ \hskip \@ifundefined{sza@0@}{0}{\expandafter%
+ \noexpand\csname sza@0@\endcsname}\stanzaindentbase%
\hangingsymbol%
\fi%
-\fi}
+ \fi%
+}%
% \end{macrocode}
% \end{macro}
% \end{macro}
-%\changes{v0.11}{2012/06/11}{Prevent shift of column separator when a verse is hanged}
-% When a verse is hanged, the column separator is shifted. To prevent it, the \cs{do@lineL} and \cs{do@lineR} commands call \cs{correcthangingL} and \cs{correcthangingR} commands. These commands insert horizontal skip which length is equal to the hang indent.
-% \begin{macro}{\correcthangingL}
-% \begin{macro}{\correcthangingR}
-% \begin{macrocode}
-\newcommand{\correcthangingL}{%
-\ifl@dpaging\else%
- \ifinstanzaL%
- \ifinserthangingsymbol%
- \hskip \@ifundefined{sza@0@}{0}{\expandafter%
- \noexpand\csname sza@0@\endcsname}\stanzaindentbase%
- \fi%
- \fi%
-\fi}
-\newcommand{\correcthangingR}{%
-\ifl@dpaging\else%
- \ifinstanzaR%
- \ifinserthangingsymbolR%
- \hskip \@ifundefined{sza@0@}{0}{\expandafter%
- \noexpand\csname sza@0@\endcsname}\stanzaindentbase%
- \fi%
- \fi%
-\fi}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
% Before we can define the main stanza macros we need to be able to save
% and reset
% the category code for \&. To save the current value we use
@@ -4993,12 +5029,12 @@
\newcommand*{\Pages}{%
\l@dprintingpagestrue%
\eledsection@correcting@skip=-2\baselineskip% line correcting for section titles.
- \parledgroup@notespacing@set@correction
- \typeout{}
- \typeout{*************************** PAGES ***************************}
- \ifnum\l@dnumpstartsL=\l@dnumpstartsR\else
+ \parledgroup@notespacing@set@correction%
+ \typeout{}%
+ \typeout{*************************** PAGES ***************************}%
+ \ifnum\l@dnumpstartsL=\l@dnumpstartsR\else%
\led@err@BadLeftRightPstarts{\the\l@dnumpstartsL}{\the\l@dnumpstartsR}%
- \fi
+ \fi%
% \end{macrocode}
% \changes{v1.13.0}{2015/03/06xx}{Prevent false overfull hboxes when using \cs{Pages} outside of pages environment.}
% As \cs{Pages} must be called outside of the pages environment, we have to redefine the \cs{Lcolwidth} and \cs{Rcolwidth} lengths, to prevent false overfull hboxes.
@@ -5008,93 +5044,93 @@
% \end{macrocode}
% Get onto an empty even (left) page, then initialise counters, etc.
% \begin{macrocode}
- \cleartol@devenpage
- \begingroup
- \l@dzeropenalties
- \endgraf\global\num@lines=\prevgraf
- \global\num@linesR=\prevgraf
- \global\par@line=\z@
- \global\par@lineR=\z@
- \global\l@dpscL=\z@
- \global\l@dpscR=\z@
- \writtenlinesLfalse
- \writtenlinesRfalse
+ \cleartol@devenpage%
+ \begingroup%
+ \l@dzeropenalties%
+ \endgraf\global\num@lines=\prevgraf%
+ \global\num@linesR=\prevgraf%
+ \global\par@line=\z@%
+ \global\par@lineR=\z@%
+ \global\l@dpscL=\z@%
+ \global\l@dpscR=\z@%
+ \writtenlinesLfalse%
+ \writtenlinesRfalse%
% \end{macrocode}
-% The footnotes are printed in way which is different way from the one expected in \Lpack{eledmac}, as we may want to have the notes printed in one side only.
+% The footnotes are printed in a different way from expected in \Lpack{eledmac}, as we may want to print the notes on one side only.
% \begin{macrocode}
\let\print@Xnotes\print@Xnotes@forpages%
\let\print@notesX\print@notesX@forpages%
% \end{macrocode}
% Check if there are chunks to be processed.
% \begin{macrocode}
- \check@pstarts
- \loop\if@pstarts
+ \check@pstarts%
+ \loop\if@pstarts%
% \end{macrocode}
% Loop over the number of chunks, incrementing the chunk counts
% (\cs{l@dpscL}
% and \cs{l@dpscR} are chunk (box) counts.)
% \begin{macrocode}
- \global\advance\l@dpscL \@ne
- \global\advance\l@dpscR \@ne
+ \global\advance\l@dpscL \@ne%
+ \global\advance\l@dpscR \@ne%
% \end{macrocode}
% Calculate the maximum number of real text lines in the chunk pair,
% storing the result in the relevant \cs{l@dmaxlinesinpar}.
% \begin{macrocode}
- \getlinesfromparlistL
- \getlinesfromparlistR
+ \getlinesfromparlistL%
+ \getlinesfromparlistR%
\l@dcalc@maxoftwo{\@cs@linesinparL}{\@cs@linesinparR}%
{\usenamecount{l@dmaxlinesinpar\the\l@dpscL}}%
- \check@pstarts
- \repeat
+ \check@pstarts%
+ \repeat%
% \end{macrocode}
% Zero the counts again, ready for the next bit.
% \begin{macrocode}
- \global\l@dpscL=\z@
- \global\l@dpscR=\z@
+ \global\l@dpscL=\z@%
+ \global\l@dpscR=\z@%
% \end{macrocode}
% Get the number of lines on the first pair of pages and store
% the minumum in \cs{l@dminpagelines}.
% \begin{macrocode}
- \getlinesfrompagelistL
- \getlinesfrompagelistR
+ \getlinesfrompagelistL%
+ \getlinesfrompagelistR%
\l@dcalc@minoftwo{\@cs@linesonpageL}{\@cs@linesonpageR}%
{\l@dminpagelines}%
% \end{macrocode}
% Now we start processing the left and right chunks (\cs{l@dpscL} and
% \cs{l@dpscR} count the left and right chunks), starting with the first pair.
% \begin{macrocode}
- \check@pstarts
- \if@pstarts
+ \check@pstarts%
+ \if@pstarts%
% \end{macrocode}
% Increment the chunk counts to get the first pair.
% Restore also the value of public pstart counters.
% \begin{macrocode}
- \global\advance\l@dpscL \@ne
- \global\advance\l@dpscR \@ne
+ \global\advance\l@dpscL \@ne%
+ \global\advance\l@dpscR \@ne%
\restore@pstartL@pc%
\restore@pstartR@pc%
% \end{macrocode}
% We haven't processed any lines from these chunks yet, so zero the
% respective line counts.
% \begin{macrocode}
- \global\@donereallinesL=\z@
- \global\@donetotallinesL=\z@
- \global\@donereallinesR=\z@
- \global\@donetotallinesR=\z@
+ \global\@donereallinesL=\z@%
+ \global\@donetotallinesL=\z@%
+ \global\@donereallinesR=\z@%
+ \global\@donetotallinesR=\z@%
% \end{macrocode}
% Start a loop over the boxes (chunks).
% \begin{macrocode}
- \checkraw@text
+ \checkraw@text%
% \end{macrocode}
% \begin{macrocode}
% \begingroup
-{ \loop\ifaraw@text
+{ \loop\ifaraw@text%
% \end{macrocode}
% See if there is more that can be done for the left page and set up the
% left language.
% \changes{v0.2}{2004/12/20}{Added \cs{l@duselanguage} to \cs{Pages}}
% \begin{macrocode}
- \checkpageL
+ \checkpageL%
\l@duselanguage{\theledlanguageL}%
{ \loop\ifl@dsamepage%
% \end{macrocode}
@@ -5102,14 +5138,14 @@
% Eventually, adds the optional argument of pstart.
% \changes{v0.3}{2005/02/10}{Added \cs{ledstrutL} to \cs{Pages}}
% \begin{macrocode}
- \ifdefstring{\@eledsectnotoc}{L}{\ledsectnotoc}{}
+ \ifdefstring{\@eledsectnotoc}{L}{\ledsectnotoc}{}%
\csuse{before@pstartL@\the\l@dpscL}%
- \global\csundef{before@pstartL@\the\l@dpscL}
- \do@lineL
+ \global\csundef{before@pstartL@\the\l@dpscL}%
+ \do@lineL%
\xifinlist{\the\l@dpscL}{\eled@sections@@}
{\print@eledsectionL}%
{}%
- \advance\numpagelinesL \@ne
+ \advance\numpagelinesL \@ne%
% \end{macrocode}
% When using shiftedpstarts option, a \cs{l@dleftbox} with a null height is not printed.
% That means we do not insert blank lines at the end of a left chunk lower than the corresponding right chunk.
@@ -5119,7 +5155,7 @@
% even if all the lines actually needed for the current page have been printed.
% \l@dleftbox
% \begin{macrocode}
- \ifshiftedpstarts
+ \ifshiftedpstarts%
\ifdim\ht\l@dleftbox>0pt\hb@xt@%
\hsize{\ledstrutL\unhbox\l@dleftbox}%
\else%
@@ -5130,7 +5166,7 @@
\else%
\parledgroup@correction@notespacing{L}
\hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}%
- \fi
+ \fi%
% \end{macrocode}
% Perhaps we have to move to the next (left) box. Check if we have got all
% we can onto the page. If not, repeat for the next line.
@@ -5138,16 +5174,18 @@
% Check if the page is full.
% Check if the verse is split in two subsequent pages.
% Check there is any forced page breaks.
+% Reset the verse skipnumber boolean
% \begin{macrocode}
\get@nextboxL%
+ \global\l@dskipversenumberfalse%
\ifprint@last@after@pendL%
\csuse{after@pendL@\the\l@dpscL}%
\global\csundef{after@pendL@\the\l@dpscL}%
\fi%
\checkpageL%
- \checkverseL
- \checkpbL
- \repeat
+ \checkverseL%
+ \checkpbL%
+ \repeat%
% \end{macrocode}
% That (left) page has been filled. Output the number of real lines
% on the page --- if the page break is because the page has been
@@ -5155,17 +5193,17 @@
% ended early in order to synchronise with the facing page so use an
% impossibly large number.
% \begin{macrocode}
- \ifl@dpagefull
+ \ifl@dpagefull%
\@writelinesonpageL{\the\numpagelinesL}%
- \else
+ \else%
\@writelinesonpageL{1000}%
- \fi
+ \fi%
% \end{macrocode}
% Reset to zero the left-page line count, clear the page to get onto the facing
% (odd, right) page, and reinitialize the accumulated dimension of interline correction for notes in parallel ledgroup.
% \begin{macrocode}
- \numpagelinesL \z@
- \parledgroup@correction@notespacing@init
+ \numpagelinesL \z@%
+ \parledgroup@correction@notespacing@init%
\clearl@dleftpage }%
% \end{macrocode}
% Now do the same for the right text.
@@ -5174,16 +5212,16 @@
\checkpageR%
\l@duselanguage{\theledlanguageR}%
{ \loop\ifl@dsamepage%
- \initnumbering@sectcountR
- \ifdefstring{\@eledsectnotoc}{R}{\ledsectnotoc}{}
+ \initnumbering@sectcountR%
+ \ifdefstring{\@eledsectnotoc}{R}{\ledsectnotoc}{}%
\csuse{before@pstartR@\the\l@dpscR}%
- \global\csundef{before@pstartR@\the\l@dpscR}
- \do@lineR
- \xifinlist{\the\l@dpscR}{\eled@sectionsR@@}
+ \global\csundef{before@pstartR@\the\l@dpscR}%
+ \do@lineR%
+ \xifinlist{\the\l@dpscR}{\eled@sectionsR@@}%
{\print@eledsectionR}%
{}%
- \advance\numpagelinesR \@ne
- \ifshiftedpstarts
+ \advance\numpagelinesR \@ne%
+ \ifshiftedpstarts%
\ifdim\ht\l@drightbox>0pt\hb@xt@%
\hsize{\ledstrutR\unhbox\l@drightbox}%
\else%
@@ -5192,63 +5230,64 @@
\global\pagetotal=\dimen0%
\fi%
\else%
- \parledgroup@correction@notespacing{R}
+ \parledgroup@correction@notespacing{R}%
\hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}%
- \fi
+ \fi%
\get@nextboxR%
+ \global\l@dskipversenumberRfalse%
\ifprint@last@after@pendR%
\csuse{after@pendR@\the\l@dpscR}%
\global\csundef{after@pendR@\the\l@dpscR}%
\fi%
\checkpageR%
- \checkverseR
- \checkpbR
- \repeat
- \ifl@dpagefull
+ \checkverseR%
+ \checkpbR%
+ \repeat%
+ \ifl@dpagefull%
\@writelinesonpageR{\the\numpagelinesR}%
- \else
+ \else%
\@writelinesonpageR{1000}%
- \fi
- \numpagelinesR=\z@
- \parledgroup@correction@notespacing@init
+ \fi%
+ \numpagelinesR=\z@%
+ \parledgroup@correction@notespacing@init%
% \end{macrocode}
% The page is full, so move onto the next (left, odd) page and repeat left
% text processing.
% \begin{macrocode}
- \clearl@drightpage}
+ \clearl@drightpage}%
% \end{macrocode}
% More to do? If there is we have to get the number of lines for the next
% pair of pages before starting to output them.
% \changes{v0.3.b}{2005/04/08}{Added \cs{l@dminpagelines} calculation
% for succeeding page pairs}
% \begin{macrocode}
- \checkraw@text
- \ifaraw@text
- \getlinesfrompagelistL
- \getlinesfrompagelistR
+ \checkraw@text%
+ \ifaraw@text%
+ \getlinesfrompagelistL%
+ \getlinesfrompagelistR%
\l@dcalc@minoftwo{\@cs@linesonpageL}{\@cs@linesonpageR}%
{\l@dminpagelines}%
- \fi
- \repeat}
+ \fi%
+ \repeat}%
% \end{macrocode}
% We have now output the text from all the chunks.
% \begin{macrocode}
- \fi
+ \fi%
% \end{macrocode}
% Make sure that there are no inserts hanging around.
% \begin{macrocode}
- \flush@notes
- \flush@notesR
- \endgroup
+ \flush@notes%
+ \flush@notesR%
+ \endgroup%
% \end{macrocode}
% Zero counts ready for the next set of left/right text chunks. The boolean tests for stanza are switched to false.
% \begin{macrocode}
- \global\l@dpscL=\z@
- \global\l@dpscR=\z@
- \global\l@dnumpstartsL=\z@
- \global\l@dnumpstartsR=\z@
- \global\instanzaLfalse
- \global\instanzaRfalse
+ \global\l@dpscL=\z@%
+ \global\l@dpscR=\z@%
+ \global\l@dnumpstartsL=\z@%
+ \global\l@dnumpstartsR=\z@%
+ \global\instanzaLfalse%
+ \global\instanzaRfalse%
\l@dprintingpagesfalse%
\finish@Pages@notes%Needed to prevent final notes overlap line number
\ignorespaces}
@@ -5261,6 +5300,12 @@
% \begin{macrocode}
\newcommand{\finish@Pages@notes}{%
\def\do##1{%
+ \ifnocritical@%
+ \newbox\csuse{##1footins}
+ \fi
+ \ifnofamiliar@%
+ \newbox\csuse{footins##1}
+ \fi
\ifvoid\csuse{##1footins}%
\ifvoid\csuse{footins##1}\else%
\newpage\null%
@@ -5731,6 +5776,21 @@
% \end{macro}
%
% \section{Sections' titles' commands}
+% As switching from left to right pages does not clear the page since v1.13.0,
+% but only creates new pages, no \verb+\vbox{}+ is inserted, and consequently parallel chapters are mis-aligned.
+%
+% So we patch the \cs{chapter} command in order to prevent this problem.
+% \begin{macro}{\chapter}
+% \begin{macrocode}
+\pretocmd{\chapter}{%
+ \ifl@dprintingpages%
+ \vbox{}%
+ \fi%
+ }%
+ {}%
+ {}%
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\eledsectnotoc}
% \cs{eledsectnotoc} just saves its content \cs{@eledsectnotoc}, which will be tested where sectioning commands will be printed.
% \begin{macrocode}
diff --git a/Master/texmf-dist/tex/latex/eledmac/eledmac.sty b/Master/texmf-dist/tex/latex/eledmac/eledmac.sty
index cb2acbfc52d..f5214429322 100644
--- a/Master/texmf-dist/tex/latex/eledmac/eledmac.sty
+++ b/Master/texmf-dist/tex/latex/eledmac/eledmac.sty
@@ -26,8 +26,14 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{eledmac}[2015/03/22 v1.20.0 LaTeX port of EDMAC]%
+\ProvidesPackage{eledmac}[2015/04/13 v1.21.0 LaTeX port of EDMAC]%
\newif\ifledfinal
+\newif\ifoldprintnpnumspace@
+\newif\ifnocritical@%
+\newif\if@noeled@sec%
+\newif\ifnoend@%
+\newif\ifnofamiliar@%
+\newif\ifnoledgroup@%
\newif\ifparapparatus@
\newif\ifnoquotation@
\newif\iflednopbinverse
@@ -37,7 +43,20 @@
\parapparatus@false
\RequirePackage{xkeyval}
\DeclareOptionX{series}[A,B,C,D,E,Z]{\xdef\default@series{#1}}
+\DeclareOptionX{noeledsec}{\@noeled@sectrue}
+\DeclareOptionX{nocritical}{\nocritical@true}%
+\DeclareOptionX{nofamiliar}{\nofamiliar@true}%
+\DeclareOptionX{noledgroup}{\noledgroup@true}%
+\DeclareOptionX{noend}{%
+ \let\l@dend@open\@gobble%
+ \let\l@d@end\relax
+ \let\l@dend@close\relax%
+ \global\let\l@dend@stuff=\relax%
+ \global\chardef\l@d@end=16%
+ \noend@true%
+}%
\DeclareOptionX{noquotation}{\noquotation@true}
+\DeclareOptionX{oldprintnpnumspace}{\oldprintnpnumspace@true}
\DeclareOptionX{final}{\ledfinaltrue}
\DeclareOptionX{draft}{\ledfinalfalse}
\DeclareOptionX{parapparatus}{\parapparatus@true}
@@ -90,7 +109,7 @@
\newcommand*{\led@err@NumberingShouldHaveStarted}{%
\eledmac@error{Numbering should already have been started}{\@ehc}}
\newcommand*{\led@err@edtextoutsidepstart}{%
- \eledmac@error{\string\edtext\space outside numbered paragraph (\pstart…\pend)}{\@ehc}}%
+ \eledmac@error{\string\edtext\space outside numbered paragraph (\pstart\ldots\pend)}{\@ehc}}%
\newcommand*{\led@mess@NotesChanged}{%
\typeout{eledmac reminder: }%
\typeout{ The number of the footnotes in this section
@@ -142,6 +161,8 @@
\eledmac@warning{Bad action code, value \next@action.}}
\newcommand*{\led@warn@DuplicateLabel}[1]{%
\eledmac@warning{Duplicate definition of label `#1' on page \the\pageno.}}
+\newcommand*{\led@warn@AppLabelOutEdtext}[1]{%
+ \eledmac@warning{\string\applabel\space outside of \string\edtext\space `#1' on page \the\pageno.}}%
\newcommand*{\led@warn@RefUndefined}[1]{%
\eledmac@warning{Reference `#1' on page \the\pageno\space undefined.
Using `000'.}}
@@ -181,12 +202,18 @@
\eledmac@warning{\itemcount@\space rightnotes on line \the\line@num\space p. \the\page@num}%
\fi%
}%
-\newcommand{\led@war@FalseverseDeprecated}{%
- \eledmac@warning{\string\falseverse\space deprecated. Look at \string\newverse\space instead.}%
+\newcommand{\led@war@noeledsecDeprecated}[0]{%
+ \eledmac@warning{\string\noeledsec\space deprecated. Use `noeledsec` option instead.}%
+}%
+\newcommand{\led@war@ledsetnormalparstuffDeprecated}{%
+ \eledmac@warning{\string\ledsetnormalparstuff\space deprecated. Look at \string\Xledsetnormalparstuff\space and \ledsetnormalparstuffX\space instead.}%
}%
\newcommand{\led@war@ledxxxDeprecated}[1]{%
\eledmac@warning{\string\led#1\space deprecated. Look at \string\e#1 instead.}%
}%
+\newcommand{\led@war@noendnotesDeprecated}[0]{%
+ \eledmac@warning{\string\noendnotes\space deprecated. Use `noend` option instead.}%
+}%
\newcommand*{\led@err@TooManyColumns}{%
\eledmac@error{Too many columns}{\@ehc}}
\newcommand*{\led@err@UnequalColumns}{%
@@ -212,6 +239,7 @@
}%
\providecommand*{\@gobblethree}[3]{}
\providecommand*{\@gobblefour}[4]{}
+\providecommand*{\@gobblefive}[5]{}
\let\linenumberlist=\empty
\newcount\@l@dtempcnta \newcount\@l@dtempcntb
@@ -339,19 +367,25 @@
\ifx\@tempa\@tempb
\global\bypage@true
\global\bypstart@false
- \pstartinfootnote[][false]
+ \unless\ifnocritical@%
+ \pstartinfootnote[][false]%
+ \fi%
\else
\def\@tempb{pstart}%
\ifx\@tempa\@tempb
\global\bypage@false
\global\bypstart@true
- \pstartinfootnote
+ \unless\ifnocritical@%
+ \pstartinfootnote%
+ \fi%
\else
\def\@tempb{section}
\ifx\@tempa\@tempb
\global\bypage@false
\global\bypstart@false
- \pstartinfootnote[][false]
+ \unless\ifnocritical@%
+ \pstartinfootnote[][false]%
+ \fi%
\else
\led@warn@BadLineation
\fi
@@ -594,6 +628,7 @@
\ifnum #1=\last@page@num
\else
\ifbypage@
+ \csxdef{lastlinenumberon@\the\last@page@num}{\the\line@num}%
\line@num=\z@ \subline@num=\z@
\fi
\page@num=#1\relax
@@ -716,11 +751,42 @@
\newcommand*{\skip@lockoff}{\global\let\lock@off=\do@lockoff}
\global\let\lock@off=\do@lockoff
-\newcommand*{\n@num}{\n@num@reg}
-\newcommand*{\n@num@reg}{%
- \xright@appenditem{\the\absline@num}\to\actionlines@list
- \xright@appenditem{-1007}\to\actions@list}
+\newcommand*{\n@num}{%
+ \ifledRcol%
+ \xright@appenditem{\the\absline@numR}\to\actionlines@listR
+ \xright@appenditem{-1007}\to\actions@listR
+ \else%
+ \xright@appenditem{\the\absline@num}\to\actionlines@list%
+ \xright@appenditem{-1007}\to\actions@list%
+ \fi%
+}%
+\newcommand*{\n@num@stanza}{%
+ \ifledRcol%
+ \xright@appenditem{\the\absline@numR}\to\actionlines@listR%
+ \xright@appenditem{-1008}\to\actions@listR%
+ \else%
+ \xright@appenditem{\the\absline@num}\to\actionlines@list%%
+ \xright@appenditem{-1008}\to\actions@list%
+ \fi%
+}
+\newif\ifl@dhidenumber
+\newcommand*{\hidenumbering}{
+ \ifledRcol%
+ \write\linenum@outR{\string\hide@num}%
+ \else%
+ \write\linenum@out{\string\hide@num}%
+ \fi%
+}%
+\newcommand*{\hide@num}{%
+ \ifledRcol%
+ \xright@appenditem{\the\absline@numR}\to\actionlines@listR%
+ \xright@appenditem{-1009}\to\actions@listR%
+ \else%
+ \xright@appenditem{\the\absline@num}\to\actionlines@list%%
+ \xright@appenditem{-1009}\to\actions@list%
+ \fi%
+}
\newcount\insert@count
\newcommand*{\dummy@ref}[2]{#2}
\newcommand*{\@ref}[2]{%
@@ -847,10 +913,24 @@
\def\endlock{\write\linenum@out{\string\lock@off}}
\newif\ifl@dskipnumber
-\newcommand*{\skipnumbering}{\skipnumbering@reg}
-\newcommand*{\skipnumbering@reg}{%
- \write\linenum@out{\string\n@num}%
- \advanceline{-1}}
+\newif\ifl@dskipversenumber%
+\newcommand*{\skipnumbering}{
+ \ifledRcol%
+ \ifinstanza%
+ \write\linenum@outR{\string\n@num@stanza}%
+ \else%
+ \write\linenum@outR{\string\n@num}%
+ \fi%
+ \advanceline{-1}%
+ \else%
+ \ifinstanza%
+ \write\linenum@out{\string\n@num@stanza}%
+ \else%
+ \write\linenum@out{\string\n@num}%
+ \fi%
+ \advanceline{-1}%
+ \fi%
+}%
\list@create{\end@lemmas}
\long\def\dummy@text#1#2/{#1}
@@ -1051,7 +1131,11 @@
\newif\iflabelpstart
\labelpstartfalse
\newcommandx*{\pstart}[1][1]{%
+ \normal@pars%
\ifstrempty{#1}{\at@every@pstart}{\noindent#1}%
+ \ifautopar%
+ \autopar%
+ \fi%
\ifluatex%
\edef\l@luatextextdir@L{\the\luatextextdir}%
\fi%
@@ -1092,6 +1176,7 @@
\newcommandx*{\pend}[1][1]{\ifnumbering \else%
\led@err@PendNotNumbered%
\fi%
+ \global\l@dskipversenumberfalse%
\ifnumberedpar@ \else%
\led@err@PendNoPstart%
\fi%
@@ -1114,7 +1199,11 @@
\fi%
\@oldnobreak%
\addtocounter{pstart}{1}%
+ \normal@pars%
\ifstrempty{#1}{\at@every@pend}{\noindent#1}%
+ \ifautopar%
+ \autopar%
+ \fi%
}
@@ -1165,7 +1254,12 @@
\inserthangingsymbolfalse
\fi
\check@pb@in@verse
- \affixline@num
+ \ifl@dhidenumber%
+ \global\l@dhidenumberfalse%
+ \f@x@l@cks%
+ \else%
+ \affixline@num%
+ \fi%
\xifinlist{\the\l@dnumpstartsL}{\eled@sections@@}%
{\print@eledsection}%
{\print@line}%
@@ -1227,22 +1321,22 @@
\newcommand*{\ledrlfill}{}
\newcommand*{\getline@num}{%
- \global\advance\absline@num \@ne
+ \global\advance\absline@num \@ne%
\do@actions
\do@ballast
\ifnumberline
- \ifsublines@
- \ifnum\sub@lock<\tw@
- \global\advance\subline@num \@ne
- \fi
- \else
- \ifnum\@lock<\tw@
- \global\advance\line@num \@ne
- \global\subline@num \z@
- \fi
- \fi
+ \ifsublines@
+ \ifnum\sub@lock<\tw@
+ \global\advance\subline@num \@ne
+ \fi
+ \else
+ \ifnum\@lock<\tw@
+ \global\advance\line@num \@ne
+ \global\subline@num \z@
+ \fi
+ \fi
\fi
- }
+}
\newcount\ballast@count
\newcounter{ballast}
\setcounter{ballast}{0}
@@ -1313,74 +1407,81 @@
\fi
\or% % 1007
\l@dskipnumbertrue
+ \or% % 1008
+ \l@dskipversenumbertrue%
+ \or% % 1009
+ \l@dhidenumbertrue
\else
\led@warn@BadAction
\fi}
\newcommand*{\affixline@num}{%
-\ifledgroupnotesL@\else\ifnumberline
-\ifl@dskipnumber
- \global\l@dskipnumberfalse
-\else
- \ifsublines@
- \@l@dtempcntb=\subline@num
- \ifnum\subline@num>\c@firstsublinenum
- \@l@dtempcnta=\subline@num
- \advance\@l@dtempcnta by-\c@firstsublinenum
- \divide\@l@dtempcnta by\c@sublinenumincrement
- \multiply\@l@dtempcnta by\c@sublinenumincrement
- \advance\@l@dtempcnta by\c@firstsublinenum
- \else
- \@l@dtempcnta=\c@firstsublinenum
- \fi
- \ch@cksub@l@ck
- \else
- \@l@dtempcntb=\line@num
- \ifx\linenumberlist\empty
- \ifnum\line@num>\c@firstlinenum
- \@l@dtempcnta=\line@num
- \advance\@l@dtempcnta by-\c@firstlinenum
- \divide\@l@dtempcnta by\c@linenumincrement
- \multiply\@l@dtempcnta by\c@linenumincrement
- \advance\@l@dtempcnta by\c@firstlinenum
+ \ifledgroupnotesL@\else
+ \ifnumberline
+ \ifl@dskipnumber
+ \global\l@dskipnumberfalse
\else
- \@l@dtempcnta=\c@firstlinenum
+ \ifsublines@
+ \@l@dtempcntb=\subline@num
+ \ifnum\subline@num>\c@firstsublinenum
+ \@l@dtempcnta=\subline@num
+ \advance\@l@dtempcnta by-\c@firstsublinenum
+ \divide\@l@dtempcnta by\c@sublinenumincrement
+ \multiply\@l@dtempcnta by\c@sublinenumincrement
+ \advance\@l@dtempcnta by\c@firstsublinenum
+ \else
+ \@l@dtempcnta=\c@firstsublinenum
+ \fi
+ \ch@cksub@l@ck
+ \else
+ \@l@dtempcntb=\line@num
+ \ifx\linenumberlist\empty
+ \ifnum\line@num>\c@firstlinenum
+ \@l@dtempcnta=\line@num
+ \advance\@l@dtempcnta by-\c@firstlinenum
+ \divide\@l@dtempcnta by\c@linenumincrement
+ \multiply\@l@dtempcnta by\c@linenumincrement
+ \advance\@l@dtempcnta by\c@firstlinenum
+ \else
+ \@l@dtempcnta=\c@firstlinenum
+ \fi
+ \else
+ \@l@dtempcnta=\line@num
+ \edef\rem@inder{,\linenumberlist,\number\line@num,}%
+ \edef\sc@n@list{\def\noexpand\sc@n@list
+ ####1,\number\@l@dtempcnta,####2|{\def\noexpand\rem@inder{####2}}}%
+ \sc@n@list\expandafter\sc@n@list\rem@inder|%
+ \ifx\rem@inder\empty%
+ \advance\@l@dtempcnta\@ne
+ \fi
+ \fi
+ \ch@ck@l@ck
+ \fi
+ \ifnum\@l@dtempcnta=\@l@dtempcntb
+ \ifl@dskipversenumber\else
+ \if@twocolumn
+ \if@firstcolumn
+ \gdef\l@dld@ta{\llap{{\leftlinenum}}}%
+ \else
+ \gdef\l@drd@ta{\rlap{{\rightlinenum}}}%
+ \fi
+ \else
+ \@l@dtempcntb=\line@margin
+ \ifnum\@l@dtempcntb>\@ne
+ \advance\@l@dtempcntb \page@num
+ \fi
+ \ifodd\@l@dtempcntb
+ \gdef\l@drd@ta{\rlap{{\rightlinenum}}}%
+ \else
+ \gdef\l@dld@ta{\llap{{\leftlinenum}}}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \f@x@l@cks
\fi
- \else
- \@l@dtempcnta=\line@num
- \edef\rem@inder{,\linenumberlist,\number\line@num,}%
- \edef\sc@n@list{\def\noexpand\sc@n@list
- ####1,\number\@l@dtempcnta,####2|{\def\noexpand\rem@inder{####2}}}%
- \sc@n@list\expandafter\sc@n@list\rem@inder|%
- \ifx\rem@inder\empty\advance\@l@dtempcnta\@ne\fi
- \fi
- \ch@ck@l@ck
- \fi
- \ifnum\@l@dtempcnta=\@l@dtempcntb
- \if@twocolumn
- \if@firstcolumn
- \gdef\l@dld@ta{\llap{{\leftlinenum}}}%
- \else
- \gdef\l@drd@ta{\rlap{{\rightlinenum}}}%
\fi
- \else
- \@l@dtempcntb=\line@margin
- \ifnum\@l@dtempcntb>\@ne
- \advance\@l@dtempcntb \page@num
- \fi
- \ifodd\@l@dtempcntb
- \gdef\l@drd@ta{\rlap{{\rightlinenum}}}%
- \else
- \gdef\l@dld@ta{\llap{{\leftlinenum}}}%
- \fi
- \fi
- \else
-%% #1%
\fi
- \f@x@l@cks
-\fi
-\fi
-\fi
}
\newcommand*{\ch@cksub@l@ck}{%
@@ -1612,16 +1713,36 @@
\csname #1footfmt\endcsname #2[#1]\color@endgroup}}
\newcommand*{\ledsetnormalparstuff}{%
+ \led@war@ledsetnormalparstuffDeprecated%
+ \ifluatex%
+ \luatextextdir\footnote@luatextextdir%
+ \luatexpardir\footnote@luatexpardir%
+ \fi%
+ \csuse{\csuse{footnote@dir}}%
+ \normal@pars%
+ \noindent \parfillskip \z@ \@plus 1fil}%
+
+\newcommand*{\ledsetnormalparstuff@common}{%
\ifluatex%
\luatextextdir\footnote@luatextextdir%
\luatexpardir\footnote@luatexpardir%
\fi%
\csuse{\csuse{footnote@dir}}%
\normal@pars%
- \noindent \parfillskip \z@ \@plus 1fil}
+ \parfillskip \z@ \@plus 1fil}%
+
+\newcommand*{\Xledsetnormalparstuff}[1]{%
+ \ledsetnormalparstuff@common%
+ \nottoggle{Xparindent@#1}{\noindent}{}%\noindent and and not \parindent=0pt to avoid to break the (bad) change made when moving from ledmac to eledmac
+}%
+
+\newcommand*{\ledsetnormalparstuffX}[1]{%
+ \ledsetnormalparstuff@common%
+ \nottoggle{parindentX@#1}{\noindent}{}%\noindent and and not \parindent=0pt to avoid to break the (bad) change made when moving from ledmac to eledmac
+}%
\notbool{parapparatus@}{\newcommandx*}{\newcommandx}{\normalfootfmt}[4][4=Z]{% 4th arg is optional, for backward compatibility
- \ledsetnormalparstuff%
+ \Xledsetnormalparstuff{#4}%
\hangindent=\csuse{Xhangindent@#4}
\strut{\printlinefootnote{#1}{#4}}%
{\nottoggle{Xlemmadisablefontselection@#4}{\select@lemmafont#1|#2}{#2}}%
@@ -1676,6 +1797,24 @@
\def\l@dparsedendline{0}%
\def\l@dparsedendsub{0}%
+\newif\ifistwofollowinglines@%
+\newcommand{\setistwofollowinglines}[4]{%
+ \ifcsdef{lastlinenumberon@#1}%
+ {\numdef{\tmp}{\csuse{lastlinenumberon@#1}}}%
+ {\numdef{\tmp}{0}}%
+ \istwofollowinglines@false%
+ \ifnumequal{#4-#2}{1}%
+ {\istwofollowinglines@true}%
+ {\ifbypage@%
+ \ifnumequal{#3-#1}{1}%
+ {%
+ \ifnumequal{#2}{\tmp}%
+ {\ifnumequal{#4}{1}{\istwofollowinglines@true}{}}%
+ {}%
+ }%
+ {}%
+ }%
+}%
\newcommand*{\setprintlines}[6]{%
\l@d@pnumfalse \l@d@dashfalse
\ifbypage@
@@ -1703,10 +1842,24 @@
\fi
\fi%
\ifl@d@dash%
- \iftoggle{fulllines@}%
+ \ifboolexpr{togl{fulllines@} or test{\ifcsempty{twolines@\@currentseries}}}%
{}%
{%
- \ifcsempty{twolines@\@currentseries}%
+ \setistwofollowinglines{#1}{#2}{#4}{#5}%
+ \ifboolexpr{%
+ (%
+ togl {twolinesbutnotmore@\@currentseries}%
+ and not%
+ (%
+ bool {istwofollowinglines@}%
+ )%
+ )%
+ or%
+ (%
+ (not test{\ifnumequal{#1}{#4}})%
+ and togl{twolinesonlyinsamepage@\@currentseries}%
+ )%
+ }%
{}%
{%
\l@d@dashfalse%
@@ -1715,7 +1868,7 @@
\l@d@eslfalse%
\ifcsempty{morethantwolines@\@currentseries}%
{}%
- {\ifnum\numexpr #5-#2>1\relax%
+ {\ifistwofollowinglines@\else%
\l@d@morethantwolinestrue%
\fi%
}%
@@ -1731,23 +1884,27 @@
\ifl@d@pnum #1\fullstop\fi
\linenumrep{#2}
\ifl@d@ssub \fullstop \sublinenumrep{#3}\fi
- \ifl@d@dash \ifl@d@twolines\else\endashchar\fi\fi
- \ifl@d@pnum #4\fullstop\fi
- \ifl@d@elin \linenumrep{#5}\fi
- \ifl@d@esl \ifl@d@elin \fullstop\fi \sublinenumrep{#6}\fi
\ifl@d@twolines%
\ifl@d@morethantwolines%
\csuse{morethantwolines@\@currentseries}%
\else%
\csuse{twolines@\@currentseries}%
\fi%
+ \else%
+ \ifl@d@dash \endashchar\fi%
+ \ifl@d@pnum #4\fullstop\fi%
+ \ifl@d@elin \linenumrep{#5}\fi%
+ \ifl@d@esl \ifl@d@elin \fullstop\fi \sublinenumrep{#6}\fi%
\fi%
\endgroup}
\newcommand*{\normalfootstart}[1]{%
\ifdimequal{0pt}{\preXnotes@}{}%
{%
\iftoggle{preXnotes@}{%
- \togglefalse{preXnotes@}\skip\csname #1footins\endcsname=\csuse{preXnotes@}}%
+ \togglefalse{preXnotes@}%
+ \skip\csname #1footins\endcsname=%
+ \dimexpr\csuse{preXnotes@}+\csuse{afterXrule@#1}\relax%
+ }%
{}%
}%
\vskip\skip\csname #1footins\endcsname%
@@ -1757,8 +1914,7 @@
\fi%
\setXnoteswidthliketwocolumns@{#1}%
\setXnotespositionliketwocolumns@{#1}%
- \print@Xfootnoterule{#1}%%
- \vskip\csuse{afterXrule@#1}%
+ \print@Xfootnoterule{#1}%
\noindent\leavevmode}
\let\normalfootnoterule=\footnoterule
\newcommand*{\normalfootgroup}[1]{%
@@ -1780,13 +1936,11 @@
\setXnoteswidthliketwocolumns@{#1}%
\setXnotespositionliketwocolumns@{#1}%
\print@Xfootnoterule{#1}%%
- \vskip\csuse{afterXrule@#1}%
\fi%
\else%
\setXnoteswidthliketwocolumns@{#1}%
\setXnotespositionliketwocolumns@{#1}%
\print@Xfootnoterule{#1}%%
- \vskip\csuse{afterXrule@#1}%
\fi%
\setlength{\parindent}{0pt}
{\csuse{Xnotefontsize@#1}\csuse{txtbeforeXnotes@#1}}
@@ -1813,12 +1967,16 @@
\count\csname #1footins\endcsname=1000
\csxdef{default@#1footins}{1000}%Use this to confine the notes to one side only
\dimen\csname #1footins\endcsname=\csuse{maxhXnotes@#1}
- \skip\csname #1footins\endcsname=\csuse{beforeXnotes@#1}
- \expandafter\let\csname mpv#1footnote\endcsname=\mpnormalvfootnote
- \expandafter\let\csname mp#1footgroup\endcsname=\mpnormalfootgroup
- \count\csname mp#1footins\endcsname=1000
- \dimen\csname mp#1footins\endcsname=\csuse{maxhXnotes@#1}
- \skip\csname mp#1footins\endcsname=\csuse{beforeXnotes@#1}
+ \skip\csname #1footins\endcsname=\csuse{beforeXnotes@#1}%
+ \advance\skip\csname #1footins\endcsname by\csuse{afterXrule@#1}%
+ \ifnoledgroup@\else%
+ \expandafter\let\csname mpv#1footnote\endcsname=\mpnormalvfootnote
+ \expandafter\let\csname mp#1footgroup\endcsname=\mpnormalfootgroup
+ \count\csname mp#1footins\endcsname=1000
+ \dimen\csname mp#1footins\endcsname=\csuse{maxhXnotes@#1}
+ \skip\csname mp#1footins\endcsname=\csuse{beforeXnotes@#1}%
+ \advance\skip\csname mp#1footins\endcsname by\csuse{afterXrule@#1}%
+ \fi
}
\newcommand*{\footparagraph}[1]{%
@@ -1831,13 +1989,17 @@
\count\csname #1footins\endcsname=1000
\csxdef{default@#1footins}{1000}%Use this to confine the notes to one side only
\dimen\csname #1footins\endcsname=\csuse{maxhXnotes@#1}
- \skip\csname #1footins\endcsname=\csuse{beforeXnotes@#1}
+ \skip\csname #1footins\endcsname=\csuse{beforeXnotes@#1}%
+ \advance\skip\csname #1footins\endcsname by\csuse{afterXrule@#1}%
\para@footsetup{#1}
- \expandafter\let\csname mpv#1footnote\endcsname=\mppara@vfootnote
- \expandafter\let\csname mp#1footgroup\endcsname=\mppara@footgroup
- \count\csname mp#1footins\endcsname=1000
- \dimen\csname mp#1footins\endcsname=\csuse{maxhXnotes@#1}
- \skip\csname mp#1footins\endcsname=\csuse{beforeXnotes@#1}
+ \ifnoledgroup@\else
+ \expandafter\let\csname mpv#1footnote\endcsname=\mppara@vfootnote
+ \expandafter\let\csname mp#1footgroup\endcsname=\mppara@footgroup
+ \count\csname mp#1footins\endcsname=1000
+ \dimen\csname mp#1footins\endcsname=\csuse{maxhXnotes@#1}
+ \skip\csname mp#1footins\endcsname=\csuse{beforeXnotes@#1}%
+ \advance\skip\csname mp#1footins\endcsname by\csuse{afterXrule@#1}%
+ \fi
}
\providecommand{\footfudgefiddle}{64}
\newcommand*{\para@footsetup}[1]{{\csuse{Xnotefontsize@#1}
@@ -1853,14 +2015,16 @@
\ifdimequal{0pt}{\preXnotes@}{}%
{%
\iftoggle{preXnotes@}{%
- \togglefalse{preXnotes@}\skip\csname #1footins\endcsname=\csuse{preXnotes@}}%
+ \togglefalse{preXnotes@}%
+ \skip\csname #1footins\endcsname=%
+ \dimexpr\csuse{preXnotes@}+\csuse{afterXrule@#1}\relax%
+ }%
{}%
}%
\vskip\skip\csname #1footins\endcsname%
\setXnoteswidthliketwocolumns@{#1}%
\setXnotespositionliketwocolumns@{#1}%
\print@Xfootnoterule{#1}%%
- \vskip\csuse{afterXrule@#1}%
\noindent\leavevmode}
\newcommand*{\para@vfootnote}[2]{%
\insert\csname #1footins\endcsname
@@ -1903,7 +2067,7 @@
\newcommandx*{\parafootfmt}[4][4=Z]{%
\insertparafootsep{#4}%
- \ledsetnormalparstuff%
+ \Xledsetnormalparstuff{#4}%
\printlinefootnote{#1}{#4}%
{\nottoggle{Xlemmadisablefontselection@#4}{\select@lemmafont#1|#2}{#2}}%
\iftoggle{nosep@}{\hskip\csuse{inplaceoflemmaseparator@#4}}{\ifcsempty{lemmaseparator@#4}%
@@ -1936,13 +2100,11 @@
\setXnoteswidthliketwocolumns@{#1}%
\setXnotespositionliketwocolumns@{#1}%
\print@Xfootnoterule{#1}%%
- \vskip\csuse{afterXrule@#1}%
\fi%
\else%
\setXnoteswidthliketwocolumns@{#1}%
\setXnotespositionliketwocolumns@{#1}%
- \print@Xfootnoterule{#1}%%
- \vskip\csuse{afterXrule@#1}%
+ \print@Xfootnoterule{#1}%
\fi%
\unvbox\csname mp#1footins\endcsname
\ifcsstring{Xragged@#1}{L}{\RaggedLeft}{}%
@@ -1994,10 +2156,16 @@
\expandafter\let\csname #1footfmt\endcsname=\threecolfootfmt
\expandafter\let\csname #1footgroup\endcsname=\threecolfootgroup
\dimen\csname #1footins\endcsname=\csuse{maxhXnotes@#1}%
+ \skip\csname #1footins\endcsname=\csuse{beforeXnotes@#1}%
+ \advance\skip\csname #1footins\endcsname by\csuse{afterXrule@#1}%
\threecolfootsetup{#1}
- \expandafter\let\csname mpv#1footnote\endcsname=\mpnormalvfootnote
- \expandafter\let\csname mp#1footgroup\endcsname=\mpthreecolfootgroup
- \mpthreecolfootsetup{#1}
+ \ifnoledgroup@\else
+ \expandafter\let\csname mpv#1footnote\endcsname=\mpnormalvfootnote
+ \expandafter\let\csname mp#1footgroup\endcsname=\mpthreecolfootgroup
+ \skip\csname mp#1footins\endcsname=\csuse{beforeXnotes@#1}%
+ \advance\skip\csname mp#1footins\endcsname by\csuse{afterXrule@#1}%
+ \mpthreecolfootsetup{#1}
+ \fi
}
\newcommand*{\threecolfootsetup}[1]{%
@@ -2016,11 +2184,11 @@
\notbool{parapparatus@}{\newcommandx*}{\newcommandx}{\threecolfootfmt}[4][4=Z]{%
\normal@pars
\hsize \csuse{hsizethreecol@#4}
- \parindent=0pt
+ \nottoggle{Xparindent@#4}{\parindent=\z@}{}
\tolerance=5000
- \raggedright
\hangindent=\csuse{Xhangindent@#4}
\leavevmode
+ \csuse{Xcolalign@#4}%
\strut{\printlinefootnote{#1}{#4}}%
{\nottoggle{Xlemmadisablefontselection@#4}{\select@lemmafont#1|#2}{#2}}%
\iftoggle{nosep@}{\hskip\csuse{inplaceoflemmaseparator@#4}}{\ifcsempty{lemmaseparator@#4}%
@@ -2045,14 +2213,12 @@
\else%
\setXnoteswidthliketwocolumns@{#1}%
\setXnotespositionliketwocolumns@{#1}%
- \print@Xfootnoterule{#1}%%
- \vskip\csuse{afterXrule@#1}%
+ \print@Xfootnoterule{#1}%
\fi%
\else%
\setXnoteswidthliketwocolumns@{#1}%
\setXnotespositionliketwocolumns@{#1}%
- \print@Xfootnoterule{#1}%%
- \vskip\csuse{afterXrule@#1}%
+ \print@Xfootnoterule{#1}%
\fi%
{\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par
\splittopskip=\ht\strutbox
@@ -2065,10 +2231,16 @@
\expandafter\let\csname #1footfmt\endcsname=\twocolfootfmt
\expandafter\let\csname #1footgroup\endcsname=\twocolfootgroup
\dimen\csname #1footins\endcsname=\csuse{maxhXnotes@#1}%
+ \skip\csname #1footins\endcsname=\csuse{beforeXnotes@#1}%
+ \advance\skip\csname #1footins\endcsname by\csuse{afterXrule@#1}%
\twocolfootsetup{#1}
- \expandafter\let\csname mpv#1footnote\endcsname=\mpnormalvfootnote
- \expandafter\let\csname mp#1footgroup\endcsname=\mptwocolfootgroup
- \mptwocolfootsetup{#1}
+ \ifnoledgroup@\else
+ \expandafter\let\csname mpv#1footnote\endcsname=\mpnormalvfootnote
+ \expandafter\let\csname mp#1footgroup\endcsname=\mptwocolfootgroup
+ \skip\csname mp#1footins\endcsname=\csuse{beforeXnotes@#1}%
+ \advance\skip\csname mp#1footins\endcsname by\csuse{afterXrule@#1}%
+ \mptwocolfootsetup{#1}
+ \fi
}
\newcommand*{\twocolfootsetup}[1]{%
@@ -2082,11 +2254,11 @@
\notbool{parapparatus@}{\newcommandx*}{\newcommandx}{\twocolfootfmt}[4][4=Z]{% 4th arg is optional, for backward compatibility
\normal@pars
\hsize \csuse{hsizetwocol@#4}
- \parindent=0pt
+ \nottoggle{Xparindent@#4}{\parindent=\z@}{}
\tolerance=5000
- \raggedright
\hangindent=\csuse{Xhangindent@#4}
\leavevmode
+ \csuse{Xcolalign@#4}%
\strut{\printlinefootnote{#1}{#4}}%
{\nottoggle{Xlemmadisablefontselection@#4}{\select@lemmafont#1|#2}{#2}}%
\iftoggle{nosep@}{\hskip\csuse{inplaceoflemmaseparator@#4}}{\ifcsempty{lemmaseparator@#4}%
@@ -2115,14 +2287,12 @@
\else%
\setXnoteswidthliketwocolumns@{#1}%
\setXnotespositionliketwocolumns@{#1}%
- \print@Xfootnoterule{#1}%%
- \vskip\csuse{afterXrule@#1}%
+ \print@Xfootnoterule{#1}%
\fi%
\else%
\setXnoteswidthliketwocolumns@{#1}%
\setXnotespositionliketwocolumns@{#1}%
- \print@Xfootnoterule{#1}%%
- \vskip\csuse{afterXrule@#1}%
+ \print@Xfootnoterule{#1}%
\fi%
{\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par
\splittopskip=\ht\strutbox
@@ -2193,7 +2363,7 @@
\newcommand*{\normalbodyfootmarkX}[1]{%
\hbox{\textsuperscript{\normalfont\@nameuse{@thefnmark#1}}}}
-\newcommand*{\normalvfootnoteX}[2]{%
+\notbool{parapparatus@}{\newcommand*}{\newcommand}{\normalvfootnoteX}[2]{%
\insert\@nameuse{footins#1}\bgroup
\csuse{bhooknoteX@#1}
\csuse{notefontsizeX@#1}
@@ -2203,7 +2373,7 @@
\fi\fi%
\setnotesXpositionliketwocolumns@{#1}%
\spaceskip=\z@skip \xspaceskip=\z@skip
- \csuse{\csuse{footnote@dir}}\if@RTL\else\noindent\leavevmode\fi\@nameuse{footfmt#1}{#1}{#2}\egroup}
+ \csuse{\csuse{footnote@dir}}\@nameuse{footfmt#1}{#1}{#2}\egroup}
\newcommand*{\mpnormalvfootnoteX}[2]{%
\global\setbox\@nameuse{mpfootins#1}\vbox{%
@@ -2215,7 +2385,7 @@
\color@begingroup
\@nameuse{footfmt#1}{#1}{#2}\color@endgroup}}
-\newcommand*{\normalfootfmtX}[2]{%
+\notbool{parapparatus@}{\newcommand*}{\newcommand}{\normalfootfmtX}[2]{%
\ifluatex%
\luatextextdir\footnote@luatextextdir%
\luatexpardir\footnote@luatexpardir%
@@ -2224,9 +2394,9 @@
\protected@edef\@currentlabel{%
\@nameuse{@thefnmark#1}%
}%
- \ledsetnormalparstuff
+ \ledsetnormalparstuffX{#1}%
\hangindent=\csuse{hangindentX@#1}%
- {{\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}}\strut%\enspace
+ {{\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}}\strut%
#2\strut\par}}
\newcommand*{\normalfootfootmarkX}[1]{%
@@ -2236,7 +2406,10 @@
\ifdimequal{0pt}{\prenotesX@}{}%
{%
\iftoggle{prenotesX@}{%
- \togglefalse{prenotesX@} \skip\csname footins#1\endcsname=\csuse{prenotesX@}}%
+ \togglefalse{prenotesX@}%
+ \skip\csname footins#1\endcsname=%
+ \dimexpr\csuse{prenotesX@}+\csuse{afterruleX@#1}\relax%
+ }%
{}%
}%
\vskip\skip\csname footins#1\endcsname%
@@ -2248,7 +2421,7 @@
\setnotesXwidthliketwocolumns@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
- \vskip\csuse{afterruleX@#1}}
+}%
\let\normalfootnoteruleX=\footnoterule
@@ -2270,13 +2443,11 @@
\setnotesXwidthliketwocolumns@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
- \vskip\csuse{afterruleX@#1}%
\fi%
\else%
\setnotesXwidthliketwocolumns@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
- \vskip\csuse{afterruleX@#1}%
\fi%
\unvbox\@nameuse{mpfootins#1}}
@@ -2313,24 +2484,35 @@
\count\csname footins#1\endcsname=1000
\csxdef{default@footins#1}{1000}%Use to have note only for one side
\dimen\csname footins#1\endcsname=\csuse{maxhnotesX@#1}
- \skip\csname footins#1\endcsname=\csuse{beforenotesX@#1}
- \expandafter\let\csname mpvfootnote#1\endcsname=\mpnormalvfootnoteX
- \expandafter\let\csname mpfootgroup#1\endcsname=\mpnormalfootgroupX
- \count\csname mpfootins#1\endcsname=1000
- \dimen\csname mpfootins#1\endcsname=\csuse{maxhnotesX@#1}
- \skip\csname mpfootins#1\endcsname=\csuse{beforenotesX@#1}
+ \skip\csname footins#1\endcsname=\csuse{beforenotesX@#1}%
+ \advance\skip\csname footins#1\endcsname by\csuse{afterruleX@#1}%
+ \ifnoledgroup@\else%
+ \expandafter\let\csname mpvfootnote#1\endcsname=\mpnormalvfootnoteX
+ \expandafter\let\csname mpfootgroup#1\endcsname=\mpnormalfootgroupX
+ \count\csname mpfootins#1\endcsname=1000
+ \dimen\csname mpfootins#1\endcsname=\csuse{maxhnotesX@#1}
+ \skip\csname mpfootins#1\endcsname=\csuse{beforenotesX@#1}%
+ \advance\skip\csname mpfootins#1\endcsname by\csuse{afterruleX@#1}%
+ \fi
}
\newcommand*{\foottwocolX}[1]{%
- \csgdef{series@displayX#1}{twocol}
+ \csgdef{series@displayX#1}{twocolX}
\expandafter\let\csname regvfootnote#1\endcsname=\twocolvfootnoteX
\expandafter\let\csname footfmt#1\endcsname=\twocolfootfmtX
\expandafter\let\csname footgroup#1\endcsname=\twocolfootgroupX
- \dimen\csname #1footins\endcsname=\csuse{maxhnotesX@#1}%
+ \dimen\csname footins#1\endcsname=\csuse{maxhnotesX@#1}%
+ \skip\csname footins#1\endcsname=\csuse{beforenotesX@#1}%
+ \advance\skip\csname footins#1\endcsname by \csuse{afterruleX@#1}\relax%
\twocolfootsetupX{#1}
- \expandafter\let\csname mpvfootnote#1\endcsname=\mpnormalvfootnoteX
- \expandafter\let\csname mpfootgroup#1\endcsname=\mptwocolfootgroupX
- \mptwocolfootsetupX{#1}}
+ \ifnoledgroup@\else%
+ \expandafter\let\csname mpvfootnote#1\endcsname=\mpnormalvfootnoteX
+ \expandafter\let\csname mpfootgroup#1\endcsname=\mptwocolfootgroupX
+ \skip\csname mpfootins#1\endcsname=\csuse{beforenotesX@#1}%
+ \advance\skip\csname mpfootins#1\endcsname by\csuse{afterruleX@#1}
+ \mptwocolfootsetupX{#1}
+ \fi%
+}
\newcommand*{\twocolfootsetupX}[1]{%
\count\csname footins#1\endcsname 500
@@ -2340,26 +2522,25 @@
\count\csname mpfootins#1\endcsname 500
\multiply\dimen\csname mpfootins#1\endcsname by \tw@}
-\newcommand*{\twocolvfootnoteX}[2]{%
+\notbool{parapparatus@}{\newcommand*}{\newcommand}{\twocolvfootnoteX}[2]{%
\insert\csname footins#1\endcsname\bgroup
\csuse{notefontsizeX@#1}
\footsplitskips
\spaceskip=\z@skip \xspaceskip=\z@skip
\@nameuse{footfmt#1}{#1}{#2}\egroup}
-\newcommand*{\twocolfootfmtX}[2]{%
+\notbool{parapparatus@}{\newcommand*}{\newcommand}{\twocolfootfmtX}[2]{%
\protected@edef\@currentlabel{%
\@nameuse{@thefnmark#1}%
}%
\normal@pars
\hangindent=\csuse{hangindentX@#1}%
\hsize \csuse{hsizetwocolX@#1}
- \parindent=\z@
-%%% \parfillskip=0pt \@plus 1fil
+ \nottoggle{parindentX@#1}{\parindent=\z@}{}
\tolerance=5000\relax
- \raggedright
\leavevmode
- {\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}\strut%\enspace
+ \csuse{colalignX@#1}%
+ {\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}\strut%
#2\strut\par}\allowbreak}
\newcommand*{\twocolfootgroupX}[1]{{\csuse{notefontsizeX@#1}
@@ -2379,28 +2560,33 @@
\setnotesXwidthliketwocolumns@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
- \vskip\csuse{afterruleX@#1}%
\fi%
\else%
\setnotesXwidthliketwocolumns@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
- \vskip\csuse{afterruleX@#1}%
\fi%
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname mpfootins#1\endcsname \tw@ \splittopskip}}
\newcommand*{\footthreecolX}[1]{%
- \csgdef{series@displayX#1}{threecol}
+ \csgdef{series@displayX#1}{threecolX}
\expandafter\let\csname regvfootnote#1\endcsname=\threecolvfootnoteX
\expandafter\let\csname footfmt#1\endcsname=\threecolfootfmtX
\expandafter\let\csname footgroup#1\endcsname=\threecolfootgroupX
- \dimen\csname #1footins\endcsname=\csuse{maxhnotesX@#1}%
+ \dimen\csname footins#1\endcsname=\csuse{maxhnotesX@#1}%
+ \skip\csname footins#1\endcsname=\csuse{beforenotesX@#1}%
+ \advance\skip\csname footins#1\endcsname by \csuse{afterruleX@#1}\relax%
\threecolfootsetupX{#1}
- \expandafter\let\csname mpvfootnote#1\endcsname=\mpnormalvfootnoteX
- \expandafter\let\csname mpfootgroup#1\endcsname=\mpthreecolfootgroupX
- \mpthreecolfootsetupX{#1}}
+ \ifnoledgroup@\else%
+ \expandafter\let\csname mpvfootnote#1\endcsname=\mpnormalvfootnoteX
+ \expandafter\let\csname mpfootgroup#1\endcsname=\mpthreecolfootgroupX
+ \skip\csname mpfootins#1\endcsname=\csuse{beforenotesX@#1}%
+ \advance\skip\csname mpfootins#1\endcsname by\csuse{afterruleX@#1}
+ \mpthreecolfootsetupX{#1}
+ \fi%
+}
\newcommand*{\threecolfootsetupX}[1]{%
\count\csname footins#1\endcsname 333
@@ -2410,25 +2596,24 @@
\count\csname mpfootins#1\endcsname 333
\multiply\dimen\csname mpfootins#1\endcsname by \thr@@}
-\newcommand*{\threecolvfootnoteX}[2]{%
+\notbool{parapparatus@}{\newcommand*}{\newcommand}{\threecolvfootnoteX}[2]{%
\insert\csname footins#1\endcsname\bgroup
\csuse{notefontsizeX@#1}
\footsplitskips
\@nameuse{footfmt#1}{#1}{#2}\egroup}
-\newcommand*{\threecolfootfmtX}[2]{%
+\notbool{parapparatus@}{\newcommand*}{\newcommand}{\threecolfootfmtX}[2]{%
\protected@edef\@currentlabel{%
\@nameuse{@thefnmark#1}%
}%
\hangindent=\csuse{hangindentX@#1}%
\normal@pars
\hsize \csuse{hsizethreecolX@#1}
- \parindent=\z@
-%%% \parfillskip=0pt \@plus 1fil
+ \nottoggle{parindentX@#1}{\parindent=\z@}{} %
\tolerance=5000\relax
- \raggedright
\leavevmode
- {\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}\strut%\enspace
+ \csuse{colalignX@#1}%
+ {\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}\strut%
#2\strut\par}\allowbreak}
\newcommand*{\threecolfootgroupX}[1]{{\csuse{notefontsizeX@#1}
@@ -2448,13 +2633,11 @@
\setnotesXwidthliketwocolumns@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
- \vskip\csuse{afterruleX@#1}%
\fi%
\else%
\setnotesXwidthliketwocolumns@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
- \vskip\csuse{afterruleX@#1}%
\fi%
\splittopskip=\ht\strutbox
\expandafter
@@ -2471,13 +2654,18 @@
\count\csname footins#1\endcsname=1000
\csxdef{default@footins#1}{1000}%Use this to confine the notes to one side only
\dimen\csname footins#1\endcsname=\csuse{maxhnotesX@#1}
- \skip\csname footins#1\endcsname=\csuse{beforenotesX@#1}
- \expandafter\let\csname mpvfootnote#1\endcsname=\mppara@vfootnoteX
- \expandafter\let\csname mpfootgroup#1\endcsname=\mppara@footgroupX
- \count\csname mpfootins#1\endcsname=1000
- \dimen\csname mpfootins#1\endcsname=\csuse{maxhnotesX@#1}
- \skip\csname mpfootins#1\endcsname=\csuse{beforenotesX@#1}
- \para@footsetupX{#1}}
+ \skip\csname footins#1\endcsname=\csuse{beforenotesX@#1}%
+ \advance\skip\csname footins#1\endcsname by\csuse{afterruleX@#1}%
+ \para@footsetupX{#1}
+ \ifnoledgroup@\else
+ \expandafter\let\csname mpvfootnote#1\endcsname=\mppara@vfootnoteX
+ \expandafter\let\csname mpfootgroup#1\endcsname=\mppara@footgroupX
+ \count\csname mpfootins#1\endcsname=1000
+ \dimen\csname mpfootins#1\endcsname=\csuse{maxhnotesX@#1}
+ \skip\csname mpfootins#1\endcsname=\csuse{beforenotesX@#1}%
+ \advance\skip\csname mpfootins#1\endcsname by\csuse{afterruleX@#1}%
+ \fi
+ }
\newcommand*{\para@footsetupX}[1]{{\csuse{notefontsizeX@#1}
\setnotesXwidthliketwocolumns@{#1}%
@@ -2492,7 +2680,10 @@
\ifdimequal{0pt}{\prenotesX@}{}%
{%
\iftoggle{prenotesX@}{%
- \togglefalse{prenotesX@}\skip\csname footins#1\endcsname=\csuse{prenotesX@}}%
+ \togglefalse{prenotesX@}%
+ \skip\csname footins#1\endcsname=%
+ \dimexpr\csuse{prenotesX@}+\csuse{afterruleX@#1}\relax%
+ }%
{}%
}%
\vskip\skip\csname footins#1\endcsname%
@@ -2503,7 +2694,6 @@
\setnotesXwidthliketwocolumns@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
- \vskip\csuse{afterruleX@#1}%
}
\newcommand*{\para@vfootnoteX}[2]{%
@@ -2539,8 +2729,8 @@
\@nameuse{@thefnmark#1}%
}%
\insertparafootsep{#1}%
- \ledsetnormalparstuff
- {\csuse{notenumfontX@#1}\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}\strut%\enspace
+ \ledsetnormalparstuffX{#1}%
+ {\csuse{notenumfontX@#1}\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}\strut%
#2\penalty-10}}
\newcommand*{\para@footgroupX}[1]{%
@@ -2566,13 +2756,11 @@
\setnotesXwidthliketwocolumns@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
- \vskip\csuse{afterruleX@#1}%
\fi%
\else%
\setnotesXwidthliketwocolumns@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
- \vskip\csuse{afterruleX@#1}%
\fi%
\unvbox\csname mpfootins#1\endcsname
\ifcsstring{raggedX@#1}{L}{\RaggedLeft}{}%
@@ -2584,11 +2772,11 @@
\newdimen\old@hsize%
-\old@hsize=\linewidth%
+\AtBeginDocument{\old@hsize=\hsize}%
\newcommand{\setXnoteswidthliketwocolumns@}[1]{%
- \global\let\hsize@fornote=\linewidth%
- \global\old@hsize=\linewidth%
+ \global\let\hsize@fornote=\hsize%
+ \global\old@hsize=\hsize%
\iftoggle{Xnoteswidthliketwocolumns@#1}%
{%
\csuse{setwidthliketwocolumns@\columns@position}%
@@ -2601,7 +2789,7 @@
\newcommand{\setnotesXwidthliketwocolumns@}[1]{%
\global\let\hsize@fornote=\hsize%
- \global\old@hsize=\linewidth%
+ \global\old@hsize=\hsize%
\iftoggle{notesXwidthliketwocolumns@#1}%
{%
\csuse{setwidthliketwocolumns@\columns@position}%
@@ -2629,36 +2817,95 @@
\newcommand{\fnpos}[1]{\xdef\@fnpos{#1}}
\newcommand{\mpfnpos}[1]{\xdef\@mpfnpos{#1}}
\newcommand{\print@Xfootnoterule}[1]{%
+ \vskip-\csuse{afterXrule@#1}%Because count in \dimen\csuse{#1footins}
\nointerlineskip%
\moveleft-\leftskip\vbox{\csuse{#1footnoterule}}%
\nointerlineskip%
+ \vskip\csuse{afterXrule@#1}%
}%
\newcommand{\print@footnoteXrule}[1]{%
+ \vskip-\csuse{afterruleX@#1}%Because count in \dimen\csuse{footins#1}
\nointerlineskip%
\moveleft-\leftskip\vbox{\csuse{footnoterule#1}}%
\nointerlineskip%
+ \vskip\csuse{afterruleX@#1}%
}%
+\gdef\firstXseries@{}
+\newcommand{\prepare@preXnotes}[1]{%
+ \ifdimequal{0pt}{\preXnotes@}%
+ {}%
+ {%
+ \IfStrEq{\firstXseries@}{}{%
+ \global\skip\csuse{#1footins}=\preXnotes@%
+ \global\advance\skip\csname #1footins\endcsname by\csuse{afterXrule@#1}%
+ \gdef\firstXseries@{#1}%
+ }%
+ {%
+ \ifseriesbefore{#1}{\firstXseries@}%
+ {%
+ \global\skip\csuse{#1footins}=\csuse{beforeXnotes@\firstXseries@}%
+ \global\advance\skip\csname #1footins\endcsname by\csuse{afterXrule@#1}%
+ \gdef\firstXseries@{#1}%
+ }%
+ {}%
+ }%
+ }%
+}
+\gdef\firstseriesX@{}
+\newcommand{\prepare@prenotesX}[1]{%
+ \ifdimequal{0pt}{\prenotesX@}%
+ {}%
+ {%
+ \IfStrEq{\firstseriesX@}{}{%
+ \global\skip\csuse{footins#1}=\prenotesX@%
+ \global\advance\skip\csname footins#1\endcsname by\csuse{afterruleX@#1}%
+ \gdef\firstseriesX@{#1}%
+ }%
+ {%
+ \ifseriesbefore{#1}{\firstseriesX@}%
+ {%
+ \global\skip\csuse{footins#1}=\csuse{beforenotesX@\firstseriesX@}%
+ \global\advance\skip\csname footins#1\endcsname by\csuse{afterruleX@#1}%
+ \gdef\firstXseries@{#1}%
+ }%
+ {}%
+ }%
+ }%
+}
\newcommand\print@notesX[1]{%
\csuse{footstart#1}{#1}%
\csuse{footgroup#1}{#1}%
}%
\newcommand*{\doxtrafeeti}{%
- \setbox\@outputbox \vbox{%
- \unvbox\@outputbox%
- \def\do##1{%
- \ifvoid\csuse{footins##1}\else%
- \print@notesX{##1}%
- \fi%
- }%
- \dolistloop{\@series}}%
- }%
+ \unless\ifnofamiliar@%
+ \gdef\firstseriesX@{}%
+ \setbox\@outputbox \vbox{%
+ \unvbox\@outputbox%
+ \def\do##1{%
+ \ifvoid\csuse{footins##1}\else%
+ \global\skip\csuse{footins##1}=\csuse{beforenotesX@##1}%
+ \global\advance\skip\csuse{footins##1} by\csuse{afterruleX@##1}%
+ \print@notesX{##1}%
+ \fi%
+ }%
+ \dolistloop{\@series}}%
+ \fi%
+}%
\newcommand{\doreinxtrafeeti}{%
- \def\do##1{\ifvoid\csuse{footins##1}\else\insert\csuse{footins##1}{\unvbox\csuse{footins##1}}\fi}%
- \dolistloop{\@series}%
- }
+ \unless\ifnofamiliar@%
+ \def\do##1{%
+ \ifvoid\csuse{footins##1}\else
+ \insert%
+ \csuse{footins##1}
+ {\unvbox\csuse{footins##1}}%
+ \fi%
+ }%
+ \dolistloop{\@series}%
+ \fi%
+}%
\newcommand*{\addfootinsX}[1]{%
\led@warn@AddfootinsXObsolete%
@@ -2677,6 +2924,7 @@
\g@addto@macro{\l@dfamendmini}{%
\ifvoid\@nameuse{mpfootins#1}\else\@nameuse{mpfootgroup#1}{#1}\fi}%
}
+\ifbool{noend@}{}{%Used instead of \ifnoend@ to prevent expansion problem
\newwrite\l@d@end
\newif\ifl@dend@
\newcommand{\l@dend@open}[1]{\global\l@dend@true\immediate\openout\l@d@end=#1\relax}
@@ -2688,7 +2936,11 @@
\fi
\immediate\write\l@d@end{\string\l@d@section{\the\section@num}}}
-\global\notbool{parapparatus@}{}{\long}\def\endprint#1#2#3#4{{%
+\global\notbool{parapparatus@}{}{\long}\def\endprint#1#2#3#4#5{{%
+ \xdef\@currentseries{#4}%
+ \IfStrEq{#5}{fulllines}%
+ {\toggletrue{fulllines@}}%
+ {}%
\csuse{bhookXendnote@#4}%
\csuse{Xendnotefontsize@#4}%
{%
@@ -2703,6 +2955,7 @@
{#2}%
}%
\enskip#3\par%
+ \togglefalse{fulllines@}%
}}%
\let\l@d@section=\@gobble
@@ -2731,15 +2984,60 @@
\l@d@esltrue
\l@d@dashtrue
\fi
- \fi}
+ \fi%
+ \ifl@d@dash%
+ \ifboolexpr{togl{fulllines@} or test{\ifcsempty{Xendtwolines@\@currentseries}}}%
+ {}%
+ {%
+ \setistwofollowinglines{#1}{#2}{#4}{#5}%
+ \ifboolexpr{%
+ (%
+ togl {Xendtwolinesbutnotmore@\@currentseries}%
+ and not%
+ (%
+ bool {istwofollowinglines@}%
+ )%
+ )%
+ or%
+ (%
+ (not test{\ifnumequal{#1}{#4}})%
+ and togl{Xendtwolinesonlyinsamepage@\@currentseries}%
+ )%
+ }%
+ {}%
+ {%
+ \l@d@dashfalse%
+ \l@d@twolinestrue%
+ \l@d@elinfalse%
+ \l@d@eslfalse%
+ \ifcsempty{Xendmorethantwolines@\@currentseries}%
+ {}%
+ {\ifistwofollowinglines@\else%
+ \l@d@morethantwolinestrue%
+ \fi%
+ }%
+ }%
+ }%
+ \fi%
+}%
\def\printendlines#1|#2|#3|#4|#5|#6|#7|{\begingroup
\setprintendlines{#1}{#2}{#3}{#4}{#5}{#6}%
- \printnpnum{#1} \linenumrep{#2}%
+ \printnpnum{#1}%
+ \ifoldprintnpnumspace@\space\fi%
+ \linenumrep{#2}%
\ifl@d@ssub \fullstop \sublinenumrep{#3}\fi
- \ifl@d@dash \endashchar\fi
- \ifl@d@pnum \printnpnum{#4}\fi
- \ifl@d@elin \linenumrep{#5}\fi
- \ifl@d@esl \ifl@d@elin \fullstop\fi \sublinenumrep{#6}\fi
+ \ifl@d@twolines%
+ \ifl@d@morethantwolines%
+ \csuse{Xendmorethantwolines@\@currentseries}%
+ \else%
+ \csuse{Xendtwolines@\@currentseries}%
+ \fi%
+ \else%
+ \ifl@d@dash \endashchar\fi%
+ \ifl@d@pnum \printnpnum{#4}\fi%
+ \ifl@d@elin \linenumrep{#5}\fi%
+ \ifl@d@esl \ifl@d@elin \fullstop\fi \sublinenumrep{#6}\fi%
+ \fi%
\endgroup}
\newcommand*{\printnpnum}[1]{p.#1) }
@@ -2750,8 +3048,12 @@
\expandafter\let\csname #1end\endcsname=\endprint
\input\jobname.end
\endgroup}
-\newcommand*{\noendnotes}{\global\let\l@dend@stuff=\relax
- \global\chardef\l@d@end=16 }
+\newcommand*{\noendnotes}{%
+ \led@war@noendnotesDeprecated%
+ \global\let\l@dend@stuff=\relax%
+ \global\chardef\l@d@end=16%
+}%
+}%
\newcommand{\newseries}[1]{%
\def\do##1{\newseries@{##1}}%
\docsvlist{#1}
@@ -2763,162 +3065,194 @@
\ifdefined\newseries@eledpar%
\newseries@eledpar{#1}%
\fi%
- \newtoggle{Xlemmadisablefontselection@#1}
- \newtoggle{Xendlemmadisablefontselection@#1}
- \csgdef{Xhangindent@#1}{0pt}%
- \csgdef{hangindentX@#1}{0pt}%
- \csgdef{Xragged@#1}{}%
- \csgdef{raggedX@#1}{}%
- \csgdef{hsizetwocol@#1}{0.45 \hsize}%
- \csgdef{hsizetwocolX@#1}{0.45 \hsize}%
- \csgdef{hsizethreecol@#1}{.3 \hsize}%
- \csgdef{hsizethreecolX@#1}{.3 \hsize}%
- \csgdef{Xnotenumfont@#1}{\notenumfont}%
- \csgdef{Xendnotenumfont@#1}{\notenumfont}%
- \csgdef{notenumfontX@#1}{\notenumfont}%
- \csgdef{Xnotefontsize@#1}{\notefontsetup}%
- \csgdef{notefontsizeX@#1}{\notefontsetup}%
- \csgdef{Xendnotefontsize@#1}{\notefontsetup}%
- \csgdef{bhooknoteX@#1}{}%
- \csgdef{bhookXnote@#1}{}%
- \csgdef{bhookXendnote@#1}{}%
- \csgdef{boxlinenum@#1}{0pt}%
- \csgdef{boxXendlinenum@#1}{0pt}%
- \csgdef{boxsymlinenum@#1}{0pt}%
- \newtoggle{numberonlyfirstinline@#1}%
- \newtoggle{numberonlyfirstintwolines@#1}%
- \csgdef{twolines@#1}{}%
- \csgdef{morethantwolines@#1}{}%
- \newtoggle{onlypstartinfootnote@#1}%
- \newtoggle{pstartinfootnoteeverytime@#1}%
- \newtoggle{pstartinfootnote@#1}%
- \csgdef{symlinenum@#1}{\symplinenum}%
- \newtoggle{nonumberinfootnote@#1}%
- \csgdef{beforenumberinfootnote@#1}{0pt}%
- \csgdef{afternumberinfootnote@#1}{0.5em}%
- \newtoggle{nonbreakableafternumber@#1}%
- \csgdef{beforesymlinenum@#1}{\csuse{beforenumberinfootnote@#1}}%
- \csgdef{aftersymlinenum@#1}{\csuse{afternumberinfootnote@#1}}%
- \csgdef{inplaceofnumber@#1}{1em}%
- \global\cslet{lemmaseparator@#1}{\rbracket}%
- \csgdef{beforelemmaseparator@#1}{0em}%
- \csgdef{afterlemmaseparator@#1}{0.5em}%
- \csgdef{inplaceoflemmaseparator@#1}{1em}%
- \csgdef{afternote@#1}{1em plus.4em minus.4em}%
- \csgdef{parafootsep@#1}{\parafootftmsep}%
- \csgdef{beforeXnotes@#1}{1.2em \@plus .6em \@minus .6em}
- \csgdef{beforenotesX@#1}{1.2em \@plus .6em \@minus .6em}
- \csgdef{afterXrule@#1}{0pt}
- \csgdef{afterruleX@#1}{0pt}
- \csgdef{txtbeforeXnotes@#1}{}
- \csgdef{maxhnotesX@#1}{\ledfootinsdim}%
- \csgdef{maxhXnotes@#1}{\ledfootinsdim}
- \newtoggle{Xnoteswidthliketwocolumns@#1}%
- \newtoggle{notesXwidthliketwocolumns@#1}%
-
- \expandafter\newinsert\csname footins#1\endcsname%
- \expandafter\newinsert\csname #1footins\endcsname%
- \expandafter\newinsert\csname mpfootins#1\endcsname%
- \expandafter\newinsert\csname mp#1footins\endcsname%
-
- \global\notbool{parapparatus@}{\expandafter\newcommand\expandafter *}{\expandafter\newcommand}\csname #1footnote\endcsname[2][]{%
- \if@edtext@%
- \begingroup%
- \newcommand{\content}{##2}%
- \ifnumberedpar@%
- \ifledRcol%
- \ifluatex%
- \footnotelang@lua[R]%
- \fi%
- \@ifundefined{xpg@main@language}%if polyglossia
- {}%
- {\footnotelang@poly[R]}%
- \footnoteoptions@[R]{##1}{true}%
- \xright@appenditem{\noexpand\prepare@edindex@fornote{\l@d@nums}%
- \noexpand\csuse{v#1footnote}{#1}%
- {{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}}\to\inserts@listR
- \footnoteoptions@[R]{##1}{false}%
- \global\advance\insert@countR \@ne%
- \else%
+ \unless\ifnocritical@
+ \newtoggle{Xparindent@#1}
+ \newtoggle{Xlemmadisablefontselection@#1}
+ \csgdef{Xhangindent@#1}{0pt}%
+ \csgdef{Xragged@#1}{}%
+ \csgdef{hsizetwocol@#1}{0.45 \hsize}%
+ \csgdef{hsizethreecol@#1}{.3 \hsize}%
+ \csgdef{Xcolalign@#1}{\raggedright}%
+ \csgdef{Xnotenumfont@#1}{\notenumfont}%
+ \csgdef{Xnotefontsize@#1}{\notefontsetup}%
+ \csgdef{bhookXnote@#1}{}%
+ \csgdef{boxlinenum@#1}{0pt}%
+ \csgdef{boxsymlinenum@#1}{0pt}%
+ \newtoggle{numberonlyfirstinline@#1}%
+ \newtoggle{numberonlyfirstintwolines@#1}%
+ \csgdef{twolines@#1}{}%
+ \csgdef{morethantwolines@#1}{}%
+ \newtoggle{twolinesbutnotmore@#1}%
+ \newtoggle{twolinesonlyinsamepage@#1}%
+ \newtoggle{onlypstartinfootnote@#1}%
+ \newtoggle{pstartinfootnoteeverytime@#1}%
+ \newtoggle{pstartinfootnote@#1}%
+ \csgdef{symlinenum@#1}{\symplinenum}%
+ \newtoggle{nonumberinfootnote@#1}%
+ \csgdef{beforenumberinfootnote@#1}{0pt}%
+ \csgdef{afternumberinfootnote@#1}{0.5em}%
+ \newtoggle{nonbreakableafternumber@#1}%
+ \csgdef{beforesymlinenum@#1}{\csuse{beforenumberinfootnote@#1}}%
+ \csgdef{aftersymlinenum@#1}{\csuse{afternumberinfootnote@#1}}%
+ \csgdef{inplaceofnumber@#1}{1em}%
+ \global\cslet{lemmaseparator@#1}{\rbracket}%
+ \csgdef{beforelemmaseparator@#1}{0em}%
+ \csgdef{afterlemmaseparator@#1}{0.5em}%
+ \csgdef{inplaceoflemmaseparator@#1}{1em}%
+ \csgdef{beforeXnotes@#1}{1.2em \@plus .6em \@minus .6em}
+ \csgdef{afterXrule@#1}{0pt}
+ \csgdef{txtbeforeXnotes@#1}{}
+ \csgdef{maxhXnotes@#1}{\ledfootinsdim}
+ \newtoggle{Xnoteswidthliketwocolumns@#1}%
+ \expandafter\newinsert\csname #1footins\endcsname%
+ \unless\ifnoledgroup@%
+ \expandafter\newinsert\csname mp#1footins\endcsname%
+ \fi%
+ \global\notbool{parapparatus@}{\expandafter\newcommand\expandafter *}{\expandafter\newcommand}\csname #1footnote\endcsname[2][]{%
+ \if@edtext@%
+ \begingroup%
+ \newcommand{\content}{##2}%
+ \ifnumberedpar@%
+ \ifledRcol%
\ifluatex%
- \footnotelang@lua%
+ \footnotelang@lua[R]%
\fi%
- \@ifundefined{xpg@main@language}%if polyglossia
- {}%
- {\footnotelang@poly}%
- \footnoteoptions@{##1}{true}%
- \xright@appenditem{\noexpand\prepare@edindex@fornote{\l@d@nums}%
- \noexpand\csuse{v#1footnote}{#1}%
- {{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}}\to\inserts@list
- \global\advance\insert@count \@ne%
- \footnoteoptions@{##1}{false}%
- \fi
- \else
- \csuse{v#1footnote}{#1}{{0|0|0|0|0|0|0}{}{##1}}%
- \fi%
- \ignorespaces%
- \endgroup%
- \else%
- \led@err@FootnoteWithoutEdtext%
- \fi%
- }
- \csgdef{series@display#1}{}
- \footnormal{#1}
-
- \global\expandafter\newcommand\csname footnote#1\endcsname[1]{%
- \begingroup%
- \newcommand{\content}{##1}%
- \stepcounter{footnote#1}%
- \protected@csxdef{@thefnmark#1}{\csuse{thefootnote#1}}%
- \nottoggle{nomk@}%Nomk is set to true when using \footnoteXnomk with eledpar
- {\csuse{@footnotemark#1}}%
- {}%
- \ifluatex%
- \xdef\footnote@luatextextdir{\the\luatextextdir}%
- \xdef\footnote@luatexpardir{\the\luatexpardir}%
+ \@ifundefined{xpg@main@language}%if polyglossia
+ {}%
+ {\footnotelang@poly[R]}%
+ \footnoteoptions@[R]{##1}{true}%
+ \xright@appenditem{%
+ \noexpand\prepare@preXnotes{#1}%
+ \noexpand\prepare@edindex@fornote{\l@d@nums}%
+ \noexpand\csuse{v#1footnote}{#1}%
+ {{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}%
+ }\to\inserts@listR
+ \footnoteoptions@[R]{##1}{false}%
+ \global\advance\insert@countR \@ne%
+ \else%
+ \ifluatex%
+ \footnotelang@lua%
+ \fi%
+ \@ifundefined{xpg@main@language}%if polyglossia
+ {}%
+ {\footnotelang@poly}%
+ \footnoteoptions@{##1}{true}%
+ \xright@appenditem{%
+ \noexpand\prepare@preXnotes{#1}%
+ \noexpand\prepare@edindex@fornote{\l@d@nums}%
+ \noexpand\csuse{v#1footnote}{#1}%
+ {{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}%
+ }\to\inserts@list
+ \global\advance\insert@count \@ne%
+ \footnoteoptions@{##1}{false}%
+ \fi
+ \else
+ \csuse{v#1footnote}{#1}{{0|0|0|0|0|0|0}{}{##1}}%
\fi%
- \csuse{vfootnote#1}{#1}{\expandonce\content}\m@mmf@prepare%
- \endgroup%
- }
- \newcounter{footnote#1}
- \global\expandafter\renewcommand\csname thefootnote#1\endcsname{\arabic{footnote#1}}
- \csgdef{series@displayX#1}{}
- \footnormalX{#1}
-
- \global\expandafter\newcommand\csname #1endnote\endcsname[2]{{\newlinechar='40
- \global\@noneed@Footnotetrue%
- \newcommand{\content}{##1}%
- \immediate\write\l@d@end{\expandafter\string\csname #1end\endcsname%
- {\ifnumberedpar@\l@d@nums\fi}%
- {\ifnumberedpar@\expandonce\@tag\fi}{\expandonce\content}{#1}}}\ignorespaces%
- }
-
- \global\cslet{#1end}{\@gobblefour}
+ \ignorespaces%
+ \endgroup%
+ \else%
+ \led@err@FootnoteWithoutEdtext%
+ \fi%
+ }
+ \footnormal{#1}
+ \fi
+ \unless\ifnofamiliar@
+ \newtoggle{parindentX@#1}
+ \csgdef{hangindentX@#1}{0pt}%
+ \csgdef{raggedX@#1}{}%
+ \csgdef{hsizetwocolX@#1}{0.45 \hsize}%
+ \csgdef{hsizethreecolX@#1}{.3 \hsize}%
+ \csgdef{colalignX@#1}{\raggedright}%
+ \csgdef{notenumfontX@#1}{\notenumfont}%
+ \csgdef{notefontsizeX@#1}{\notefontsetup}%
+ \csgdef{bhooknoteX@#1}{}%
+ \csgdef{afterruleX@#1}{0pt}
+ \csgdef{beforenotesX@#1}{1.2em \@plus .6em \@minus .6em}
+ \csgdef{maxhnotesX@#1}{\ledfootinsdim}%
+ \newtoggle{notesXwidthliketwocolumns@#1}%
+ \expandafter\newinsert\csname footins#1\endcsname%
+ \unless\ifnoledgroup@%
+ \expandafter\newinsert\csname mpfootins#1\endcsname%
+ \fi%
- \global\csletcs{#1@@footnote}{#1footnote}
+ \global\expandafter\newcommand\csname footnote#1\endcsname[1]{%
+ \begingroup%
+ \prepare@prenotesX{#1}%
+ \newcommand{\content}{##1}%
+ \stepcounter{footnote#1}%
+ \protected@csxdef{@thefnmark#1}{\csuse{thefootnote#1}}%
+ \nottoggle{nomk@}%Nomk is set to true when using \footnoteXnomk with eledpar
+ {\csuse{@footnotemark#1}}%
+ {}%
+ \ifluatex%
+ \xdef\footnote@luatextextdir{\the\luatextextdir}%
+ \xdef\footnote@luatexpardir{\the\luatexpardir}%
+ \fi%
+ \csuse{vfootnote#1}{#1}{\expandonce\content}\m@mmf@prepare%
+ \endgroup%
+ }
+ \newcounter{footnote#1}
+ \global\expandafter\renewcommand\csname thefootnote#1\endcsname{\arabic{footnote#1}}
+ \footnormalX{#1}
+ \fi
+ \csgdef{parafootsep@#1}{\parafootftmsep}%
+ \csgdef{afternote@#1}{1em plus.4em minus.4em}%
+ \unless\ifnoend@
+
+ \global\expandafter\newcommandx\csname #1endnote\endcsname[2][1,usedefault]{%
+ \bgroup%
+ \newlinechar='40%
+ \global\@noneed@Footnotetrue%
+ \newcommand{\content}{##2}%
+ \immediate\write\l@d@end{%
+ \expandafter\string\csname #1end\endcsname%
+ {\ifnumberedpar@\l@d@nums\fi}%
+ {\ifnumberedpar@\expandonce\@tag\fi}%
+ {\expandonce\content}%
+ {#1}%
+ {##1}%
+ }%
+ \egroup%
+ \ignorespaces%
+ }%
+ \global\cslet{#1end}{\@gobblefive}
+ \global\csletcs{#1@@footnote}{#1footnote}
+ \csgdef{Xendtwolines@#1}{}%
+ \csgdef{Xendmorethantwolines@#1}{}%
+ \newtoggle{Xendtwolinesbutnotmore@#1}{}%
+ \newtoggle{Xendtwolinesonlyinsamepage@#1}{}%
+ \newtoggle{Xendlemmadisablefontselection@#1}%
+ \csgdef{Xendnotenumfont@#1}{\notenumfont}%
+ \csgdef{Xendnotefontsize@#1}{\notefontsetup}%
+ \csgdef{bhookXendnote@#1}{}%
+ \csgdef{boxXendlinenum@#1}{0pt}%
+ \fi%
\listxadd{\@series}{#1}
-}
+ }
}% End of \newseries
\expandafter\newseries\expandafter{\default@series}
-\newcommand{\seriesatbegin}[1]{
- \edef\series{#1}
- \def\new{}
- \listeadd{\new}{\series}
- \def\do##1{\ifcsstring{series}{##1}{}{\listadd{\new}{##1}}}
- \dolistloop{\@series}
- \xdef\@series{\new}
+\newcommand{\seriesatbegin}[1]{%
+ \StrDel{\@series}{#1}[\@series]%
+ \edef\@new{}%
+ \listeadd{\@new}{#1}%
+ \listeadd{\@new}{\@series}%
+ \xdef\@series{\@new}%
}
-\newcommand{\seriesatend}[1]{
- \edef\series{#1}
- \def\new{}
- \def\do##1{\ifcsstring{series}{##1}{}{\listadd{\new}{##1}}}
- \dolistloop{\@series}
- \listeadd{\new}{\series}
- \xdef\@series{\new}
+\newcommand{\seriesatend}[1]{%
+ \StrDel{\@series}{#1}[\@series]%
+ \edef\@new{}%
+ \listeadd{\@new}{\@series}%
+ \listeadd{\@new}{#1}%
+ \xdef\@series{\@new}%
}
-
-\newcommandx{\settoggle@series}[4][4]{%
+\newcommand{\ifseriesbefore}[4]{%
+ \StrPosition{\@series}{#1}[\@first]%
+ \StrPosition{\@series}{#2}[\@second]%
+ \ifnumgreater{\@second}{\@first}{#3}{#4}%
+}
+\newcommandx{\settoggle@series}[5][4,5,usedefault]{%
\def\do##1{%
\global\settoggle{#2@##1}{#3}%
\ifstrequal{#4}{reload}%
@@ -2930,12 +3264,15 @@
}%
\ifstrempty{#1}{%
\dolistloop{\@series}%
+ \ifstrempty{#5}{}{%
+ \docsvlist{#5}%
+ }
}%
- {%
+ {%
\docsvlist{#1}%
}%
}
-\newcommandx{\setcommand@series}[4][4]{%
+\newcommandx{\setcommand@series}[5][4,5,usedefault]{%
\def\do##1{
\csgdef{#2@##1}{#3}
\ifstrequal{#4}{reload}{
@@ -2944,126 +3281,118 @@
}{}}
\ifstrempty{#1}{%
\dolistloop{\@series}%
+ \ifstrempty{#5}{}{%
+ \docsvlist{#5}
+ }
}%
{%
\docsvlist{#1}%
}%
}%
-\newcommand{\newhookcommand@series}[1]{%
+\newcommandx{\newhookcommand@series}[2][2,usedefault]{%
\global\expandafter\newcommand\expandafter*\csname #1\endcsname[2][]{%
- \setcommand@series{##1}{#1}{##2}%
+ \setcommand@series{##1}{#1}{##2}[][#2]%
}%
-}
-
-\newhookcommand@series{twolines}
-
-\newhookcommand@series{morethantwolines}
-
-\newhookcommand@series{Xhangindent}
-
-\newhookcommand@series{hangindentX}
-
-\newhookcommand@series{Xragged}
-
-\newhookcommand@series{raggedX}
-
-\newhookcommand@series{hsizetwocol}
-
-\newhookcommand@series{hsizethreecol}
-
-\newhookcommand@series{hsizetwocolX}
-
-\newhookcommand@series{hsizethreecolX}
-
-\newhookcommand@series{Xnotenumfont}
-
-\newhookcommand@series{notenumfontX}
-
-\newhookcommand@series{Xendnotenumfont}
-
-\newhookcommand@series{bhooknoteX}
-
-\newhookcommand@series{bhookXnote}
-
-\newhookcommand@series{bhookXendnote}
-
-\newhookcommand@series{Xnotefontsize}
-
-\newhookcommand@series{notefontsizeX}
-
-\newhookcommand@series{Xendnotefontsize}
-
-\newhookcommand@series{boxlinenum}
-
-\newhookcommand@series{boxXendlinenum}%
-
-\newhookcommand@series{boxsymlinenum}
-
-\newhookcommand@series{parafootsep}
-
-\newhookcommand@series{symlinenum}
-
-\newhookcommand@series{beforenumberinfootnote}
-
-\newhookcommand@series{afternumberinfootnote}
-
-\newhookcommand@series{beforesymlinenum}
-
-\newhookcommand@series{aftersymlinenum}
-
-\newhookcommand@series{inplaceofnumber}
-
-\newhookcommand@series{lemmaseparator}
-
-\newhookcommand@series{beforelemmaseparator}
-
-\newhookcommand@series{afterlemmaseparator}
-
-\newhookcommand@series{inplaceoflemmaseparator}
-
-\newhookcommand@series{afternote}
-
-\newhookcommand@series{txtbeforeXnotes}
-
-\newhookcommand@series{afterruleX}
-
-\newhookcommand@series{afterXrule}
-
-\newcommand{\newhookcommand@series@reload}[1]{%
- \global\expandafter\newcommand\expandafter*\csname #1\endcsname[2][]{%
- \setcommand@series{##1}{#1}{##2}[reload]%
+ \ifstrempty{#2}{}{%
+ \def\do##1{%
+ \global\expandafter\newcommand\expandafter*\csname #1##1\endcsname[1]{%
+ \csuse{#1}[##1]{####1}%
+ }%
+ }%
+ \docsvlist{#2}%
}%
}
-\newhookcommand@series@reload{beforeXnotes}
-
-\newhookcommand@series@reload{beforenotesX}
-
-\newhookcommand@series@reload{maxhnotesX}
-
-\newhookcommand@series@reload{maxhXnotes}
-\newcommand{\newhooktoggle@series}[1]{%
+\newcommandx{\newhooktoggle@series}[2][2,usedefault]{%
\global\expandafter\newcommandx\expandafter*\csname #1\endcsname[2][1,2={true},usedefault]{%
- \settoggle@series{##1}{#1}{##2}%
+ \settoggle@series{##1}{#1}{##2}[][#2]%
+ }%
+ \ifstrempty{#2}{}{%
+ \def\do##1{%
+ \global\expandafter\newcommand\expandafter*\csname #1##1\endcsname{%
+ \csuse{#1}[##1]%
+ }%
}%
+ \docsvlist{#2}%
+ }%
}
-\newhooktoggle@series{numberonlyfirstinline}
-\newhooktoggle@series{numberonlyfirstintwolines}
-\newhooktoggle@series{nonumberinfootnote}
-\newhooktoggle@series{pstartinfootnote}
-\newhooktoggle@series{pstartinfootnoteeverytime}%
-\newhooktoggle@series{onlypstartinfootnote}
-\newhooktoggle@series{nonbreakableafternumber}
-\newhooktoggle@series{Xlemmadisablefontselection}
-\newhooktoggle@series{Xendlemmadisablefontselection}
\newcommand{\newhooktoggle@series@reload}[1]{%
\global\expandafter\newcommandx\expandafter*\csname #1\endcsname[2][1,2={true},usedefault]{%
\settoggle@series{##1}{#1}{##2}[reload]%
}%
}%
-
-\newhooktoggle@series@reload{Xnoteswidthliketwocolumns}%
-\newhooktoggle@series@reload{notesXwidthliketwocolumns}%
-
+\newcommand{\newhookcommand@series@reload}[1]{%
+ \global\expandafter\newcommand\expandafter*\csname #1\endcsname[2][]{%
+ \setcommand@series{##1}{#1}{##2}[reload]%
+ }%
+}
+\unless\ifnocritical@
+ \newhooktoggle@series{Xparindent}
+ \newhookcommand@series{twolines}[appref]
+ \newhookcommand@series{morethantwolines}[appref]
+ \newhooktoggle@series{twolinesbutnotmore}[appref]
+ \newhooktoggle@series{twolinesonlyinsamepage}[appref]
+ \newhookcommand@series{Xhangindent}
+ \newhookcommand@series{Xragged}
+ \newhookcommand@series{hsizetwocol}
+ \newhookcommand@series{hsizethreecol}
+ \newhookcommand@series{Xcolalign}%
+ \newhookcommand@series{Xnotenumfont}
+ \newhookcommand@series{bhookXnote}
+ \newhookcommand@series{boxsymlinenum}
+ \newhookcommand@series{symlinenum}
+ \newhookcommand@series{beforenumberinfootnote}
+ \newhookcommand@series{afternumberinfootnote}
+ \newhookcommand@series{beforesymlinenum}
+ \newhookcommand@series{aftersymlinenum}
+ \newhookcommand@series{inplaceofnumber}
+ \newhookcommand@series{lemmaseparator}
+ \newhookcommand@series{beforelemmaseparator}
+ \newhookcommand@series{afterlemmaseparator}
+ \newhookcommand@series{inplaceoflemmaseparator}
+ \newhookcommand@series{txtbeforeXnotes}
+ \newhookcommand@series@reload{afterXrule}
+ \newhooktoggle@series{numberonlyfirstinline}
+ \newhooktoggle@series{numberonlyfirstintwolines}
+ \newhooktoggle@series{nonumberinfootnote}
+ \newhooktoggle@series{pstartinfootnote}
+ \newhooktoggle@series{pstartinfootnoteeverytime}%
+ \newhooktoggle@series{onlypstartinfootnote}
+ \newhooktoggle@series{nonbreakableafternumber}
+ \newhooktoggle@series{Xlemmadisablefontselection}
+ \newhookcommand@series@reload{maxhXnotes}
+ \newhookcommand@series@reload{beforeXnotes}
+ \newhooktoggle@series@reload{Xnoteswidthliketwocolumns}%
+ \newhookcommand@series{Xnotefontsize}
+ \newhookcommand@series{boxlinenum}
+\fi
+\unless\ifnofamiliar@
+ \newhooktoggle@series{parindentX}
+ \newhookcommand@series{hangindentX}
+ \newhookcommand@series{raggedX}
+ \newhookcommand@series{hsizetwocolX}
+ \newhookcommand@series{hsizethreecolX}
+ \newhookcommand@series{colalignX}%
+ \newhookcommand@series{notenumfontX}
+ \newhookcommand@series{bhooknoteX}
+ \newhookcommand@series@reload{beforenotesX}
+ \newhookcommand@series@reload{maxhnotesX}
+ \newhooktoggle@series@reload{notesXwidthliketwocolumns}%
+ \newhookcommand@series@reload{afterruleX}
+ \newhookcommand@series{notefontsizeX}
+\fi
+\newhookcommand@series{parafootsep}
+\newhookcommand@series{afternote}
+\unless\ifnoend@
+ \newhookcommand@series{Xendtwolines}[apprefwithpage]
+ \newhookcommand@series{Xendmorethantwolines}[apprefwithpage]
+ \newhooktoggle@series{Xendtwolinesbutnotmore}[apprefwithpage]
+ \newhooktoggle@series{Xendtwolinesonlyinsamepage}[apprefwithpage]
+ \newhookcommand@series{Xendnotenumfont}
+ \newhookcommand@series{bhookXendnote}
+ \newhookcommand@series{boxXendlinenum}%
+ \newhookcommand@series{Xendnotefontsize}
+ \newhooktoggle@series{Xendlemmadisablefontselection}
+\fi
\newcommand*{\notenumfont}{\normalfont}
\newcommand*{\notefontsetup}{\footnotesize}
\newif\ifledplinenum
@@ -3193,7 +3522,6 @@
\AtBeginDocument{\@ifpackageloaded{footmisc}{}{\newif\ifFN@bottom}}
\newcommand*{\l@ddofootinsert}{%
-%%% \page@start
\ifvoid\footins
\setbox\@outputbox \box\@cclv
\else
@@ -3201,7 +3529,7 @@
\boxmaxdepth \@maxdepth
\@tempdima\dp\@cclv
\unvbox \@cclv
- \ifFN@bottom\vfill\fi\vskip \skip\footins%%% If the option bottom of loadmisc package is loaded
+ \ifFN@bottom\vfill\fi\vskip \skip\footins% If the option bottom of loadmisc package is loaded
\color@begingroup
\normalcolor
\footnoterule
@@ -3231,23 +3559,30 @@
\csuse{#1footgroup}{#1}%%
}%
\newcommand*{\@opxtrafeetii}{%
- \def\do##1{%
- \ifvoid\csuse{##1footins}\else%
- \print@Xnotes{##1}%
- \fi%
- }%
- \dolistloop{\@series}%
+ \unless\ifnocritical@%
+ \gdef\firstXseries@{}%
+ \def\do##1{%
+ \ifvoid\csuse{##1footins}\else%
+ \global\skip\csuse{##1footins}=\csuse{beforeXnotes@##1}%
+ \global\advance\skip\csuse{##1footins} by\csuse{afterXrule@##1}%
+ \print@Xnotes{##1}%
+ \fi%
+ }%
+ \dolistloop{\@series}%
+ \fi%
}%
\newcommand*{\l@ddodoreinxtrafeet}{%
\doreinxtrafeeti
\doreinxtrafeetii}
\newcommand*{\doreinxtrafeetii}{%
- \def\do##1{%
- \ifvoid\csuse{##1footins}\else%
- \insert\csuse{##1footins}{\unvbox\csuse{##1footins}}%
- \fi}%
- \dolistloop{\@series}
+ \unless\ifnocritical@%
+ \def\do##1{%
+ \ifvoid\csuse{##1footins}\else%
+ \insert\csuse{##1footins}{\unvbox\csuse{##1footins}}%
+ \fi}%
+ \dolistloop{\@series}
+ \fi%
}
\gdef \l@d@reinserts{%
@@ -3283,19 +3618,35 @@
\@ifclassloaded{memoir}{%
\g@addto@macro{\@mem@extranofeet}{%
- \def\do#1{\ifvoid\csuse{#1footins}\else\@mem@nofootfalse\fi%
- \ifvoid\csuse{footins#1}\else\@mem@nofootfalse\fi%
- }
- \dolistloop{\@series}%
- \@led@extranofeet}
+ \unless\ifnocritical@%
+ \def\do#1{\ifvoid\csuse{#1footins}\else\@mem@nofootfalse\fi%
+ \ifvoid\csuse{footins#1}\else\@mem@nofootfalse\fi%
+ }
+ \dolistloop{\@series}%
+ \@led@extranofeet
+ \fi%
+ }%
}{%
\newcommand*{\@led@testifnofoot}{%
- \@led@nofoottrue
- \ifvoid\footins\else\@led@nofootfalse\fi
- \def\do##1{\ifvoid\csuse{##1footins}\else\@led@nofootfalse\fi%
- \ifvoid\csuse{footins##1}\else\@led@nofootfalse\fi}%
- \dolistloop{\@series}
- \@led@extranofeet}
+ \@led@nofoottrue%
+ \ifvoid\footins\else%
+ \@led@nofootfalse%
+ \fi%
+ \def\do##1{%
+ \unless\ifnocritical@%
+ \ifvoid\csuse{##1footins}\else%
+ \@led@nofootfalse%
+ \fi%
+ \fi%
+ \unless\ifnofamiliar@%
+ \ifvoid\csuse{footins##1}\else%
+ \@led@nofootfalse%
+ \fi%
+ \fi%
+ }%
+ \dolistloop{\@series}%
+ \@led@extranofeet%
+}%
\renewcommand{\@doclearpage}{%
\@led@testifnofoot
@@ -3405,6 +3756,34 @@
{\linenumrep{\line@num}|%
\ifsublines@ \sublinenumrep{\subline@num}\else 0\fi}\to\labelref@list}
+\newcommand*{\applabel}[1]{%
+ \if@edtext@%
+ \ifcsundef{the@label#1}{%
+ \csdef{the@label#1}{applabel}%
+ }%
+ {%
+ \led@warn@DuplicateLabel{#1 (applabel)}%
+ }%
+ \expandafter\l@dp@rsefootspec\l@d@nums|%
+ \@bsphack%
+ \ifledRcol%
+ \protected@write\@auxout{}%
+ {\string\l@dmake@labelsR\space\l@dparsedstartpage|\l@dparsedstartline|\l@dparsedstartsub|\the\c@pstartR|{#1:start}}%
+ \ifdef{\hypertarget}{\hypertarget{#1:start}{}}{}%
+ \protected@write\@auxout{}%
+ {\string\l@dmake@labelsR\space\l@dparsedendpage|\l@dparsedendline|\l@dparsedendsub|\the\c@pstartR|{#1:end}}%
+ \else%
+ \protected@write\@auxout{}%
+ {\string\l@dmake@labels\space\l@dparsedstartpage|\l@dparsedstartline|\l@dparsedstartsub|\the\c@pstart|{#1:start}}%
+ \ifdef{\hypertarget}{\hypertarget{#1:start}{}}{}%
+ \protected@write\@auxout{}%
+ {\string\l@dmake@labels\space\l@dparsedendpage|\l@dparsedendline|\l@dparsedendsub|\the\c@pstart|{#1:end}}%
+ \fi%
+ \@esphack%
+ \else%
+ \led@warn@AppLabelOutEdtext{#1}%
+ \fi%
+}%
\newrobustcmd{\wrap@edcrossref}[2]{%
\ifdef{\hyperlink}%
{\hyperlink{#1}{#2}}%
@@ -3469,6 +3848,42 @@
\linenum{\@tempa|%
\@tempb}}}%
+\xdef\twolines@appref{}%
+\xdef\morethantwolines@appref{}%
+\newtoggle{twolinesbutnotmore@appref}%
+\newtoggle{twolinesonlyinsamepage@appref}%
+
+\newcommand\apprefprefixsingle{}%
+\newcommand\apprefprefixmore{}%
+
+\newcommandx{\appref}[2][1,usedefault]{%
+ \IfStrEq{#1}{fulllines}%
+ {\toggletrue{fulllines@}}%
+ {}%
+ \xdef\@currentseries{appref}%
+ \ifdefempty{\apprefprefixmore}%
+ {\apprefprefixsingle}%
+ {%
+ \IfEq{\xlineref{#2:start}}{\xlineref{#2:end}}%
+ {\apprefprefixsingle}%
+ {\apprefprefixmore}%
+ }%
+ \printlines\xpageref{#2:start}|\xlineref{#2:start}|\xsublineref{#2:start}|\xpageref{#2:end}|\xlineref{#2:end}|\xsublineref{#2:end}||%
+ \togglefalse{fulllines@}%
+}%
+
+\xdef\Xendtwolines@apprefwithpage{}%
+\xdef\Xendmorethantwolines@apprefwithpage{}%
+\newtoggle{Xendtwolinesbutnotmore@apprefwithpage}%
+\newtoggle{Xendtwolinesonlyinsamepage@apprefwithpage}%
+
+\newcommandx{\apprefwithpage}[2][1,usedefault]{%
+ \IfStrEq{#1}{fulllines}%
+ {\toggletrue{fulllines@}}%
+ {}%
+ \printendlines\xpageref{#2:start}|\xlineref{#2:start}|\xsublineref{#2:start}|\xpageref{#2:end}|\xlineref{#2:end}|\xsublineref{#2:end}||%
+ \togglefalse{fulllines@}%
+}%
\newcommand*{\edmakelabel}[2]{\expandafter\xdef\csname the@label#1\endcsname{#2}}
\let\l@dold@xympar\@xympar
@@ -3695,6 +4110,7 @@
\fi%
\fi%
}
+\ifnoledgroup@\else%
\newcommand*{\l@dfeetbeginmini}{\l@dedbeginmini\l@dfambeginmini}
\newcommand*{\l@dfeetendmini}{%
\IfStrEq{critical-familiar}{\@mpfnpos}%
@@ -3822,6 +4238,7 @@
\l@dfeetendmini%
}
+\fi%
\newif\ifledgroupnotesL@
\newif\ifledgroupnotesR@
\AtBeginDocument{%
@@ -3864,8 +4281,9 @@
\xdef\@index@parenthesis{)}%
}{}%
}
-\newcommand{\ledinnote}[2]{\csuse{#1}{#2\emph{n}}}
-\newcommand{\ledinnotehyperpage}[2]{\csuse{#1}{\hyperpage{#2}\emph{n}}}
+\newcommand{\ledinnote}[2]{\csuse{#1}{\ledinnotemark{#2}}}%
+\newcommand{\ledinnotehyperpage}[2]{\csuse{#1}{\ledinnotemark{\hyperpage{#2}}}}%
+\newcommand{\ledinnotemark}[1]{#1\emph{n}}%
\def\create@edindex@for@memoir{
\g@addto@macro{\makememindexhook}{%
\def\edindex{\@bsphack%
@@ -3987,7 +4405,7 @@
}%
\newcommand{\get@edindex@hyperref}[1]{%
- \ifdef{\hyperlink}%
+ \ifdefequal{\iftrue}{\ifHy@hyperindex}%
{%
\edef\temp@{%
\catcode`\ =9 %space need for catcode
@@ -4190,20 +4608,24 @@
}
\newcommand{\disable@familiarnotes}{%
- \def\do##1{%
- \csletcs{footnote@@##1}{footnote##1}%
- \expandafter\renewcommand \csname footnote##1\endcsname[1]{%
- \protected@csxdef{@thefnmark##1}{\csuse{thefootnote##1}}%
- \csuse{@footnotemark##1}%
- }%
- }%
- \dolistloop{\@series}%
+ \unless\ifnofamiliar@%
+ \def\do##1{%
+ \csletcs{footnote@@##1}{footnote##1}%
+ \expandafter\renewcommand \csname footnote##1\endcsname[1]{%
+ \protected@csxdef{@thefnmark##1}{\csuse{thefootnote##1}}%
+ \csuse{@footnotemark##1}%
+ }%
+ }%
+ \dolistloop{\@series}%
+ \fi%
}%
\newcommand{\restore@familiarnotes}{%
- \def\do##1{%
- \csletcs{footnote##1}{footnote@@##1}%
- }%
- \dolistloop{\@series}%
+ \unless\ifnofamiliar@%
+ \def\do##1{%
+ \csletcs{footnote##1}{footnote@@##1}%
+ }%
+ \dolistloop{\@series}%
+ \fi%
}%
\newcommand{\disable@sidenotes}{%
@@ -4967,6 +5389,7 @@
\let\sectionmark\@gobble%
\let\subsectionmark\@gobble%
}
+\notbool{@noeled@sec}{%
\ifl@dmemoir
\newcommand\beforeeledchapter{\clearforchapter}
\else
@@ -5008,7 +5431,9 @@
\AtBeginDocument{%
\patchcmd{\chapter}{\clearforchapter}{%
\if@eled@sectioning\else%
- \clearforchapter
+ \ifl@dprintingpages\else%
+ \clearforchapter%
+ \fi%
\fi%
}
{}
@@ -5060,7 +5485,9 @@
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{%
\if@eled@sectioning\else%
- \if@openright\cleardoublepage\else\clearpage\fi%No clearpage inside a \eledsection : will keep critical notes from printing on the title page.
+ \ifl@dprintingpages\else%
+ \if@openright\cleardoublepage\else\clearpage\fi%No clearpage inside a \eledsection: will keep critical notes from printing on the title page.
+ \fi%
\fi%
}%
{}%
@@ -5187,8 +5614,10 @@
}
\catcode`\#=6 %Space NEEDS by \catcode
\newwrite\eled@sectioning@out
-\newif\if@noeled@sec%
-\newcommand{\noeledsec}{\global\@noeled@sectrue}%
+\newcommand{\noeledsec}{%
+ \led@war@noeledsecDeprecated%
+ \global\@noeled@sectrue%
+}%
\newcommand{\eledchapter}[2][]{%
#2%
\ifledRcol%
@@ -5360,6 +5789,7 @@
\listcsgadd{eled@sections#5@@}{#3}%
}
+}{}
\def\normal@page@break{}
\def\l@prev@pb{}
\def\l@prev@nopb{}
diff --git a/Master/texmf-dist/tex/latex/eledmac/eledpar.sty b/Master/texmf-dist/tex/latex/eledmac/eledpar.sty
index 07d9fadb905..f1fd61f5c34 100644
--- a/Master/texmf-dist/tex/latex/eledmac/eledpar.sty
+++ b/Master/texmf-dist/tex/latex/eledmac/eledpar.sty
@@ -23,7 +23,7 @@
%% This work consists of the files listed in the README file.
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{eledpar}[2015/03/22 v1.14.0 eledmac extension for parallel texts]%
+\ProvidesPackage{eledpar}[2015/04/13 v1.15.0 eledmac extension for parallel texts]%
\RequirePackage{xspace}%
\newif\ifshiftedpstarts
@@ -166,19 +166,28 @@
\ifx\@tempa\@tempb
\global\bypage@Rtrue
\global\bypstart@Rfalse
+ \unless\ifnocritical@%
+ \pstartinfootnote[][false]%
+ \fi%
\else
\def\@tempb{pstart}%
\ifx\@tempa\@tempb
\global\bypage@Rfalse
\global\bypstart@Rtrue
+ \unless\ifnocritical@%
+ \pstartinfootnote%
+ \fi%
\else
\def@tempb{section}
\ifx\@tempa\@tempb
- \global\bypage@Rfalse
- \global\bypstart@Rfalse
+ \global\bypage@Rfalse%
+ \global\bypstart@Rfalse%
+ \unless\ifnocritical@%
+ \pstartinfootnote[][false]%
+ \fi%
\else
\led@warn@BadLineation
- \fi
+ \fi%
\fi
\fi
\fi}}
@@ -550,15 +559,6 @@
\fi}
\global\let\lock@off=\do@lockoff
-\providecommand*{\n@num}{}
-\renewcommand*{\n@num}{%
- \ifledRcol
- \xright@appenditem{\the\absline@numR}\to\actionlines@listR
- \xright@appenditem{-1007}\to\actions@listR
- \else
- \n@num@reg
- \fi}
-
\newcount\insert@countR
\renewcommand*{\@ref}[2]{%
\ifledRcol
@@ -668,13 +668,6 @@
\else \write\linenum@out{\string\lock@off}%
\fi}
-\renewcommand*{\skipnumbering}{%
- \ifledRcol \write\linenum@outR{\string\n@num}%
- \advanceline{-1}%
- \else
- \skipnumbering@reg
- \fi}
-
\renewcommand*{\set@line}{%
\ifledRcol
@@ -698,35 +691,44 @@
\fi}
\newcommand{\newseries@eledpar}[1]{%
- \csgdef{onlysideX@#1}{}%
- \csgdef{onlyXside@#1}{}%
- \global\newbool{keepforXside@#1}%
- \global\newbool{keepforsideX@#1}%
- \expandafter\list@create\csname footnote#1@mk\endcsname%
- \expandafter\newcommand\csname footnote#1nomk\endcsname[1]{%
- \toggletrue{nomk@}%
- \csuse{footnote#1}{##1}%
- \togglefalse{nomk@}%
- \letcs{\@tmp}{footnote#1@mk}%
- \numdef\@tmpa{\csuse{c@footnote#1}}%
- \global\xright@appenditem{\@tmpa}\to\@tmp%
- \global\cslet{footnote#1@mk}{\@tmp}%
- }%
- \expandafter\newcommand\csname footnote#1mk\endcsname{%
- \letcs{\@tmp}{footnote#1@mk}%
- \gl@p\@tmp\to\@tmpa%
- \global\cslet{footnote#1@mk}{\@tmp}%
- \letcs{\old@footnote}{c@footnote#1}%
- \setcounter{footnote#1}{\@tmpa}%
- \protected@csxdef{@thefnmark#1}{\csuse{thefootnote#1}}%
- \csuse{@footnotemark#1}%
- \setcounter{footnote#1}{\old@footnote}%
- \xspace%
- }%
+ \unless\ifnocritical@%
+ \csgdef{onlysideX@#1}{}%
+ \global\newbool{keepforXside@#1}%
+ \fi%
+ \unless\ifnofamiliar@%
+ \global\newbool{keepforsideX@#1}%
+ \csgdef{onlyXside@#1}{}%
+ \fi%
+ \unless\ifnofamiliar@%
+ \expandafter\list@create\csname footnote#1@mk\endcsname%
+ \expandafter\newcommand\csname footnote#1nomk\endcsname[1]{%
+ \toggletrue{nomk@}%
+ \csuse{footnote#1}{##1}%
+ \togglefalse{nomk@}%
+ \letcs{\@tmp}{footnote#1@mk}%
+ \numdef\@tmpa{\csuse{c@footnote#1}}%
+ \global\xright@appenditem{\@tmpa}\to\@tmp%
+ \global\cslet{footnote#1@mk}{\@tmp}%
+ }%
+ \expandafter\newcommand\csname footnote#1mk\endcsname{%
+ \letcs{\@tmp}{footnote#1@mk}%
+ \gl@p\@tmp\to\@tmpa%
+ \global\cslet{footnote#1@mk}{\@tmp}%
+ \letcs{\old@footnote}{c@footnote#1}%
+ \setcounter{footnote#1}{\@tmpa}%
+ \protected@csxdef{@thefnmark#1}{\csuse{thefootnote#1}}%
+ \csuse{@footnotemark#1}%
+ \setcounter{footnote#1}{\old@footnote}%
+ \xspace%
+ }%
+ \fi
}%
-\newhookcommand@series{onlysideX}%
-
-\newhookcommand@series{onlyXside}%
+\unless\ifnocritical@%
+ \newhookcommand@series{onlyXside}%
+\fi%
+\unless\ifnofamiliar@%
+ \newhookcommand@series{onlysideX}%
+\fi
\newcommand{\init@series@eledpar}{%
\def\do##1{\newseries@eledpar{##1}}%
@@ -884,6 +886,7 @@
\ifstrempty{#1}%
{\csgdef{before@pstartL@\the\l@dnumpstartsL}{\at@every@pstart}}%
{\csgdef{before@pstartL@\the\l@dnumpstartsL}{\noindent#1}}%
+ \at@every@pstart@call%
}
\newcommandx*{\pstartR}[1][1]{%
\if@nobreak%
@@ -931,6 +934,7 @@
\ifstrempty{#1}%
{\csgdef{before@pstartR@\the\l@dnumpstartsR}{\at@every@pstart}}%
{\csgdef{before@pstartR@\the\l@dnumpstartsR}{\noindent#1}}%
+ \at@every@pstart@call%
}
\newcommandx*{\pendL}[1][1]{%
\ifnumbering \else%
@@ -977,6 +981,8 @@
{\csgdef{after@pendR@\the\l@dnumpstartsR}{\noindent#1}}%
}
+\newcommand{\AtEveryPstartCall}[1]{\xdef\at@every@pstart@call{\unexpanded{#1}}}%
+\gdef\at@every@pstart@call{}%
\newif\ifprint@last@after@pendL%
\newif\ifprint@last@after@pendR%
\newbox\l@dleftbox
@@ -994,34 +1000,39 @@
\newcommand*{\do@lineL}{%
\letcs{\ifnumberpstart}{numberpstart@L\the\l@dpscL}%
- \advance\countLline \@ne
+ \advance\countLline \@ne%
\ifvbox\namebox{l@dLcolrawbox\the\l@dpscL}%
- {\vbadness=10000
- \splittopskip=\z@
- \do@lineLhook
- \l@demptyd@ta
- \global\setbox\one@line=\vsplit\namebox{l@dLcolrawbox\the\l@dpscL}
+ {\vbadness=10000%
+ \splittopskip=\z@%
+ \do@lineLhook%
+ \l@demptyd@ta%
+ \global\setbox\one@line=\vsplit\namebox{l@dLcolrawbox\the\l@dpscL}%
to\baselineskip}%
- \IfStrEq{\splitfirstmarks\parledgroup@}{begin}{\parledgroup@notes@startL}{}
- \unvbox\one@line \global\setbox\one@line=\lastbox
- \getline@numL
+ \IfStrEq{\splitfirstmarks\parledgroup@}{begin}{\parledgroup@notes@startL}{}%
+ \unvbox\one@line \global\setbox\one@line=\lastbox%
+ \getline@numL%
\ifnum\@lock>\@ne%
\inserthangingsymboltrue%
\else%
\inserthangingsymbolfalse%
- \fi
- \setbox\l@dleftbox
+ \fi%
+ \setbox\l@dleftbox%
\hb@xt@ \Lcolwidth{%
- \affixline@num
+ \ifl@dhidenumber%
+ \global\l@dhidenumberfalse%
+ \f@x@l@cks%
+ \else%
+ \affixline@num%
+ \fi%
\xifinlist{\the\l@dpscL}{\eled@sections@@}%
{\add@inserts\affixside@note}%
{\print@lineL}}%
- \add@penaltiesL
- \global\advance\@donereallinesL\@ne
- \global\advance\@donetotallinesL\@ne
-\else
+ \add@penaltiesL%
+ \global\advance\@donereallinesL\@ne%
+ \global\advance\@donetotallinesL\@ne%
+\else%
\setbox\l@dleftbox \hb@xt@ \Lcolwidth{\hspace*{\Lcolwidth}}%
- \global\advance\@donetotallinesL\@ne
+ \global\advance\@donetotallinesL\@ne%
\fi}
\def\print@lineL{%
@@ -1029,14 +1040,14 @@
\l@dld@ta %space kept for backward compatibility
\add@inserts\affixside@note%
\l@dlsn@te %space kept for backward compatibility
- {\ledllfill\hb@xt@ \wd\one@line{%
+ {\ledllfill\hb@xt@ \Lcolwidth{%
\do@insidelineLhook%
\ifluatex%
\luatextextdir\l@luatextextdir@L%
\fi%
\new@lineL%
\inserthangingsymbolL%
- \l@dunhbox@line{\one@line}}\correcthangingL\ledrlfill\l@drd@ta%
+ \l@dunhbox@line{\one@line}}\ledrlfill\l@drd@ta%
\l@drsn@te}}
\def\print@eledsectionL{%%
@@ -1080,36 +1091,41 @@
\newcommand*{\do@lineR}{%
\letcs{\ifnumberpstart}{numberpstart@R\the\l@dpscR}%
\ledRcol@true%
- \advance\countRline \@ne
+ \advance\countRline \@ne%
\ifvbox\namebox{l@dRcolrawbox\the\l@dpscR}%
- {\vbadness=10000
- \splittopskip=\z@
- \do@lineRhook
- \l@demptyd@ta
- \global\setbox\one@lineR=\vsplit\namebox{l@dRcolrawbox\the\l@dpscR}
+ {\vbadness=10000%
+ \splittopskip=\z@%
+ \do@lineRhook%
+ \l@demptyd@ta%
+ \global\setbox\one@lineR=\vsplit\namebox{l@dRcolrawbox\the\l@dpscR}%
to\baselineskip}%
- \IfStrEq{\splitfirstmarks\parledgroup@}{begin}{\parledgroup@notes@startR}{}
- \unvbox\one@lineR \global\setbox\one@lineR=\lastbox
- \getline@numR
+ \IfStrEq{\splitfirstmarks\parledgroup@}{begin}{\parledgroup@notes@startR}{}%
+ \unvbox\one@lineR \global\setbox\one@lineR=\lastbox%
+ \getline@numR%
\ifnum\@lockR>\@ne%
- \inserthangingsymbolRtrue
+ \inserthangingsymbolRtrue%
\else%
\inserthangingsymbolRfalse%
\fi%
- \setbox\l@drightbox
+ \setbox\l@drightbox%
\hb@xt@ \Rcolwidth{%
- \affixline@numR%
+ \ifl@dhidenumber%
+ \global\l@dhidenumberfalse%
+ \f@x@l@cksR%
+ \else%
+ \affixline@numR%
+ \fi%
\xifinlist{\the\l@dpscR}{\eled@sectionsR@@}%
{\add@insertsR\affixside@noteR}%
{\print@lineR}%
}%
- \add@penaltiesR
- \global\advance\@donereallinesR\@ne
- \global\advance\@donetotallinesR\@ne
-\else
- \setbox\l@drightbox \hb@xt@ \Rcolwidth{\hspace*{\Rcolwidth}}
- \global\advance\@donetotallinesR\@ne
-\fi
+ \add@penaltiesR%
+ \global\advance\@donereallinesR\@ne%
+ \global\advance\@donetotallinesR\@ne%
+\else%
+ \setbox\l@drightbox \hb@xt@ \Rcolwidth{\hspace*{\Rcolwidth}}%
+ \global\advance\@donetotallinesR\@ne%
+\fi%
\ledRcol@false%
}
@@ -1118,7 +1134,7 @@
\l@dld@ta %space kept for backward compatibility
\add@insertsR\affixside@noteR%
\l@dlsn@te %space kept for backward compatibility
- \correcthangingR\ledllfill\hb@xt@ \wd\one@lineR{%
+ \ledllfill\hb@xt@ \Rcolwidth{%
\do@insidelineRhook%
\new@lineR%
\inserthangingsymbolR%
@@ -1126,7 +1142,7 @@
\luatextextdir\l@luatextextdir@R%
\fi%
\l@dunhbox@line{\one@lineR}}\ledrlfill\l@drd@ta%
- \l@drsn@te
+ \l@drsn@te%
}
\def\print@eledsectionR{%
@@ -1161,37 +1177,39 @@
\global\advance\absline@numR \@ne
\do@actionsR
\do@ballastR
-\ifledgroupnotesR@\else\ifnumberline
- \ifsublines@
- \ifnum\sub@lockR<\tw@
- \global\advance\subline@numR \@ne
- \fi
- \else
- \ifnum\@lockR<\tw@
- \global\advance\line@numR \@ne
- \global\subline@numR \z@
- \fi
+ \ifledgroupnotesR@\else
+ \ifnumberline
+ \ifsublines@
+ \ifnum\sub@lockR<\tw@
+ \global\advance\subline@numR \@ne
+ \fi
+ \else
+ \ifnum\@lockR<\tw@
+ \global\advance\line@numR \@ne
+ \global\subline@numR \z@
+ \fi
+ \fi
+ \fi
\fi
-\fi
-\fi
}
\newcommand*{\getline@numL}{%
- \global\advance\absline@num \@ne
+ \global\advance\absline@num \@ne
\do@actions
\do@ballast
-\ifledgroupnotesL@\else\ifnumberline
- \ifsublines@
- \ifnum\sub@lock<\tw@
- \global\advance\subline@num \@ne
- \fi
- \else
- \ifnum\@lock<\tw@
- \global\advance\line@num \@ne
- \global\subline@num \z@
- \fi
+ \ifledgroupnotesL@\else
+ \ifnumberline
+ \ifsublines@
+ \ifnum\sub@lock<\tw@
+ \global\advance\subline@num \@ne
+ \fi
+ \else
+ \ifnum\@lock<\tw@
+ \global\advance\line@num \@ne
+ \global\subline@num \z@
+ \fi
+ \fi
+ \fi
\fi
-\fi
-\fi
}
\newcommand*{\do@ballastR}{\global\ballast@count=\z@
@@ -1203,6 +1221,8 @@
\fi
\fi
\endgroup}
+
+\newif\ifl@dskipversenumberR
\newcommand*{\do@actions@fixedcodeR}{%
\ifcase\@l@dtempcnta%
\or% % 1001
@@ -1211,7 +1231,7 @@
\global\sublines@false
\or% % 1003
\global\@lockR=\@ne
- \or% % 1004
+ \or% % 1004%
\ifnum\@lockR=\tw@
\global\@lockR=\thr@@
\else
@@ -1227,9 +1247,14 @@
\fi
\or% % 1007
\l@dskipnumbertrue
- \else
+ \or% % 1008
+ \l@dskipversenumberRtrue%
+ \or% % 1009
+ \l@dhidenumbertrue%
+ \else%
\led@warn@BadAction
- \fi}
+ \fi%
+}
\newcommand*{\do@actionsR}{%
\global\let\do@actions@nextR=\relax
@@ -1349,21 +1374,23 @@
\ch@ck@l@ckR
\fi
\ifnum\@l@dtempcnta=\@l@dtempcntb
- \if@twocolumn
- \if@firstcolumn
- \gdef\l@dld@ta{\llap{{\leftlinenumR}}}%
- \else
- \gdef\l@drd@ta{\rlap{{\rightlinenumR}}}%
- \fi
- \else
- \@l@dtempcntb=\line@marginR
- \ifnum\@l@dtempcntb>\@ne
- \advance\@l@dtempcntb by\page@numR
- \fi
- \ifodd\@l@dtempcntb
- \gdef\l@drd@ta{\rlap{{\rightlinenumR}}}%
+ \ifl@dskipversenumberR\else
+ \if@twocolumn
+ \if@firstcolumn
+ \gdef\l@dld@ta{\llap{{\leftlinenumR}}}%
+ \else
+ \gdef\l@drd@ta{\rlap{{\rightlinenumR}}}%
+ \fi
\else
- \gdef\l@dld@ta{\llap{{\leftlinenumR}}}%
+ \@l@dtempcntb=\line@marginR
+ \ifnum\@l@dtempcntb>\@ne
+ \advance\@l@dtempcntb by\page@numR
+ \fi
+ \ifodd\@l@dtempcntb
+ \gdef\l@drd@ta{\rlap{{\rightlinenumR}}}%
+ \else
+ \gdef\l@dld@ta{\llap{{\leftlinenumR}}}%
+ \fi
\fi
\fi
\fi
@@ -1691,36 +1718,24 @@
\newif\ifinserthangingsymbolR
\newcommand{\inserthangingsymbolL}{%
-\ifinserthangingsymbol%
+ \ifinserthangingsymbol%
\ifinstanzaL%
+ \hskip \@ifundefined{sza@0@}{0}{\expandafter%
+ \noexpand\csname sza@0@\endcsname}\stanzaindentbase%
\hangingsymbol%
\fi%
-\fi}
+ \fi%
+}%
\newcommand{\inserthangingsymbolR}{%
-\ifinserthangingsymbolR%
+ \ifinserthangingsymbolR%
\ifinstanzaR%
+ \hskip \@ifundefined{sza@0@}{0}{\expandafter%
+ \noexpand\csname sza@0@\endcsname}\stanzaindentbase%
\hangingsymbol%
\fi%
-\fi}
-\newcommand{\correcthangingL}{%
-\ifl@dpaging\else%
- \ifinstanzaL%
- \ifinserthangingsymbol%
- \hskip \@ifundefined{sza@0@}{0}{\expandafter%
- \noexpand\csname sza@0@\endcsname}\stanzaindentbase%
- \fi%
- \fi%
-\fi}
+ \fi%
+}%
-\newcommand{\correcthangingR}{%
-\ifl@dpaging\else%
- \ifinstanzaR%
- \ifinserthangingsymbolR%
- \hskip \@ifundefined{sza@0@}{0}{\expandafter%
- \noexpand\csname sza@0@\endcsname}\stanzaindentbase%
- \fi%
- \fi%
-\fi}
\chardef\next=\catcode`\&
\catcode`\&=\active
@@ -2122,67 +2137,67 @@
\newcommand*{\Pages}{%
\l@dprintingpagestrue%
\eledsection@correcting@skip=-2\baselineskip% line correcting for section titles.
- \parledgroup@notespacing@set@correction
- \typeout{}
- \typeout{*************************** PAGES ***************************}
- \ifnum\l@dnumpstartsL=\l@dnumpstartsR\else
+ \parledgroup@notespacing@set@correction%
+ \typeout{}%
+ \typeout{*************************** PAGES ***************************}%
+ \ifnum\l@dnumpstartsL=\l@dnumpstartsR\else%
\led@err@BadLeftRightPstarts{\the\l@dnumpstartsL}{\the\l@dnumpstartsR}%
- \fi
+ \fi%
\setlength{\Lcolwidth}{\textwidth}%
\setlength{\Rcolwidth}{\textwidth}%
- \cleartol@devenpage
- \begingroup
- \l@dzeropenalties
- \endgraf\global\num@lines=\prevgraf
- \global\num@linesR=\prevgraf
- \global\par@line=\z@
- \global\par@lineR=\z@
- \global\l@dpscL=\z@
- \global\l@dpscR=\z@
- \writtenlinesLfalse
- \writtenlinesRfalse
+ \cleartol@devenpage%
+ \begingroup%
+ \l@dzeropenalties%
+ \endgraf\global\num@lines=\prevgraf%
+ \global\num@linesR=\prevgraf%
+ \global\par@line=\z@%
+ \global\par@lineR=\z@%
+ \global\l@dpscL=\z@%
+ \global\l@dpscR=\z@%
+ \writtenlinesLfalse%
+ \writtenlinesRfalse%
\let\print@Xnotes\print@Xnotes@forpages%
\let\print@notesX\print@notesX@forpages%
- \check@pstarts
- \loop\if@pstarts
- \global\advance\l@dpscL \@ne
- \global\advance\l@dpscR \@ne
- \getlinesfromparlistL
- \getlinesfromparlistR
+ \check@pstarts%
+ \loop\if@pstarts%
+ \global\advance\l@dpscL \@ne%
+ \global\advance\l@dpscR \@ne%
+ \getlinesfromparlistL%
+ \getlinesfromparlistR%
\l@dcalc@maxoftwo{\@cs@linesinparL}{\@cs@linesinparR}%
{\usenamecount{l@dmaxlinesinpar\the\l@dpscL}}%
- \check@pstarts
- \repeat
- \global\l@dpscL=\z@
- \global\l@dpscR=\z@
- \getlinesfrompagelistL
- \getlinesfrompagelistR
+ \check@pstarts%
+ \repeat%
+ \global\l@dpscL=\z@%
+ \global\l@dpscR=\z@%
+ \getlinesfrompagelistL%
+ \getlinesfrompagelistR%
\l@dcalc@minoftwo{\@cs@linesonpageL}{\@cs@linesonpageR}%
{\l@dminpagelines}%
- \check@pstarts
- \if@pstarts
- \global\advance\l@dpscL \@ne
- \global\advance\l@dpscR \@ne
+ \check@pstarts%
+ \if@pstarts%
+ \global\advance\l@dpscL \@ne%
+ \global\advance\l@dpscR \@ne%
\restore@pstartL@pc%
\restore@pstartR@pc%
- \global\@donereallinesL=\z@
- \global\@donetotallinesL=\z@
- \global\@donereallinesR=\z@
- \global\@donetotallinesR=\z@
- \checkraw@text
-{ \loop\ifaraw@text
- \checkpageL
+ \global\@donereallinesL=\z@%
+ \global\@donetotallinesL=\z@%
+ \global\@donereallinesR=\z@%
+ \global\@donetotallinesR=\z@%
+ \checkraw@text%
+{ \loop\ifaraw@text%
+ \checkpageL%
\l@duselanguage{\theledlanguageL}%
{ \loop\ifl@dsamepage%
- \ifdefstring{\@eledsectnotoc}{L}{\ledsectnotoc}{}
+ \ifdefstring{\@eledsectnotoc}{L}{\ledsectnotoc}{}%
\csuse{before@pstartL@\the\l@dpscL}%
- \global\csundef{before@pstartL@\the\l@dpscL}
- \do@lineL
+ \global\csundef{before@pstartL@\the\l@dpscL}%
+ \do@lineL%
\xifinlist{\the\l@dpscL}{\eled@sections@@}
{\print@eledsectionL}%
{}%
- \advance\numpagelinesL \@ne
- \ifshiftedpstarts
+ \advance\numpagelinesL \@ne%
+ \ifshiftedpstarts%
\ifdim\ht\l@dleftbox>0pt\hb@xt@%
\hsize{\ledstrutL\unhbox\l@dleftbox}%
\else%
@@ -2193,37 +2208,38 @@
\else%
\parledgroup@correction@notespacing{L}
\hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}%
- \fi
+ \fi%
\get@nextboxL%
+ \global\l@dskipversenumberfalse%
\ifprint@last@after@pendL%
\csuse{after@pendL@\the\l@dpscL}%
\global\csundef{after@pendL@\the\l@dpscL}%
\fi%
\checkpageL%
- \checkverseL
- \checkpbL
- \repeat
- \ifl@dpagefull
+ \checkverseL%
+ \checkpbL%
+ \repeat%
+ \ifl@dpagefull%
\@writelinesonpageL{\the\numpagelinesL}%
- \else
+ \else%
\@writelinesonpageL{1000}%
- \fi
- \numpagelinesL \z@
- \parledgroup@correction@notespacing@init
+ \fi%
+ \numpagelinesL \z@%
+ \parledgroup@correction@notespacing@init%
\clearl@dleftpage }%
\checkpageR%
\l@duselanguage{\theledlanguageR}%
{ \loop\ifl@dsamepage%
- \initnumbering@sectcountR
- \ifdefstring{\@eledsectnotoc}{R}{\ledsectnotoc}{}
+ \initnumbering@sectcountR%
+ \ifdefstring{\@eledsectnotoc}{R}{\ledsectnotoc}{}%
\csuse{before@pstartR@\the\l@dpscR}%
- \global\csundef{before@pstartR@\the\l@dpscR}
- \do@lineR
- \xifinlist{\the\l@dpscR}{\eled@sectionsR@@}
+ \global\csundef{before@pstartR@\the\l@dpscR}%
+ \do@lineR%
+ \xifinlist{\the\l@dpscR}{\eled@sectionsR@@}%
{\print@eledsectionR}%
{}%
- \advance\numpagelinesR \@ne
- \ifshiftedpstarts
+ \advance\numpagelinesR \@ne%
+ \ifshiftedpstarts%
\ifdim\ht\l@drightbox>0pt\hb@xt@%
\hsize{\ledstrutR\unhbox\l@drightbox}%
\else%
@@ -2232,50 +2248,57 @@
\global\pagetotal=\dimen0%
\fi%
\else%
- \parledgroup@correction@notespacing{R}
+ \parledgroup@correction@notespacing{R}%
\hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}%
- \fi
+ \fi%
\get@nextboxR%
+ \global\l@dskipversenumberRfalse%
\ifprint@last@after@pendR%
\csuse{after@pendR@\the\l@dpscR}%
\global\csundef{after@pendR@\the\l@dpscR}%
\fi%
\checkpageR%
- \checkverseR
- \checkpbR
- \repeat
- \ifl@dpagefull
+ \checkverseR%
+ \checkpbR%
+ \repeat%
+ \ifl@dpagefull%
\@writelinesonpageR{\the\numpagelinesR}%
- \else
+ \else%
\@writelinesonpageR{1000}%
- \fi
- \numpagelinesR=\z@
- \parledgroup@correction@notespacing@init
- \clearl@drightpage}
- \checkraw@text
- \ifaraw@text
- \getlinesfrompagelistL
- \getlinesfrompagelistR
+ \fi%
+ \numpagelinesR=\z@%
+ \parledgroup@correction@notespacing@init%
+ \clearl@drightpage}%
+ \checkraw@text%
+ \ifaraw@text%
+ \getlinesfrompagelistL%
+ \getlinesfrompagelistR%
\l@dcalc@minoftwo{\@cs@linesonpageL}{\@cs@linesonpageR}%
{\l@dminpagelines}%
- \fi
- \repeat}
- \fi
- \flush@notes
- \flush@notesR
- \endgroup
- \global\l@dpscL=\z@
- \global\l@dpscR=\z@
- \global\l@dnumpstartsL=\z@
- \global\l@dnumpstartsR=\z@
- \global\instanzaLfalse
- \global\instanzaRfalse
+ \fi%
+ \repeat}%
+ \fi%
+ \flush@notes%
+ \flush@notesR%
+ \endgroup%
+ \global\l@dpscL=\z@%
+ \global\l@dpscR=\z@%
+ \global\l@dnumpstartsL=\z@%
+ \global\l@dnumpstartsR=\z@%
+ \global\instanzaLfalse%
+ \global\instanzaRfalse%
\l@dprintingpagesfalse%
\finish@Pages@notes%Needed to prevent final notes overlap line number
\ignorespaces}
\newcommand{\finish@Pages@notes}{%
\def\do##1{%
+ \ifnocritical@%
+ \newbox\csuse{##1footins}
+ \fi
+ \ifnofamiliar@%
+ \newbox\csuse{footins##1}
+ \fi
\ifvoid\csuse{##1footins}%
\ifvoid\csuse{footins##1}\else%
\newpage\null%
@@ -2539,6 +2562,13 @@
\fi
\fi}
+\pretocmd{\chapter}{%
+ \ifl@dprintingpages%
+ \vbox{}%
+ \fi%
+ }%
+ {}%
+ {}%
\newcommand{\eledsectnotoc}[1]{\xdef\@eledsectnotoc{#1}}
\eledsectnotoc{R}
\newcommand{\eledsectmark}[1]{\xdef\@eledsectmark{#1}}