summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-11-06 21:58:48 +0000
committerKarl Berry <karl@freefriends.org>2017-11-06 21:58:48 +0000
commit8250d9a7dd7d0b665030bd401781a79022ddc865 (patch)
treef2df69706bd33b51880b83e9d722b8d2a4007131 /Master/texmf-dist/source/latex/reledmac/reledmac.dtx
parent5949a9aee0bb29a10f1ec50a6cb8dd50a1c7de81 (diff)
reledmac (6nov17)
git-svn-id: svn://tug.org/texlive/trunk@45709 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/reledmac/reledmac.dtx')
-rw-r--r--Master/texmf-dist/source/latex/reledmac/reledmac.dtx77
1 files changed, 48 insertions, 29 deletions
diff --git a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
index fe550515fbb..6acb2f99500 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
@@ -429,7 +429,7 @@
% \changes{v2.15.2}{2016/09/12}{Fix a bug with \protect\package{fancyhdr} package 3.8 and later.}
% \changes{v2.15.3}{2016/09/26}{Fix a bug with \protect\cs{section} in optional argument of \protect\cs{pstart} and empty line before \protect\cs{pend} (bug added in v2.8.2).}
% \changes{v2.15.3}{2016/09/26}{Simplification of the sectioning command code.}
-% \changes{v2.16.0}{2016/10/02}{Display a warning message if using a version of \protect\LaTeX that is too old.}
+% \changes{v2.16.0}{2016/10/02}{Display a warning message if using a version of \protect\LaTeX\ that is too old.}
% \changes{v2.16.0}{2016/10/02}{Deleted dead code.}
% \changes{v2.16.0}{2016/10/02}{New options for \protect\cs{fnpos} and \protect\cs{mpfnpos} to set a customized order for familiar and critical footnotes.}
% \changes{v2.16.0}{2016/10/02}{Compatibility with new features of \protect\reledpar}
@@ -490,6 +490,7 @@
% \changes{v2.24.0}{2017/08/17}{Fix spurious space with \protect\cs{labelpstarttrue}}
% \changes{v2.24.1}{2017/08/31}{Compatibility with \protect\parpackage 2.20.2}
% \changes{v2.24.2}{2017/10/21}{Fix bug between tabular environments and endnotes}
+%% \changes{v2.25.0}{2017/11/05}{Add \protect\cs{Xendtxtbeforenotes} hook}
% Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename)
% has version number \fileversion, last revised \filedate.}}
%
@@ -1135,6 +1136,8 @@
% or sub-line depending on what it started out as, even if it
% changes in the middle.
%
+% \DescribeMacro{Xsublinesep}
+% \DescribeMacro{Xsublinesepside}
% You can change the separator between the line number and the subline number either by using \cs{Xsublinesep} without any optional argument (\reff{Xsublinesep}) or by using \cs{Xsublinesepside}. In the second case, it will change the separator only for line numbers in the margins, not in the footnotes.
% \subsubsection{Locking lineation}
% \DescribeMacro{\startlock}
@@ -1798,7 +1801,7 @@
%
% Please not that the maintainer of this script is not the maintainer of \macpackage.
%
-% \subsection{Apparatus of Manuscripts}
+% \subsection{Apparatus of manuscripts}
% The critical notes mostly refer to textual variants between manuscripts which contain the text to be edited.
% It may so happen that the manuscripts only contain parts of the text.
% Depending on one's wishes, \macpackage\ can generate lists of relevant manuscripts for any delimited portion of text.
@@ -2110,6 +2113,16 @@
% \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.
+% \paragraph{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}.
% \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.}
@@ -2295,16 +2308,6 @@
% \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.
@@ -2355,7 +2358,7 @@
%
%
% \DescribeMacro{\Xendinplaceoflemmaseparator}\label{Xendinplaceoflemmaseparator}
-% With \protect\cs{Xendinplaceoflemmaseparator}\oarg{s}\marg{l} you can add some space if you chose to remove the lemma separator. The default value is 0.5~em.
+% With \protect\cs{Xendinplaceoflemmaseparator}\oarg{s}\marg{l} you can add some space if you choose to remove the lemma separator. The default value is 0.5~em.
%
%
% \subsection{Font style}
@@ -2457,15 +2460,15 @@
% \end{verbatim}
%
% \DescribeMacro{\Xbhooknote}
-% \protect\cs{Xbhooknote}\oarg{s}\marg{code} is to be used at the beginning of the critical footnotes.
+% \protect\cs{Xbhooknote}\oarg{s}\marg{code} is to be used at the beginning of each critical footnotes.
%
%
% \DescribeMacro{\bhooknoteX}
-% \protect\cs{bhooknoteX}\oarg{s}\marg{code} is to be used at the beginning of the familiar footnotes.
+% \protect\cs{bhooknoteX}\oarg{s}\marg{code} is to be used at the beginning of each familiar footnote.
%
%
% \DescribeMacro{\Xendbhooknote}
-% \protect\cs{Xendbhooknote}\oarg{s}\marg{code} is to be used at the beginning of the endnotes.
+% \protect\cs{Xendbhooknote}\oarg{s}\marg{code} is to be used at the beginning of each endnote.
%
% \subsection{Arbitrary code before inserting note}
% \DescribeMacro{\Xbeforeinserting}
@@ -2560,8 +2563,12 @@
% \DescribeMacro{\Xtxtbeforenotes}
% You can add text before critical footnotes with \protect\cs{Xtxtbeforenotes}\oarg{s}\marg{text}.
% \DescribeMacro{\txtbeforenotesX}
+%
% You can add text before familiar footnotes with \protect\cs{txtbeforenotesX}\oarg{s}\marg{text}.
%
+% \DescribeMacro{\Xendtxtbeforenotes}
+% You can add text before endnotes with \protect\cs{Xendtxtbeforenotes}\oarg{s}\marg{text}. The text will be typeset only if we have endnotes.
+%
% \DescribeMacro{\Xtxtbeforenotesonlyonce}
% \DescribeMacro{\txtbeforenotesonlyonceX} By default, such texts are inserted at the beginning of the groups of notes on each pages.
% You can add \cs{Xtxtbeforenotesonlyonce} (for critical footnotes) and \cs{txtbeforenotesonlyonceX} (for familiar footnotes) to insert them only the first time notes are typeset.
@@ -3394,7 +3401,7 @@
% Its default name is \verb+reledmac-markup-attr.xdy+,
% but you can change it by using your own as an argument of the \verb|xindy+hyperref| option.
%
-% If you chose to use both \verb+xindy+ and the \verb+hyperref+ package,
+% If you choose to use both \verb+xindy+ and the \verb+hyperref+ package,
% you must do three more things:
% \begin{enumerate}
% \item Use \verb|xindy+hyperref| option when loading the \macpackage package.
@@ -4062,7 +4069,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2017/10/21 v2.24.2 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2017/11/05 v2.25.0 typesetting critical editions]%
% \end{macrocode}
%
% \subsection{Package options}
@@ -9598,7 +9605,8 @@
\ifcsdef{\csuse{series@display#1}@begin@insert}{%
\csuse{\csuse{series@display#1}@begin@insert}{#1}%
}{}%
- \strut\csuse{Xnotefontsize@#1}\csuse{Xtxtbeforenotes@#1}%
+ \strut\csuse{Xnotefontsize@#1}%
+ \csuse{Xtxtbeforenotes@#1}%
\egroup%
}%
}%
@@ -13036,6 +13044,10 @@
% \end{itemize}
% \begin{macrocode}
\global\notbool{parapparatus@}{}{\long}\def\endprint#1#2#3#4#5#6#7{{%
+ \iftoggle{Xendfirstnote@#4}{%
+ \global\togglefalse{Xendfirstnote@#4}%
+ \csuse{Xendtxtbeforenotes@#4}%
+ }{}%
\csuse{Xendbhooknote@#4}%
\csuse{Xendnotefontsize@#4}%
\hangindent=\csuse{Xendhangindent@#4}%
@@ -13217,6 +13229,7 @@
\begingroup
\csxdef{prevpagenum@#1}{}%
\csxdef{prevpagerange@#1}{}%
+ \global\toggletrue{Xendfirstnote@#1}%
\makeatletter
\expandafter\let\csname #1end\endcsname=\endprint
\input\l@auxdir\jobname.#1end%
@@ -13238,6 +13251,7 @@
\begingroup%
\makeatletter%
\def\l@d@section##1{%
+ \global\toggletrue{Xendfirstnote@#1}%
\ifnumequal{##1}{\csname #1end@bysection\endcsname}%
{\cslet{#1end}{\endprint}}%
{\cslet{#1end}{\@gobbleseven}}%
@@ -14054,11 +14068,14 @@
\csgdef{Xendlemmafont@#1}{}%
- \newtoggle{Xendpagenumberonlyfirst@#1}%
- \newtoggle{Xendpagenumberonlyfirstifsingle@#1}%
- \newtoggle{Xendpagenumberonlyfirstintwo@#1}%
- \csgdef{Xendsympagenum@#1}{}%
- \csgdef{Xendinplaceofpagenumber@#1}{0pt}%
+ \newtoggle{Xendpagenumberonlyfirst@#1}%
+ \newtoggle{Xendpagenumberonlyfirstifsingle@#1}%
+ \newtoggle{Xendpagenumberonlyfirstintwo@#1}%
+ \csgdef{Xendsympagenum@#1}{}%
+ \csgdef{Xendinplaceofpagenumber@#1}{0pt}%
+
+ \csgdef{Xendtxtbeforenotes@#1}{}%
+ \newtoggle{Xendfirstnote@#1}%Not a hook, but used to apply Xendtxtbeforenotes
% \end{macrocode}
% End of endnotes declaration
@@ -14452,12 +14469,14 @@
\newhookcommand@series{Xendhangindent}%
- \newhooktoggle@series{Xendpagenumberonlyfirst}%
- \newhooktoggle@series{Xendpagenumberonlyfirstifsingle}%
- \newhooktoggle@series{Xendpagenumberonlyfirstintwo}%
- \newhookcommand@series{Xendsympagenum}%
- \newhookcommand@series{Xendinplaceofpagenumber}%
+ \newhooktoggle@series{Xendpagenumberonlyfirst}%
+ \newhooktoggle@series{Xendpagenumberonlyfirstifsingle}%
+ \newhooktoggle@series{Xendpagenumberonlyfirstintwo}%
+ \newhookcommand@series{Xendsympagenum}%
+ \newhookcommand@series{Xendinplaceofpagenumber}%
+ \newhookcommand@series{Xendtxtbeforenotes}%
+
\fi
\newhooktoggle@series{Xendlineflag}[apprefwithpage,SErefwithpage]
\newhookcommand@series{Xendtwolines}[apprefwithpage,SErefwithpage]