summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/reledmac/reledmac.dtx')
-rw-r--r--Master/texmf-dist/source/latex/reledmac/reledmac.dtx102
1 files changed, 76 insertions, 26 deletions
diff --git a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
index df809b04abc..eefa3d1c619 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
@@ -571,6 +571,8 @@
% \changes{v2.35.0}{2020/11/29}{Add \protect\cs{linenumannotationothersidetrue}.}
% \changes{v2.35.0}{2020/11/29}{Add new hooks: \protect\cs{Xnolinenumber}, \protect\cs{Xendnolinenumber}, \protect\cs{Xnolinenumberifannotation}, \protect\cs{Xendnolinenumberifannotation}.}
% \changes{v2.35.1}{2020/12/20}{Fix a bug when printing ending page number in endnotes and using the \protect\package{hyperref} package.}
+% \changes{v2.36.0}{2020/01/21}{Fix bug with sublineation on right side of parallel typesetting.}
+% \changes{v2.36.0}{2020/01/21}{Add \protect\cs{Xnonote} and \protect\cs{nonoteX}.}
% Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename)
% has version number \fileversion, last revised \filedate.}}
%
@@ -2255,7 +2257,6 @@
% \label{displayoptions}
% \subsection{Introduction}
% \changes{v1.0.0}{2012/09/15}{New generic commands to customize footnote display.}
-% \subsection{Introduction}
% Some commands can be used to change the way the footnotes are displayed.\footnote{In the code of \macpackage, these commands are called \enquote{hooks}.}
% All can have an optional argument \oarg{s}, which is the letter of the series\,---\,or
% a list of letters separated by comma\,---\,depending on which option is applied.
@@ -2320,6 +2321,14 @@
% change the \protect\cs{hsize} within the document, call
% the arrangement macro again afterwards to take account of the new
% value.
+% \subsection{Disabling footnote}
+% \DescribeMacro{Xnonote}\DescribeMacro{nonoteX}
+% Some time, you may want to export your edition without notes, but don't want to modify globally your code.
+%
+% \cs{Xnonote}\oarg{s} allow to disable critical notes for the series \meta{s}.
+%
+% \cs{nonoteX}\oarg{s} is the same for familiar notes.
+%
% \subsection{Control number printing}
% \subsubsection{Print line number only at first time}
% \DescribeMacro{\Xnumberonlyfirstinline}\label{Xnumberonlyfirstinline}
@@ -4450,7 +4459,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2020/12/20 v2.35.1 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2021/01/21 v2.36.0 typesetting critical editions]%
% \end{macrocode}
%
% \subsection{Package options}
@@ -6176,11 +6185,12 @@
% \end{macro}
%
% \begin{macro}{\ifsublines@}
+% \begin{macro}{\ifsublines@R}
% \begin{macro}{\sublines@true}
% \begin{macro}{\sublines@false}
% We maintain an associated flag, \protect\cs{ifsublines@},
% to tell us whether we're within
-% a sub-line range or not.
+% a sub-line range or not (and the equivalent for right side: \cs{ifsublines@R})
%
% You may wonder why we do not just use the value of \protect\cs{subline@num}
% to determine this---treating anything greater than $0$ as an
@@ -6195,10 +6205,12 @@
% interrupted by several stage directions.
% \begin{macrocode}
\newif\ifsublines@
+\newif\ifsublines@R%
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\absline@num}
% The count \protect\cs{absline@num} stores the
@@ -6852,16 +6864,28 @@
% do not really take effect until the next line of text. Instead
% they set a flag that notifies \protect\cs{@nl} of the necessary action.
% \begin{macrocode}
-\newcommand*{\sub@on}{\ifsublines@
+\newcommand*{\sub@on}{%
+ \ifboolexpr{%
+ bool{sublines@}%
+ or%
+ (bool{sublines@R} and bool{ledRcol})%
+ }{%
\let\sub@change=\relax
- \else
+ }{%
\def\sub@change{1}%
- \fi}
-\newcommand*{\sub@off}{\ifsublines@
+ }%
+}%
+\newcommand*{\sub@off}{%
+ \ifboolexpr{%
+ bool{sublines@}%
+ or%
+ (bool{sublines@R} and bool{ledRcol})%
+ }{%
\def\sub@change{-1}%
- \else
+ }{%
\let\sub@change=\relax
- \fi}
+ }%
+}%
% \end{macrocode}
% \end{macro}
@@ -6916,7 +6940,7 @@
\newcommand*{\@set}[1]{%
\ifledRcol
- \ifsublines@
+ \ifsublines@R%
\subline@numR=#1\relax
\else
\line@numR=#1\relax
@@ -6985,7 +7009,7 @@
\newcommand*{\set@line@action}{%
\ifledRcol
\xright@appenditem{\the\absline@numR}\to\actionlines@listR
- \ifsublines@
+ \ifsublines@R%
\@l@dtempcnta=-\subline@numR
\else
\@l@dtempcnta=-\line@numR
@@ -7014,7 +7038,7 @@
\newcommand*{\sub@action}{%
\ifledRcol
\xright@appenditem{\the\absline@numR}\to\actionlines@listR
- \ifsublines@
+ \ifsublines@R%
\xright@appenditem{-1001}\to\actions@listR
\else
\xright@appenditem{-1002}\to\actions@listR
@@ -7706,18 +7730,35 @@
% \begin{macrocode}
-\newcommand*{\startsub}{\dimen0\lastskip
- \ifdim\dimen0>0pt \unskip \fi
- \ifledRcol \write\linenum@outR{\string\sub@on}%
- \else \write\linenum@out{\string\sub@on}%
- \fi
- \ifdim\dimen0>0pt \hskip\dimen0 \fi}
-\def\endsub{\dimen0\lastskip
- \ifdim\dimen0>0pt \unskip \fi
- \ifledRcol \write\linenum@outR{\string\sub@off}%
- \else \write\linenum@out{\string\sub@off}%
- \fi
- \ifdim\dimen0>0pt \hskip\dimen0 \fi}
+\newcommand*{\startsub}{%
+ \dimen0\lastskip%
+ \ifdim\dimen0>0pt%
+ \unskip%
+ \fi%
+ \ifledRcol%
+ \write\linenum@outR{\string\sub@on}%
+ \else%
+ \write\linenum@out{\string\sub@on}%
+ \fi%
+ \ifdim\dimen0>0pt%
+ \hskip\dimen0%
+ \fi%
+}%
+
+\def\endsub{%
+ \dimen0\lastskip%
+ \ifdim\dimen0>0pt%
+ \unskip%
+ \fi%
+ \ifledRcol%
+ \write\linenum@outR{\string\sub@off}%
+ \else%
+ \write\linenum@out{\string\sub@off}%
+ \fi%
+ \ifdim\dimen0>0pt%
+ \hskip\dimen0%
+ \fi%
+}%
% \end{macrocode}
% \end{macro}
@@ -10463,7 +10504,7 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\set@txtbeforenotesX}
-% The \cs{set@txtbeforenotesX} does the same for the \cs{textbeforenotesX}.
+% The \cs{set@txtbeforenotesX} does the same for the \cs{txtbeforenotesX}.
% \begin{macrocode}
\newcommand{\set@txtbeforenotesX}{%
\unless\ifnofamiliar@%
@@ -14980,6 +15021,8 @@
\csgdef{Xsymlinenum@#1}{}%
\csgdef{Xsymlinenumannotation@#1}{}%
+ \newtoggle{Xnonote@#1}%
+
\newtoggle{Xnonumber@#1}%
\newtoggle{Xnolinenumber@#1}%
\newtoggle{Xnolinenumberifannotation@#1}%
@@ -15029,6 +15072,7 @@
% \changes{v1.23.0}{2015/04/29}{Prevent spurious spaces when \protect\cs{Afootnote} and similar commands are followed by spaces (bug added on 1.0.0!).}
% \begin{macrocode}
\global\notbool{parapparatus@}{\expandafter\newcommand\expandafter *}{\expandafter\newcommand}\csname #1footnote\endcsname[2][]{%
+ \nottoggle{Xnonote@#1}{%
\if@edtext@secondarg@%
\ifledRcol%
\ifcsstring{Xonlyside@#1}{L}{\led@error@note@called@onrightside{#1footnote}}{}%
@@ -15125,6 +15169,7 @@
\else%
\led@err@FootnoteNotInSecondArgEdtext{#1}%
\fi%
+ }{\@noneed@Footnotetrue}% End of \nottoggle{Xnonote@#1}{%
\ignorespaces%
}
% \end{macrocode}
@@ -15174,6 +15219,7 @@
\csgdef{widthX@#1}{\hsize}%
\expandafter\csgdef{innotemarkX@#1}##1{\ledinnotemark{##1}}%
\csgdef{txtbeforenotesX@#1}{}%
+ \newtoggle{nonoteX@#1}%
\newtoggle{txtbeforesnotesX@#1@typeset}%Not directly used by user, but internal
\newtoggle{txtbeforenotesonlyonceX@#1}%
% End of for familiar footnotes.
@@ -15191,6 +15237,7 @@
% \begin{macrocode}
\global\expandafter\newcommand\csname footnote#1\endcsname[2][]{%
+ \nottoggle{nonoteX@#1}{%
\begingroup%
\prepare@prenotesX{#1}%
\newcommand{\content}{##2}%
@@ -15247,6 +15294,7 @@
{\let\index\orig@@index}%
{}%
\endgroup%
+ }{}%End of the notoggleX@#1
}
% \end{macrocode}
% Then define the counters.
@@ -15758,6 +15806,8 @@
\newhooktoggle@series{Xstanzaonlyfirst}%
\newhookcommand@series{Xstanzaseparator}%
+ \newhooktoggle@series{Xnonote}%
+
\newhooktoggle@series{Xonlypstart}
\newhooktoggle@series{Xnonbreakableafternumber}
\newhooktoggle@series{Xlemmadisablefontselection}
@@ -15828,7 +15878,7 @@
\newhooktoggle@series{txtbeforenotesonlyonceX}%
\newhookcommand@series@reload{widthX}{familiar}%
\newhookcommand@series{innotemarkX}[][1]%
-
+ \newhooktoggle@series{nonoteX}%
\ifundef{\hsizeX}%
{%
\newcommandx{\hsizeX}[2][1,usedefault]{%