summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-11-13 22:34:12 +0000
committerKarl Berry <karl@freefriends.org>2015-11-13 22:34:12 +0000
commitc5e0cd049cb657a40e15cef1fddf373161d5615d (patch)
treeae6c99f7df2f58569060989b2f43ba3fdd71ab5f
parent22e97b885e90c0253656b4ca0015e655034b05ad (diff)
reledmac (13nov15)
git-svn-id: svn://tug.org/texlive/trunk@38840 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/Makefile1
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-mac.dtx11
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-par.dtx2
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/1-criticalnotes.pdfbin17173 -> 17031 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/1-sidenotes.pdfbin20220 -> 20152 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/1-tabular.pdfbin20889 -> 20939 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/1-verses.pdfbin17412 -> 17412 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.pdfbin17609 -> 18209 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.tex12
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/2-footnote_spacing.pdfbin20899 -> 20949 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.pdfbin19888 -> 21552 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.tex4
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/2-lemma_disambigution.pdfbin17092 -> 17094 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/2-line_numbers_in_header.pdfbin31545 -> 31484 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/2-one_series_per_pstart.pdfbin25876 -> 25883 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/2-performances.pdfbin23062 -> 23114 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/2-titles_in_line_numbering_with_notes.pdfbin22797 -> 22798 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/2-titles_not_in_line_numbering.pdfbin17143 -> 17142 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_columns_different_languages.pdfbin26121 -> 26269 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_mwe.pdfbin12225 -> 12225 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdfbin39708 -> 39708 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdfbin23030 -> 23218 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdfbin35007 -> 35008 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdfbin34746 -> 34741 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_default.pdfbin33301 -> 33299 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdfbin34910 -> 34910 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax.pdfbin34463 -> 34474 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nosync.pdfbin34510 -> 34511 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_shifted.pdfbin34741 -> 34739 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column.pdfbin18427 -> 18432 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_alignment.pdfbin21173 -> 21172 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdfbin29591 -> 29658 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_one_series_per_pstart.pdfbin36490 -> 36501 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_page_titles_in_line_numbering_with_notes.pdfbin31715 -> 32593 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_page_titles_in_line_numbering_with_notes.tex2
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_long_notes.pdfbin59065 -> 59061 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_notes_leftpage.pdfbin22725 -> 22726 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdfbin18979 -> 18725 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdfbin22219 -> 22220 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_verse_text_between.pdfbin16238 -> 16240 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/migration.pdfbin83616 -> 84472 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/reledmac.pdfbin1043643 -> 1066587 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/reledpar.pdfbin431839 -> 440815 bytes
-rw-r--r--Master/texmf-dist/source/latex/reledmac/migration.dtx2
-rw-r--r--Master/texmf-dist/source/latex/reledmac/reledmac.dtx1109
-rw-r--r--Master/texmf-dist/source/latex/reledmac/reledpar.dtx222
-rw-r--r--Master/texmf-dist/tex/latex/reledmac/reledmac.sty602
-rw-r--r--Master/texmf-dist/tex/latex/reledmac/reledpar.sty109
48 files changed, 1449 insertions, 627 deletions
diff --git a/Master/texmf-dist/doc/latex/reledmac/Makefile b/Master/texmf-dist/doc/latex/reledmac/Makefile
index 73bb87645c1..47447b182f9 100644
--- a/Master/texmf-dist/doc/latex/reledmac/Makefile
+++ b/Master/texmf-dist/doc/latex/reledmac/Makefile
@@ -41,6 +41,7 @@ README: README.md
dist: $(PACKAGE) examples
rm -rf reledmac
mkdir reledmac
+ @xelatex reledmac.dtx #We call it at last time because reledmac handbook can refer to page of reledpar handbook, and so we need to run reledmac.dtx a last time after reledpar.dtx has been run
$(MAKE) -C examples all
mkdir reledmac/examples
ln examples/*pdf reledmac/examples
diff --git a/Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-mac.dtx b/Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-mac.dtx
index 0488c4433ea..2f3253adf54 100644
--- a/Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-mac.dtx
+++ b/Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-mac.dtx
@@ -375,9 +375,16 @@
% Before \reledmac~2.3.0, for typesetting verse, any empty line was considered a paragraph inside verses. Counting empty lines this created breaking verse, hanging verses, and also added spurious vertical spaces.
% Version 2.3.0 disables paragraph in stanza. If you want vertical space, use optional argument of \cs{stanza} or \cs{endverse}.
% \subsection{Migration to \reledmac~2.4.0}
-% It is not mandatory, but strongly recommended, to change any \cs{renewcommand}\\marg{\endashchar}\marg{…} to the use of \cs{Xlinerangeseparator} or / and \cs{Xendlinerangeseparator} (\reff{linerangeseparator}).
-%
+% It is not mandatory, but strongly recommended, to change any \cs{renewcommand}\arg{\textbackslash endashchar}\marg{…} to the use of \cs{Xlinerangeseparator} or / and \cs{Xendlinerangeseparator} (\reff{linerangeseparator}).
+% \subsection{Migration to \reledmac~2.5.0}
+% It is strongly recommended to stop redefining \cs{printnpnum} and to use the hooks documented in \reff{pagelineendnotes}.
+%
+% \cs{xlineref} does not print anymore the side flag (R for right side), because it is incompatible with numerical test. Use \cs{xflagref} to obtain it.
+%
+% The \cs{printlines} and \cs{printendlines} commands take now an eighth argument, which is the side flag. It is strongly recommended to NEVER redefine these two commands and to use the setting commands instead (or to ask for new setting commands if the actual does not answer to your needs). However, if you have done it, just change your redefinition to have a new argument.
%
%
+% It is strongly recommended to stop redefining \cs{fullstop} and to use \cs{Xsublinesep} instead.
+%
%
%
diff --git a/Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-par.dtx b/Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-par.dtx
index 2a717ab0674..ad7eb7d8e95 100644
--- a/Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-par.dtx
+++ b/Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-par.dtx
@@ -71,3 +71,5 @@
% We have tested and saw no problem with this correction, but if you see a difference in alignment between version 2.3.0 and 2.4.0, please contact us.
% \subsection{Migration to \reledpar~2.5.0}
% If you use \cs{stanza} or \env{astanza} environment, please read \reff{reledmac-mac2.5.0migration}.
+% \subsection{Migration to \reledpar~2.6.0}
+% \cs{printlinenumR} was deleted. Use \cs{Xlineflag} instead. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalnotes.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalnotes.pdf
index df7dedd06f9..1edc16e9192 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalnotes.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalnotes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/1-sidenotes.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/1-sidenotes.pdf
index d543f84299a..442aea5b5b3 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/1-sidenotes.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/1-sidenotes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/1-tabular.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/1-tabular.pdf
index c27c849545d..5f184a7194f 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/1-tabular.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/1-tabular.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/1-verses.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/1-verses.pdf
index 441b78206d9..1272d313d9e 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/1-verses.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/1-verses.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.pdf
index 6c9fb3b71a9..cdf50f7cd74 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.tex b/Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.tex
index 784efac679b..3830f5c8483 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.tex
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.tex
@@ -6,7 +6,9 @@
\usepackage[series={A},noend,noeledsec,nofamiliar,noledgroup]{reledmac}
\usepackage{hyperref}
-\renewcommand{\apprefprefixsingle}{l.~}
+\setapprefprefixsingle{l.~}
+\setSErefprefixsingle{l.~}
+
\begin{document}
@@ -18,19 +20,23 @@
This file provides a MWE of cross-referencing with reledmac, with reference to line number.
The \verb+\edlabel+, \verb+\edpageref+ and \verb+\lineref+ commands are used.
-We also use \verb+\applabel+, \verb+\appref+ and \verb+\apprefprefixsingle+.
+We also use \verb+\applabel+, \verb+\appref+ and \verb+\setapprefprefixsingle+
+and also \verb+\edlabelS+, \verb+\edlabelE+, \verb+\SEref+ and \verb+\setSErefprefixsingle+.
\end{abstract}
\end{english}
See p.~\edpageref{ultrices} l.~\edlineref{ultrices}.
+Read the passage in \SEref{passage}.
+
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. \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.
+\edlabelS{passage}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.\edlabelE{passage}
+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
\endnumbering
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/2-footnote_spacing.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/2-footnote_spacing.pdf
index 362af3eccf3..4741a5a6735 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/2-footnote_spacing.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/2-footnote_spacing.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.pdf
index 60fbd5a596d..72c4d2b83f6 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.tex b/Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.tex
index fc61b0c83ff..55532f9aad0 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.tex
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.tex
@@ -5,7 +5,7 @@
\setotherlanguage{english}
\usepackage[nonewpage]{indextools}
-\usepackage[series={},nocritical,noend,noeledsec,nofamiliar,noledgroup]{reledmac}
+\usepackage[series={A},noend,noeledsec,nofamiliar,noledgroup]{reledmac}
\usepackage{hyperref}
\makeindex
\makeindex[title=Index Nominum,name=name]
@@ -30,7 +30,7 @@ Imperator\edindex[name]{Nero} purus, dictum a semper eu, \edindex{long passage|(
Phasellus pretium euismod urna ac congue. Integer interdum\edindex{long passage|)} dapibus aliquet. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum placerat volutpat est, porta adipiscing lectus commodo vel. Vestibulum libero magna, vulputate eget tellus ornare, posuere lobortis velit. Suspendisse non diam at est auctor luctus in nec elit. Cras sed aliquam tellus. Suspendisse non odio sit amet nunc consequat malesuada. Curabitur eget lacus lectus. Vivamus elementum risus eget nisi venenatis, in volutpat elit placerat. Maecenas congue nunc id est luctus accumsan. Fusce id nisl enim.
\pend
\pstart
-Pellentesque non orci dui. Donec a libero\edindex{libero|textbf} 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, ultrices facilisis odio interdum non. Donec et condimentum quam, id ullamcorper nisl.
+Pellentesque non orci dui. Donec a libero\edindex{libero|textbf} eu nisl sollicitudin lobortis eget nec lacus. \edtext{Nulla pellentesque, neque ut tincidunt vestibulum, ante mi varius purus, nec cursus neque orci ut orci}{\lemma{Nulla\ldots orci}\Afootnote{Some comment\edindex{nulla}.}}. 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, ultrices facilisis odio interdum non. Donec et condimentum quam, id ullamcorper nisl.
\pend
\endnumbering
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/2-lemma_disambigution.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/2-lemma_disambigution.pdf
index 5dc7f916db0..5e3c2ae5c2b 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/2-lemma_disambigution.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/2-lemma_disambigution.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/2-line_numbers_in_header.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/2-line_numbers_in_header.pdf
index 78da94a54b4..497cea0cb29 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/2-line_numbers_in_header.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/2-line_numbers_in_header.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/2-one_series_per_pstart.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/2-one_series_per_pstart.pdf
index 8d680be08c9..67df52b3012 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/2-one_series_per_pstart.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/2-one_series_per_pstart.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/2-performances.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/2-performances.pdf
index f226c3fd581..8f0d78073cb 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/2-performances.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/2-performances.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf
index b2978e79ef3..f8224c9d56d 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_not_in_line_numbering.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_not_in_line_numbering.pdf
index de4f545fb94..d0b80115c57 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_not_in_line_numbering.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_not_in_line_numbering.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_columns_different_languages.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_columns_different_languages.pdf
index 8cfbc995fd6..7159ec86f51 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_columns_different_languages.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_columns_different_languages.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_mwe.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_mwe.pdf
index d2a7316f323..34d1461ddb3 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_mwe.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_mwe.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf
index 60561fafb5a..a34b9396864 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf
index 6aa1cd81d4b..e48070f7faa 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf
index ad2a3760bbc..0535cbf7dd6 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf
index 1b83256d609..bca6e3d4366 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_default.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_default.pdf
index 3fb48f6e62c..1cbda204ac1 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_default.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_default.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf
index bb06df3eb72..5d4c44d4b55 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax.pdf
index b03cef5032e..ddc076379f8 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nosync.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nosync.pdf
index 66b801b3b90..30450a7a57f 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nosync.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nosync.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_shifted.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_shifted.pdf
index bf5dc564dcd..5e1140d2e4a 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_shifted.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_shifted.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf
index f5204c8477e..175d5c6a6e0 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_alignment.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_alignment.pdf
index 56767df64c0..7ff3cf35998 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_alignment.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_alignment.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf
index 924385d48a8..7c9906f9476 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_one_series_per_pstart.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_one_series_per_pstart.pdf
index f3cddc8bb6a..6a60cb235f5 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_one_series_per_pstart.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_one_series_per_pstart.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_page_titles_in_line_numbering_with_notes.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_page_titles_in_line_numbering_with_notes.pdf
index b000b00634f..08b6b71ddc0 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_page_titles_in_line_numbering_with_notes.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_page_titles_in_line_numbering_with_notes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_page_titles_in_line_numbering_with_notes.tex b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_page_titles_in_line_numbering_with_notes.tex
index 1c01a5d2dd6..6959be1baa7 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_page_titles_in_line_numbering_with_notes.tex
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_page_titles_in_line_numbering_with_notes.tex
@@ -29,6 +29,8 @@ Page breaks are manually added before chapter with \verb+\beforeeledchapter+.
\beforeeledchapter
+\chapter{Preamble}
+A chapter outside of any parallel typesetting.
\begin{pages}
\begin{Leftside}
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_long_notes.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_long_notes.pdf
index 5f637b4da92..389ec3e37b8 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_long_notes.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_long_notes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf
index 29630e722b5..57373e53b06 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf
index aef11a8df99..7445176dd6e 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf
index 10e7868b472..a5f947a6a7a 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_verse_text_between.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_verse_text_between.pdf
index 7fb4a949f14..9ddc0611804 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_verse_text_between.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_verse_text_between.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/migration.pdf b/Master/texmf-dist/doc/latex/reledmac/migration.pdf
index 533e6158cad..54114f868ee 100644
--- a/Master/texmf-dist/doc/latex/reledmac/migration.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/migration.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/reledmac.pdf b/Master/texmf-dist/doc/latex/reledmac/reledmac.pdf
index 043c397d645..a9d81b18927 100644
--- a/Master/texmf-dist/doc/latex/reledmac/reledmac.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/reledmac.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/reledpar.pdf b/Master/texmf-dist/doc/latex/reledmac/reledpar.pdf
index bbc20890336..6af362e9fdc 100644
--- a/Master/texmf-dist/doc/latex/reledmac/reledpar.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/reledpar.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/reledmac/migration.dtx b/Master/texmf-dist/source/latex/reledmac/migration.dtx
index 0823da6cf68..071c4634084 100644
--- a/Master/texmf-dist/source/latex/reledmac/migration.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/migration.dtx
@@ -31,7 +31,7 @@
hyperindex=false
]{hyperref}
\usepackage[mono=false]{libertine}
-\usepackage{reledmac}
+\usepackage[noeledsec,series={},nocritical,noend,nofamiliar]{reledmac}
\usepackage{doctools}
\usepackage[english]{babel}
\usepackage{xspace}
diff --git a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
index 0183b9d969e..f2cb5c1a1a3 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
@@ -22,6 +22,7 @@
%<*driver>
\documentclass[twoside]{ltxdoc}
\usepackage[T1]{fontenc}
+\usepackage{xr-hyper}
\usepackage{url}
\usepackage[draft=false,
plainpages=false,
@@ -60,6 +61,7 @@
\pagestyle{headings}
\setcounter{StandardModuleDepth}{1}
\usepackage{longtable}
+\externaldocument[reledpar-]{reledpar}
\begin{document}
\raggedbottom
\DocInput{reledmac.dtx}
@@ -345,7 +347,19 @@
% \changes{v2.4.0}{2015/10/19}{Fix bug of \protect\cs{parindentX} and \protect\cs{Xparindent} with two columns and three columns notes.}
% \changes{v2.4.0}{2015/10/19}{Fix spurious space when using optional argument of \protect{stanza} (introduced in v2.3.0).}
% \changes{v2.4.1}{2015/10/26}{Fix bug with \protect\cs{appref} and \protect\cs{apprefwithpage} (introduced in v2.4.0).}
-% \changes{v2.4.1}{2015/10/26}{Fix bug with tabular environments when using \protect\env{babel} or \protect\env{polyglossia} language which override \LaTeX\ \protect\cs{roman} command, like greek language.}
+% \changes{v2.4.1}{2015/10/26}{Fix bug with tabular environments when using \protect\package{babel} or \protect\package{polyglossia} language which override \LaTeX\ \protect\cs{roman} command, like Greek.}
+% \changes{v2.4.1}{2015/10/26}{Fix bug with tabular environments when using \protect\package{babel} or \protect\package{polyglossia} language which override \LaTeX\ \protect\cs{roman} command, like greek language.}
+% \changes{v2.5.0}{2015/11/13}{Compatibility with new hook and tools of \protect\reledpar~2.6.0.}
+% \changes{v2.5.0}{2015/11/13}{\protect\cs{lemma} can be used even when the \protect\option{nocritical} is enabled.}
+% \changes{v2.5.0}{2015/11/13}{New hooks to customize page and line number appearance in endnotes.}
+% \changes{v2.5.0}{2015/11/13}{New hooks: \protect\cs{Xbhookgroup} and \protect\cs{bhookgroupX}.}
+% \changes{v2.5.0}{2015/11/13}{\protect\cs{appref} and \protect\cs{apprefwithpage} can take linerangesep optional argument.}
+% \changes{v2.5.0}{2015/11/13}{\protect\cs{apprefwithpage} works also when \protect\option{noend} option is enabled.}
+% \changes{v2.5.0}{2015/11/13}{\protect\cs{apprefwithpage} and \protect\cs{appref} print double quotation mark when the label was not defined.}
+% \changes{v2.5.0}{2015/11/13}{\protect\cs{apprefwithpage} and \protect\cs{appref} work with right side crossref.}
+% \changes{v2.5.0}{2015/11/13}{\protect\cs{edlabel} works now in \protect\cs{Xfootnote}.}
+% \changes{v2.5.0}{2015/11/13}{Log contains `There were undefined references` when using false references in \protect\cs{edlineref} or \protect{edpageref}.}
+% \changes{v2.5.0}{2015/11/13}{Fix spurious vertical space in \protect\env{astanza} environment (\reledpar)}
%
%
% \title{\Macpackage \\
@@ -952,6 +966,7 @@
% or sub-line depending on what it started out as, even if it
% changes in the middle.
%
+% You can change the separator between line number and subline number or using \cs{Xsublinesep} without any option argument (\reff{Xsublinesep} or using \cs{Xsublinesepside}. But in the second case, it will change the separator only for line number in side, not for the footnotes.
% \subsubsection{Locking lineation}
% \DescribeMacro{\startlock}
% \DescribeMacro{\endlock}
@@ -1183,7 +1198,7 @@
% The mechanism is similar to the one for footnotes: each macro takes one or more optional arguments and one single argument, like:\\
% \protect\cs{Aendnote}\oarg{option}\marg{text}.
%
-% \meta{option} can contain a comma-separated list of values. Allowed values are:
+% \label{Xendnoteopt}\meta{option} can contain a comma-separated list of values. Allowed values are:
% \begin{itemize}
% \item \verb|fulllines| to disable \protect\cs{Xendtwolines} and \protect\cs{Xendmorethantwolines} features for this particular note (cf. \reff{Xtwolines}).
% \item \verb+nonum+ to disable line number for this particular note.
@@ -1215,11 +1230,7 @@
% However you can use the \protect\cs{Xendlemmaseparator} macro to define one (\reff{Xendlemmaseparator}).
%
% As endnotes may be printed at any point in the document they always
-% start with the page number where they are called. The
-% macro \protect\cs{printnpnum}\marg{num} is used to print these numbers.
-% Its default definition is: \\
-% \verb?\newcommand*{\printnpnum}[1]{p.#1) }?
-%
+% start with the page number where they are called.
%
% \subsubsection{Paragraph in critical apparatus}
% By default, no paragraph can be made in the notes of critical apparatus.
@@ -1601,6 +1612,9 @@
% \DescribeMacro{\Xendsymlinenum}
% For endnotes, \cs{Xendnumberonlyfirstinline}; \cs{Xendnumberonlyfirstintwolines} and \cs{Xendsymlinenum} are the equivalents of
% \\ \cs{Xnumberonlyfirstinline}; \cs{Xnumberonlyfirstintwolines} and \cs{Xsymlinenum}.
+% \subsubsection{Arbitrary text before line number}
+% \DescribeMacro{\Xbeforenumber}
+% \cs{Xbeforenumber}\oarg{s}\marg{txt} allow to insert \meta{txt} before the line number, only when the line number is printed, so taking into accout \cs{Xnumberonlyfirstinline} and similar.
% \subsubsection{Separator for line range}\label{linerangeseparator}
% \changes{v2.4.0}{2015/10/19}{New hooks: \protect\cs{Xlinerangeseparator} and \protect\cs{Xendlinerangeseparator}.}
% \changes{v2.4.0}{2015/10/19}{Option linerangesep for critical footnotes and endnotes.}
@@ -1691,6 +1705,18 @@
% When using \cs{Xstanza}, you can use \cs{Xstanzaseparator}\oarg{s}\marg{text} to print \meta{text} after the stanza number.
% Default value is empty.
%
+% \subsubsection{Separator between line and subline numbers}\label{Xsublinesep}
+% \DescribeMacro{\Xsublinesep}
+% \cs{Xsublinesep}\oarg{s}\marg{txt} changes the separator between line and subline in footnotes.
+%
+% \textbf{Employed without optional argument, it also change separator in side number}.
+%
+% \DescribeMacro{\Xendsublinesep}
+% \cs{Xendsublinesep}\oarg{s}\marg{txt} does the same thing for endnotes.
+%
+% \textbf{However, it does not change anything for the separator in side number. Use \cs{Xsublinesep} without optional argument or \cs{Xsublinesepside}\marg{txt} to do it.}
+%
+% The default value is \verb+\textnormal{.}+.
% \subsubsection{Space around number}
% \DescribeMacro{\Xbeforenumber}
% With \protect\cs{Xbeforenumber}\oarg{s}\marg{l}, you can add some space before the line number in a footnote. If the line number is not printed, the space is not either. The default value is 0~pt.
@@ -1773,6 +1799,16 @@
% \protect\cs{Xendboxlinenum}\oarg{s}\marg{l}, \protect\cs{Xendboxlinenumalign}\oarg{s}\marg{text}, \protect\cs{Xendboxstartlinenum}\oarg{s}\marg{l}, \protect\cs{Xendboxendlinenum}\oarg{s}\marg{l} are the same as, respectively, \protect\cs{Xboxlinenum} and \protect\cs{Xboxlinenumalign}, \protect\cs{Xboxstartlinenum}, \protect\cs{Xboxendlinenum} except in endnotes.
%
%
+% \subsection{For endnotes}\label{pagelineendnotes}
+% \DescribeMacro{\Xendbeforepagenumber}
+% \cs{Xendbeforepagenumber}\oarg{s}\marg{text} defines the text before the page number in endnotes. Default value is \verb+p.+ (``p'' followed by a dot).
+%
+% \DescribeMacro{\Xendafterpagenumber}
+% \cs{Xendafterpagenumber}\oarg{s}\marg{text} defines the text after the page number in endnotes. Default value is \verb+) + (open parenthesis followed by a single space).
+% \DescribeMacro{\Xendlineprefixsingle}
+% \cs{Xendlineprefixsingle}\oarg{s}\marg{text} defines the text before the line number in endnotes, when there is only one line. Default value is empty.
+% \DescribeMacro{\Xendlineprefixmore}
+% \cs{Xendlineprefixmore}\oarg{s}\marg{text} defines the text before the line number in endnotes, when there is more than one line. Default value is empty. If you don't define it, use the value defined by \cs{Xendlineprefixsingle}.
% \subsection{Arbitrary code around line number}
% \DescribeMacro{\Xendbhooklinenumber}
% \cs{Xendbhooklinenumber}\oarg{s}\marg{code} is used to execute code before line number in endnotes. The code is executed before the \cs{Xendbeforelinenumber} space and before the \cs{Xendnotenumfont} font setting.
@@ -1965,6 +2001,12 @@
% \DescribeMacro{\Xtxtbeforenotes}
% You can add text before critical notes with \protect\cs{Xtxtbeforenotes}\oarg{s}\marg{text}.
%
+% \subsubsection{Code before notes}
+%\DescribeMacro{Xbhookgroup}
+%\DescribeMacro{bhookgroupX}
+% While \cs{Xtxtbeforenotes} is for typesetting code before notes, \cs{Xbhookgroup} and \cs{bhookgroupX} (respectively for critical and familiar) are for executing code before a groups of notes, between the rules and the printing of the notes.
+%
+%
% \subsubsection{Spacing}
% \DescribeMacro{\Xbeforenotes}
% You can change the vertical space before the rule of the critical notes with \protect\cs{Xbeforenotes}\oarg{s}\marg{l}.
@@ -2075,28 +2117,6 @@
%
%
%
-% \DescribeMacro{\fullstop}
-% \font\teni=cmmi10
-% A relatively trivial matter relates to punctuation. In your
-% footnotes, there will be sometimes lines with sub-line numbers like this: 55.6. The
-% en-dash and the full stop are taken from the same font as the
-% numbers, and it all works nicely. But what if you wanted to use
-% old-style numbers, like {\teni12} and {\teni34}? These look nice
-% in an edition, but when you use the fonts provided by \PlainTeX\
-% they are taken from a math font which does not
-% have full stop in the same places as a text font.
-% If you (or your macros) just typed
-% \verb"$\oldstyle 55.6$" you will get
-% `{\teni55.6}'. So we define
-% \protect\cs{fullstop}, which produces a full stop
-% from the normal document font, whatever font you are using
-% for the numbers. This macro is used in the
-% macros which format the line numbers in the margins and
-% footnotes, instead of explicit punctuation.
-%
-%
-%
-%
%
% \DescribeMacro{\select@lemmafont}
% We will briefly discuss \protect\cs{select@lemmafont}
@@ -2376,6 +2396,8 @@
% will produce, respectively, the page, line, sub-line and pstart on which
% the \protect\cs{edlabel}\marg{lab} command occurred.
%
+% Note that the \cs{edlineref} command insert the side flag after the line number.
+%
%
% An \protect\cs{edlabel} command may appear in the main text, or in the
% first argument of \protect\cs{edtext}, but not in the apparatus itself. But
@@ -2395,23 +2417,12 @@
% process a document after adding a new \protect\cs{edlabel} command: the
% auxiliary file will not have been updated yet.)
%
-% \subsection{Refer to a critical notes}
-% If you want to refer to a word inside an
-% \protect\cs{edtext}\marg{lemma}\marg{app} command, the \protect\cs{edlabel} should be defined inside
-% the first argument, e.g.,
-% \begin{verbatim}
-% The \edtext{creature\edlabel{elephant} was quite
-% unafraid}{\Afootnote{Of the mouse, that is.}}
-% \end{verbatim}
+% \subsection{Cross-referencing to a critical note}
+% If you when to refer to a word which is a lemma word, the \cs{edlabel} command should be in the first argument of \cs{edtext} command.
%
-% If you add the \protect\cs{edlabel} inside some \protect\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 \protect\cs{ledinnotemark}.
-% Its actual definition is:
-% \begin{verbatim}
-% \newcommand{\ledinnotemark}[1]{#1\emph{n}}
-% \end{verbatim}
+% If you want to refer to the content of a a \cs{Xfootnote}, the line and subline number printed will be the start line.
%
+% If you want to refers to the start and end lines, you should use \cs{appref} and related tools (\reff{appref}).
% \subsection{Cross-referencing which return a number in any case}
% Where \verb+#1+ stands for the reference.
% \DescribeMacro{\xpageref}
@@ -2434,14 +2445,15 @@
% They have these limitations:
% \begin{itemize}
% \item They will not tell you if the label is undefined.
-% \item They must
+% \item They must
% be preceded in the file by at least one of the four other
% cross-reference commands---e.g., a \verb"\edlabel{foo}" command,
% even if you never refer to that label---since those commands can all
% do the necessary processing of the \file{.aux} file, and the \protect\cs{x...}
% ones cannot.
-% \item When \protect\package{hyperref} is loaded, the hyperref link will not be added. (Indeed,
+% \item When \protect\package{hyperref} is loaded, the hyperref link will not be added. (Indeed,
% it is not a limitation, but a feature.)
+% \item With \parpackage, the \cs{xlineref} does not insert the right side flag, in order to obtain a line number. Use \cs{xflagref} to obtain the side flag, depending of your flag.
% \end{itemize}
%
% \subsubsection{Cross-referencing in order to define line number of a critical note}
@@ -2481,7 +2493,34 @@
% \changes{v0.2.1}{2003/08/25}{Added text about normal labeling}
% The normal \protect\cs{label}, \protect\cs{ref} and \protect\cs{pageref} macros may be used
% within numbered text, and operate in the familiar fashion.
-% \subsection{References to lines commented in the apparatus}
+% \subsection{References to start and end lines}
+% \subsubsection{Reference to main text lines}
+% \changes{v2.5.0}{2015/11/13}{New tools to easily make cross-reference to a passage defined by a start and an end line}
+% Many times, you may want to make a cross-reference to a passage that is defined by a start line and an end line.
+% \Macpackage provides specific tools for this scenario.
+
+% \DescribeMacro{\edlabelS}
+% Use \cs{edlabelS}\marg{label} to mark the start line of the passage.
+%
+% \DescribeMacro{\edlabelE}
+% Use \cs{edlabelE}\marg{label} to mark the end the end line of the passage.
+% These two commands just create to label which are named \meta{label}\verb+:start+ and \meta{label}\verb+:end+.
+%
+% \DescribeMacro{\edlabelSE}
+% Use \cs{edlabelSE}\marg{label} to mark just one location in the text. Contrary to a classical \cs{edlabel}, the \meta{label} could be use with \cs{SEref} and \cs{SErefwithpage}.
+%
+%
+% The main utility is to use them with three other commands.
+% \DescribeMacro{\SEref}
+% \cs{SEref}\marg{label} will make a cross-reference printed as a reference in critical footnotes.
+%
+% \DescribeMacro{\SErefwithpage}
+% \cs{SErefwithpage} will make a cross-reference printed as a reference in critical endnotes.
+%
+% \DescribeMacro{\SErefonlypage}
+% \cs{SErefonlypage} will make a cross-reference printed only with page number.
+%
+% \subsubsection{References to lines commented in the apparatus}\label{appref}
% \changes{v1.21.0}{2015/03/09}{Add \protect\cs{applabel} and related}
% You may want to make a cross-reference to a passage that is referred to by \protect\cs{edtext}.
% \Macpackage provides specific tools for this scenario.
@@ -2501,10 +2540,12 @@
% 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.
%
+% \subsubsection{Settings}
+% \paragraph{Specific to these tools}
% \DescribeMacro{\setapprefprefixsingle}\DescribeMacro{\setapprefprefixmore}
-% If you use \protect\cs{setapprefprefixsingle}\marg{prefix}, \meta{prefix} will be printed
+% If you use \protect\cs{apprefprefixsingle}\marg{prefix}, \meta{prefix} will be printed
% before the line numbers of a \protect\cs{appref}-reference.
-% If you use \protect\cs{setapprefprefixmore}\marg{prefix}, \meta{prefix} will be printed
+% If you use \protect\cs{apprefprefixmore}\marg{prefix}, \meta{prefix} will be printed
% before the line numbers, if you refer to more than one line.
%
% For example, you may use:
@@ -2514,52 +2555,47 @@
% \end{verbatim}
%
% Note that if you have not used \protect\cs{setapprefprefixmore} is empty, argument of \protect\cs{setapprefprefixsingle} will used in any case.
+%
+%
+% \DescribeMacro{\setSErefprefixsingle}\DescribeMacro{setSErefprefixmore}
+% \cs{setSErefprefixsingle} and \cs{setSErefprefixmore} are similar for \cs{SEref} command.
%
-
-% \DescribeMacro{\Xtwolinesappref}
-% \DescribeMacro{\Xmorethantwolinesappref}
-% \DescribeMacro{\Xtwolinesbutnotmoreappref}
-% \DescribeMacro{\Xtwolinesonlyinsamepage}
-% If you use \protect\cs{Xtwolines}, \protect\cs{Xmorethantwolines}, \protect\cs{Xtwolinesbutnotmore} and/or \protect\cs{Xtwolinesonlyinsamepage}
-% (\reff{Xtwolines}) \emph{without the optional
-% series argument}, the setting will also be available for \protect\cs{appref}.
+% \paragraph{Linked to setting of critical endnotes and footnotes}
+% Some commands who set the appearance of line numbers in critical footnotes also set the appearance of line numbers in \cs{appref} and \cs{SEref} if you call them \emph{without the optional series argument}.
%
-% The commands \protect\cs{Xtwolinesappref}\marg{text},
-% \protect\cs{Xmorethantwolinesappref}\marg{text}, \protect\cs{Xtwolinesbutnotmoreappref} \protect\cs{Xtwolinesonlyinsamepageappref} can also be used, if you
-% only want to change the reference style of \protect\cs{appref}.
+% These commandes are the following:
+% \begin{itemize}
+% \item \cs{Xlineflag} (for \parpackage), enabled by default.
+% \item \cs{Xlinerangeseparator}
+% \item \cs{Xmorethantwolines}
+% \item \cs{Xsublinesep}
+% \item \cs{Xtwolines}
+% \item \cs{Xtwolinesbutnotmore}
+% \item \cs{Xtwolinesonlyinsamepage}
+% \end{itemize}
%
-% It is possible to disable this setting for a specific \protect\cs{appref} command by
-% using \protect\cs{appref}\verb+[fulllines]+\marg{label}.
+% If you want to make settings specific to \cs{appref} or \cs{SEref}, just call them with an optional argument containing a comma-separated list of command names (for example \verb+appref,SEref+) or with a suffix equal to the command name (for example \verb+appref+).
%
%
-% \DescribeMacro{Xlinerangeseparatorappref}
-% If you use \protect\cs{Xlinerangeseparator} \emph{without the optional
-% series argument}, the setting will also be available for \protect\cs{appref}.
-%
-% The commands \protect\cs{Xlinerangeseparatorappref}\marg{text}, can also be used, if you
-% only want to change the reference style of \protect\cs{appref}.
-% \DescribeMacro{\Xendtwolinesapprefwithpage}
-% \DescribeMacro{\Xendmorethantwolinesapprefwithpage}
-% \DescribeMacro{\Xendtwolinesbutnotmoreapprefwithpage}
-% \DescribeMacro{\Xendtwolinesonlyinsamepageapprefwithpage}
-% If you use one of \protect\cs{Xendtwolines}, \protect\cs{Xendmorethantwolines}, \protect\cs{Xendtwolinesbutnotmore},
-% \protect\cs{Xendtwolinesonlyinsamepage})
-% (\reff{Xendtwolines}) \emph{without the optional
-% series argument}, the setting will also be available for \protect\cs{apprefwithpage}.
-%
-% The commands \protect\cs{Xendtwolinesappref}\marg{text},
-% \protect\cs{Xendmorethantwolinesappref}\marg{text}, \protect\cs{Xendtwolinesbutnotmoreappref}, \protect\cs{Xendtwolinesonlyinsamepageappref} can also be used, if you
-% only want to change the reference style of \protect\cs{apprefwithpage}.
-%
-% It is possible to disable this setting for a specific \protect\cs{apprefwithpage} command by
-% using \protect\cs{apprefwithpage}\verb+[fulllines]+\marg{label}.
-%
-% \DescribeMacro{Xendlinerangeseparatorapprefwithpage}
-% If you use \protect\cs{Xendlinerangeseparator} \emph{without the optional
-% series argument}, the setting will also be available for \protect\cs{apprefwithpage}.
-%
-% The commands \protect\cs{Xendlinerangeseparatorapprefwithpage}\marg{text}, can also be used, if you
-% only want to change the reference style of \protect\cs{apprefwithpage}.
+% The same principle is available for \cs{apprefwithpage}, \cs{SErefwithpage} and \cs{SErefonlypage} with the following commands:
+% \begin{itemize}
+% \item\cs{Xendafterpagenumber}
+% \item\cs{Xendbeforepagenumber}
+% \item\cs{Xendlineflag} (for \parpackage), enabled by default.
+% \item\cs{Xendlineprefixmore}
+% \item\cs{Xendlineprefixsingle}
+% \item\cs{Xendlinerangeseparator}
+% \item\cs{Xendmorethantwolines}
+% \item\cs{Xendsublinesep}
+% \item\cs{Xendtwolines}
+% \item\cs{Xendtwolinesbutnotmore}
+% \item\cs{Xendtwolinesonlyinsamepage}
+% \end{itemize}
+% \paragraph{For one specific command}
+%
+% When calling \cs{appref} and \cs{SEref}, you can use as a first optional argument, in brackets (\verb+[]+), any optional argument which can be used for critical footnotes (\reff{Xfootnoteopt}).
+%
+% When calling \cs{apprefwithpage}, \cs{SErefwithpage} or \cs{SErefonlypage} you can use as a first optional argument, in brackets (\verb+[]+), any optional argument which can be used for critical endnotes (\reff{Xendnoteopt}).
% \section{Side notes}
%
% \subsection{Basics}
@@ -2641,7 +2677,7 @@
% that \meta{item} and the current page \& linenumber should be added to
% the raw index file.
%
-% Note that the file \verb+.idx+ will contain the right reference only after the third run, because of the internal indexing mechanism of \protect\package{eledmac}.
+% Note that the file \verb+.idx+ will contain the right reference only after the third run, because of the internal indexing mechanism of \protect\macpackage.
% That means you must first run (Xe/Lua)\LaTeX three times, then run \verb+makeindex+, and then finally run (Xe/Lua)\LaTeX\ again, in order to get an index with the right page numbers.
%
% If the \protect\package{imakeidx} or \protect\package{indextools} package is used then the macro takes an optional
@@ -2657,6 +2693,23 @@
% \item Load \macpackage.
% \item Declare the index with the macro \cs{makeindex} of \package{imakeidx} and \package{indextools}.
% \end{enumerate}
+% \subsection{Refer to a critical notes}
+% If you want to refer to a word inside an
+% \protect\cs{edtext}\marg{lemma}\marg{app} command, the \protect\cs{edindex} should be defined inside
+% the first argument, e.g.,
+% \begin{verbatim}
+% The \edtext{creature\edlabel{elephant} was quite
+% unafraid}{\Afootnote{Of the mouse, that is.}}
+% \end{verbatim}
+%
+% If you add the \protect\cs{edindex} inside some \protect\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 \protect\cs{ledinnotemark}.
+% Its actual definition is:
+% \begin{verbatim}
+% \newcommand{\ledinnotemark}[1]{#1\emph{n}}
+% \end{verbatim}
+%
% \subsection{Separator between page and line numbers}
% \DescribeMacro{\pagelinesep}
% The page \& linenumber combination is written as |page\pagelinesep line|,
@@ -3336,7 +3389,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2015/10/26 v2.4.1 typeset critical edition]%
+\ProvidesPackage{reledmac}[2015/11/13 v2.5.0 typeset critical edition]%
% \end{macrocode}
%
% \subsection{Package options}
@@ -3687,18 +3740,25 @@
% \begin{macro}{\led@warn@DuplicateLabel}
% \begin{macro}{\led@warn@AppLabelOutEdtext}
% \begin{macro}{\led@warn@RefUndefined}
+% \begin{macro}{\led@warn@RefUndefined}
% \begin{macrocode}
\newcommand*{\led@warn@DuplicateLabel}[1]{%
\reledmac@warning{Duplicate definition of label `#1' on page \the\pageno.}}
\newcommand*{\led@warn@AppLabelOutEdtext}[1]{%
\reledmac@warning{\string\applabel\space outside of \string\edtext\space `#1' on page \the\pageno.}}%
\newcommand*{\led@warn@RefUndefined}[1]{%
+ \G@refundefinedtrue%
\reledmac@warning{Reference `#1' on page \the\pageno\space undefined.
Using `000'.}}
+\newcommand*{\led@warn@pairRefUndefined}[1]{%
+ \G@refundefinedtrue%
+ \reledmac@warning{Reference `#1:start' and/or `#1:end' on page \the\pageno\space undefined.
+ Using `??'.}}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\led@warn@NoMarginpars}
% \begin{macrocode}
@@ -3923,6 +3983,7 @@
% \begin{macro}{\l@dnumpstartsL}
% \begin{macro}{\ifledRcol}
% \begin{macro}{\ifledRcol@}
+% \begin{macro}{\ifXnote@}
% In preparation for the \parpackage package, these are related to
% the `right' text of parallel texts (when \protect\cs{ifl@dpairing} is TRUE).
% They are explained in the \protect\package{eledpar}
@@ -3951,6 +4012,11 @@
% \begin{macrocode}
\newif\ifnumberingR
% \end{macrocode}
+% The \cs{ifXnote@} macro is set to true when we are typesetting a critical footnote.
+% \begin{macrocode}
+\newif\ifXnote@%
+% \end{macrocode}
+% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
@@ -4675,7 +4741,9 @@
\numlabfont\linenumrep{\line@num}%
\ifsublines@
\ifnum\subline@num>0\relax
- \unskip\fullstop\sublinenumrep{\subline@num}%
+ \unskip%
+ \Xsublinesep@side%
+ \sublinenumrep{\subline@num}%
\fi
\fi%
\egroup%
@@ -5851,7 +5919,7 @@
% It is written in the file list.
% If we process a line-list file which used a older version, that means the commands used inside are deprecated, and we can't use them.
% \begin{macrocode}
-\newcommand{\this@line@list@version}{3}%
+\newcommand{\this@line@list@version}{5}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\line@list@stuff}
@@ -6588,7 +6656,6 @@
% that is passed on to the notes.
% Read about \protect\cs{@tag} in normal \protect\cs{edtext} macro for more details about \protect\cs{sw@list@inedtext} and \protect\cs{no@expands} (\reff{@tag}).
% \begin{macrocode}
-\unless\ifnocritical@
\newcommand*{\lemma}[1]{%
\global\@lemmacommand@true%
\global\renewcommand{\@tag}{%
@@ -6606,7 +6673,6 @@
\newcommand{\@lemma}{%
\booltrue{lemmacommand@\the\@edtext@level}%
}%
-\fi
% \end{macrocode}
% \end{macro}
% \begin{macro}{\if@lemmacommand@}
@@ -8556,6 +8622,7 @@
% \begin{macrocode}
\newcommand*{\normalfootgroup}[1]{%
{\csuse{Xnotefontsize@#1}\noindent\csuse{Xtxtbeforenotes@#1}}%
+ \csuse{Xbhookgroup@#1}%
\unvbox\csname #1footins\endcsname%
\hsize=\old@hsize%
}%
@@ -8590,6 +8657,7 @@
\fi%
\setlength{\parindent}{0pt}
{\csuse{Xnotefontsize@#1}\csuse{Xtxtbeforenotes@#1}}
+ \csuse{Xbhookgroup@#1}%
\unvbox\csname mp#1footins\endcsname}}
\fi
% \end{macrocode}
@@ -8668,7 +8736,7 @@
% Peter Wilson have also included \protect\cs{footfudgefiddle}.
% \changes{v0.2.2}{2003/11/04}{Added \protect\cs{footfudgefiddle} to \protect\cs{para@footsetup}}
% \begin{macrocode}
-\newcommand*{\para@footsetup}[1]{{\csuse{Xnotefontsize@#1}
+\newcommand*{\para@footsetup}[1]{{\csuse{Xbhookgroup@#1}\csuse{Xnotefontsize@#1}
\setXnoteswidthliketwocolumns@{#1}%
\dimen0=\baselineskip
\multiply\dimen0 by 1024
@@ -8924,7 +8992,8 @@
\ifcsstring{Xragged@#1}{R}{\RaggedRight}{}%
\makehboxofhboxes
\setbox0=\hbox{{\csuse{Xnotefontsize@#1}\csuse{Xtxtbeforenotes@#1}}\unhbox0 \removehboxes}%
- \csuse{Xnotefontsize@#1}
+ \csuse{Xbhookgroup@#1}%
+ \csuse{Xnotefontsize@#1}%
\unhbox0\par%
\global\hsize=\old@hsize%
}%
@@ -8960,7 +9029,8 @@
\ifcsstring{Xragged@#1}{R}{\RaggedRight}{}%
\makehboxofhboxes
\setbox0=\hbox{{\csuse{Xnotefontsize@#1}\csuse{Xtxtbeforenotes@#1}}\unhbox0 \removehboxes}%
- \csuse{Xnotefontsize@#1}
+ \csuse{Xbhookgroup@#1}%
+ \csuse{Xnotefontsize@#1}%
\unhbox0\par}}
% \end{macrocode}
@@ -9187,7 +9257,7 @@
% \protect\cs{rigidbalance} directly, without any re-boxing.
% \begin{macrocode}
\newcommand*{\threecolfootgroup}[1]{{\csuse{Xnotefontsize@#1}%
- \noindent\csuse{Xtxtbeforenotes@#1}}\par%
+ \noindent\csuse{Xtxtbeforenotes@#1}\csuse{Xbhookgroup@#1}}\par%
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname #1footins\endcsname \thr@@ \splittopskip}
@@ -9216,7 +9286,8 @@
\setXnotespositionliketwocolumns@{#1}%
\print@Xfootnoterule{#1}%
\fi%
- {\csuse{Xnotefontsize@#1}\noindent\csuse{Xtxtbeforenotes@#1}}\par
+ {\csuse{Xnotefontsize@#1}\noindent\csuse{Xtxtbeforenotes@#1}}%
+ \csuse{Xbhookgroup@#1}\par%
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname mp#1footins\endcsname \thr@@ \splittopskip}}
@@ -9297,7 +9368,7 @@
% \end{macrocode}
% \begin{macrocode}
\newcommand*{\twocolfootgroup}[1]{{\csuse{Xnotefontsize@#1}
- \noindent\csuse{Xtxtbeforenotes@#1}}\par%
+ \noindent\csuse{Xtxtbeforenotes@#1}\csuse{Xbhookgroup@#1}}\par%
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname #1footins\endcsname \tw@ \splittopskip}
@@ -9336,7 +9407,8 @@
\setXnotespositionliketwocolumns@{#1}%
\print@Xfootnoterule{#1}%
\fi%
- {\csuse{Xnotefontsize@#1}\noindent\csuse{Xtxtbeforenotes@#1}}\par
+ {\csuse{Xnotefontsize@#1}\noindent\csuse{Xtxtbeforenotes@#1}}%
+ \csuse{Xbhookgroup@#1}\par%
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname mp#1footins\endcsname \tw@ \splittopskip}}
@@ -9372,7 +9444,10 @@
% \changes{v1.4.0}{2012/11/16}{Switch the right bracket to a left bracket when the lemma is RTL (needs polyglossia or LuaTeX).}
% \begin{macrocode}
\def\endashchar{\textnormal{--}}
+
\newcommand*{\fullstop}{\textnormal{.}}
+\def\Xsublinesep@side{\fullstop}
+
\newcommand*{\rbracket}{\textnormal{%
\csuse{text\csuse{footnote@lang}}{%
\ifluatex%
@@ -9416,15 +9491,12 @@
% \changes{v1.18.0}{2015/02/23}{Code refactoring in \protect\cs{printlinefootnote}: the printing of the numbers are factorized in \protect\cs{printlinefootnotearea}}
% \begin{macrocode}
\newcommand{\printlinefootnote}[2]{%
- \def\extractline@##1|##2|##3|##4|##5|##6|##7|{##2}%
- \def\extractsubline@##1|##2|##3|##4|##5|##6|##7|{##3}%
- \def\extractendline@##1|##2|##3|##4|##5|##6|##7|{##5}%
- \def\extractendsubline@##1|##2|##3|##4|##5|##6|##7|{##6}%
+ \l@dp@rsefootspec#1|%
\iftoggle{Xnumberonlyfirstintwolines@#2}{%
- \edef\lineinfo@{\extractline@ #1| - \extractsubline@ #1| - \extractendline@ #1| - \extractendsubline@ #1|}%
+ \edef\lineinfo@{\l@dparsedstartline - \l@dparsedstartsub - \l@dparsedendline - \l@dparsedendsub}%
}%
{%
- \edef\lineinfo@{\extractline@ #1| - \extractsubline@ #1|}%
+ \edef\lineinfo@{\l@dparsedstartline - \l@dparsedstartsub}%
}%
\iftoggle{nonum@}{%Try if the line number must printed for this specific not (by default, yes)
\hspace{\csuse{Xinplaceofnumber@#2}}%
@@ -9533,7 +9605,9 @@
\csuse{Xstanzaseparator@#2}%
\fi%
}{}%
- \iftoggle{Xonlypstart@#2}{}{\printlines#1|}%
+ \iftoggle{Xonlypstart@#2}{}{%
+ \csuse{Xtxtbeforenumber@#2}%
+ \printlines#1||\ifledRcol@\@Rlineflag\fi}%
}%
% \end{macrocode}
% \end{macro}
@@ -9606,7 +9680,6 @@
% \end{macro}
%
%
-% \begin{macro}{\l@dparsefootspec}
% \begin{macro}{\l@dp@rsefootspec}
% \begin{macro}{\l@dparsedstartpage}
% \begin{macro}{\l@dparsedstartline}
@@ -9614,16 +9687,12 @@
% \begin{macro}{\l@dparsedendpage}
% \begin{macro}{\l@dparsedendline}
% \begin{macro}{\l@dparsedendsub}
-% \protect\cs{l@dparsefootspec}\marg{spec}\marg{lemma}\marg{text} parses a footnote
-% specification. \meta{lemma} and \meta{text} are the lemma and text
-% respectively. \meta{spec} is the line and page number and lemma font
-% specifier in \protect\cs{l@d@nums} style format. The real work is done
-% by \protect\cs{l@dp@rsefootspec} which defines macros holding the numeric values.
+% \changes{v2.5.0}{2015/11/13}{\protect\cs{l@dparsefootspec} deleted, not use anymore since \protect\eledmac release!}
+% \protect\cs{l@dp@rsefootspec} parses lines specification and defines macros holding the numeric values.
% Just a reminder of the arguments: \\
-% \verb?\printlines #1 | #2 | #3 | #4 | #5 | #6 | #7? \\
-% \verb?\printlines start-page | line | subline | end-page | line | subline | font ?
+% \verb?\printlines #1 | #2 | #3 | #4 | #5 | #6 | #7?\\
+% \verb?\printlines start-page | line | subline | end-page | line | subline | font?flag
% \begin{macrocode}
-\newcommand*{\l@dparsefootspec}[3]{\l@dp@rsefootspec#1|}
\def\l@dp@rsefootspec#1|#2|#3|#4|#5|#6|#7|{%
\gdef\l@dparsedstartpage{#1}%
\gdef\l@dparsedstartline{#2}%
@@ -9650,7 +9719,6 @@
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
%
%
%
@@ -9790,12 +9858,14 @@
% \end{macro}
%
% \begin{macro}{\printlines}
+% \changes{v2.5.0}{2015/11/13}{\protect\cs{printlines} takes an eighth argument: the line flag}
% So, we have decided which part of line number sets will be printed depending of these value.
% Now we are ready to print them.
% If the lineation is by pstart, we print the pstart.
% \changes{v0.15.0}{2012/06/11}{Line numbering can be reset at each pstart.}
+% Arguments are 1) start page number 2) start line number 3) start subline number 4) end page number 5) end line number 6) end subline number 7) font specification 8) side flag
% \begin{macrocode}
-\def\printlines#1|#2|#3|#4|#5|#6|#7|{%
+\def\printlines#1|#2|#3|#4|#5|#6|#7|#8|{%
\begingroup%
% \end{macrocode}
% If we use \LuaTeX, ensure we use good text's direction.
@@ -9819,9 +9889,14 @@
\ifdimequal{\csuse{Xboxstartlinenum@\@currentseries}}{0pt}%
{\bgroup}%
{\leavevmode\hbox to \csuse{Xboxstartlinenum@\@currentseries}\bgroup\hfill}%
- \ifl@d@pnum #1\fullstop\fi
- \linenumrep{#2}
- \ifl@d@ssub \fullstop \sublinenumrep{#3}\fi
+ \ifl@d@pnum #1%
+ \csuse{Xsublinesep@\@currentseries}%
+ \fi%
+ \linenumrep{#2}\iftoggle{Xlineflag@\@currentseries}{#8}{}%
+ \ifl@d@ssub%
+ \csuse{Xsublinesep@\@currentseries}%
+ \sublinenumrep{#3}%
+ \fi
\egroup%
% \end{macrocode}
% Then print the dash + end line number, or the range symbol.
@@ -9846,9 +9921,17 @@
\csuse{Xlinerangeseparator@\@currentseries}%
\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@pnum%
+ #4%
+ \csuse{Xsublinesep@\@currentseries}%
+ \fi%
+ \ifl@d@elin \linenumrep{#5}\iftoggle{Xlineflag@\@currentseries}{#8}{}\fi%
+ \ifl@d@esl%
+ \ifl@d@elin%
+ \csuse{Xsublinesep@\@currentseries}%
+ \fi%
+ \sublinenumrep{#6}%
+ \fi%
\fi%
\ifdimequal{\csuse{Xboxendlinenum@\@currentseries}}{0pt}%
{}%
@@ -9971,34 +10054,68 @@
%
% \begin{macro}{\l@dbfnote}
% \begin{macro}{\vl@dbfnote}
+% \begin{macro}{\footnote}
% \protect\cs{l@dbfnote} adds the footnote to the insert list, and
% \protect\cs{vl@dbfnote} calls the original \protect\cs{@footnotetext}.
% \changes{v0.6.0}{2004/11/23}{Changed \protect\cs{l@dbfnote} and \protect\cs{vl@dbfnote} as
% originals could give incorrect markers in the footnotes}
+% We also patch \cs{footnote} in order to get the correct footnote numbers when typesetting parallel texts.
% \changes{v1.4.1}{2012/11/16}{Compatibility of standard footnotes with \eledmac when these footnotes contain any commands.}
% \begin{macrocode}
+\patchcmd%
+ {\footnote}%
+ {\stepcounter\@mpfn}%
+ {%
+ \ifl@dpairing%
+ \global\advance\footnote@reading by \@ne%
+ \ifcsdef{footnotereading\the\footnote@reading=typeset}%
+ {\setcounter{\@mpfn}{\csuse{footnotereading\the\footnote@reading=typeset}}}%
+ {\setcounter{\@mpfn}{\footnote@reading}}%
+ \else%
+ \stepcounter\@mpfn%
+ \fi%
+ }%
+ {}
+ {}
\newcommand{\l@dbfnote}[1]{%
\ifnumberedpar@
+ \ifl@dpairing
+ \protected@xdef\thisfootnote{\the\footnote@reading}%
+ \else%
+ \protected@xdef\thisfootnote{\thefootnote}%
+ \fi%
\gdef\@tag{#1\relax}%
\ifledRcol%
- \xright@appenditem{\noexpand\vl@dbfnote{{\expandonce\@tag}}{\@thefnmark}}%
+ \xright@appenditem{\noexpand\vl@dbfnote{{\expandonce\@tag}}{\thisfootnote}}%
\to\inserts@listR
\global\advance\insert@countR \@ne%
\else%
- \xright@appenditem{\noexpand\vl@dbfnote{{\expandonce\@tag}}{\@thefnmark}}%
+ \xright@appenditem{\noexpand\vl@dbfnote{{\expandonce\@tag}}{\thisfootnote}}%
\to\inserts@list
\global\advance\insert@count \@ne%
\fi
\fi\ignorespaces}
\newcommand{\vl@dbfnote}[2]{%
- \def\@thefnmark{#2}%
- \@footnotetext{#1}%
+ \ifboolexpr{bool{l@dprintingpages} or bool{l@dprintingcolumns}}%
+ {%
+ \global\advance\footnote@typeset by \@ne%
+ \setcounter{footnote}{\footnote@typeset}%
+ \immediate\write\@mainaux{%
+ \global\csdef{footnotereading#2=typeset}{\the\footnote@typeset}%
+ }%
+ \def\@thefnmark{\the\footnote@typeset}%
+ }%
+ {%
+ \@namedef{@thefnmark}{#2}%
+ }%
+ \@footnotetext{#1}%
}%
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \subsection{Footnote formats}
%
@@ -10181,6 +10298,7 @@
% insert box to the output page without alteration.
% \begin{macrocode}
\newcommand*{\normalfootgroupX}[1]{%
+ \csuse{bhookgroupX@#1}%
\unvbox\@nameuse{footins#1}%
\hsize=\old@hsize%
}%
@@ -10210,6 +10328,7 @@
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
\fi%
+ \csuse{bhookgroupX@#1}%
\unvbox\@nameuse{mpfootins#1}}
% \end{macrocode}
@@ -10223,14 +10342,18 @@
\newcommand{\normalbfnoteX}[2]{%
\ifnumberedpar@
+ \ifl@dpairing
+ \protected@xdef\thisfootnote{\the\csname footnote#1@reading\endcsname}%
+ \else%
+ \protected@xdef\thisfootnote{\csuse{thefootnote#1}}%
+ \fi%
\ifledRcol%
\ifluatex
\footnotelang@lua[R]%
\fi
\@ifundefined{xpg@main@language}%if polyglossia
{}%
- {\footnotelang@poly[R]}%
- \protected@xdef\thisfootnote{\csuse{thefootnote#1}}%
+ {\footnotelang@poly[R]}%
\xright@appenditem{\noexpand\vbfnoteX{#1}{#2}{\expandonce\thisfootnote}}%
\to\inserts@listR
\global\advance\insert@countR \@ne%
@@ -10240,8 +10363,7 @@
\fi
\@ifundefined{xpg@main@language}%if polyglossia
{}%
- {\footnotelang@poly}%
- \protected@xdef\thisfootnote{\csuse{thefootnote#1}}%
+ {\footnotelang@poly}%
\xright@appenditem{\noexpand\vbfnoteX{#1}{#2}{\expandonce\thisfootnote}}%
\to\inserts@list
\global\advance\insert@count \@ne%
@@ -10253,10 +10375,24 @@
%
%
% \begin{macro}{\vbfnoteX}
+% This command calls the correct footnote-inserting commands.
+% It also gets the correct footnote number when typesetting parallel texts.
% \begin{macrocode}
\newcommand{\vbfnoteX}[3]{%
- \@namedef{@thefnmark#1}{#3}%
- \@nameuse{regvfootnote#1}{#1}{#2}}
+ \ifboolexpr{bool{l@dprintingpages} or bool{l@dprintingcolumns}}%
+ {%
+ \global\expandafter\advance\csname footnote#1@typeset\endcsname by \@ne%
+ \setcounter{footnote#1}{\csuse{footnote#1@typeset}}%
+ \@namedef{@thefnmark#1}{\csuse{thefootnote#1}}%
+ \immediate\write\@mainaux{%
+ \global\csdef{footnote#1reading#3=typeset}{\the\csname footnote#1@typeset\endcsname}%
+ }%
+ }%
+ {%
+ \@namedef{@thefnmark#1}{#3}%
+ }%
+ \@nameuse{regvfootnote#1}{#1}{#2}%
+}
% \end{macrocode}
% \end{macro}
@@ -10400,10 +10536,11 @@
% \begin{macro}{\mptwocolfootgroupX}
% \protect\cs{twocolfootgroupX}\marg{series}
% \begin{macrocode}
-\newcommand*{\twocolfootgroupX}[1]{{\csuse{notefontsizeX@#1}
+\newcommand*{\twocolfootgroupX}[1]{{\csuse{bhookgroupX@#1}\csuse{notefontsizeX@#1}
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname footins#1\endcsname \tw@ \splittopskip}}
+
\newcommand*{\mptwocolfootgroupX}[1]{{%
\vskip\skip\@nameuse{mpfootins#1}
\ifl@dpairing\ifparledgroup%
@@ -10423,6 +10560,7 @@
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
\fi%
+ \csuse{bhookgroupX@#1}%
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname mpfootins#1\endcsname \tw@ \splittopskip}}
@@ -10516,10 +10654,11 @@
% \begin{macro}{\mpthreecolfootgroupX}
% \protect\cs{threecolfootgroupX}\marg{series}
% \begin{macrocode}
-\newcommand*{\threecolfootgroupX}[1]{{\csuse{notefontsizeX@#1}
+\newcommand*{\threecolfootgroupX}[1]{{\csuse{bhookgroupX@#1}\csuse{notefontsizeX@#1}
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname footins#1\endcsname \thr@@ \splittopskip}}
+
\newcommand*{\mpthreecolfootgroupX}[1]{{%
\vskip\skip\@nameuse{mpfootins#1}
\ifl@dpairing\ifparledgroup
@@ -10539,6 +10678,7 @@
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
\fi%
+ \csuse{bhookgroupX@#1}%
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname mpfootins#1\endcsname \thr@@ \splittopskip}}
@@ -10587,7 +10727,7 @@
% \changes{v0.2.2}{2003/11/04}{Added \protect\cs{footfudgefiddle} to \protect\cs{para@footsetupX}}
% \changes{v1.13.0}{2014/09/16}{In \protect\cs{para@footsetupX}, use \protect\cs{columnwidth} instead of \protect\cs{hsize}}
% \begin{macrocode}
-\newcommand*{\para@footsetupX}[1]{{\csuse{notefontsizeX@#1}
+\newcommand*{\para@footsetupX}[1]{{\csuse{bhookgroupX@#1}\csuse{notefontsizeX@#1}
\setnoteswidthliketwocolumnsX@{#1}%
\dimen0=\baselineskip
\multiply\dimen0 by 1024
@@ -10703,8 +10843,10 @@
\ifcsstring{raggedX@#1}{R}{\RaggedRight}{}%
\makehboxofhboxes
\setbox0=\hbox{\unhbox0 \removehboxes}%
+ \csuse{bhookgroupX@#1}
\csuse{notefontsizeX@#1}
\unhbox0\par}
+
\newcommand*{\mppara@footgroupX}[1]{{%
\setnoteswidthliketwocolumnsX@{#1}%
\vskip\skip\@nameuse{mpfootins#1}
@@ -10731,6 +10873,7 @@
\ifcsstring{raggedX@#1}{R}{\RaggedRight}{}%
\makehboxofhboxes
\setbox0=\hbox{\unhbox0 \removehboxes}%
+ \csuse{bhookgroupX@#1}%
\csuse{notefontsizeX@#1}
\unhbox0\par}}
@@ -11074,6 +11217,7 @@
% 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}{\protect\cs{endnotes} take five arguments.}
+% \changes{v2.5.0}{2015/11/13}{\protect\cs{endnotes} take six arguments.}
% Arguments are:
% \begin{itemize}
% \item \verb+#1+ Line numbers and font selection.
@@ -11081,9 +11225,10 @@
% \item \verb+#3+ Note content.
% \item \verb+#4+ Series.
% \item \verb+#5+ Optional argument of \protect\cs{Xendnote}.
+% \item \verb+#6+ Side (L or R).
% \end{itemize}
% \begin{macrocode}
-\global\notbool{parapparatus@}{}{\long}\def\endprint#1#2#3#4#5{{%
+\global\notbool{parapparatus@}{}{\long}\def\endprint#1#2#3#4#5#6{{%
\hangindent=\csuse{Xendhangindent@#4}%
\ifXendinsertsep@%
\hskip\csuse{Xendafternote@#4}%
@@ -11100,7 +11245,9 @@
\notblank{#5}{\docsvlist{#5}}{}%
\csuse{Xendbhooknote@#4}%
\csuse{Xendnotefontsize@#4}%
+ \IfStrEq{#6}{R}{\ledRcol@true}{}%
\printlineendnote{#1}{#4}%
+ \IfStrEq{#6}{R}{\ledRcol@false}{}%
\nottoggle{Xendlemmadisablefontselection@#4}%
{\select@lemmafont#1|#2}%
{#2}%
@@ -11190,12 +11337,12 @@
\bgroup%
\csuse{Xendnotenumfont@#2}%
\ifdimequal{\csuse{Xendboxlinenum@#2}}{0pt}%
- {\printendlines#1|}%
+ {\printendlines#1||\ifledRcol@\@Rlineflag\fi}%
{\leavevmode%
\hbox to \csuse{Xendboxlinenum@#2}%
{%
\IfSubStr{RC}{\csuse{Xendboxlinenumalign@#2}}{\hfill}{}%
- \printendlines#1|%
+ \printendlines#1||\ifledRcol@\@Rlineflag\fi%
\IfSubStr{LC}{\csuse{Xendboxlinenumalign@#2}}{\hfill}{}%
}}%
\egroup%
@@ -11204,6 +11351,51 @@
}%
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\doendnotes}
+% \begin{macro}{\ifXendinsertsep@}
+% \protect\cs{doendnotes} is
+% the command you use to print one series of endnotes; it
+% takes one argument: the series letter of the note series you want
+% to print.
+% \protect\cs{Xendinsertsep@} is set to true at the first note of the series, and to false at the last one.
+% \begin{macrocode}
+\newif\ifXendinsertsep@%
+\newcommand*{\doendnotes}[1]{%
+ \l@dend@close{#1}%
+ \begingroup
+ \makeatletter
+ \expandafter\let\csname #1end\endcsname=\endprint
+ \input\jobname.#1end%
+ \global\Xendinsertsep@false%
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\doendnotesbysection}
+% \protect\cs{doendnotesbysection} is a variant of the previous macro.
+% While \protect\cs{doendnotes} print endnotes for all of numbered sections
+% \protect\cs{doendnotesbysection} print the endnotes for the first numbered section at its first call for a series, then for the second section at its second call for the same series, then for the third section at its third call for the same series, and so on.
+% \begin{macrocode}
+\newcommand*{\doendnotesbysection}[1]{%
+ \l@dend@close{#1}%
+ \global\expandafter\advance\csname #1end@bysection\endcsname by 1%
+ \begingroup%
+ \makeatletter%
+ \def\l@d@section##1{%
+ \ifnumequal{##1}{\csname #1end@bysection\endcsname}%
+ {\cslet{#1end}{\endprint}}%
+ {\cslet{#1end}{\@gobblefive}}%
+ }%
+ \input\jobname.#1end%
+ \global\Xendinsertsep@false%
+ \endgroup%
+}%
+% \end{macrocode}
+% \end{macro}
+% We close now the conditional period, which depends on \cs{ifnoend@}, because the following commands can be used by other commands than those speicific to endnotes.
+% \begin{macrocode}
+}%
+% \end{macrocode}
% \begin{macro}{\setprintendlines}
% The \protect\cs{printendlines} macro is similar to \protect\cs{printlines} but is
% for printing endnotes rather than footnotes.
@@ -11308,7 +11500,7 @@
% \changes{v0.3.0}{2004/02/14}{Added \protect\cs{linenumr@p} and \protect\cs{sublinenumr@p}
% to \protect\cs{printendlines}}
% \begin{macrocode}
-\def\printendlines#1|#2|#3|#4|#5|#6|#7|{\begingroup
+\def\printendlines#1|#2|#3|#4|#5|#6|#7|#8|{\begingroup
\setprintendlines{#1}{#2}{#3}{#4}{#5}{#6}%
% \end{macrocode}
% The only subtlety left here is when to print a period between
@@ -11323,8 +11515,22 @@
{\bgroup}%
{\leavevmode\hbox to \csuse{Xendboxstartlinenum@\@currentseries}\bgroup\hfill}%
\printnpnum{#1}%
- \linenumrep{#2}%
- \ifl@d@ssub \fullstop \sublinenumrep{#3}\fi
+ \ifl@d@dash%
+ \ifl@d@pnum%
+ \csuse{Xendlineprefixsingle@\@currentseries}%
+ \else%
+ \ifcsempty{Xendlineprefixmore@\@currentseries}%
+ {\csuse{Xendlineprefixsingle@\@currentseries}}
+ {\csuse{Xendlineprefixmore@\@currentseries}}%
+ \fi%
+ \else%
+ \csuse{Xendlineprefixsingle@\@currentseries}%
+ \fi%
+ \linenumrep{#2}\iftoggle{Xendlineflag@\@currentseries}{\ifledRcol@\@Rlineflag\fi}{}%
+ \ifl@d@ssub%
+ \csuse{Xendsublinesep@\@currentseries}%
+ \sublinenumrep{#3}%
+ \fi%
\egroup%
% \end{macrocode}
% And now, print the dash + the end line number, or the line number range symbol.
@@ -11347,8 +11553,17 @@
\fi%
\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@elin%
+ \ifl@d@pnum\csuse{Xendlineprefixsingle@\@currentseries}\fi%
+ \linenumrep{#5}%
+ \iftoggle{Xendlineflag@\@currentseries}{\ifledRcol@\@Rlineflag\fi}{}%
+ \fi%
+ \ifl@d@esl%
+ \ifl@d@elin%
+ \csuse{Xendsublinesep@\@currentseries}%
+ \fi%
+ \sublinenumrep{#6}%
+ \fi%
\fi%
\ifdimequal{\csuse{Xendboxendlinenum@\@currentseries}}{0pt}%
{}%
@@ -11361,59 +11576,14 @@
% \end{macro}
%
% \begin{macro}{\printnpnum}
-% A macro to print a page number in an endnote.
+% A macro to print a page number in an endnote. Should not be override anymore
% \begin{macrocode}
-\newcommand*{\printnpnum}[1]{p.#1) }
+\newcommand*{\printnpnum}[1]{\csuse{Xendbeforepagenumber@\@currentseries}#1\csuse{Xendafterpagenumber@\@currentseries}}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\doendnotes}
-% \begin{macro}{\ifXendinsertsep@}
-% \protect\cs{doendnotes} is
-% the command you use to print one series of endnotes; it
-% takes one argument: the series letter of the note series you want
-% to print.
-% \protect\cs{Xendinsertsep@} is set to true at the first note of the series, and to false at the last one.
-% \begin{macrocode}
-\newif\ifXendinsertsep@%
-\newcommand*{\doendnotes}[1]{%
- \l@dend@close{#1}%
- \begingroup
- \makeatletter
- \expandafter\let\csname #1end\endcsname=\endprint
- \input\jobname.#1end%
- \global\Xendinsertsep@false%
- \endgroup}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\doendnotesbysection}
-% \protect\cs{doendnotesbysection} is a variant of the previous macro.
-% While \protect\cs{doendnotes} print endnotes for all of numbered sections
-% \protect\cs{doendnotesbysection} print the endnotes for the first numbered section at its first call for a series, then for the second section at its second call for the same series, then for the third section at its third call for the same series, and so on.
-% \begin{macrocode}
-\newcommand*{\doendnotesbysection}[1]{%
- \l@dend@close{#1}%
- \global\expandafter\advance\csname #1end@bysection\endcsname by 1%
- \begingroup%
- \makeatletter%
- \def\l@d@section##1{%
- \ifnumequal{##1}{\csname #1end@bysection\endcsname}%
- {\cslet{#1end}{\endprint}}%
- {\cslet{#1end}{\@gobblefive}}%
- }%
- \input\jobname.#1end%
- \global\Xendinsertsep@false%
- \endgroup%
-}%
-% \end{macrocode}
-% \end{macro}
-% End of section for end notes
-% \begin{macrocode}
-}%
-% \end{macrocode}
% \section{Generate series of notes}%
% In this section, X means the name of the series (A, B etc.)
% \begin{macro}{\series}
@@ -11456,6 +11626,7 @@
% \end{macrocode}
% \subsubsection{Options}
% \begin{macrocode}
+ \newtoggle{Xlineflag@#1}
\newtoggle{Xparindent@#1}
\newtoggle{Xlemmadisablefontselection@#1}
\csgdef{Xhangindent@#1}{0pt}%
@@ -11466,6 +11637,7 @@
\csgdef{Xnotenumfont@#1}{\normalfont}%
\csgdef{Xnotefontsize@#1}{\footnotesize}%
\csgdef{Xbhooknote@#1}{}%
+ \csgdef{Xbhookgroup@#1}{}%
\csgdef{Xboxlinenum@#1}{0pt}%
\csgdef{Xboxlinenumalign@#1}{L}%
@@ -11478,6 +11650,7 @@
\newtoggle{Xnumberonlyfirstintwolines@#1}%
\csgdef{Xtwolines@#1}{}%
\csgdef{Xmorethantwolines@#1}{}%
+ \csgdef{Xsublinesep@#1}{\fullstop}%
\newtoggle{Xtwolinesbutnotmore@#1}%
\newtoggle{Xtwolinesonlyinsamepage@#1}%
\newtoggle{Xonlypstart@#1}%
@@ -11488,6 +11661,7 @@
\csgdef{Xsymlinenum@#1}{}%
\newtoggle{Xnonumber@#1}%
\csgdef{Xbeforenumber@#1}{0pt}%
+ \csgdef{Xtxtbeforenumber@#1}{}%
\csgdef{Xafternumber@#1}{0.5em}%
\newtoggle{Xnonbreakableafternumber@#1}%
\csgdef{Xbeforesymlinenum@#1}{\csuse{Xbeforenumber@#1}}%
@@ -11533,12 +11707,14 @@
{\footnotelang@poly[R]}%
\footnoteoptions@{R}{##1}{true}%
\xright@appenditem{%
+ \noexpand\Xnote@true%
\noexpand\prepare@preXnotes{#1}%
\noexpand\prepare@edindex@fornote{\l@d@nums}%
\unexpanded{\def\sw@list@inedtext}{\expandafter\unexpanded\expandafter{\sw@inthisedtext}}%The value of the \sw@inthisedtext of current \edtext will be pushed to \sw@list@inedtext when the notes are expanded.
\noexpand\setcounter{stanzaR}{\the\c@stanzaR}%Save stanzaR counter for footnote
\noexpand\csuse{v#1footnote}{#1}%
{{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}%
+ \noexpand\Xnote@false%
}\to\inserts@listR
\footnoteoptions@{R}{##1}{false}%
\global\advance\insert@countR \@ne%
@@ -11551,6 +11727,7 @@
{\footnotelang@poly}%
\footnoteoptions@{L}{##1}{true}%
\xright@appenditem{%
+ \noexpand\Xnote@true%
\noexpand\prepare@preXnotes{#1}%
\noexpand\prepare@edindex@fornote{\l@d@nums}%
\unexpanded{\def\sw@list@inedtext}{\expandafter\unexpanded\expandafter{\sw@inthisedtext}}%The value of the \sw@inthisedtext of current edtext will be pushed to \sw@list@inedtext when the notes are expanded.
@@ -11559,6 +11736,7 @@
\fi%
\noexpand\csuse{v#1footnote}{#1}%
{{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}%
+ \noexpand\Xnote@false%
}\to\inserts@list
\global\advance\insert@count \@ne%
\footnoteoptions@{L}{##1}{false}%
@@ -11602,6 +11780,7 @@
\csgdef{notenumfontX@#1}{\normalfont}%
\csgdef{notefontsizeX@#1}{\footnotesize}%
\csgdef{bhooknoteX@#1}{}%
+ \csgdef{bhookgroupX@#1}{}%
\csgdef{afterruleX@#1}{0pt}
\csgdef{beforenotesX@#1}{1.2em \@plus .6em \@minus .6em}
\csgdef{maxhnotesX@#1}{0.8\vsize}%
@@ -11626,7 +11805,21 @@
\begingroup%
\prepare@prenotesX{#1}%
\newcommand{\content}{##1}%
- \stepcounter{footnote#1}%
+% \end{macrocode}
+% If we are preparing parallel typesetting, we cannot just increase the footnote counter.
+% Read \parpackage's handbook about that (\reff{reledpar-familiarfootnotenumber}).
+% \begin{macrocode}
+ \ifl@dpairing%
+ \global\expandafter\advance\csname footnote#1@reading\endcsname by \@ne
+ \ifcsdef{footnote#1reading\the\csname footnote#1@reading\endcsname=typeset}%
+ {\setcounter{footnote#1}{\csuse{footnote#1reading\the\csname footnote#1@reading\endcsname=typeset}}}%
+ {\setcounter{footnote#1}{\the\csname footnote#1@reading\endcsname}}%
+ \else%
+ \stepcounter{footnote#1}%
+ \fi%
+% \end{macrocode}
+% And now, the feature not depending of wether we are preparing parallel typesetting
+% \begin{macrocode}
\protected@csxdef{@thefnmark#1}{\csuse{thefootnote#1}}%
\nottoggle{nomk@}%Nomk is set to true when using \footnoteXnomk with \parpackage
{\csuse{@footnotemark#1}}%
@@ -11646,8 +11839,8 @@
% \end{macrocode}
% Do not forget to initialize series
% \begin{macrocode}
- \arrangementX@normal{#1}%
- \fi
+ \arrangementX@normal{#1}%
+ \fi
% \end{macrocode}
% \subsection{The endnotes}
% \changes{v2.0.0}{2015/07/19}{One endnotes file by series.}
@@ -11695,6 +11888,7 @@
{\expandonce\content}%
{#1}%
{\unexpanded{##1}}%
+ {\ifledRcol R\else L\fi}
\@percentchar%
}%
\egroup%
@@ -11727,6 +11921,8 @@
\csgdef{Xendnotefontsize@#1}{\footnotesize}%
\csgdef{Xendbhooknote@#1}{}%
+ \csgdef{Xendsublinesep@#1}{\fullstop}%
+
\csgdef{Xendbeforenumber@#1}{0pt}
\csgdef{Xendafternumber@#1}{0.5em}
@@ -11763,6 +11959,13 @@
\csgdef{Xendehookinplaceofnumber@#1}{}%
\csgdef{Xendlinerangeseparator@#1}{\endashchar}%
+
+ \csgdef{Xendbeforepagenumber@#1}{p.}%
+ \csgdef{Xendafterpagenumber@#1}{) }%
+ \csgdef{Xendlineprefixsingle@#1}{}%
+ \csgdef{Xendlineprefixmore@#1}{}%
+
+ \newtoggle{Xendlineflag@#1}
% \end{macrocode}
% End of endnotes declaration
% \begin{macrocode}
@@ -12004,9 +12207,11 @@
\newhookcommand@series{Xcolalign}%
\newhookcommand@series{Xnotenumfont}
\newhookcommand@series{Xbhooknote}
+ \newhookcommand@series@reload{Xbhookgroup}{critical}
\newhookcommand@series{Xboxsymlinenum}%
\newhookcommand@series{Xsymlinenum}
\newhookcommand@series{Xbeforenumber}
+ \newhookcommand@series{Xtxtbeforenumber}
\newhookcommand@series{Xafternumber}
\newhookcommand@series{Xbeforesymlinenum}
\newhookcommand@series{Xaftersymlinenum}
@@ -12032,8 +12237,8 @@
\newhookcommand@series@reload{Xmaxhnotes}{critical}
\newhookcommand@series@reload{Xbeforenotes}{critical}
\newhooktoggle@series@reload{Xnoteswidthliketwocolumns}{critical}%
- \newhookcommand@series{Xnotefontsize}
-
+ \newhookcommand@series@reload{Xnotefontsize}{critical}
+
\newhookcommand@series{Xboxlinenum}%
\newhookcommand@series{Xboxlinenumalign}%
@@ -12045,11 +12250,13 @@
\fi
-\newhookcommand@series{Xtwolines}[appref]
-\newhookcommand@series{Xmorethantwolines}[appref]
-\newhooktoggle@series{Xtwolinesbutnotmore}[appref]
-\newhooktoggle@series{Xtwolinesonlyinsamepage}[appref]
-\newhookcommand@series{Xlinerangeseparator}[appref]
+\newhooktoggle@series{Xlineflag}[appref,SEref]
+\newhookcommand@series{Xtwolines}[appref,SEref]
+\newhookcommand@series{Xmorethantwolines}[appref,SEref]
+\newhookcommand@series{Xsublinesep}[appref,SEref,side]
+\newhooktoggle@series{Xtwolinesbutnotmore}[appref,SEref]
+\newhooktoggle@series{Xtwolinesonlyinsamepage}[appref,SEref]
+\newhookcommand@series{Xlinerangeseparator}[appref,SEref]
% \end{macrocode}
% \subsubsection{Options for familiar notes}
% Before generating the optional commands for familiar notes, we check the \protect\cs{nofamiliar} option.
@@ -12063,11 +12270,12 @@
\newhookcommand@series{colalignX}%
\newhookcommand@series{notenumfontX}
\newhookcommand@series{bhooknoteX}
+ \newhookcommand@series@reload{bhookgroupX}{familiar}
\newhookcommand@series@reload{beforenotesX}{familiar}
\newhookcommand@series@reload{maxhnotesX}{familiar}
\newhooktoggle@series@reload{noteswidthliketwocolumnsX}{familiar}%
\newhookcommand@series@reload{afterruleX}{familiar}
- \newhookcommand@series{notefontsizeX}
+ \newhookcommand@series@reload{notefontsizeX}{familiar}
\newhookcommand@series{afternoteX}
\newhookcommand@series{parafootsepX}
\fi
@@ -12117,12 +12325,20 @@
\newhookcommand@series{Xendhangindent}%
+
\fi
-\newhookcommand@series{Xendtwolines}[apprefwithpage]
-\newhookcommand@series{Xendmorethantwolines}[apprefwithpage]
-\newhooktoggle@series{Xendtwolinesbutnotmore}[apprefwithpage]
-\newhooktoggle@series{Xendtwolinesonlyinsamepage}[apprefwithpage]
-\newhookcommand@series{Xendlinerangeseparator}[apprefwithpage]
+\newhooktoggle@series{Xendlineflag}[apprefwithpage,SErefwithpage]
+\newhookcommand@series{Xendtwolines}[apprefwithpage,SErefwithpage]
+\newhookcommand@series{Xendmorethantwolines}[apprefwithpage,SErefwithpage]
+\newhooktoggle@series{Xendtwolinesbutnotmore}[apprefwithpage,SErefwithpage]
+\newhooktoggle@series{Xendtwolinesonlyinsamepage}[apprefwithpage,SErefwithpage]
+\newhookcommand@series{Xendlinerangeseparator}[apprefwithpage,SErefwithpage]
+\newhookcommand@series{Xendbeforepagenumber}[apprefwithpage,SErefwithpage,SErefonlypage]
+\newhookcommand@series{Xendafterpagenumber}[apprefwithpage,SErefwithpagem,SErefonlypage]
+\newhookcommand@series{Xendlineprefixsingle}[apprefwithpage,SErefwithpage]
+\newhookcommand@series{Xendlineprefixmore}[apprefwithpage,SErefwithpage]
+\newhookcommand@series{Xendsublinesep}[apprefwithpage,SErefwithpage]
+
% \end{macrocode}
% \subsection{Hooks for a particular footnote}
% \begin{macro}{\newhooktoggle@specific}
@@ -12546,45 +12762,57 @@
% \changes{v0.2.1}{2003/08/26}{Tweaked \protect\cs{edlabel} to get correct page numbers}
% \changes{v0.14.0}{2012/04/04}{Tweaked \protect\cs{edlabel} to get correct line number if the command is first element of a paragraph.}
% \changes{v1.18.0}{2015/02/23}{\protect\cs{edlabel} is now defined only one time for both \eledmac and \eledpar}
-
+% \changes{v2.5.0}{2015/11/13}{Fix bug when calling\protect\cs{edlabel} in a footnotes of the rightside}
% \begin{macrocode}
\newcommand*{\edlabel}[1]{%
\ifl@dpairing\ifautopar%
\strut%
\fi\fi%
\@bsphack%
- \ifledRcol%
- \write\linenum@outR{\string\@lab}%
- \ifx\labelref@listR\empty%
- \xdef\label@refs{\zz@@@}%
+ \ifboolexpr{bool{ledRcol} or bool{ledRcol@}}{%
+ \ifXnote@%
+ \protected@write\@auxout{}%
+ {\string\l@dmake@labelsR\space\thepage|\l@dparsedstartline|\l@dparsedstartsub|\the\c@pstartR|{#1}}%
+ \ifdef{\hypertarget}{\Hy@raisedlink{\hypertarget{#1}{}}}{}%
\else%
- \gl@p\labelref@listR\to\label@refs%
- \fi%
- \ifvmode%
- \advancelabel@refs%
- \fi%
+ \write\linenum@outR{\string\@lab}%
+ \ifx\labelref@listR\empty%
+ \xdef\label@refs{\zz@@@}%
+ \else%
+ \gl@p\labelref@listR\to\label@refs%
+ \fi%
+ \ifvmode%
+ \advancelabel@refs%
+ \fi%
% \end{macrocode}
% Use code from the kernel \protect\cs{label} command to write the correct
% page number.
% Also define an hypertarget if \protect\package{hyperref} package is loaded.
% \begin{macrocode}
- \protected@write\@auxout{}%
- {\string\l@dmake@labelsR\space\thepage|\label@refs|\the\c@pstartR|{#1}}%
- \ifdef{\hypertarget}{\Hy@raisedlink{\hypertarget{#1}{}}}{}%
- \else%
- \write\linenum@out{\string\@lab}%
- \ifx\labelref@list\empty%
- \xdef\label@refs{\zz@@@}%
- \else%
- \gl@p\labelref@list\to\label@refs%
+ \protected@write\@auxout{}%
+ {\string\l@dmake@labelsR\space\thepage|\label@refs|\the\c@pstartR|{#1}}%
+ \ifdef{\hypertarget}{\Hy@raisedlink{\hypertarget{#1}{}}}{}%
\fi%
- \ifvmode%
- \advancelabel@refs%
+ }{%
+ \ifXnote@%
+ \protected@write\@auxout{}%
+ {\string\l@dmake@labels\space\thepage|\l@dparsedstartline|\l@dparsedstartsub|\the\c@pstart|{#1}}%
+ \ifdef{\hypertarget}{\Hy@raisedlink{\hypertarget{#1}{}}}{}%
+ \else%
+ \write\linenum@out{\string\@lab}%
+ \ifx\labelref@list\empty%
+ \xdef\label@refs{\zz@@@}%
+ \else%
+ \gl@p\labelref@list\to\label@refs%
+ \fi%
+ \ifvmode%
+ \advancelabel@refs%
+ \fi%
+ \protected@write\@auxout{}%
+ {\string\l@dmake@labels\space\thepage|\label@refs|\the\c@pstart|{#1}}%
+ \ifdef{\hypertarget}{\Hy@raisedlink{\hypertarget{#1}{}}}{}%
\fi%
- \protected@write\@auxout{}%
- {\string\l@dmake@labels\space\thepage|\label@refs|\the\c@pstart|{#1}}%
- \ifdef{\hypertarget}{\Hy@raisedlink{\hypertarget{#1}{}}}{}%
- \fi%
+ }%
\@esphack}%
% \end{macrocode}
@@ -12636,7 +12864,7 @@
\expandafter\ifx\csname the@label#5\endcsname \relax\else
\led@warn@DuplicateLabel{#5}%
\fi
- \expandafter\gdef\csname the@label#5\endcsname{#1|#2|#3|#4}%
+ \expandafter\gdef\csname the@label#5\endcsname{#1|#2|#3|#4|\relax}%
\ignorespaces}
% \end{macrocode}
@@ -12737,6 +12965,24 @@
}%
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\edlabelS}
+% \begin{macro}{\edlabelE}
+% \begin{macro}{\edlabelSE}
+% \cs{edlabelS} and \cs{edlabelE} are just used to mark the beginning and the end of a passage.
+% \begin{macrocode}
+\newcommand{\edlabelS}[1]{%
+ \edlabel{#1:start}%
+}
+\newcommand{\edlabelE}[1]{%
+ \edlabel{#1:end}%
+}
+\newcommand{\edlabelSE}[1]{%
+ \edlabelS{#1}%
+ \edlabelE{#1}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% \begin{macro}{\wrap@edcrossref}
% \changes{v1.12.1}{2014/08/06}{Fix spurious spaces.}
% \changes{v1.12.7}{2014/09/07}{\protect\cs{wrap@edcrossref} is now robust}
@@ -12774,12 +13020,13 @@
% \end{macro}
%
% \begin{macro}{\edlineref}
+% \begin{macro}{\xlineref}
% \changes{v1.16.1}{2015/02/05}{\protect\cs{lineref} is not defined if defined by some other package, like lineno.
% \Eledmac provides \protect\cs{edlineref} instead.}
-% \begin{macro}{\xlineref}
+% \changes{v2.5.0}{2015/11/13}{\protect\cs{xlineref} does not include anymore the side flag. Use \protect\cs{xflagref} to get it. Not that \protect\cs{edlineref} still contains the flag.}
% If the specified label exists, \protect\cs{lineref} gives its line number.
% \begin{macrocode}
-\newcommand*{\edlineref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{2}{#1}}}%
+\newcommand*{\edlineref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{2}{#1}\xflagref{#1}}}%
\newcommand*{\xlineref}[1]{\l@dgetref@num{2}{#1}}%
% \end{macrocode}
@@ -12807,6 +13054,12 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \begin{macro}{\xflagref}
+% \cs{xflagref} finds the side flag of any ref defined with \cs{edlabel}.
+% \begin{macrocode}
+\newcommand*{\xflagref}[1]{\l@dgetref@num{5}{#1}}
+% \end{macrocode}
+% \end{macro}
% The next three macros are used by the referencing commands above,
% and do the job of extracting the right numbers from the label
% macro that contains the page, line, and sub-line number.
@@ -12828,7 +13081,7 @@
% \begin{macro}{\l@dgetref@num}
% Next, \protect\cs{l@dgetref@num} fetches the number we want. It has two
% arguments: the first is simply a digit, specifying whether to
-% fetch a page (1), line (2), sub-line (3) or (4) pstart number. (This
+% fetch a page (1), line (2), sub-line (3), (4) pstart number or (5) side flag. (This
% switching is done by calling \protect\cs{l@dlabel@parse}.) The second argument
% is the label-macro, which because of the \protect\cs{@lab} macro above is
% defined to be a string of the type \verb"123|456|789".
@@ -12853,17 +13106,18 @@
% which extracts the appropriate number from its first arguments.
% The \verb"|"-delimited arguments consist of the expanded label-macro
% (three reference numbers), followed by the switch-number (1,
-% 2, 3 or 4) which defines which of the earlier three numbers to
+% 2, 3 or 4) which defines which of the earlier fiver numbers to
% pick out. (It was earlier given as the first argument of
% \protect\cs{l@dgetref@num}.)
% \begin{macrocode}
\newcommand*{\l@dlabel@parse}{}
-\def\l@dlabel@parse#1|#2|#3|#4|#5{%
- \ifcase #5%
+\def\l@dlabel@parse#1|#2|#3|#4|#5|#6{%
+ \ifcase #6%
\or #1%
\or #2%
\or #3%
\or #4%
+ \or #5%
\fi}
% \end{macrocode}
% \end{macro}
@@ -12896,13 +13150,8 @@
\else%
\expandafter\def\csname the@@label#2\endcsname{\l@dgetref@num{1}{#2}|\l@dgetref@num{2}{#2}|\l@dgetref@num{3}{#2}}%
\fi%
- \ifdefined\@Rlineflag%
- \StrDel{\csuse{the@@label#1}}{\@Rlineflag}[\@tempa]%
- \StrDel{\csuse{the@@label#2}}{\@Rlineflag}[\@tempb]%
- \else%
\letcs{\@tempa}{the@@label#1}%
\letcs{\@tempb}{the@@label#2}%
- \fi%
\linenum{\@tempa|%
\@tempb}}}%
@@ -12911,87 +13160,208 @@
%
% \begin{macro}{\appref}
% \begin{macro}{\apprefwithpage}
-% \begin{macro}{\@apprefprefixsingle}
-% \begin{macro}{\@apprefprefixmore}
-% \begin{macro}{\setapprefprefixsingle}
-% \begin{macro}{\setapprefprefixmore}
-% \protect\cs{appref} prints a crossref to some lines of the apparatus defined by \protect\cs{applabel}.
-% It prints the lines as they should be printed in the apparatus.
+% \begin{macro}{\SEref}
+% \begin{macro}{\SErefwithpage}
+% \begin{macro}{\SErefwithpage}
+% \protect\cs{appref}, \cs{SEref}, \cs{apprefwithpage}, \cs{SErefwithpage} and \cs{SEonlypage} print crossref to some start / end lines defined by specific commands.
+% It prints the lines as they should be printed in the apparatus (critical notes for not suffixed versions, endnotes for suffixed versions).
%
-% If \protect\cs{@apprefprefixsingle} is not empty, it prints it before the line number.
-% If \protect\cs{@apprefprefixmore} is not empty, it prints it before the line numbers when the first line is not the same as the last line.
-% \protect\cs{apprefwithpage} prints a crossref to some lines of the apparatus defined by \protect\cs{applabel}.
-% It always prints the page number, as it should be printed in the end notes.
-% The \protect\cs{Xtwolinesappref} and \protect\cs{Xmorethantwolinesappref} are similar to the footnote
-% hooks and \protect\cs{Xtwolines} \protect\cs{Xmorethantwolines}.
-%
-% So, first declare the default value of the hooks for the pseudo-series appref.
+% Here we define hooks similar to some those related to critical footnotes or endnotes.
+%
+% So, first declare the default value of the hooks for the pseudo-series.
% Also declare the internal toggle which are switch by \macpackage{}.
% \begin{macrocode}
\def\Xtwolines@appref{}%
+\def\Xtwolines@SEref{}%
+
\def\Xmorethantwolines@appref{}%
+\def\Xmorethantwolines@SEref{}%
+
\def\Xlinerangeseparator@appref{\endashchar}%
+\def\Xlinerangeseparator@SEref{\endashchar}%
+
+\def\Xsublinesep@appref{\fullstop}%
+\def\Xsublinesep@SEref{\fullstop}%
+
\newtoggle{Xtwolinesbutnotmore@appref}%
+\newtoggle{Xtwolinesbutnotmore@SEref}%
+
\newtoggle{Xtwolinesonlyinsamepage@appref}%
+\newtoggle{Xtwolinesonlyinsamepage@SEref}%
+
+\newtoggle{Xlineflag@appref}%
+\toggletrue{Xlineflag@appref}%Here exception
+\newtoggle{Xlineflag@SEref}%
+\toggletrue{Xlineflag@SEref}%%Here exception
+
\def\Xendtwolines@apprefwithpage{}%
+\def\Xendtwolines@SEwithpage{}%
+
\def\Xendmorethantwolines@apprefwithpage{}%
-\def\Xendlinerangeseparator@apprefwithpage{\endashchar}%
+\def\Xendmorethantwolines@SErefwithpage{}%
+
+\def\Xendlinerangeseparator@apprefwithpage{\endashchar}
+\def\Xendlinerangeseparator@SErefwithpage{\endashchar}
+
+\def\Xendbeforepagenumber@apprefwithpage{p.}%
+\def\Xendbeforepagenumber@SErefwithpage{p.}%
+\def\Xendbeforepagenumber@SEonlypage{p.}%
+
+\def\Xendafterpagenumber@apprefwithpage{) }%
+\def\Xendafterpagenumber@SErefwithpage{) }%
+\def\Xendafterpagenumber@SErefonlypage{) }%
+
+\def\Xendlineprefixsingle@apprefwithpage{}%
+\def\Xendlineprefixsingle@SErefwithpage{}%
+
+\def\Xendlineprefixmore@apprefwithpage{}%
+\def\Xendlineprefixmore@SErefwithpage{}%
+
\newtoggle{Xendtwolinesbutnotmore@apprefwithpage}%
+\newtoggle{Xendtwolinesbutnotmore@SErefwithpage}%
+
+\def\Xendsublinesep@apprefwithpage{\fullstop}%
+\def\Xendsublinesep@SErefwithpage{\fullstop}%
+
\newtoggle{Xendtwolinesonlyinsamepage@apprefwithpage}%
+\newtoggle{Xendtwolinesonlyinsamepage@SErefwithpage}%
+
+\newtoggle{Xendlineflag@apprefwithpage}
+\toggletrue{Xendlineflag@apprefwithpage}%Here, exception
+\newtoggle{Xendlineflag@SErefwithpage}
+\toggletrue{Xendlineflag@SErefwithpage}%Here, exception
% \end{macrocode}
% Note that some of these hooks are declared but no user command can change their values. Such hooks are not pertinent for \verb+appref+ and \verb+apprefwithpage+ pseudo-series, but their values are nonetheless tested in some macros.
% \begin{macrocode}
\xdef\Xboxstartlinenum@appref{0pt}
+\xdef\Xboxstartlinenum@SEref{0pt}
+
\xdef\Xboxendlinenum@appref{0pt}
+\xdef\Xboxendlinenum@SEref{0pt}
\xdef\Xendboxstartlinenum@apprefwithpage{0pt}
+\xdef\Xendboxstartlinenum@SErefwithpage{0pt}
+
\xdef\Xendboxendlinenum@apprefwithpage{0pt}
+\xdef\Xendboxendlinenum@SErefwithpage{0pt}
% \end{macrocode}
-% Now, declare the default value of \protect\cs{@apprefprefixsingle} and \protect\cs{@apprefprefixmore}, and the commands which defines them
+% Now, declare the default value of \protect\cs{@apprefprefixsingle} and \protect\cs{@apprefprefixmore}, \cs{@SErefprefix}, \cs{@SErefprefixmore} and the commands which defines them.
+% \changes{v2.5.0}{2015/11/13}{Debug \protect\cs{setapprefprefixsingle}}
% \begin{macrocode}
\newcommand\@apprefprefixsingle{}%
+\newcommand\@SErefprefixsingle{}%
+
\newcommand\@apprefprefixmore{}%
+\newcommand\@SErefprefixmore{}%
-\newcommand{\apprefprefixsingle}[1]{%
+\newcommand{\setapprefprefixsingle}[1]{%
\gdef\@apprefprefixsingle{#1}%
}
+\newcommand{\setSErefprefixsingle}[1]{%
+ \gdef\@SErefprefixsingle{#1}%
+}
\newcommand{\setapprefprefixmore}[1]{%
\gdef\@apprefprefixmore{#1}%
}
+\newcommand{\setSErefprefixmore}[1]{%
+ \gdef\@SErefprefixmore{#1}%
+}
% \end{macrocode}
-% And now, the main commands: \protect\cs{appref} and \protect\cs{apprefwithpage}.
-% These commands call \protect\cs{printlines} and \protect\cs{printendlines}. That is why we have previously declared all hooks values tested inside these last commands.
+% \changes{v1.23.0}{2015/05/18}{Debug \protect\cs{Xendtwolines}, \protect\cs{Xendmorethantwolines}, \protect\cs{Xendtwolinesbutnotmore} and \protect\cs{Xendtwolinesonlyinsamepage} when using \protect\cs{apprefwithpage}.}
+% And now, the main commands: \protect\cs{appref}, \protect\cs{apprefwithpage}, \cs{SEref} and \cs{SErefwithpage}.
+% These commands call \cs{refformated@} and \protect\cs{refformatedwithpage}, which calls \cs{printlines} and \cs{printendlines} . That is why we have previously declared all hooks values tested inside these last commands.
% \begin{macrocode}
-\newcommandx{\appref}[2][1,usedefault]{%
- \IfStrEq{#1}{fulllines}%
- {\toggletrue{fulllines@}}%
- {}%
- \xdef\@currentseries{appref}%
- \ifdefempty{\@apprefprefixmore}%
+
+\newcommandx{\appref}[2][1,usedefault]{\refformated@{#1}{#2}{appref}}
+\newcommandx{\SEref}[2][1,usedefault]{\refformated@{#1}{#2}{SEref}}
+
+\newcommandx{\apprefwithpage}[2][1,usedefault]{\refformatedwithpage@{#1}{#2}{appref}}
+\newcommandx{\SErefwithpage}[2][1,usedefault]{\refformatedwithpage@{#1}{#2}{SEref}}
+\newcommandx{\SErefonlypage}[2][1,usedefault]{\refformatedonlypage@{#1}{#2}{SEref}}
+
+
+\newcommand{\refformated@}[3]{%
+ \def\do##1{%
+ \setkeys[mac]{truefootnoteoption}{##1}%
+ }%
+ \notblank{#1}{\docsvlist{#1}}{}%
+ \xdef\@currentseries{#3}%
+ \ifcsempty{@#3prefixmore}%
{\@apprefprefixsingle}%
{%
\IfEq{\xlineref{#2:start}}{\xlineref{#2:end}}%
- {\@apprefprefixsingle}%
- {\@apprefprefixmore}%
+ {\csuse{@#3prefixsingle}}%
+ {\csuse{@#3prefixmore}}%
}%
- \printlines\xpageref{#2:start}|\xlineref{#2:start}|\xsublineref{#2:start}|\xpageref{#2:end}|\xlineref{#2:end}|\xsublineref{#2:end}||%
- \togglefalse{fulllines@}%
+ \ifboolexpr{%
+ test{\ifcsundef{the@label#2:start}}%
+ or test{\ifcsundef{the@label#2:end}}%
+ }%
+ {\led@warn@pairRefUndefined{#2}\nfss@text{\reset@font\bfseries ??}}%
+ {\printlines\xpageref{#2:start}|\xlineref{#2:start}|\xsublineref{#2:start}|\xpageref{#2:end}|\xlineref{#2:end}|\xsublineref{#2:end}|\relax|\xflagref{#2:start}|}%
+ \def\do##1{%
+ \setkeys[mac]{falsefootnoteoption}{##1}%
+ }%
+ \notblank{#1}{\docsvlist{#1}}{}%
}%
-% \changes{v1.23.0}{2015/05/18}{Debug \protect\cs{Xendtwolines}, \protect\cs{Xendmorethantwolines}, \protect\cs{Xendtwolinesbutnotmore} and \protect\cs{Xendtwolinesonlyinsamepage} when using \protect\cs{apprefwithpage}.}
-\newcommandx{\apprefwithpage}[2][1,usedefault]{%
- \IfStrEq{#1}{fulllines}%
- {\toggletrue{fulllines@}}%
- {}%
- \xdef\@currentseries{apprefwithpage}%
- \printendlines\xpageref{#2:start}|\xlineref{#2:start}|\xsublineref{#2:start}|\xpageref{#2:end}|\xlineref{#2:end}|\xsublineref{#2:end}||%
- \togglefalse{fulllines@}%
+\newcommand{\refformatedwithpage@}[3]{%
+ \def\do##1{%
+ \setkeys[mac]{truefootnoteoption}{##1}%
+ }%
+ \notblank{#1}{\docsvlist{#1}}{}%
+ \xdef\@currentseries{#3withpage}%
+ \ifboolexpr{%
+ test{\ifcsundef{the@label#2:start}}%
+ or test{\ifcsundef{the@label#2:end}}%
+ }%
+ {\led@warn@pairRefUndefined{#2}\nfss@text{\reset@font\bfseries ??}}%
+ {\printendlines\xpageref{#2:start}|\xlineref{#2:start}|\xsublineref{#2:start}|\xpageref{#2:end}|\xlineref{#2:end}|\xsublineref{#2:end}|\relax|\xflagref{#2:start}|}%
+ \def\do##1{%
+ \setkeys[mac]{falsefootnoteoption}{##1}%
+ }%
+ \notblank{#1}{\docsvlist{#1}}{}%
+}%
+
+\newcommand{\refformatedonlypage@}[3]{%
+ \def\do##1{%
+ \setkeys[mac]{truefootnoteoption}{##1}%
+ }%
+ \notblank{#1}{\docsvlist{#1}}{}%
+ \xdef\@currentseries{#3onlypage}%
+ \ifboolexpr{%
+ test{\ifcsundef{the@label#2:start}}%
+ or test{\ifcsundef{the@label#2:end}}%
+ }%
+ {\led@warn@pairRefUndefined{#2}\nfss@text{\reset@font\bfseries ??}}%
+ {\ifnum\xpageref{#2:start}=\xpageref{#2:end}%
+ \printnpnum{\xpageref{#2:start}}
+ \else%
+ \ifdefined\linerangesep@%
+ \printnpnum{%
+ \xpageref{#2:start}%
+ \linerangesep@%
+ \xpageref{#2:end}%
+ }%
+ \else%
+ \printnpnum{%
+ \xpageref{#2:start}%
+ \csuse{Xendlinerangeseparator@\@currentseries}%
+ \xpageref{#2:end}%
+ }%
+ \fi%
+ \fi%
+ }%
+ \def\do##1{%
+ \setkeys[mac]{falsefootnoteoption}{##1}%
+ }%
+ \notblank{#1}{\docsvlist{#1}}{}%
}%
% \end{macrocode}
% \end{macro}
@@ -13877,8 +14247,6 @@
% Write the index information to the \file{idx} file.
% \begin{macrocode}
\newcommandx{\@wredindex}[2][1=\expandonce\jobname,usedefault]{%#1 = the index name, #2 = the text
- \global\let\old@Rlineflag\@Rlineflag%
- \gdef\@Rlineflag{}%
\ifl@imakeidx%
\if@edindex@fornote@%
\IfSubStr[1]{#2}{|}{\get@index@command#2+}{\get@index@command#2|+}%
@@ -13906,7 +14274,6 @@
\fi%
\fi%
\endgroup
- \global\let\@Rlineflag\old@Rlineflag%
\@esphack%
}
% \end{macrocode}
@@ -14190,11 +14557,11 @@
\newcounter{stanzaindentsrepetition}
\newcount\stanza@modulo
-\newcommand*{\managestanza@modulo}[0]{
- \advance\stanza@modulo\@ne
- \ifnum\stanza@modulo>\value{stanzaindentsrepetition}
- \stanza@modulo\@ne
- \fi
+\newcommand*{\managestanza@modulo}[0]{%
+ \advance\stanza@modulo\@ne%
+ \ifnum\stanza@modulo>\value{stanzaindentsrepetition}%
+ \stanza@modulo\@ne%
+ \fi%
}
% \end{macrocode}
% \end{macro}
@@ -15070,7 +15437,7 @@
% \begin{macro}{\theaddcolcount}
% A counter to hold the number of a column. We use a roman number so
% that we can grab the column dimension from \protect\cs{dcol}.
-% We do not use \cs{roman} \LaTeX\ command, because some package, like \package{babel} can override it in some specific case (greek, for example).
+% We do not use the \cs{roman} \LaTeX\ command, because some packages, like \package{babel} can override it in some specific cases (Greek, for example).
% \begin{macrocode}
\newcounter{addcolcount}
\renewcommand{\theaddcolcount}{\romannumeral \c@addcolcount}
@@ -16561,85 +16928,85 @@
% \begin{macrocode}
\ifeledmaccompat@%
-\newcommand{\footnormalX}[1]{\arrangementX[#1]{normal}}%
-\newcommand{\footparagraphX}[1]{\arrangementX[#1]{paragraph}}%
-\newcommand{\foottwocolX}[1]{\arrangementX[#1]{twocol}}%
-\newcommand{\footthreecolX}[1]{\XarrangementX[#1]{threecol}}%
-
-\unless\ifnocritical@
- \newcommand{\footnormal}[1]{\Xarrangement[#1]{normal}}%
- \newcommand{\footparagraph}[1]{\Xarrangement[#1]{paragraph}}%
- \newcommand{\foottwocol}[1]{\Xarrangement[#1]{twocol}}%
- \newcommand{\footthreecol}[1]{\Xarrangement[#1]{threecol}}%
- \let\hsizetwocol\Xhsizetwocol
- \let\hsizethreecol\Xhsizethreecol
- \let\bhookXnote\Xbhooknote
- \let\boxsymlinenum\Xboxsymlinenum
- \let\symlinenum\Xsymlinenum
- \let\beforenumberinfootnote\Xbeforenumber
- \let\afternumberinfootnote\Xafternumber
- \let\beforeXsymlinenum\Xbeforesymlinenum
- \let\afterXsymlinenum\Xaftersymlinenum
- \let\inplaceofnumber\Xinplaceofnumber
- \let\Xlemmaseparator\lemmaseparator
- \let\afterlemmaseparator\Xafterlemmaseparator
- \let\beforelemmaseparator\Xbeforelemmaseparator
- \let\inplaceoflemmaseparator\Xinplaceoflemmaseparator
- \let\txtbeforeXnotes\Xtxtbeforenotes
- \let\afterXrule\Xafterrule
- \let\numberonlyfirstinline\Xnumberonlyfirstinline
- \let\numberonlyfirstintwolines\Xnumberonlyfirstintwolines
- \let\nonumberinfootnote\Xnonumberinfootnote
- \let\pstartinfootnote\Xpstart
- \let\pstartinfootnoteeverytime\Xpstarteverytime
- \let\onlyXpstart\Xonlypstart
- \let\Xnonumberinfootnote\Xnonumber
- \let\nonbreakableafternumber\Xnonbreakableafternumber
- \let\maxhXnotes\Xmaxhnotes
- \let\beforeXnotes\Xbeforenotes
- \let\boxlinenum\Xboxlinenum
- \let\boxlinenumalign\Xboxlinenumaligm
- \let\boxstartlinenum\Xboxstartlinenum
- \let\boxendlinenum\Xboxendlinenum
- \let\twolines\Xtwolines
- \let\morethantwolines\Xmorethantwolines
- \let\twolinesbutnotmore\Xtwolinesbutnotmore
- \let\twolinesonlyinsamepage\Xtwolinesonlyinsamepage
- \fi
-
- \unless\ifnofamiliar@
- \let\notesXwidthliketwocolumns\noteswidthliketwocolumnsX
- \fi
- \newcommandx{\parafootsep}[2][1,usedefault]{%
- \Xparafootsep[#1]{#2}%
- \parafootsepX[#1]{#2}
- }%
-
- \newcommandx{\afternote}[2][1,usedefault]{%
- \Xafternote[#1]{#2}%
- \afternoteX[#1]{#2}%
- }%
-
- \unless\ifnoend@
- \let\XendXtwolines\Xendtwolines
- \let\XendXmorethantwolines\Xendmorethantwolines
- \let\bhookXendnote\Xendbhooknote
- \let\boxXendlinenum\Xendboxlinenum%
- \let\boxXendlinenumalign\Xendboxlinenumalign%
- \let\boxXendstartlinenum\Xendboxstartlinenum%
- \let\boxXendendlinenum\Xendboxendlinenum%
- \let\XendXlemmaseparator\Xendlemmaseparator
- \let\XendXbeforelemmaseparator\Xendbeforelemmaseparator
- \let\XendXafterlemmaseparator\Xendafterlemmaseparator
- \let\XendXinplaceoflemmaseparator\Xendinplaceoflemmaseparator
- \fi
-
- \AtBeginDocument{%
- \ifdef\lineref{}{\let\lineref\edlineref}%
- }%
+ \newcommand{\footnormalX}[1]{\arrangementX[#1]{normal}}%
+ \newcommand{\footparagraphX}[1]{\arrangementX[#1]{paragraph}}%
+ \newcommand{\foottwocolX}[1]{\arrangementX[#1]{twocol}}%
+ \newcommand{\footthreecolX}[1]{\XarrangementX[#1]{threecol}}%
+
+ \unless\ifnocritical@
+ \newcommand{\footnormal}[1]{\Xarrangement[#1]{normal}}%
+ \newcommand{\footparagraph}[1]{\Xarrangement[#1]{paragraph}}%
+ \newcommand{\foottwocol}[1]{\Xarrangement[#1]{twocol}}%
+ \newcommand{\footthreecol}[1]{\Xarrangement[#1]{threecol}}%
+ \let\hsizetwocol\Xhsizetwocol
+ \let\hsizethreecol\Xhsizethreecol
+ \let\bhookXnote\Xbhooknote
+ \let\boxsymlinenum\Xboxsymlinenum
+ \let\symlinenum\Xsymlinenum
+ \let\beforenumberinfootnote\Xbeforenumber
+ \let\afternumberinfootnote\Xafternumber
+ \let\beforeXsymlinenum\Xbeforesymlinenum
+ \let\afterXsymlinenum\Xaftersymlinenum
+ \let\inplaceofnumber\Xinplaceofnumber
+ \let\Xlemmaseparator\lemmaseparator
+ \let\afterlemmaseparator\Xafterlemmaseparator
+ \let\beforelemmaseparator\Xbeforelemmaseparator
+ \let\inplaceoflemmaseparator\Xinplaceoflemmaseparator
+ \let\txtbeforeXnotes\Xtxtbeforenotes
+ \let\afterXrule\Xafterrule
+ \let\numberonlyfirstinline\Xnumberonlyfirstinline
+ \let\numberonlyfirstintwolines\Xnumberonlyfirstintwolines
+ \let\nonumberinfootnote\Xnonumberinfootnote
+ \let\pstartinfootnote\Xpstart
+ \let\pstartinfootnoteeverytime\Xpstarteverytime
+ \let\onlyXpstart\Xonlypstart
+ \let\Xnonumberinfootnote\Xnonumber
+ \let\nonbreakableafternumber\Xnonbreakableafternumber
+ \let\maxhXnotes\Xmaxhnotes
+ \let\beforeXnotes\Xbeforenotes
+ \let\boxlinenum\Xboxlinenum
+ \let\boxlinenumalign\Xboxlinenumaligm
+ \let\boxstartlinenum\Xboxstartlinenum
+ \let\boxendlinenum\Xboxendlinenum
+ \let\twolines\Xtwolines
+ \let\morethantwolines\Xmorethantwolines
+ \let\twolinesbutnotmore\Xtwolinesbutnotmore
+ \let\twolinesonlyinsamepage\Xtwolinesonlyinsamepage
+ \fi
+
+ \unless\ifnofamiliar@
+ \let\notesXwidthliketwocolumns\noteswidthliketwocolumnsX
+ \fi
+ \newcommandx{\parafootsep}[2][1,usedefault]{%
+ \Xparafootsep[#1]{#2}%
+ \parafootsepX[#1]{#2}
+ }%
+
+ \newcommandx{\afternote}[2][1,usedefault]{%
+ \Xafternote[#1]{#2}%
+ \afternoteX[#1]{#2}%
+ }%
+
+ \unless\ifnoend@
+ \let\XendXtwolines\Xendtwolines
+ \let\XendXmorethantwolines\Xendmorethantwolines
+ \let\bhookXendnote\Xendbhooknote
+ \let\boxXendlinenum\Xendboxlinenum%
+ \let\boxXendlinenumalign\Xendboxlinenumalign%
+ \let\boxXendstartlinenum\Xendboxstartlinenum%
+ \let\boxXendendlinenum\Xendboxendlinenum%
+ \let\XendXlemmaseparator\Xendlemmaseparator
+ \let\XendXbeforelemmaseparator\Xendbeforelemmaseparator
+ \let\XendXafterlemmaseparator\Xendafterlemmaseparator
+ \let\XendXinplaceoflemmaseparator\Xendinplaceoflemmaseparator
+ \fi
+
+ \AtBeginDocument{%
+ \ifdef\lineref{}{\let\lineref\edlineref}%
+ }%
- \fi%
+\fi%
% \end{macrocode}
%
%</code>
diff --git a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
index df27a8862c6..d1f7f51622f 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
@@ -252,7 +252,14 @@
% \changes{v2.5.0}{2015/10/14}{Disable empty lines as paragraph in astanza.}
% \changes{v2.5.1}{2015/10/19}{Fix spurious space when using optional argument of \protect\env{astanza} environment (introduced in v2.5.0).}
% \changes{v2.5.2}{2015/10/26}{Fix bug introduced in v2.5.0 with \protect\cs{linenummargin}, \protect\cs{firstlinenum}, \protect\cs{linenumincrement}, \protect\cs{firstsublinenum}, \protect\cs{sublinenumincrement}.}
+% \changes{v2.6.0}{2015/11/13}{\protect\cs{printlinesR} deleted}
+% \changes{v2.6.0}{2015/11/13}{\protect\cs{Xlineflag} and \protect\cs{Xendlineflag} added}
+% \changes{v2.6.0}{2015/11/13}{Fix bug with footnote numbering when using the same series of familiar footnotes on both sides.}
+% \changes{v2.6.0}{2015/11/13}{Error message when calling \protect\cs{Pages} or \protect\cs{Columns} without previous \protect\env{pages} or \protect\env{pairs} environnment.}
+% \changes{v2.6.0}{2015/11/13}{Fix compatibility with \protect\package{babel} (broken in v.2.0.0.}
+% \changes{v2.6.0}{2015/11/13}{No error messages about ends of left / right page when using the \protect\cs{syntaxonly} command of the \protect\package{syntonly} package.}
% \hyphenation{man-u-script man-u-scripts}
+% \changes{v2.6.0}{2015/11/13}{Fix bug with right side title number when using title commands before \protect\env{pages} or \protect\env{columns} environment.}
%
%
% ^^A PW added following as the definitions are at some unknown elsewhere
@@ -715,6 +722,12 @@
% \Xmaxhnotes{0.6\textheight}
% \maxhnotesX{0.6\textheight}
% \end{verbatim}
+% \subsubsection{About the numbering of familiar footnotes}
+% If you use the same series of familiar footnotes on both sides, the numbers won't be correct in the first run. There will be a continuous numbering for left notes, and a continuous numbering for right notes.
+% However, after the second run, the numbering will be continuous, alternating between the left and right side.
+% For example if you have two left pages and two right pages, with one note by page, you will obtain the following numbering at the first run: 1 (left page), 3 (right page), 2 (left page), 4 (right page). But at the next run, you will obtain: 1 (left page), 2 (right page), 3 (left page), 4 (right page).
+%
+% If you use parallel columns, during the second of run of typesetting the footnote numbering will not run down the columns. Instead, it will read both column lines completely across the page, and number footnotes from left to right.
% \subsubsection{Notes for one side only}
% \DescribeMacro{\Xonlyside}
% \DescribeMacro{\onlysideX}
@@ -742,11 +755,15 @@
% \begin{Rightside}
% \beginnumbering
% \pstart
-% Un petit chat\footnotemk. And so one ...
+% Un petit chat\footnoteAmk. And so one ...
% \pend
% \endnumbering
% \end{Rightside}
% \end{verbatim}
+% \subsection{Using line flag}
+% \DescribeMacro{\Xlineflag}
+% \DescribeMacro{\Xendlineflag}
+% Use \cs{Xlineflag}\oarg{s} to add right line flag (\reff{Rlineflag}) to right critical footnotes and \cs{Xendlineflag}\oarg{s} to add it to right critical endnotes.
% \section{Left and right texts}\label{leftright}
% \subsection{Environments}
% Parallel texts are divided into Leftside and Rightside. The form of the
@@ -883,7 +900,7 @@
% \cs{linenummarginR}\marg{margin} sets the line margin for right side.
% \cs{linenummargin*}\marg{margin} sets for both side.
% \meta{margin} can be, as for \macpackage's \cs{linenummargin} one of these values: \verb+left+, \verb+right+, \verb+inner+, \verb+outer+.
-% \DescribeMacro{\setRlineflag}
+% \DescribeMacro{\setRlineflag}\label{Rlineflag}
% A ``R'' is appended to the line numbers of the
% right texts.
% This may be useful for parallel columns but for parallel pages it might
@@ -1118,7 +1135,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2015/10/26 v2.5.2 reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2015/11/13 v2.6.0 reledmac extension for parallel texts]%
% \end{macrocode}
% \subsection{Package's requirement}
@@ -1287,10 +1304,17 @@
% \begin{macro}{\led@err@LeftOnRightPage}
% \begin{macro}{\led@err@RightOnLeftPage}
% \begin{macrocode}
+\providebool{syntax@}
\newcommand*{\led@err@LeftOnRightPage}{%
- \reledpar@error{The left page has ended on a right page}{\@ehc}}
+ \notbool{syntax@}%
+ {\reledpar@error{The left page has ended on a right page}{\@ehc}}%
+ {}%
+ }
\newcommand*{\led@err@RightOnLeftPage}{%
- \reledpar@error{The right page has ended on a left page}{\@ehc}}
+ \notbool{syntax@}%
+ {\reledpar@error{The right page has ended on a left page}{\@ehc}}
+ {}%
+ }%
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1315,6 +1339,17 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \begin{macro}{\led@err@Pages@WithoutEnv}
+% \begin{macro}{\led@err@Columns@WithoutEnv}
+% \begin{macrocode}
+\newcommand*{\led@err@Pages@WithoutEnv}{%
+ \reledpar@error{\string\Pages\space called without previous `pages` environment}{\@ehc}}
+\newcommand*{\led@err@Columns@WithoutEnv}{%
+ \reledpar@error{\string\Columns\space called without previous `pairs` environment}{\@ehc}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
%
% \begin{macro}{\led@error@fail@patch@thepage}
% \begin{macrocode}
@@ -1474,22 +1509,50 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\initnumbering@sectcountR}
+% \begin{macro}{\save@section@number}
+% \begin{macro}{\set@sectcountR}
% \changes{v1.2.1}{2012/11/01}{For the right section, the counter is defined only once.}
-% We do not want the numbering of the right-side section commands to be continuous with the numbering of the left side,
+% We do not want the numbering of the right-side section commands to be continuous with the numbering of the left side,
+% however, we want they be continous with the numbering of contents typesette before the \env{pages} or \env{columns} env.
% we switch the \LaTeX\ counter in \protect\cs{numberingR}.
+%
% \begin{macrocode}
\newcounter{chapterR}
\newcounter{sectionR}
\newcounter{subsectionR}
\newcounter{subsubsectionR}
+
+\newcount\old@chapter%
+\newcount\old@section%
+\newcount\old@subsection%
+\newcount\old@subsubsection%
+\newcommand{\save@section@number}{%
+ \ifdefined\c@chapter%
+ \global\old@chapter\value{chapter}%
+ \fi%
+ \global\old@section\value{section}%
+ \global\old@subsection\value{subsection}%
+ \global\old@subsubsection\value{subsubsection}%
+}%
\newcommand{\initnumbering@sectcountR}{
- \let\c@chapter\c@chapterR
- \let\c@section\c@sectionR
- \let\c@subsection\c@subsectionR
- \let\c@subsubsection\c@subsubsectionR
+ \ifdefined\c@chapter%
+ \setcounter{chapterR}{\old@chapter}%
+ \fi%
+ \setcounter{sectionR}{\old@section}%
+ \setcounter{subsectionR}{\old@subsection}%
+ \setcounter{subsubsectionR}{\old@subsubsection}%
+ \set@sectcountR%
}
+\newcommand{\set@sectcountR}{%
+ \let\c@chapter\c@chapterR%
+ \let\c@section\c@sectionR%
+ \let\c@subsection\c@subsectionR%
+ \let\c@subsubsection\c@subsubsectionR%
+}%
% \end{macrocode}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\pausenumberingR}
% \begin{macro}{\resumenumberingR}
@@ -2529,6 +2592,32 @@
\csgdef{Xonlyside@#1}{}%
\fi%
% \end{macrocode}
+% \subsection{Tools specific to familiar footnotes}
+% \begin{macrocode}
+ \unless\ifnofamiliar@%
+% \end{macrocode}
+% \subsubsection{Managing correct number}\label{familiarfootnotenumber}
+% One problem with using familiar footnotes in parallel typesetting is the fact that the order of reading ​notes is not the same as the order they are typset, because \LaTeX\ reads first all the notes on one side, then all the notes on the other side.
+% Then, however, \LaTeX\ alternates between typesetting left-side note and right-side notes.
+% Consequently, if we do nothing special, the note numbers are sorted in the reading order, not in the typesetting order.
+% So we could obtain something like 1,3,2,5,4.
+%
+% To prevent this problem, we use a two new counters by series.
+% Every note, in parallel typesetting, has three associated counters.
+% \begin{enumerate}
+% \item A \LaTeX\ counter \verb+footnoteX+. This the only one manipulated by user, and the only one finally printed.
+% \item A \TeX\ counter \verb+footnoteX@reading+. Its value is increased when reading the \cs{footnoteX} command in the side environments. It is used to get the correct footnote number from the \verb+.aux+ file to typeset in the main text.
+% \item A \TeX\ counter \verb+footnoteX@typeset. Its value is increased when inserting footnotes. Its value is directly used in the footnote, and is stored in the \verb+aux+ files to be used on the next run for the main text.
+% \end{enumerate}
+%
+%
+%
+% So here, we only defined the new counters.
+% \begin{macrocode}
+ \expandafter\newcount\csname footnote#1@reading\endcsname%
+ \expandafter\newcount\csname footnote#1@typeset\endcsname%
+% \end{macrocode}
+%
% \subsubsection{Familiar footnotes without marks}
% The \protect\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 \protect\cs{nomark@} to true, then call the \protect\cs{footnoteX}.
@@ -2536,8 +2625,6 @@
%
% First, check the \verb+nofamiliar+ option of \macpackage.
%
-% \begin{macrocode}
- \unless\ifnofamiliar@%
% So declare the list.
% \begin{macrocode}
\expandafter\list@create\csname footnote#1@mk\endcsname%
@@ -2589,7 +2676,7 @@
\xspace%
}%
% \end{macrocode}
-% End of tools for familiar notes without marks
+% End of tools specific to familiar notes.
% \begin{macrocode}
\fi
% \end{macrocode}
@@ -2598,7 +2685,29 @@
}%
% \end{macrocode}
% \end{macro}
-% \subsubsection{Create hooks}
+% \subsubsection{Get correct footnote number}
+% \begin{macro}{\get@familiarfootnote@number}
+% \begin{macro}{\save@familiarfootnote@number}
+% As users can insert footnotes​ between two \cs{Pairs} or \cs{Pages} commands, we have to set the \cs+footnoteX@typeset+ counter to the last value of the \verb+footnoteX+ counter at the beginning of these two commands.
+% \begin{macrocode}
+\newcommand{\save@familiarfootnote@number}{%
+ \unless\ifnofamiliar@%
+ \def\do##1{\csxdef{saved@footnote##1}{\the\csname c@footnote##1\endcsname}}%
+ \dolistloop{\@series}%
+ \fi%
+ \xdef\saved@footnote{\the\c@footnote}%
+}
+\newcommand{\get@familiarfootnote@number}{%
+ \unless\ifnofamiliar@%
+ \def\do##1{\global\expandafter\csname footnote##1@typeset\endcsname=\csuse{saved@footnote##1}}%
+ \dolistloop{\@series}%
+ \fi%
+ \global\footnote@typeset=\saved@footnote%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \subsection{Create hooks}
% Read the \macpackage code handbook about \protect\cs{newhookcommand@series}.
% Here, we create hooks which are specific to \parpackage.
% \begin{macrocode}
@@ -2611,7 +2720,7 @@
% \end{macrocode}
-% \subsubsection{Init standards series (A,B,C,D,E,Z)}
+% \subsection{Init standards series (A,B,C,D,E,Z)}
% \begin{macro}{\init@series@par}
% \protect\cs{newseries@par} is called by \protect\cs{newseries}.
% However, this last command is called before \parpackage is loaded.
@@ -2624,8 +2733,19 @@
\init@series@par%
% \end{macrocode}
% \end{macro}
+% \subsection{Tools specific to \LaTeX's classical footnotes}
+% As users can use classical footnotes of \LaTeX\ (\cs{footnote})
+% in parallel texts, we must integrate the same tools to get correct number as for \macpackage' footnotes (\reff{familiarfootnotenumber}).
+% \begin{macro}{\footnote@reading}
+% \begin{macro}{\footnote@typset}
+% \begin{macrocode}
+\newcount\footnote@reading%
+\newcount\footnote@typeset%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% \section{Pstart numbers dumping and restoration}
-% While in \macpackage the footnotes are inserted in the same time as the \protect\cs{pstart}\ldots\protect\cs{pend} are read, in \parpackage they are inserted when the \protect\cs{Columns} or \protect\cs{Pages} commands are called.
+% While in \macpackage the footnotes are inserted at the same time as the \protect\cs{pstart}\ldots\protect\cs{pend} are read, in \parpackage they are inserted when the \protect\cs{Columns} or \protect\cs{Pages} commands are called.
% Consequently, if we do nothing, the value of the \verb+PstartL+ and \verb+PstartR+ counters are not the same in the main text and in the notes.
% To solve this problem, we dump the values in two list (one by side) when processing \protect\cs{pstart} and restore these at each \protect\cs{pstart} when calling \protect\cs{Columns} or \protect\cs{Pages}.
% We also dump and restore the value of the boolean \protect\cs{ifnumberpstart}.
@@ -2693,6 +2813,8 @@
\l@dpairingtrue
\l@dpagingfalse
\initnumbering@quote
+ \save@familiarfootnote@number%
+ \save@section@number%
\at@begin@pairs%
}{%
\l@dpairingfalse
@@ -2715,6 +2837,8 @@
\l@dpairingtrue
\l@dpagingtrue
\initnumbering@quote
+ \save@familiarfootnote@number%
+ \save@section@number%
\setlength{\Lcolwidth}{\textwidth}%
\setlength{\Rcolwidth}{\textwidth}%
}{%
@@ -3385,7 +3509,7 @@
\def\print@eledsectionR{%
\addtocounter{pstartR}{-1}%
- \initnumbering@sectcountR%
+ \set@sectcountR%
\ifdefstring{\@eledsectnotoc}{R}{\ledsectnotoc}{}%
\ifdefstring{\@eledsectmark}{R}{}{\ledsectnomark}%
\numdef{\temp@}{\l@dpscR-1}%
@@ -3913,43 +4037,7 @@
% \section{Footnotes}
% \label{footnotes}
%
-% \subsection{Line number printing} \label{sec:nfootformat}
-%
-% The \protect\cs{printlinesR} macro prints the line
-% numbers for a note---which, in the
-% general case, is a rather complicated task.
-% The seven parameters of the
-% argument are the line numbers as stored in \protect\cs{l@d@nums}, in the
-% form described on \reff{reledmac-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.
-%
-%
-% \begin{macro}{\printlinesR}
-% This is the right text version of \protect\cs{printlines} and takes account
-% of \protect\cs{@Rlineflag}.
-% Just a reminder of the arguments: \\
-% \verb?\printlinesR #1 | #2 | #3 | #4 | #5 | #6 | #7? \\
-% \verb?\printlinesR start-page | line | subline | end-page | line | subline | font ?
-% \changes{v0.3.0}{2005/02/10}{Simplified \protect\cs{printlinesR} by using
-% \protect\cs{setprintlines}}
-% \begin{macrocode}
-\def\printlinesR#1|#2|#3|#4|#5|#6|#7|{\begingroup
- \setprintlines{#1}{#2}{#3}{#4}{#5}{#6}%
- \ifl@d@pnum #1\fullstop\fi
- \ifledplinenum \linenumr@p{#2}\@Rlineflag\else \symplinenum\fi
- \ifl@d@ssub \fullstop \sublinenumr@p{#3}\fi
- \ifl@d@dash \endashchar\fi
- \ifl@d@pnum #4\fullstop\fi
- \ifl@d@elin \linenumr@p{#5}\@Rlineflag\fi
- \ifl@d@esl \ifl@d@elin \fullstop\fi \sublinenumr@p{#6}\fi
-\endgroup}
-
-% \end{macrocode}
-% \end{macro}
-%
% \subsection{Footnotes output specific to \protect\cs{Pages}}
% \begin{macro}{\print@Xnotes@forpages}
% \begin{macro}{\correct@Xfootins@box}
@@ -4151,13 +4239,14 @@
% \begin{macro}{\l@dmake@labelsR}
% This is the right text version of \protect\cs{l@dmake@labels}, taking account
% of \protect\cs{@Rlineflag}.
+% \changes{v2.6.0}{2015/11/13}{\protect\cs{@Rlineflag} is not stored directly after the line number, but as a fith argument of \protect\cs{the@labelX}. Can be retrieved by \protect\cs{xflagref}.}
%
% \begin{macrocode}
\def\l@dmake@labelsR#1|#2|#3|#4|#5{%
\expandafter\ifx\csname the@label#5\endcsname \relax\else
- \led@warn@DuplicateLabel{#4}%
+ \led@warn@DuplicateLabel{#5}%
\fi
- \expandafter\gdef\csname the@label#5\endcsname{#1|#2\@Rlineflag|#3|#4}%
+ \expandafter\gdef\csname the@label#5\endcsname{#1|#2|#3|#4|\@Rlineflag}%
\ignorespaces}
\AtBeginDocument{%
\def\l@dmake@labelsR#1|#2|#3|#4|#5{}%
@@ -4557,7 +4646,7 @@
% that \protect\cs{theledlanguageL} and \protect\cs{theledlanguageR} are unaltered.
% \begin{macrocode}
\renewcommand*{\l@duselanguage}[1]{%
- \l@doldselectlanguage{#1}}
+ \expandafter\l@doldselectlanguage\expandafter{#1}}
% \end{macrocode}
% Lastly, initialise the left and right languages to the current \protect\package{babel}
% one.
@@ -4811,6 +4900,9 @@
\ifl@dpairing%
\led@err@Columns@InsideEnv%
\fi%
+ \expandafter\ifvoid\csname l@dRcolrawbox1\endcsname%
+ \led@err@Columns@WithoutEnv%
+ \else%
\l@dprintingcolumnstrue%
\eledsection@correcting@skip=-\baselineskip% Correction for sections' titles
\ifnum\l@dnumpstartsL=\l@dnumpstartsR\else
@@ -4827,6 +4919,7 @@
\global\par@lineR=\z@
\global\l@dpscL=\z@
\global\l@dpscR=\z@
+ \get@familiarfootnote@number%
% \end{macrocode}
% Check if there are chunks to be processed, and process them
% two by two (left and right pairs).
@@ -4935,8 +5028,9 @@
\global\l@dnumpstartsR=\z@
\l@dprintingcolumnsfalse%
\ignorespaces
- \global\instanzaLfalse
- \global\instanzaRfalse}
+ \global\instanzaLfalse%
+ \global\instanzaRfalse%
+ \fi}
% \end{macrocode}
% \end{macro}
@@ -5181,7 +5275,7 @@
}%
\print@columnseparator%
\parbox[t][][t]{\Rcolwidth}{%
- \initnumbering@sectcountR%
+ \set@sectcountR%
\csuse{before@pstartR@\the\l@dpscR}%
}%
\ifdefstring{\columns@position}{R}{}{\hfill}%
@@ -5204,7 +5298,7 @@
}%
\print@columnseparator%
\parbox[t][][t]{\Rcolwidth}{%
- \initnumbering@sectcountR%
+ \set@sectcountR%
\csuse{after@pendR@\the\l@dpscR}%
}%
\ifdefstring{\columns@position}{R}{}{\hfill}%
@@ -5253,6 +5347,9 @@
\ifl@dpairing%
\led@err@Pages@InsideEnv%
\fi%
+ \expandafter\ifvoid\csname l@dRcolrawbox1\endcsname%
+ \led@err@Pages@WithoutEnv%
+ \else%
\ifstrequal{#1}{mainmatter}{\Pages@mainmattertrue}{\Pages@mainmatterfalse}%
\eledsection@correcting@skip=-2\baselineskip% line correcting for section titles.
\parledgroup@notespacing@set@correction%
@@ -5285,6 +5382,7 @@
\global\l@dpscR=\z@%
\writtenlinesLfalse%
\writtenlinesRfalse%
+ \get@familiarfootnote@number%
% \end{macrocode}
% The footnotes are printed in a different way from expected in \macpackage, as we may want to print the notes on one side only.
% \begin{macrocode}
@@ -5457,7 +5555,7 @@
\checkpageR%
\l@duselanguage{\theledlanguageR}%
{ \loop\ifl@dsamepage%
- \initnumbering@sectcountR%
+ \set@sectcountR%
\ifdefstring{\@eledsectnotoc}{R}{\ledsectnotoc}{}%
\csuse{before@pstartR@\the\l@dpscR}%
\global\csundef{before@pstartR@\the\l@dpscR}%
@@ -5550,7 +5648,7 @@
\global\instanzaRfalse%
\l@dprintingpagesfalse%
\finish@Pages@notes%Needed to prevent final notes overlap line number
- \ignorespaces}
+ \ignorespaces\fi}
% \end{macrocode}
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
index 82613f160ba..7381db48cee 100644
--- a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
+++ b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
@@ -33,7 +33,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2015/10/26 v2.4.1 typeset critical edition]%
+\ProvidesPackage{reledmac}[2015/11/13 v2.5.0 typeset critical edition]%
\RequirePackage{xkeyval}
\newif\ifparledgroup
\DeclareOptionX{series}[A,B,C,D,E]{\xdef\default@series{#1}}
@@ -191,8 +191,13 @@
\newcommand*{\led@warn@AppLabelOutEdtext}[1]{%
\reledmac@warning{\string\applabel\space outside of \string\edtext\space `#1' on page \the\pageno.}}%
\newcommand*{\led@warn@RefUndefined}[1]{%
+ \G@refundefinedtrue%
\reledmac@warning{Reference `#1' on page \the\pageno\space undefined.
Using `000'.}}
+\newcommand*{\led@warn@pairRefUndefined}[1]{%
+ \G@refundefinedtrue%
+ \reledmac@warning{Reference `#1:start' and/or `#1:end' on page \the\pageno\space undefined.
+ Using `??'.}}
\newcommand*{\led@warn@NoMarginpars}{%
\reledmac@warning{You can't use \string\marginpar\space in numbered text}}
\newcommand*{\led@warn@BadSidenotemargin}{%
@@ -282,6 +287,7 @@
\newif\ifledRcol
\newif\ifledRcol@
\newif\ifnumberingR
+\newif\ifXnote@%
\newcount\section@num
\section@num=0
\let\extensionchars=\empty
@@ -582,7 +588,9 @@
\numlabfont\linenumrep{\line@num}%
\ifsublines@
\ifnum\subline@num>0\relax
- \unskip\fullstop\sublinenumrep{\subline@num}%
+ \unskip%
+ \Xsublinesep@side%
+ \sublinenumrep{\subline@num}%
\fi
\fi%
\egroup%
@@ -1035,7 +1043,7 @@
\newwrite\linenum@out
\newif\iffirst@linenum@out@
\first@linenum@out@true
-\newcommand{\this@line@list@version}{3}%
+\newcommand{\this@line@list@version}{5}%
\newcommand*{\line@list@stuff}[1]{%
\read@linelist{#1}%
\iffirst@linenum@out@
@@ -1279,7 +1287,6 @@
\newcommand*{\edfont@info}{\f@encoding/\f@family/\f@series/\f@shape}
-\unless\ifnocritical@
\newcommand*{\lemma}[1]{%
\global\@lemmacommand@true%
\global\renewcommand{\@tag}{%
@@ -1290,7 +1297,6 @@
\newcommand{\@lemma}{%
\booltrue{lemmacommand@\the\@edtext@level}%
}%
-\fi
\newif\if@lemmacommand@%
\newcommand*{\linenum}[1]{%
\xdef\@tempa{#1|||||||\noexpand\\\l@d@nums}%
@@ -2100,6 +2106,7 @@
\noindent\leavevmode}
\newcommand*{\normalfootgroup}[1]{%
{\csuse{Xnotefontsize@#1}\noindent\csuse{Xtxtbeforenotes@#1}}%
+ \csuse{Xbhookgroup@#1}%
\unvbox\csname #1footins\endcsname%
\hsize=\old@hsize%
}%
@@ -2126,6 +2133,7 @@
\fi%
\setlength{\parindent}{0pt}
{\csuse{Xnotefontsize@#1}\csuse{Xtxtbeforenotes@#1}}
+ \csuse{Xbhookgroup@#1}%
\unvbox\csname mp#1footins\endcsname}}
\fi
\newcommand*{\Xarrangement@paragraph}[1]{%
@@ -2151,7 +2159,7 @@
\fi
}
\providecommand{\footfudgefiddle}{64}
-\newcommand*{\para@footsetup}[1]{{\csuse{Xnotefontsize@#1}
+\newcommand*{\para@footsetup}[1]{{\csuse{Xbhookgroup@#1}\csuse{Xnotefontsize@#1}
\setXnoteswidthliketwocolumns@{#1}%
\dimen0=\baselineskip
\multiply\dimen0 by 1024
@@ -2235,7 +2243,8 @@
\ifcsstring{Xragged@#1}{R}{\RaggedRight}{}%
\makehboxofhboxes
\setbox0=\hbox{{\csuse{Xnotefontsize@#1}\csuse{Xtxtbeforenotes@#1}}\unhbox0 \removehboxes}%
- \csuse{Xnotefontsize@#1}
+ \csuse{Xbhookgroup@#1}%
+ \csuse{Xnotefontsize@#1}%
\unhbox0\par%
\global\hsize=\old@hsize%
}%
@@ -2265,7 +2274,8 @@
\ifcsstring{Xragged@#1}{R}{\RaggedRight}{}%
\makehboxofhboxes
\setbox0=\hbox{{\csuse{Xnotefontsize@#1}\csuse{Xtxtbeforenotes@#1}}\unhbox0 \removehboxes}%
- \csuse{Xnotefontsize@#1}
+ \csuse{Xbhookgroup@#1}%
+ \csuse{Xnotefontsize@#1}%
\unhbox0\par}}
\newcommand*{\makehboxofhboxes}{\setbox0=\hbox{}%
@@ -2355,7 +2365,7 @@
}}%
#3\strut\par\allowbreak}
\newcommand*{\threecolfootgroup}[1]{{\csuse{Xnotefontsize@#1}%
- \noindent\csuse{Xtxtbeforenotes@#1}}\par%
+ \noindent\csuse{Xtxtbeforenotes@#1}\csuse{Xbhookgroup@#1}}\par%
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname #1footins\endcsname \thr@@ \splittopskip}
@@ -2378,7 +2388,8 @@
\setXnotespositionliketwocolumns@{#1}%
\print@Xfootnoterule{#1}%
\fi%
- {\csuse{Xnotefontsize@#1}\noindent\csuse{Xtxtbeforenotes@#1}}\par
+ {\csuse{Xnotefontsize@#1}\noindent\csuse{Xtxtbeforenotes@#1}}%
+ \csuse{Xbhookgroup@#1}\par%
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname mp#1footins\endcsname \thr@@ \splittopskip}}
@@ -2430,7 +2441,7 @@
}}%
#3\strut\par\allowbreak}
\newcommand*{\twocolfootgroup}[1]{{\csuse{Xnotefontsize@#1}
- \noindent\csuse{Xtxtbeforenotes@#1}}\par%
+ \noindent\csuse{Xtxtbeforenotes@#1}\csuse{Xbhookgroup@#1}}\par%
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname #1footins\endcsname \tw@ \splittopskip}
@@ -2457,14 +2468,18 @@
\setXnotespositionliketwocolumns@{#1}%
\print@Xfootnoterule{#1}%
\fi%
- {\csuse{Xnotefontsize@#1}\noindent\csuse{Xtxtbeforenotes@#1}}\par
+ {\csuse{Xnotefontsize@#1}\noindent\csuse{Xtxtbeforenotes@#1}}%
+ \csuse{Xbhookgroup@#1}\par%
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname mp#1footins\endcsname \tw@ \splittopskip}}
\def\endashchar{\textnormal{--}}
+
\newcommand*{\fullstop}{\textnormal{.}}
+\def\Xsublinesep@side{\fullstop}
+
\newcommand*{\rbracket}{\textnormal{%
\csuse{text\csuse{footnote@lang}}{%
\ifluatex%
@@ -2487,15 +2502,12 @@
}%
}
\newcommand{\printlinefootnote}[2]{%
- \def\extractline@##1|##2|##3|##4|##5|##6|##7|{##2}%
- \def\extractsubline@##1|##2|##3|##4|##5|##6|##7|{##3}%
- \def\extractendline@##1|##2|##3|##4|##5|##6|##7|{##5}%
- \def\extractendsubline@##1|##2|##3|##4|##5|##6|##7|{##6}%
+ \l@dp@rsefootspec#1|%
\iftoggle{Xnumberonlyfirstintwolines@#2}{%
- \edef\lineinfo@{\extractline@ #1| - \extractsubline@ #1| - \extractendline@ #1| - \extractendsubline@ #1|}%
+ \edef\lineinfo@{\l@dparsedstartline - \l@dparsedstartsub - \l@dparsedendline - \l@dparsedendsub}%
}%
{%
- \edef\lineinfo@{\extractline@ #1| - \extractsubline@ #1|}%
+ \edef\lineinfo@{\l@dparsedstartline - \l@dparsedstartsub}%
}%
\iftoggle{nonum@}{%Try if the line number must printed for this specific not (by default, yes)
\hspace{\csuse{Xinplaceofnumber@#2}}%
@@ -2577,7 +2589,9 @@
\csuse{Xstanzaseparator@#2}%
\fi%
}{}%
- \iftoggle{Xonlypstart@#2}{}{\printlines#1|}%
+ \iftoggle{Xonlypstart@#2}{}{%
+ \csuse{Xtxtbeforenumber@#2}%
+ \printlines#1||\ifledRcol@\@Rlineflag\fi}%
}%
\newcommand{\printXbeforenumber}[1]{%
\hspace{\csuse{Xbeforenumber@#1}}%
@@ -2593,7 +2607,6 @@
\newif\ifl@d@dash
\newif\ifl@d@Xtwolines%
\newif\ifl@d@Xmorethantwolines%
-\newcommand*{\l@dparsefootspec}[3]{\l@dp@rsefootspec#1|}
\def\l@dp@rsefootspec#1|#2|#3|#4|#5|#6|#7|{%
\gdef\l@dparsedstartpage{#1}%
\gdef\l@dparsedstartline{#2}%
@@ -2689,7 +2702,7 @@
\fi%
}%
}%
-\def\printlines#1|#2|#3|#4|#5|#6|#7|{%
+\def\printlines#1|#2|#3|#4|#5|#6|#7|#8|{%
\begingroup%
\ifluatex%
\edef\@tmp{\the\textdir}%
@@ -2699,9 +2712,14 @@
\ifdimequal{\csuse{Xboxstartlinenum@\@currentseries}}{0pt}%
{\bgroup}%
{\leavevmode\hbox to \csuse{Xboxstartlinenum@\@currentseries}\bgroup\hfill}%
- \ifl@d@pnum #1\fullstop\fi
- \linenumrep{#2}
- \ifl@d@ssub \fullstop \sublinenumrep{#3}\fi
+ \ifl@d@pnum #1%
+ \csuse{Xsublinesep@\@currentseries}%
+ \fi%
+ \linenumrep{#2}\iftoggle{Xlineflag@\@currentseries}{#8}{}%
+ \ifl@d@ssub%
+ \csuse{Xsublinesep@\@currentseries}%
+ \sublinenumrep{#3}%
+ \fi
\egroup%
\ifdimequal{\csuse{Xboxendlinenum@\@currentseries}}{0pt}%
{\bgroup}%
@@ -2720,9 +2738,17 @@
\csuse{Xlinerangeseparator@\@currentseries}%
\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@pnum%
+ #4%
+ \csuse{Xsublinesep@\@currentseries}%
+ \fi%
+ \ifl@d@elin \linenumrep{#5}\iftoggle{Xlineflag@\@currentseries}{#8}{}\fi%
+ \ifl@d@esl%
+ \ifl@d@elin%
+ \csuse{Xsublinesep@\@currentseries}%
+ \fi%
+ \sublinenumrep{#6}%
+ \fi%
\fi%
\ifdimequal{\csuse{Xboxendlinenum@\@currentseries}}{0pt}%
{}%
@@ -2768,23 +2794,54 @@
}{}{}
\apptocmd{\@footnotetext}{\fi}{}{}%
+\patchcmd%
+ {\footnote}%
+ {\stepcounter\@mpfn}%
+ {%
+ \ifl@dpairing%
+ \global\advance\footnote@reading by \@ne%
+ \ifcsdef{footnotereading\the\footnote@reading=typeset}%
+ {\setcounter{\@mpfn}{\csuse{footnotereading\the\footnote@reading=typeset}}}%
+ {\setcounter{\@mpfn}{\footnote@reading}}%
+ \else%
+ \stepcounter\@mpfn%
+ \fi%
+ }%
+ {}
+ {}
\newcommand{\l@dbfnote}[1]{%
\ifnumberedpar@
+ \ifl@dpairing
+ \protected@xdef\thisfootnote{\the\footnote@reading}%
+ \else%
+ \protected@xdef\thisfootnote{\thefootnote}%
+ \fi%
\gdef\@tag{#1\relax}%
\ifledRcol%
- \xright@appenditem{\noexpand\vl@dbfnote{{\expandonce\@tag}}{\@thefnmark}}%
+ \xright@appenditem{\noexpand\vl@dbfnote{{\expandonce\@tag}}{\thisfootnote}}%
\to\inserts@listR
\global\advance\insert@countR \@ne%
\else%
- \xright@appenditem{\noexpand\vl@dbfnote{{\expandonce\@tag}}{\@thefnmark}}%
+ \xright@appenditem{\noexpand\vl@dbfnote{{\expandonce\@tag}}{\thisfootnote}}%
\to\inserts@list
\global\advance\insert@count \@ne%
\fi
\fi\ignorespaces}
\newcommand{\vl@dbfnote}[2]{%
- \def\@thefnmark{#2}%
- \@footnotetext{#1}%
+ \ifboolexpr{bool{l@dprintingpages} or bool{l@dprintingcolumns}}%
+ {%
+ \global\advance\footnote@typeset by \@ne%
+ \setcounter{footnote}{\footnote@typeset}%
+ \immediate\write\@mainaux{%
+ \global\csdef{footnotereading#2=typeset}{\the\footnote@typeset}%
+ }%
+ \def\@thefnmark{\the\footnote@typeset}%
+ }%
+ {%
+ \@namedef{@thefnmark}{#2}%
+ }%
+ \@footnotetext{#1}%
}%
\newcommand*{\prebodyfootmark}{%
\leavevmode
@@ -2880,6 +2937,7 @@
\let\normalfootnoteruleX=\footnoterule
\newcommand*{\normalfootgroupX}[1]{%
+ \csuse{bhookgroupX@#1}%
\unvbox\@nameuse{footins#1}%
\hsize=\old@hsize%
}%
@@ -2903,11 +2961,17 @@
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
\fi%
+ \csuse{bhookgroupX@#1}%
\unvbox\@nameuse{mpfootins#1}}
\newcommand{\normalbfnoteX}[2]{%
\ifnumberedpar@
+ \ifl@dpairing
+ \protected@xdef\thisfootnote{\the\csname footnote#1@reading\endcsname}%
+ \else%
+ \protected@xdef\thisfootnote{\csuse{thefootnote#1}}%
+ \fi%
\ifledRcol%
\ifluatex
\footnotelang@lua[R]%
@@ -2915,7 +2979,6 @@
\@ifundefined{xpg@main@language}%if polyglossia
{}%
{\footnotelang@poly[R]}%
- \protected@xdef\thisfootnote{\csuse{thefootnote#1}}%
\xright@appenditem{\noexpand\vbfnoteX{#1}{#2}{\expandonce\thisfootnote}}%
\to\inserts@listR
\global\advance\insert@countR \@ne%
@@ -2926,7 +2989,6 @@
\@ifundefined{xpg@main@language}%if polyglossia
{}%
{\footnotelang@poly}%
- \protected@xdef\thisfootnote{\csuse{thefootnote#1}}%
\xright@appenditem{\noexpand\vbfnoteX{#1}{#2}{\expandonce\thisfootnote}}%
\to\inserts@list
\global\advance\insert@count \@ne%
@@ -2934,8 +2996,20 @@
\fi\ignorespaces}
\newcommand{\vbfnoteX}[3]{%
- \@namedef{@thefnmark#1}{#3}%
- \@nameuse{regvfootnote#1}{#1}{#2}}
+ \ifboolexpr{bool{l@dprintingpages} or bool{l@dprintingcolumns}}%
+ {%
+ \global\expandafter\advance\csname footnote#1@typeset\endcsname by \@ne%
+ \setcounter{footnote#1}{\csuse{footnote#1@typeset}}%
+ \@namedef{@thefnmark#1}{\csuse{thefootnote#1}}%
+ \immediate\write\@mainaux{%
+ \global\csdef{footnote#1reading#3=typeset}{\the\csname footnote#1@typeset\endcsname}%
+ }%
+ }%
+ {%
+ \@namedef{@thefnmark#1}{#3}%
+ }%
+ \@nameuse{regvfootnote#1}{#1}{#2}%
+}
\newcommand{\vnumfootnoteX}[2]{%
\ifnumberedpar@
@@ -3022,10 +3096,11 @@
{\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}\strut%
#2\strut\par}\allowbreak}
-\newcommand*{\twocolfootgroupX}[1]{{\csuse{notefontsizeX@#1}
+\newcommand*{\twocolfootgroupX}[1]{{\csuse{bhookgroupX@#1}\csuse{notefontsizeX@#1}
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname footins#1\endcsname \tw@ \splittopskip}}
+
\newcommand*{\mptwocolfootgroupX}[1]{{%
\vskip\skip\@nameuse{mpfootins#1}
\ifl@dpairing\ifparledgroup%
@@ -3045,6 +3120,7 @@
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
\fi%
+ \csuse{bhookgroupX@#1}%
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname mpfootins#1\endcsname \tw@ \splittopskip}}
@@ -3099,10 +3175,11 @@
{\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}\strut%
#2\strut\par}\allowbreak}
-\newcommand*{\threecolfootgroupX}[1]{{\csuse{notefontsizeX@#1}
+\newcommand*{\threecolfootgroupX}[1]{{\csuse{bhookgroupX@#1}\csuse{notefontsizeX@#1}
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname footins#1\endcsname \thr@@ \splittopskip}}
+
\newcommand*{\mpthreecolfootgroupX}[1]{{%
\vskip\skip\@nameuse{mpfootins#1}
\ifl@dpairing\ifparledgroup
@@ -3122,6 +3199,7 @@
\setnotesXpositionliketwocolumns@{#1}%
\print@footnoteXrule{#1}%
\fi%
+ \csuse{bhookgroupX@#1}%
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname mpfootins#1\endcsname \thr@@ \splittopskip}}
@@ -3150,7 +3228,7 @@
\fi
}
-\newcommand*{\para@footsetupX}[1]{{\csuse{notefontsizeX@#1}
+\newcommand*{\para@footsetupX}[1]{{\csuse{bhookgroupX@#1}\csuse{notefontsizeX@#1}
\setnoteswidthliketwocolumnsX@{#1}%
\dimen0=\baselineskip
\multiply\dimen0 by 1024
@@ -3236,8 +3314,10 @@
\ifcsstring{raggedX@#1}{R}{\RaggedRight}{}%
\makehboxofhboxes
\setbox0=\hbox{\unhbox0 \removehboxes}%
+ \csuse{bhookgroupX@#1}
\csuse{notefontsizeX@#1}
\unhbox0\par}
+
\newcommand*{\mppara@footgroupX}[1]{{%
\setnoteswidthliketwocolumnsX@{#1}%
\vskip\skip\@nameuse{mpfootins#1}
@@ -3264,6 +3344,7 @@
\ifcsstring{raggedX@#1}{R}{\RaggedRight}{}%
\makehboxofhboxes
\setbox0=\hbox{\unhbox0 \removehboxes}%
+ \csuse{bhookgroupX@#1}%
\csuse{notefontsizeX@#1}
\unhbox0\par}}
@@ -3425,7 +3506,7 @@
\dolistloop{\@series}%
}%
-\global\notbool{parapparatus@}{}{\long}\def\endprint#1#2#3#4#5{{%
+\global\notbool{parapparatus@}{}{\long}\def\endprint#1#2#3#4#5#6{{%
\hangindent=\csuse{Xendhangindent@#4}%
\ifXendinsertsep@%
\hskip\csuse{Xendafternote@#4}%
@@ -3442,7 +3523,9 @@
\notblank{#5}{\docsvlist{#5}}{}%
\csuse{Xendbhooknote@#4}%
\csuse{Xendnotefontsize@#4}%
+ \IfStrEq{#6}{R}{\ledRcol@true}{}%
\printlineendnote{#1}{#4}%
+ \IfStrEq{#6}{R}{\ledRcol@false}{}%
\nottoggle{Xendlemmadisablefontselection@#4}%
{\select@lemmafont#1|#2}%
{#2}%
@@ -3513,18 +3596,42 @@
\bgroup%
\csuse{Xendnotenumfont@#2}%
\ifdimequal{\csuse{Xendboxlinenum@#2}}{0pt}%
- {\printendlines#1|}%
+ {\printendlines#1||\ifledRcol@\@Rlineflag\fi}%
{\leavevmode%
\hbox to \csuse{Xendboxlinenum@#2}%
{%
\IfSubStr{RC}{\csuse{Xendboxlinenumalign@#2}}{\hfill}{}%
- \printendlines#1|%
+ \printendlines#1||\ifledRcol@\@Rlineflag\fi%
\IfSubStr{LC}{\csuse{Xendboxlinenumalign@#2}}{\hfill}{}%
}}%
\egroup%
\hspace{\csuse{Xendafternumber@#2}}%
\csuse{Xendahooklinenumber@#2}%
}%
+\newif\ifXendinsertsep@%
+\newcommand*{\doendnotes}[1]{%
+ \l@dend@close{#1}%
+ \begingroup
+ \makeatletter
+ \expandafter\let\csname #1end\endcsname=\endprint
+ \input\jobname.#1end%
+ \global\Xendinsertsep@false%
+ \endgroup}
+\newcommand*{\doendnotesbysection}[1]{%
+ \l@dend@close{#1}%
+ \global\expandafter\advance\csname #1end@bysection\endcsname by 1%
+ \begingroup%
+ \makeatletter%
+ \def\l@d@section##1{%
+ \ifnumequal{##1}{\csname #1end@bysection\endcsname}%
+ {\cslet{#1end}{\endprint}}%
+ {\cslet{#1end}{\@gobblefive}}%
+ }%
+ \input\jobname.#1end%
+ \global\Xendinsertsep@false%
+ \endgroup%
+}%
+}%
\newcommand*{\setprintendlines}[6]{%
\l@d@pnumfalse \l@d@dashfalse
\ifnum#4=#1 \else
@@ -3584,14 +3691,28 @@
}%
\fi%
}%
-\def\printendlines#1|#2|#3|#4|#5|#6|#7|{\begingroup
+\def\printendlines#1|#2|#3|#4|#5|#6|#7|#8|{\begingroup
\setprintendlines{#1}{#2}{#3}{#4}{#5}{#6}%
\ifdimequal{\csuse{Xendboxstartlinenum@\@currentseries}}{0pt}%
{\bgroup}%
{\leavevmode\hbox to \csuse{Xendboxstartlinenum@\@currentseries}\bgroup\hfill}%
\printnpnum{#1}%
- \linenumrep{#2}%
- \ifl@d@ssub \fullstop \sublinenumrep{#3}\fi
+ \ifl@d@dash%
+ \ifl@d@pnum%
+ \csuse{Xendlineprefixsingle@\@currentseries}%
+ \else%
+ \ifcsempty{Xendlineprefixmore@\@currentseries}%
+ {\csuse{Xendlineprefixsingle@\@currentseries}}
+ {\csuse{Xendlineprefixmore@\@currentseries}}%
+ \fi%
+ \else%
+ \csuse{Xendlineprefixsingle@\@currentseries}%
+ \fi%
+ \linenumrep{#2}\iftoggle{Xendlineflag@\@currentseries}{\ifledRcol@\@Rlineflag\fi}{}%
+ \ifl@d@ssub%
+ \csuse{Xendsublinesep@\@currentseries}%
+ \sublinenumrep{#3}%
+ \fi%
\egroup%
\ifdimequal{\csuse{Xendboxendlinenum@\@currentseries}}{0pt}%
{\bgroup}%
@@ -3611,8 +3732,17 @@
\fi%
\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@elin%
+ \ifl@d@pnum\csuse{Xendlineprefixsingle@\@currentseries}\fi%
+ \linenumrep{#5}%
+ \iftoggle{Xendlineflag@\@currentseries}{\ifledRcol@\@Rlineflag\fi}{}%
+ \fi%
+ \ifl@d@esl%
+ \ifl@d@elin%
+ \csuse{Xendsublinesep@\@currentseries}%
+ \fi%
+ \sublinenumrep{#6}%
+ \fi%
\fi%
\ifdimequal{\csuse{Xendboxendlinenum@\@currentseries}}{0pt}%
{}%
@@ -3621,32 +3751,8 @@
\endgroup%
}%
-\newcommand*{\printnpnum}[1]{p.#1) }
+\newcommand*{\printnpnum}[1]{\csuse{Xendbeforepagenumber@\@currentseries}#1\csuse{Xendafterpagenumber@\@currentseries}}
-\newif\ifXendinsertsep@%
-\newcommand*{\doendnotes}[1]{%
- \l@dend@close{#1}%
- \begingroup
- \makeatletter
- \expandafter\let\csname #1end\endcsname=\endprint
- \input\jobname.#1end%
- \global\Xendinsertsep@false%
- \endgroup}
-\newcommand*{\doendnotesbysection}[1]{%
- \l@dend@close{#1}%
- \global\expandafter\advance\csname #1end@bysection\endcsname by 1%
- \begingroup%
- \makeatletter%
- \def\l@d@section##1{%
- \ifnumequal{##1}{\csname #1end@bysection\endcsname}%
- {\cslet{#1end}{\endprint}}%
- {\cslet{#1end}{\@gobblefive}}%
- }%
- \input\jobname.#1end%
- \global\Xendinsertsep@false%
- \endgroup%
-}%
-}%
\newcommand{\newseries}[1]{%
\def\do##1{\newseries@{##1}}%
\docsvlist{#1}
@@ -3659,6 +3765,7 @@
\newseries@par{#1}%
\fi%
\unless\ifnocritical@
+ \newtoggle{Xlineflag@#1}
\newtoggle{Xparindent@#1}
\newtoggle{Xlemmadisablefontselection@#1}
\csgdef{Xhangindent@#1}{0pt}%
@@ -3669,6 +3776,7 @@
\csgdef{Xnotenumfont@#1}{\normalfont}%
\csgdef{Xnotefontsize@#1}{\footnotesize}%
\csgdef{Xbhooknote@#1}{}%
+ \csgdef{Xbhookgroup@#1}{}%
\csgdef{Xboxlinenum@#1}{0pt}%
\csgdef{Xboxlinenumalign@#1}{L}%
@@ -3681,6 +3789,7 @@
\newtoggle{Xnumberonlyfirstintwolines@#1}%
\csgdef{Xtwolines@#1}{}%
\csgdef{Xmorethantwolines@#1}{}%
+ \csgdef{Xsublinesep@#1}{\fullstop}%
\newtoggle{Xtwolinesbutnotmore@#1}%
\newtoggle{Xtwolinesonlyinsamepage@#1}%
\newtoggle{Xonlypstart@#1}%
@@ -3691,6 +3800,7 @@
\csgdef{Xsymlinenum@#1}{}%
\newtoggle{Xnonumber@#1}%
\csgdef{Xbeforenumber@#1}{0pt}%
+ \csgdef{Xtxtbeforenumber@#1}{}%
\csgdef{Xafternumber@#1}{0.5em}%
\newtoggle{Xnonbreakableafternumber@#1}%
\csgdef{Xbeforesymlinenum@#1}{\csuse{Xbeforenumber@#1}}%
@@ -3726,12 +3836,14 @@
{\footnotelang@poly[R]}%
\footnoteoptions@{R}{##1}{true}%
\xright@appenditem{%
+ \noexpand\Xnote@true%
\noexpand\prepare@preXnotes{#1}%
\noexpand\prepare@edindex@fornote{\l@d@nums}%
\unexpanded{\def\sw@list@inedtext}{\expandafter\unexpanded\expandafter{\sw@inthisedtext}}%The value of the \sw@inthisedtext of current \edtext will be pushed to \sw@list@inedtext when the notes are expanded.
\noexpand\setcounter{stanzaR}{\the\c@stanzaR}%Save stanzaR counter for footnote
\noexpand\csuse{v#1footnote}{#1}%
{{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}%
+ \noexpand\Xnote@false%
}\to\inserts@listR
\footnoteoptions@{R}{##1}{false}%
\global\advance\insert@countR \@ne%
@@ -3744,6 +3856,7 @@
{\footnotelang@poly}%
\footnoteoptions@{L}{##1}{true}%
\xright@appenditem{%
+ \noexpand\Xnote@true%
\noexpand\prepare@preXnotes{#1}%
\noexpand\prepare@edindex@fornote{\l@d@nums}%
\unexpanded{\def\sw@list@inedtext}{\expandafter\unexpanded\expandafter{\sw@inthisedtext}}%The value of the \sw@inthisedtext of current edtext will be pushed to \sw@list@inedtext when the notes are expanded.
@@ -3752,6 +3865,7 @@
\fi%
\noexpand\csuse{v#1footnote}{#1}%
{{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}%
+ \noexpand\Xnote@false%
}\to\inserts@list
\global\advance\insert@count \@ne%
\footnoteoptions@{L}{##1}{false}%
@@ -3778,6 +3892,7 @@
\csgdef{notenumfontX@#1}{\normalfont}%
\csgdef{notefontsizeX@#1}{\footnotesize}%
\csgdef{bhooknoteX@#1}{}%
+ \csgdef{bhookgroupX@#1}{}%
\csgdef{afterruleX@#1}{0pt}
\csgdef{beforenotesX@#1}{1.2em \@plus .6em \@minus .6em}
\csgdef{maxhnotesX@#1}{0.8\vsize}%
@@ -3793,7 +3908,14 @@
\begingroup%
\prepare@prenotesX{#1}%
\newcommand{\content}{##1}%
- \stepcounter{footnote#1}%
+ \ifl@dpairing%
+ \global\expandafter\advance\csname footnote#1@reading\endcsname by \@ne
+ \ifcsdef{footnote#1reading\the\csname footnote#1@reading\endcsname=typeset}%
+ {\setcounter{footnote#1}{\csuse{footnote#1reading\the\csname footnote#1@reading\endcsname=typeset}}}%
+ {\setcounter{footnote#1}{\the\csname footnote#1@reading\endcsname}}%
+ \else%
+ \stepcounter{footnote#1}%
+ \fi%
\protected@csxdef{@thefnmark#1}{\csuse{thefootnote#1}}%
\nottoggle{nomk@}%Nomk is set to true when using \footnoteXnomk with \parpackage
{\csuse{@footnotemark#1}}%
@@ -3807,8 +3929,8 @@
}
\newcounter{footnote#1}
\global\expandafter\renewcommand\csname thefootnote#1\endcsname{\arabic{footnote#1}}
-\arrangementX@normal{#1}%
- \fi
+ \arrangementX@normal{#1}%
+ \fi
\unless\ifnoend@
\expandafter\newwrite\csname l@d@#1end\endcsname%
\expandafter\newif\csname ifl@dend@#1\endcsname%
@@ -3825,6 +3947,7 @@
{\expandonce\content}%
{#1}%
{\unexpanded{##1}}%
+ {\ifledRcol R\else L\fi}
\@percentchar%
}%
\egroup%
@@ -3842,6 +3965,8 @@
\csgdef{Xendnotefontsize@#1}{\footnotesize}%
\csgdef{Xendbhooknote@#1}{}%
+ \csgdef{Xendsublinesep@#1}{\fullstop}%
+
\csgdef{Xendbeforenumber@#1}{0pt}
\csgdef{Xendafternumber@#1}{0.5em}
@@ -3878,6 +4003,13 @@
\csgdef{Xendehookinplaceofnumber@#1}{}%
\csgdef{Xendlinerangeseparator@#1}{\endashchar}%
+
+ \csgdef{Xendbeforepagenumber@#1}{p.}%
+ \csgdef{Xendafterpagenumber@#1}{) }%
+ \csgdef{Xendlineprefixsingle@#1}{}%
+ \csgdef{Xendlineprefixmore@#1}{}%
+
+ \newtoggle{Xendlineflag@#1}
\fi%
\listxadd{\@series}{#1}
}
@@ -3992,9 +4124,11 @@
\newhookcommand@series{Xcolalign}%
\newhookcommand@series{Xnotenumfont}
\newhookcommand@series{Xbhooknote}
+ \newhookcommand@series@reload{Xbhookgroup}{critical}
\newhookcommand@series{Xboxsymlinenum}%
\newhookcommand@series{Xsymlinenum}
\newhookcommand@series{Xbeforenumber}
+ \newhookcommand@series{Xtxtbeforenumber}
\newhookcommand@series{Xafternumber}
\newhookcommand@series{Xbeforesymlinenum}
\newhookcommand@series{Xaftersymlinenum}
@@ -4020,7 +4154,7 @@
\newhookcommand@series@reload{Xmaxhnotes}{critical}
\newhookcommand@series@reload{Xbeforenotes}{critical}
\newhooktoggle@series@reload{Xnoteswidthliketwocolumns}{critical}%
- \newhookcommand@series{Xnotefontsize}
+ \newhookcommand@series@reload{Xnotefontsize}{critical}
\newhookcommand@series{Xboxlinenum}%
\newhookcommand@series{Xboxlinenumalign}%
@@ -4032,11 +4166,13 @@
\newhookcommand@series{Xparafootsep}
\fi
-\newhookcommand@series{Xtwolines}[appref]
-\newhookcommand@series{Xmorethantwolines}[appref]
-\newhooktoggle@series{Xtwolinesbutnotmore}[appref]
-\newhooktoggle@series{Xtwolinesonlyinsamepage}[appref]
-\newhookcommand@series{Xlinerangeseparator}[appref]
+\newhooktoggle@series{Xlineflag}[appref,SEref]
+\newhookcommand@series{Xtwolines}[appref,SEref]
+\newhookcommand@series{Xmorethantwolines}[appref,SEref]
+\newhookcommand@series{Xsublinesep}[appref,SEref,side]
+\newhooktoggle@series{Xtwolinesbutnotmore}[appref,SEref]
+\newhooktoggle@series{Xtwolinesonlyinsamepage}[appref,SEref]
+\newhookcommand@series{Xlinerangeseparator}[appref,SEref]
\unless\ifnofamiliar@
\newhooktoggle@series{parindentX}
\newhookcommand@series{hangindentX}
@@ -4046,11 +4182,12 @@
\newhookcommand@series{colalignX}%
\newhookcommand@series{notenumfontX}
\newhookcommand@series{bhooknoteX}
+ \newhookcommand@series@reload{bhookgroupX}{familiar}
\newhookcommand@series@reload{beforenotesX}{familiar}
\newhookcommand@series@reload{maxhnotesX}{familiar}
\newhooktoggle@series@reload{noteswidthliketwocolumnsX}{familiar}%
\newhookcommand@series@reload{afterruleX}{familiar}
- \newhookcommand@series{notefontsizeX}
+ \newhookcommand@series@reload{notefontsizeX}{familiar}
\newhookcommand@series{afternoteX}
\newhookcommand@series{parafootsepX}
\fi
@@ -4097,11 +4234,18 @@
\newhookcommand@series{Xendhangindent}%
\fi
-\newhookcommand@series{Xendtwolines}[apprefwithpage]
-\newhookcommand@series{Xendmorethantwolines}[apprefwithpage]
-\newhooktoggle@series{Xendtwolinesbutnotmore}[apprefwithpage]
-\newhooktoggle@series{Xendtwolinesonlyinsamepage}[apprefwithpage]
-\newhookcommand@series{Xendlinerangeseparator}[apprefwithpage]
+\newhooktoggle@series{Xendlineflag}[apprefwithpage,SErefwithpage]
+\newhookcommand@series{Xendtwolines}[apprefwithpage,SErefwithpage]
+\newhookcommand@series{Xendmorethantwolines}[apprefwithpage,SErefwithpage]
+\newhooktoggle@series{Xendtwolinesbutnotmore}[apprefwithpage,SErefwithpage]
+\newhooktoggle@series{Xendtwolinesonlyinsamepage}[apprefwithpage,SErefwithpage]
+\newhookcommand@series{Xendlinerangeseparator}[apprefwithpage,SErefwithpage]
+\newhookcommand@series{Xendbeforepagenumber}[apprefwithpage,SErefwithpage,SErefonlypage]
+\newhookcommand@series{Xendafterpagenumber}[apprefwithpage,SErefwithpagem,SErefonlypage]
+\newhookcommand@series{Xendlineprefixsingle}[apprefwithpage,SErefwithpage]
+\newhookcommand@series{Xendlineprefixmore}[apprefwithpage,SErefwithpage]
+\newhookcommand@series{Xendsublinesep}[apprefwithpage,SErefwithpage]
+
\newcommand{\newhooktoggle@specific}[1]{%
\newtoggle{#1@}%
\define@key[mac]{truefootnoteoption}{#1}[]{\global\settoggle{#1@}{true}}%When enabling footnote option
@@ -4288,39 +4432,50 @@
\list@create{\labelref@list}
\newcommand*{\zz@@@}{000|000} % set two counters to zero in one go
-
\newcommand*{\edlabel}[1]{%
\ifl@dpairing\ifautopar%
\strut%
\fi\fi%
\@bsphack%
- \ifledRcol%
- \write\linenum@outR{\string\@lab}%
- \ifx\labelref@listR\empty%
- \xdef\label@refs{\zz@@@}%
+ \ifboolexpr{bool{ledRcol} or bool{ledRcol@}}{%
+ \ifXnote@%
+ \protected@write\@auxout{}%
+ {\string\l@dmake@labelsR\space\thepage|\l@dparsedstartline|\l@dparsedstartsub|\the\c@pstartR|{#1}}%
+ \ifdef{\hypertarget}{\Hy@raisedlink{\hypertarget{#1}{}}}{}%
\else%
- \gl@p\labelref@listR\to\label@refs%
- \fi%
- \ifvmode%
- \advancelabel@refs%
+ \write\linenum@outR{\string\@lab}%
+ \ifx\labelref@listR\empty%
+ \xdef\label@refs{\zz@@@}%
+ \else%
+ \gl@p\labelref@listR\to\label@refs%
+ \fi%
+ \ifvmode%
+ \advancelabel@refs%
+ \fi%
+ \protected@write\@auxout{}%
+ {\string\l@dmake@labelsR\space\thepage|\label@refs|\the\c@pstartR|{#1}}%
+ \ifdef{\hypertarget}{\Hy@raisedlink{\hypertarget{#1}{}}}{}%
\fi%
- \protected@write\@auxout{}%
- {\string\l@dmake@labelsR\space\thepage|\label@refs|\the\c@pstartR|{#1}}%
- \ifdef{\hypertarget}{\Hy@raisedlink{\hypertarget{#1}{}}}{}%
- \else%
- \write\linenum@out{\string\@lab}%
- \ifx\labelref@list\empty%
- \xdef\label@refs{\zz@@@}%
+ }{%
+ \ifXnote@%
+ \protected@write\@auxout{}%
+ {\string\l@dmake@labels\space\thepage|\l@dparsedstartline|\l@dparsedstartsub|\the\c@pstart|{#1}}%
+ \ifdef{\hypertarget}{\Hy@raisedlink{\hypertarget{#1}{}}}{}%
\else%
- \gl@p\labelref@list\to\label@refs%
- \fi%
- \ifvmode%
- \advancelabel@refs%
+ \write\linenum@out{\string\@lab}%
+ \ifx\labelref@list\empty%
+ \xdef\label@refs{\zz@@@}%
+ \else%
+ \gl@p\labelref@list\to\label@refs%
+ \fi%
+ \ifvmode%
+ \advancelabel@refs%
+ \fi%
+ \protected@write\@auxout{}%
+ {\string\l@dmake@labels\space\thepage|\label@refs|\the\c@pstart|{#1}}%
+ \ifdef{\hypertarget}{\Hy@raisedlink{\hypertarget{#1}{}}}{}%
\fi%
- \protected@write\@auxout{}%
- {\string\l@dmake@labels\space\thepage|\label@refs|\the\c@pstart|{#1}}%
- \ifdef{\hypertarget}{\Hy@raisedlink{\hypertarget{#1}{}}}{}%
- \fi%
+ }%
\@esphack}%
\newcounter{line}%
@@ -4343,7 +4498,7 @@
\expandafter\ifx\csname the@label#5\endcsname \relax\else
\led@warn@DuplicateLabel{#5}%
\fi
- \expandafter\gdef\csname the@label#5\endcsname{#1|#2|#3|#4}%
+ \expandafter\gdef\csname the@label#5\endcsname{#1|#2|#3|#4|\relax}%
\ignorespaces}
\AtBeginDocument{%
@@ -4389,6 +4544,16 @@
\led@warn@AppLabelOutEdtext{#1}%
\fi%
}%
+\newcommand{\edlabelS}[1]{%
+ \edlabel{#1:start}%
+}
+\newcommand{\edlabelE}[1]{%
+ \edlabel{#1:end}%
+}
+\newcommand{\edlabelSE}[1]{%
+ \edlabelS{#1}%
+ \edlabelE{#1}%
+}
\newrobustcmd{\wrap@edcrossref}[2]{%
\ifdef{\hyperlink}%
{\hyperlink{#1}{#2}}%
@@ -4397,7 +4562,7 @@
\newcommand*{\edpageref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{1}{#1}}}
\newcommand*{\xpageref}[1]{\l@dgetref@num{1}{#1}}
-\newcommand*{\edlineref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{2}{#1}}}%
+\newcommand*{\edlineref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{2}{#1}\xflagref{#1}}}%
\newcommand*{\xlineref}[1]{\l@dgetref@num{2}{#1}}%
\newcommand*{\sublineref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{3}{#1}}}
@@ -4406,6 +4571,7 @@
\newcommand*{\pstartref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{4}{#1}}}
\newcommand*{\xpstartref}[1]{\l@dgetref@num{4}{#1}}
+\newcommand*{\xflagref}[1]{\l@dgetref@num{5}{#1}}
\newcommand*{\l@dref@undefined}[1]{%
\expandafter\ifx\csname the@label#1\endcsname\relax
\led@warn@RefUndefined{#1}%
@@ -4421,12 +4587,13 @@
\fi}
\newcommand*{\l@dlabel@parse}{}
-\def\l@dlabel@parse#1|#2|#3|#4|#5{%
- \ifcase #5%
+\def\l@dlabel@parse#1|#2|#3|#4|#5|#6{%
+ \ifcase #6%
\or #1%
\or #2%
\or #3%
\or #4%
+ \or #5%
\fi}
\newcommand*{\xxref}[2]{%
{%
@@ -4440,69 +4607,189 @@
\else%
\expandafter\def\csname the@@label#2\endcsname{\l@dgetref@num{1}{#2}|\l@dgetref@num{2}{#2}|\l@dgetref@num{3}{#2}}%
\fi%
- \ifdefined\@Rlineflag%
- \StrDel{\csuse{the@@label#1}}{\@Rlineflag}[\@tempa]%
- \StrDel{\csuse{the@@label#2}}{\@Rlineflag}[\@tempb]%
- \else%
\letcs{\@tempa}{the@@label#1}%
\letcs{\@tempb}{the@@label#2}%
- \fi%
\linenum{\@tempa|%
\@tempb}}}%
\def\Xtwolines@appref{}%
+\def\Xtwolines@SEref{}%
+
\def\Xmorethantwolines@appref{}%
+\def\Xmorethantwolines@SEref{}%
+
\def\Xlinerangeseparator@appref{\endashchar}%
+\def\Xlinerangeseparator@SEref{\endashchar}%
+
+\def\Xsublinesep@appref{\fullstop}%
+\def\Xsublinesep@SEref{\fullstop}%
+
\newtoggle{Xtwolinesbutnotmore@appref}%
+\newtoggle{Xtwolinesbutnotmore@SEref}%
+
\newtoggle{Xtwolinesonlyinsamepage@appref}%
+\newtoggle{Xtwolinesonlyinsamepage@SEref}%
+
+\newtoggle{Xlineflag@appref}%
+\toggletrue{Xlineflag@appref}%Here exception
+\newtoggle{Xlineflag@SEref}%
+\toggletrue{Xlineflag@SEref}%%Here exception
+
\def\Xendtwolines@apprefwithpage{}%
+\def\Xendtwolines@SEwithpage{}%
+
\def\Xendmorethantwolines@apprefwithpage{}%
-\def\Xendlinerangeseparator@apprefwithpage{\endashchar}%
+\def\Xendmorethantwolines@SErefwithpage{}%
+
+\def\Xendlinerangeseparator@apprefwithpage{\endashchar}
+\def\Xendlinerangeseparator@SErefwithpage{\endashchar}
+
+\def\Xendbeforepagenumber@apprefwithpage{p.}%
+\def\Xendbeforepagenumber@SErefwithpage{p.}%
+\def\Xendbeforepagenumber@SEonlypage{p.}%
+
+\def\Xendafterpagenumber@apprefwithpage{) }%
+\def\Xendafterpagenumber@SErefwithpage{) }%
+\def\Xendafterpagenumber@SErefonlypage{) }%
+
+\def\Xendlineprefixsingle@apprefwithpage{}%
+\def\Xendlineprefixsingle@SErefwithpage{}%
+
+\def\Xendlineprefixmore@apprefwithpage{}%
+\def\Xendlineprefixmore@SErefwithpage{}%
+
\newtoggle{Xendtwolinesbutnotmore@apprefwithpage}%
+\newtoggle{Xendtwolinesbutnotmore@SErefwithpage}%
+
+\def\Xendsublinesep@apprefwithpage{\fullstop}%
+\def\Xendsublinesep@SErefwithpage{\fullstop}%
+
\newtoggle{Xendtwolinesonlyinsamepage@apprefwithpage}%
+\newtoggle{Xendtwolinesonlyinsamepage@SErefwithpage}%
+
+\newtoggle{Xendlineflag@apprefwithpage}
+\toggletrue{Xendlineflag@apprefwithpage}%Here, exception
+\newtoggle{Xendlineflag@SErefwithpage}
+\toggletrue{Xendlineflag@SErefwithpage}%Here, exception
\xdef\Xboxstartlinenum@appref{0pt}
+\xdef\Xboxstartlinenum@SEref{0pt}
+
\xdef\Xboxendlinenum@appref{0pt}
+\xdef\Xboxendlinenum@SEref{0pt}
\xdef\Xendboxstartlinenum@apprefwithpage{0pt}
+\xdef\Xendboxstartlinenum@SErefwithpage{0pt}
+
\xdef\Xendboxendlinenum@apprefwithpage{0pt}
+\xdef\Xendboxendlinenum@SErefwithpage{0pt}
\newcommand\@apprefprefixsingle{}%
+\newcommand\@SErefprefixsingle{}%
+
\newcommand\@apprefprefixmore{}%
+\newcommand\@SErefprefixmore{}%
-\newcommand{\apprefprefixsingle}[1]{%
+\newcommand{\setapprefprefixsingle}[1]{%
\gdef\@apprefprefixsingle{#1}%
}
+\newcommand{\setSErefprefixsingle}[1]{%
+ \gdef\@SErefprefixsingle{#1}%
+}
\newcommand{\setapprefprefixmore}[1]{%
\gdef\@apprefprefixmore{#1}%
}
+\newcommand{\setSErefprefixmore}[1]{%
+ \gdef\@SErefprefixmore{#1}%
+}
-\newcommandx{\appref}[2][1,usedefault]{%
- \IfStrEq{#1}{fulllines}%
- {\toggletrue{fulllines@}}%
- {}%
- \xdef\@currentseries{appref}%
- \ifdefempty{\@apprefprefixmore}%
+
+\newcommandx{\appref}[2][1,usedefault]{\refformated@{#1}{#2}{appref}}
+\newcommandx{\SEref}[2][1,usedefault]{\refformated@{#1}{#2}{SEref}}
+
+\newcommandx{\apprefwithpage}[2][1,usedefault]{\refformatedwithpage@{#1}{#2}{appref}}
+\newcommandx{\SErefwithpage}[2][1,usedefault]{\refformatedwithpage@{#1}{#2}{SEref}}
+\newcommandx{\SErefonlypage}[2][1,usedefault]{\refformatedonlypage@{#1}{#2}{SEref}}
+
+\newcommand{\refformated@}[3]{%
+ \def\do##1{%
+ \setkeys[mac]{truefootnoteoption}{##1}%
+ }%
+ \notblank{#1}{\docsvlist{#1}}{}%
+ \xdef\@currentseries{#3}%
+ \ifcsempty{@#3prefixmore}%
{\@apprefprefixsingle}%
{%
\IfEq{\xlineref{#2:start}}{\xlineref{#2:end}}%
- {\@apprefprefixsingle}%
- {\@apprefprefixmore}%
+ {\csuse{@#3prefixsingle}}%
+ {\csuse{@#3prefixmore}}%
}%
- \printlines\xpageref{#2:start}|\xlineref{#2:start}|\xsublineref{#2:start}|\xpageref{#2:end}|\xlineref{#2:end}|\xsublineref{#2:end}||%
- \togglefalse{fulllines@}%
+ \ifboolexpr{%
+ test{\ifcsundef{the@label#2:start}}%
+ or test{\ifcsundef{the@label#2:end}}%
+ }%
+ {\led@warn@pairRefUndefined{#2}\nfss@text{\reset@font\bfseries ??}}%
+ {\printlines\xpageref{#2:start}|\xlineref{#2:start}|\xsublineref{#2:start}|\xpageref{#2:end}|\xlineref{#2:end}|\xsublineref{#2:end}|\relax|\xflagref{#2:start}|}%
+ \def\do##1{%
+ \setkeys[mac]{falsefootnoteoption}{##1}%
+ }%
+ \notblank{#1}{\docsvlist{#1}}{}%
}%
-\newcommandx{\apprefwithpage}[2][1,usedefault]{%
- \IfStrEq{#1}{fulllines}%
- {\toggletrue{fulllines@}}%
- {}%
- \xdef\@currentseries{apprefwithpage}%
- \printendlines\xpageref{#2:start}|\xlineref{#2:start}|\xsublineref{#2:start}|\xpageref{#2:end}|\xlineref{#2:end}|\xsublineref{#2:end}||%
- \togglefalse{fulllines@}%
+\newcommand{\refformatedwithpage@}[3]{%
+ \def\do##1{%
+ \setkeys[mac]{truefootnoteoption}{##1}%
+ }%
+ \notblank{#1}{\docsvlist{#1}}{}%
+ \xdef\@currentseries{#3withpage}%
+ \ifboolexpr{%
+ test{\ifcsundef{the@label#2:start}}%
+ or test{\ifcsundef{the@label#2:end}}%
+ }%
+ {\led@warn@pairRefUndefined{#2}\nfss@text{\reset@font\bfseries ??}}%
+ {\printendlines\xpageref{#2:start}|\xlineref{#2:start}|\xsublineref{#2:start}|\xpageref{#2:end}|\xlineref{#2:end}|\xsublineref{#2:end}|\relax|\xflagref{#2:start}|}%
+ \def\do##1{%
+ \setkeys[mac]{falsefootnoteoption}{##1}%
+ }%
+ \notblank{#1}{\docsvlist{#1}}{}%
+}%
+
+\newcommand{\refformatedonlypage@}[3]{%
+ \def\do##1{%
+ \setkeys[mac]{truefootnoteoption}{##1}%
+ }%
+ \notblank{#1}{\docsvlist{#1}}{}%
+ \xdef\@currentseries{#3onlypage}%
+ \ifboolexpr{%
+ test{\ifcsundef{the@label#2:start}}%
+ or test{\ifcsundef{the@label#2:end}}%
+ }%
+ {\led@warn@pairRefUndefined{#2}\nfss@text{\reset@font\bfseries ??}}%
+ {\ifnum\xpageref{#2:start}=\xpageref{#2:end}%
+ \printnpnum{\xpageref{#2:start}}
+ \else%
+ \ifdefined\linerangesep@%
+ \printnpnum{%
+ \xpageref{#2:start}%
+ \linerangesep@%
+ \xpageref{#2:end}%
+ }%
+ \else%
+ \printnpnum{%
+ \xpageref{#2:start}%
+ \csuse{Xendlinerangeseparator@\@currentseries}%
+ \xpageref{#2:end}%
+ }%
+ \fi%
+ \fi%
+ }%
+ \def\do##1{%
+ \setkeys[mac]{falsefootnoteoption}{##1}%
+ }%
+ \notblank{#1}{\docsvlist{#1}}{}%
}%
\newcommand*{\edmakelabel}[2]{\expandafter\xdef\csname the@label#1\endcsname{#2}}
@@ -4975,8 +5262,6 @@
\newcommand{\ledinnotehyperpage}[2]{\csuse{#1}{\ledinnotemark{\hyperpage{#2}}}}%
\newcommand{\ledinnotemark}[1]{#1\emph{n}}%
\newcommandx{\@wredindex}[2][1=\expandonce\jobname,usedefault]{%#1 = the index name, #2 = the text
- \global\let\old@Rlineflag\@Rlineflag%
- \gdef\@Rlineflag{}%
\ifl@imakeidx%
\if@edindex@fornote@%
\IfSubStr[1]{#2}{|}{\get@index@command#2+}{\get@index@command#2|+}%
@@ -5004,7 +5289,6 @@
\fi%
\fi%
\endgroup
- \global\let\@Rlineflag\old@Rlineflag%
\@esphack%
}
\pretocmd{\makeindex}{%
@@ -5132,11 +5416,11 @@
\newcounter{stanzaindentsrepetition}
\newcount\stanza@modulo
-\newcommand*{\managestanza@modulo}[0]{
- \advance\stanza@modulo\@ne
- \ifnum\stanza@modulo>\value{stanzaindentsrepetition}
- \stanza@modulo\@ne
- \fi
+\newcommand*{\managestanza@modulo}[0]{%
+ \advance\stanza@modulo\@ne%
+ \ifnum\stanza@modulo>\value{stanzaindentsrepetition}%
+ \stanza@modulo\@ne%
+ \fi%
}
\newcommand{\stanzaindent}[1]{%
\hspace{\dimexpr#1\stanzaindentbase-\parindent\relax}%
@@ -6459,22 +6743,22 @@
\let\morethantwolines\Xmorethantwolines
\let\twolinesbutnotmore\Xtwolinesbutnotmore
\let\twolinesonlyinsamepage\Xtwolinesonlyinsamepage
- \fi
+\fi
- \unless\ifnofamiliar@
+\unless\ifnofamiliar@
\let\notesXwidthliketwocolumns\noteswidthliketwocolumnsX
- \fi
- \newcommandx{\parafootsep}[2][1,usedefault]{%
+\fi
+\newcommandx{\parafootsep}[2][1,usedefault]{%
\Xparafootsep[#1]{#2}%
\parafootsepX[#1]{#2}
- }%
+}%
- \newcommandx{\afternote}[2][1,usedefault]{%
+\newcommandx{\afternote}[2][1,usedefault]{%
\Xafternote[#1]{#2}%
\afternoteX[#1]{#2}%
- }%
+}%
- \unless\ifnoend@
+\unless\ifnoend@
\let\XendXtwolines\Xendtwolines
\let\XendXmorethantwolines\Xendmorethantwolines
\let\bhookXendnote\Xendbhooknote
@@ -6486,13 +6770,13 @@
\let\XendXbeforelemmaseparator\Xendbeforelemmaseparator
\let\XendXafterlemmaseparator\Xendafterlemmaseparator
\let\XendXinplaceoflemmaseparator\Xendinplaceoflemmaseparator
- \fi
+\fi
- \AtBeginDocument{%
- \ifdef\lineref{}{\let\lineref\edlineref}%
- }%
+\AtBeginDocument{%
+ \ifdef\lineref{}{\let\lineref\edlineref}%
+}%
- \fi%
+\fi%
\endinput
%%
%% End of file `reledmac.sty'.
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
index 296d26489e3..8c75f2dd8a2 100644
--- a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
+++ b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
@@ -28,7 +28,7 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2015/10/26 v2.5.2 reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2015/11/13 v2.6.0 reledmac extension for parallel texts]%
\RequirePackage{xspace}%
\RequirePackage{xkeyval}
@@ -76,10 +76,17 @@
\newcommand*{\led@err@BadLeftRightPstarts}[2]{%
\reledpar@error{The numbers of left (#1) and right (#2)
\string\pstart s do not match}{\@ehc}}
+\providebool{syntax@}
\newcommand*{\led@err@LeftOnRightPage}{%
- \reledpar@error{The left page has ended on a right page}{\@ehc}}
+ \notbool{syntax@}%
+ {\reledpar@error{The left page has ended on a right page}{\@ehc}}%
+ {}%
+ }
\newcommand*{\led@err@RightOnLeftPage}{%
- \reledpar@error{The right page has ended on a left page}{\@ehc}}
+ \notbool{syntax@}%
+ {\reledpar@error{The right page has ended on a left page}{\@ehc}}
+ {}%
+ }%
\newcommand*{\led@err@Leftside@PreviousNotPrinted}{%
\reledpar@error{You call a new Leftside environment while the previous one has not been typeset by \string\Pages\space or \string\Columns}{\@ehc}}
\newcommand*{\led@err@Rightside@PreviousNotPrinted}{%
@@ -88,6 +95,11 @@
\reledpar@error{\string\Pages\space must be called *outside* of the `pages` environment}{\@ehc}}
\newcommand*{\led@err@Columns@InsideEnv}{%
\reledpar@error{\string\Columns\space must be called *outside* of the `pairs` environment}{\@ehc}}
+\newcommand*{\led@err@Pages@WithoutEnv}{%
+ \reledpar@error{\string\Pages\space called without previous `pages` environment}{\@ehc}}
+\newcommand*{\led@err@Columns@WithoutEnv}{%
+ \reledpar@error{\string\Columns\space called without previous `pairs` environment}{\@ehc}}
+
\newcommand{\led@error@fail@patch@thepage}{%
\reledpar@error{Fail to patch \string\@thepage\space command.}{\@ehc}%
}%
@@ -177,12 +189,34 @@
\newcounter{sectionR}
\newcounter{subsectionR}
\newcounter{subsubsectionR}
+
+\newcount\old@chapter%
+\newcount\old@section%
+\newcount\old@subsection%
+\newcount\old@subsubsection%
+\newcommand{\save@section@number}{%
+ \ifdefined\c@chapter%
+ \global\old@chapter\value{chapter}%
+ \fi%
+ \global\old@section\value{section}%
+ \global\old@subsection\value{subsection}%
+ \global\old@subsubsection\value{subsubsection}%
+}%
\newcommand{\initnumbering@sectcountR}{
- \let\c@chapter\c@chapterR
- \let\c@section\c@sectionR
- \let\c@subsection\c@subsectionR
- \let\c@subsubsection\c@subsubsectionR
+ \ifdefined\c@chapter%
+ \setcounter{chapterR}{\old@chapter}%
+ \fi%
+ \setcounter{sectionR}{\old@section}%
+ \setcounter{subsectionR}{\old@subsection}%
+ \setcounter{subsubsectionR}{\old@subsubsection}%
+ \set@sectcountR%
}
+\newcommand{\set@sectcountR}{%
+ \let\c@chapter\c@chapterR%
+ \let\c@section\c@sectionR%
+ \let\c@subsection\c@subsectionR%
+ \let\c@subsubsection\c@subsubsectionR%
+}%
\newcommand*{\pausenumberingR}{%
\endnumberingR\global\numberingRtrue}
\newcommand*{\resumenumberingR}{%
@@ -582,6 +616,8 @@
\csgdef{Xonlyside@#1}{}%
\fi%
\unless\ifnofamiliar@%
+ \expandafter\newcount\csname footnote#1@reading\endcsname%
+ \expandafter\newcount\csname footnote#1@typeset\endcsname%
\expandafter\list@create\csname footnote#1@mk\endcsname%
\expandafter\newcommand\csname footnote#1nomk\endcsname[1]{%
\toggletrue{nomk@}%
@@ -605,6 +641,20 @@
}%
\fi
}%
+\newcommand{\save@familiarfootnote@number}{%
+ \unless\ifnofamiliar@%
+ \def\do##1{\csxdef{saved@footnote##1}{\the\csname c@footnote##1\endcsname}}%
+ \dolistloop{\@series}%
+ \fi%
+ \xdef\saved@footnote{\the\c@footnote}%
+}
+\newcommand{\get@familiarfootnote@number}{%
+ \unless\ifnofamiliar@%
+ \def\do##1{\global\expandafter\csname footnote##1@typeset\endcsname=\csuse{saved@footnote##1}}%
+ \dolistloop{\@series}%
+ \fi%
+ \global\footnote@typeset=\saved@footnote%
+}
\unless\ifnocritical@%
\newhookcommand@series{Xonlyside}%
\fi%
@@ -617,6 +667,8 @@
\dolistloop{\@series}%
}%
\init@series@par%
+\newcount\footnote@reading%
+\newcount\footnote@typeset%
\list@create{\list@pstartL@pc}%
\list@create{\list@pstartR@pc}%
@@ -646,6 +698,8 @@
\l@dpairingtrue
\l@dpagingfalse
\initnumbering@quote
+ \save@familiarfootnote@number%
+ \save@section@number%
\at@begin@pairs%
}{%
\l@dpairingfalse
@@ -658,6 +712,8 @@
\l@dpairingtrue
\l@dpagingtrue
\initnumbering@quote
+ \save@familiarfootnote@number%
+ \save@section@number%
\setlength{\Lcolwidth}{\textwidth}%
\setlength{\Rcolwidth}{\textwidth}%
}{%
@@ -1036,7 +1092,7 @@
\def\print@eledsectionR{%
\addtocounter{pstartR}{-1}%
- \initnumbering@sectcountR%
+ \set@sectcountR%
\ifdefstring{\@eledsectnotoc}{R}{\ledsectnotoc}{}%
\ifdefstring{\@eledsectmark}{R}{}{\ledsectnomark}%
\numdef{\temp@}{\l@dpscR-1}%
@@ -1386,16 +1442,6 @@
\global\let\@insertR=\undefined
\repeat}
-\def\printlinesR#1|#2|#3|#4|#5|#6|#7|{\begingroup
- \setprintlines{#1}{#2}{#3}{#4}{#5}{#6}%
- \ifl@d@pnum #1\fullstop\fi
- \ifledplinenum \linenumr@p{#2}\@Rlineflag\else \symplinenum\fi
- \ifl@d@ssub \fullstop \sublinenumr@p{#3}\fi
- \ifl@d@dash \endashchar\fi
- \ifl@d@pnum #4\fullstop\fi
- \ifl@d@elin \linenumr@p{#5}\@Rlineflag\fi
- \ifl@d@esl \ifl@d@elin \fullstop\fi \sublinenumr@p{#6}\fi
-\endgroup}
\newcommand\print@Xnotes@forpages[1]{%
\ifcsempty{Xonlyside@#1}{%
@@ -1487,9 +1533,9 @@
\def\l@dmake@labelsR#1|#2|#3|#4|#5{%
\expandafter\ifx\csname the@label#5\endcsname \relax\else
- \led@warn@DuplicateLabel{#4}%
+ \led@warn@DuplicateLabel{#5}%
\fi
- \expandafter\gdef\csname the@label#5\endcsname{#1|#2\@Rlineflag|#3|#4}%
+ \expandafter\gdef\csname the@label#5\endcsname{#1|#2|#3|#4|\@Rlineflag}%
\ignorespaces}
\AtBeginDocument{%
\def\l@dmake@labelsR#1|#2|#3|#4|#5{}%
@@ -1665,7 +1711,7 @@
\else \gdef\theledlanguageL{#1}%
\fi}
\renewcommand*{\l@duselanguage}[1]{%
- \l@doldselectlanguage{#1}}
+ \expandafter\l@doldselectlanguage\expandafter{#1}}
\gdef\theledlanguageL{\bbl@main@language}%
\gdef\theledlanguageR{\bbl@main@language}%
}%
@@ -1778,6 +1824,9 @@
\ifl@dpairing%
\led@err@Columns@InsideEnv%
\fi%
+ \expandafter\ifvoid\csname l@dRcolrawbox1\endcsname%
+ \led@err@Columns@WithoutEnv%
+ \else%
\l@dprintingcolumnstrue%
\eledsection@correcting@skip=-\baselineskip% Correction for sections' titles
\ifnum\l@dnumpstartsL=\l@dnumpstartsR\else
@@ -1791,6 +1840,7 @@
\global\par@lineR=\z@
\global\l@dpscL=\z@
\global\l@dpscR=\z@
+ \get@familiarfootnote@number%
\check@pstarts
\loop\if@pstarts
\global\pstartnumtrue
@@ -1863,8 +1913,9 @@
\global\l@dnumpstartsR=\z@
\l@dprintingcolumnsfalse%
\ignorespaces
- \global\instanzaLfalse
- \global\instanzaRfalse}
+ \global\instanzaLfalse%
+ \global\instanzaRfalse%
+ \fi}
\def\print@columnseparator{%
\ifdim\beforecolumnseparator<0pt%
@@ -2001,7 +2052,7 @@
}%
\print@columnseparator%
\parbox[t][][t]{\Rcolwidth}{%
- \initnumbering@sectcountR%
+ \set@sectcountR%
\csuse{before@pstartR@\the\l@dpscR}%
}%
\ifdefstring{\columns@position}{R}{}{\hfill}%
@@ -2024,7 +2075,7 @@
}%
\print@columnseparator%
\parbox[t][][t]{\Rcolwidth}{%
- \initnumbering@sectcountR%
+ \set@sectcountR%
\csuse{after@pendR@\the\l@dpscR}%
}%
\ifdefstring{\columns@position}{R}{}{\hfill}%
@@ -2041,6 +2092,9 @@
\ifl@dpairing%
\led@err@Pages@InsideEnv%
\fi%
+ \expandafter\ifvoid\csname l@dRcolrawbox1\endcsname%
+ \led@err@Pages@WithoutEnv%
+ \else%
\ifstrequal{#1}{mainmatter}{\Pages@mainmattertrue}{\Pages@mainmatterfalse}%
\eledsection@correcting@skip=-2\baselineskip% line correcting for section titles.
\parledgroup@notespacing@set@correction%
@@ -2063,6 +2117,7 @@
\global\l@dpscR=\z@%
\writtenlinesLfalse%
\writtenlinesRfalse%
+ \get@familiarfootnote@number%
\let\print@Xnotes\print@Xnotes@forpages%
\let\print@notesX\print@notesX@forpages%
\check@pstarts%
@@ -2152,7 +2207,7 @@
\checkpageR%
\l@duselanguage{\theledlanguageR}%
{ \loop\ifl@dsamepage%
- \initnumbering@sectcountR%
+ \set@sectcountR%
\ifdefstring{\@eledsectnotoc}{R}{\ledsectnotoc}{}%
\csuse{before@pstartR@\the\l@dpscR}%
\global\csundef{before@pstartR@\the\l@dpscR}%
@@ -2226,7 +2281,7 @@
\global\instanzaRfalse%
\l@dprintingpagesfalse%
\finish@Pages@notes%Needed to prevent final notes overlap line number
- \ignorespaces}
+ \ignorespaces\fi}
\newcommand{\finish@Pages@notes}{%
\def\do##1{%