summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/reledmac/reledmac.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-03-09 03:01:02 +0000
committerNorbert Preining <norbert@preining.info>2021-03-09 03:01:02 +0000
commit0da44a32af4f9dd986fd60a51e7f9a1f932fe27c (patch)
treed808a7d66257621c8aa482570d0d7b9846690d4e /macros/latex/contrib/reledmac/reledmac.dtx
parentd9784b9287b55be1161c5d383c2a7ebde45671ee (diff)
CTAN sync 202103090301
Diffstat (limited to 'macros/latex/contrib/reledmac/reledmac.dtx')
-rw-r--r--macros/latex/contrib/reledmac/reledmac.dtx118
1 files changed, 69 insertions, 49 deletions
diff --git a/macros/latex/contrib/reledmac/reledmac.dtx b/macros/latex/contrib/reledmac/reledmac.dtx
index 7fe954be7f..7535c44e0e 100644
--- a/macros/latex/contrib/reledmac/reledmac.dtx
+++ b/macros/latex/contrib/reledmac/reledmac.dtx
@@ -156,7 +156,7 @@
% \my@changes#1.\@nil
% }%
%\makeatother
-% \newcommand{\edmac}{\protect\package{edmac}\xspace}
+% \newcommand{\edmac}{\protect\package{EDMAC}\xspace}
% \newcommand{\tabmac}{\protect\package{tabmac}\xspace}
% \newcommand{\edstanza}{\protect\package{edstanza}\xspace}
@@ -577,16 +577,19 @@
% \changes{v2.37.0}{2021/02/28}{Fix incompatibility between \protect\cs{eledsection} (and related) and \protect\package{hyperref}. Incompatibility was introduced by some changes in \protect\package{hyperref} package.}
% \changes{v2.37.0}{2021/02/28}{Fix bug with \protect\cs{Xnonote}}
% \changes{v2.37.0}{2021/02/28}{Improve syntaxis check.}
+% \changes{v2.37.1}{2021/03/08}{Fix bug with \protect\cs{edgls} and related in \protect\cs{edtext} argument. Require \protect\package{glossaries-extra} is \protect\package{glossaries} is loaded.}
% Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename)
% has version number \fileversion, last revised \filedate.}}
%
% \author{%
% Ma\"ieul Rouquette\thanks{\texttt{maieul at maieul dot net}} \\
-% {\small based on the original \protect\package{ledmac} by} \\
+% {\small based on the \protect\package{ledmac} by} \\
% Peter Wilson \\
% Herries Press \\
-% {\small which was based on the original \edmac, \tabmac{} and \edstanza{} by} \\
-% John Lavagnino, Dominik Wujastyk, Herbert Breger and Wayne Sullivan.
+% {\small with the \edmac\ plugins \tabmac{} and \edstanza{} by}\\
+% Herbert Breger and Wayne Sullivan,
+% {\small all based on \edmac\ by} \\
+% John Lavagnino and Dominik Wujastyk
% }
%
% \date{}
@@ -3818,6 +3821,8 @@
% \section{Glossary}
% \Macpackage\ provides mechanism to make glossaries with the \package{glossaries} package, refering not to the page, but to the page and line.
% \subsection{Preamble setting}
+% When using \macpackage\ with \package{glossaries}, you must use also \package{glossaries-extra}.
+%
% The standard compositor between page and line number in \macpackage\ is a dash, while \package{glossaries} uses, by default, a dot.
% Consequently, you must:
% \begin{itemize}
@@ -4463,7 +4468,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2021/02/28 v2.37.0 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2021/03/08 v2.37.1 typesetting critical editions]%
% \end{macrocode}
%
% \subsection{Package options}
@@ -5043,6 +5048,13 @@
}%
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\led@error@require@glossariesextra}
+% \begin{macrocode}
+\newcommand{\led@error@require@glossariesextra}{%
+ \reledmac@error{When using both reledmac and glossaries, you must also use glossaries-extra}{\@ehc}%
+}%
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\led@error@fail@patch@@makecol}
% \begin{macrocode}
\newcommand{\led@error@fail@patch@@makecol}{%
@@ -18760,6 +18772,8 @@
% \begin{macrocode}
\AtBeginDocument{%
\@ifpackageloaded{glossaries}{%
+ \@ifpackageloaded{glossaries-extra}{}{\led@error@require@glossariesextra}%
+ \newif\ifl@noexpands@edgl%A boolean switched to true in \no@expands
% \end{macrocode}
% First those which arguments are \oarg{options}\marg{label}\oarg{insert}.
% \begin{macrocode}
@@ -18811,17 +18825,25 @@
\renewcommand{\do}[1]{%
\expandafter\DeclareRobustCommandx\csname ed#1\endcsname[3][1,3,usedefault]{%
\doedindexlabel%
- \ifdef{\hypertarget}{%
- \Hy@raisedlink@left{\hypertarget{pageline.\thepageline}{}}%
- }{}%
- \csname#1\endcsname[counter=pageline,##1]{##2}[##3]%
+ \ifl@noexpands@edgl%
+ \csname#1\endcsname[counter=pageline,noindex,##1]{##2}[##3]%
+ \else%
+ \ifdef{\hypertarget}{%
+ \Hy@raisedlink@left{\hypertarget{pageline.\thepageline}{}}%
+ }{}%
+ \csname#1\endcsname[counter=pageline,##1]{##2}[##3]%
+ \fi%
}%
\expandafter\WithSuffix\expandafter\DeclareRobustCommandx\csname ed#1\endcsname*[3][1,3,usedefault]{%
\doedindexlabel%
- \ifdef{\hypertarget}{%
- \Hy@raisedlink@left{\hypertarget{pageline.\thepageline}{}}%
- }{}%
- \csname#1\endcsname*[counter=pageline,##1]{##2}[##3]%
+ \ifl@noexpands@edgl%
+ \csname#1\endcsname*[counter=pageline,noindex,##1]{##2}[##3]%
+ \else%
+ \csname#1\endcsname*[counter=pageline,##1]{##2}[##3]%
+ \ifdef{\hypertarget}{%
+ \Hy@raisedlink@left{\hypertarget{pageline.\thepageline}{}}%
+ }{}%
+ \fi%
}%
}%
\dolistloop{\edglsomo}%
@@ -18834,17 +18856,25 @@
\renewcommand{\do}[1]{%
\expandafter\DeclareRobustCommandx\csname ed#1\endcsname[3][1,usedefault]{%
\doedindexlabel%
- \ifdef{\hypertarget}{%
- \Hy@raisedlink@left{\hypertarget{pageline.\thepageline}{}}%
- }{}%
- \csname#1\endcsname[counter=pageline,##1]{##2}{##3}%
+ \ifl@noexpands@edgl%
+ \csname#1\endcsname[counter=pageline,noindex,##1]{##2}{##3}%
+ \else%
+ \ifdef{\hypertarget}{%
+ \Hy@raisedlink@left{\hypertarget{pageline.\thepageline}{}}%
+ }{}%
+ \csname#1\endcsname[counter=pageline,##1]{##2}{##3}%
+ \fi%
}%
\expandafter\WithSuffix\expandafter\DeclareRobustCommandx\csname ed#1\endcsname*[3][1,usedefault]{%
\doedindexlabel%
- \ifdef{\hypertarget}{%
- \Hy@raisedlink@left{\hypertarget{pageline.\thepageline}{}}%
- }{}%
- \csname#1\endcsname*[counter=pageline,##1]{##2}{##3}%
+ \ifl@noexpands@edgl%
+ \csname#1\endcsname*[counter=pageline,noindex,##1]{##2}{##3}%
+ \else%
+ \ifdef{\hypertarget}{%
+ \Hy@raisedlink@left{\hypertarget{pageline.\thepageline}{}}%
+ }{}%
+ \csname#1\endcsname*[counter=pageline,##1]{##2}{##3}%
+ \fi%
}%
}%
\dolistloop{\edglsomm}%
@@ -18856,44 +18886,34 @@
\renewcommand{\do}[1]{%
\expandafter\DeclareRobustCommandx\csname ed#1\endcsname[2][1,usedefault]{%
\doedindexlabel%
- \ifdef{\hypertarget}{%
- \Hy@raisedlink@left{\hypertarget{pageline.\thepageline}{}}%
- }{}%
- \csname#1\endcsname[counter=pageline,##1]{##2}%
+ \ifl@noexpands@edgl%
+ \csname#1\endcsname[counter=pageline,noindex,##1]{##2}%
+ \else%
+ \ifdef{\hypertarget}{%
+ \Hy@raisedlink@left{\hypertarget{pageline.\thepageline}{}}%
+ }{}%
+ \csname#1\endcsname[counter=pageline,##1]{##2}%
+ \fi%
}%
\expandafter\WithSuffix\expandafter\DeclareRobustCommandx\csname ed#1\endcsname*[2][1,usedefault]{%
\doedindexlabel%
- \ifdef{\hypertarget}{%
- \Hy@raisedlink@left{\hypertarget{pageline.\thepageline}{}}%
- }{}%
- \csname#1\endcsname*[counter=pageline,##1]{##2}%
+ \ifl@noexpands@edgl%
+ \csname#1\endcsname*[counter=pageline,noindex,##1]{##2}%
+ \else%
+ \ifdef{\hypertarget}{%
+ \Hy@raisedlink@left{\hypertarget{pageline.\thepageline}{}}%
+ }{}%
+ \csname#1\endcsname*[counter=pageline,##1]{##2}%
+ \fi%
}%
}%
\dolistloop{\edglsom}%
% \end{macrocode}
-% \cs{l@noexpands@edgl} is a macro to avoid expanding glossaries macros in \cs{edtext} first argument. It is called by \cs{no@expands}.
+% \cs{l@noexpands@edgl} is a macro to switch \cs{ifl@noexpands@edgl} to true in \cs{no@expands}.
% Its definition is made dynamically.
% \begin{macro}{\l@noexpands@edgl}
% \begin{macrocode}
- \def\l@noexpands@edgl{}%
- \renewcommand\do[1]{%
- \xappto\l@noexpands@edgl{%
- \noexpand\RenewDocumentCommand\csname ed#1\endcsname{omos}{}%
- }%
- }%
- \dolistloop{\edglsomo}%
- \renewcommand\do[1]{%
- \xappto\l@noexpands@edgl{%
- \noexpand\RenewDocumentCommand\csname ed#1\endcsname{omms}{}%
- }%
- }%
- \dolistloop{\edglsomm}%
- \renewcommand\do[1]{%
- \xappto\l@noexpands@edgl{%
- \noexpand\RenewDocumentCommand\csname ed#1\endcsname{oms}{}%
- }%
- }%
- \dolistloop{\edglsom}%
+ \def\l@noexpands@edgl{\l@noexpands@edgltrue}%
}{\let\l@noexpands@edgl\relax}%
}%
% \end{macrocode}