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.dtx583
1 files changed, 429 insertions, 154 deletions
diff --git a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
index 94416d35700..ea8a9997766 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
@@ -404,6 +404,17 @@
% \changes{v2.11.0}{2016/06/02}{Make \protect\cs{parafootsepX} work}
% \changes{v2.11.0}{2016/06/02}{Fix bug in \protect\cs{Xparafootsep} in parallel typesetting}
% \changes{v2.11.0}{2016/06/02}{Add new tools to produce an apparatus of manuscripts}
+% \changes{v2.12.0}{2016/06/16}{Fix bug with familiar footnote number in optional argument of \protect\cs{pstart} or \protect\cs{pend} in parallel typesetting}
+% \changes{v2.12.0}{2016/06/16}{Add \protect\cs{hidenumberingonleftpage} and \protect\cs{hidenumberingonrightpage}}
+% \changes{v2.12.0}{2016/06/16}{\protect\cs{preXnotes} become \protect\cs{Xprenotes} (naming convention)}
+% \changes{v2.12.0}{2016/06/16}{Add \protect\option{auxdir} option.}
+% \changes{v2.12.0}{2016/06/16}{Add \protect\cs{toendnotes} and related.}
+% \changes{v2.12.0}{2016/06/16}{Fix bug when using \protect\cs{chapter} in optional argument of \protect\cs{pstart} in parallel typesetting in combination with the \protect\option{noeledsec} option.}
+% \changes{v2.12.0}{2016/06/16}{Fix spurious vertical space in \protect\cs{chapter} when used as optional argument of \protect\cs{pstart} in parallel tyepsetting.}
+% \changes{v2.12.0}{2016/06/16}{Fix bug with \protect\cs{ledinnernote} and \protect\cs{ledouternote} in parallel typesetting}
+% \changes{v2.12.0}{2016/06/16}{More accurate message to control the position of \protect\cs{Xfootnote} and \protect\cs{applabel} in the \protect\LaTeX\ code}
+% \changes{v2.12.0}{2016/06/16}{Fix bug in critical and familiar footnotes when using uppercase letters with accent mark}
+% \changes{v2.12.0}{2016/06/16}{Make endnote compatible with \protect\cs{sameword} mechanism}
% \title{\Macpackage \\
% Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename)
% has version number \fileversion, last revised \filedate.}}
@@ -681,6 +692,14 @@
% \subsection{Specific features}
% \begin{description}
% \item[draft] underlines lemmas in the main text.
+% \item[auxdir] \macpackage generates auxiliary files.
+% It could be useful to store them in a specific directory.
+% You can set it using \option{auxdir}=\meta{folder} option.
+% Note the two following point:
+% \begin{enumerate}
+% \item \TeX\ is not able to create folder. You should create it yourself.
+% \item The option does not change the default \LaTeX auxiliary files (.aux, .toc, \ldots).
+% \end{enumerate}
% \item[eledmac-compat] help to migrate from \eledmac to \reledmac (see \reff{eledmac-compat}).
% \item[nopenalties] must be called in some cases when using paragraphed endnotes (\reff{nopenalties)}
% \item[nopbinverse] prevents page break within verse environment.
@@ -1096,6 +1115,9 @@
% the number for that particular line to be hidden; namely, no line number will print.
% Note that if you use it in \protect\cs{stanza}, you must call it at the beginning of the verse.
%
+% \DescribeMacro{\hidenumberingonleftpage}
+% \cs{hidenumberingonleftpage} is like \protect{hidenumbering}, but is applied only on left page. \cs{hidenumberingonrightpage} is applied on right page.
+% They can be useful if the position of the line number is depending of the position of the page, but the position of marginal note is fixed.
% \subsubsection{Execute code at each line}
% \Macpackage provides an advanced feature for users.
% \DescribeMacro{\dolinehook}\DescribeMacro{\doinsidelinehook}
@@ -1237,6 +1259,7 @@
% Example: \protect\cs{Afootnote}\verb|[nonum]|\marg{text}.
%
% \subsubsection{Endnotes}
+% \paragraph{Inserting endnotes}
% \DescribeMacro{\Aendnote}
% \DescribeMacro{\Bendnote}
% \DescribeMacro{\Cendnote}
@@ -1257,6 +1280,8 @@
% \item \verb|linerangesep=|\meta{c} to change to \meta{c} the separator between start line and end line for this particular note.
% \end{itemize}
%
+%
+% \paragraph{Printing endnotes}
% \DescribeMacro{\doendnotes}\label{doendnotes} Normally, endnotes are not printed: you must use the
% \protect\cs{doendnotes}\marg{s}, where \meta{s} is the letter of the series to be printed. Put this command where you want the corresponding set of endnotes printed.
% In this case, all the endnotes of the \meta{s} series are printed, for all numbered sections.
@@ -1283,8 +1308,37 @@
% As endnotes may be printed at any point in the document they always
% start with the page number where they are called.
%
+% \paragraph{Code between endnotes}
+% \DescribeMacro{toendnotes}
+% \DescribeMacro{Xtoendnotes}
+% Sometimes, it is useful to insert content between endnotes of the same series: for example to separate endnotes of different sections of the same text.
+% In this case, you could use \emph{inside
+% numbered text} the command:\\
+% \cs{toendnotes}\oarg{series}\marg{content}
+% where \meta{series} is a comma-separated list of the series of endnotes where \meta{content} must be inserted.
+% If \meta{series} is empty, then \meta{content} is inserted to all the series.
+%
+% For example:
+% \begin{verbatim}
+% \toendnotes{\section{Section's title}}
+% \end{verbatim}
+%
+% Alternatively, you can use \cs{Xtoendnotes}\marg{content}, where \enquote{X} must be replaced by a series letter.
+%
+% Remember that the endnotes are temporarily stored in an auxiliary file. That means in general you want to write the \meta{content} in the auxiliary file \emph{without expanding it}, that is without interpreting \TeX\ content.
+%
+% However, in some case, you may want to write
+% once-expanded\footnote{The expansion mechanism' of \TeX is a quite complex problem, but fundamental. We have no place to explain it fully here. Read introduction to \TeX to understand well.}
+% version of the \meta{content}, that is the version where the commands are expanded on the first level.
+% This can be, for example, to get a counter value.
+% Use the starred version in this case.
+% For example:
+% \begin{verbatim}
+% \Atoendnotes*{\string\section{Letter 1 (chap. \thechapter)}}
+% \end{verbatim}
+%
% \subsubsection{Paragraph in critical apparatus}
-% By default, no paragraph can be made in the notes of critical apparatus.
+% By default, no paragraph can be made in the notes of the critical apparatus.
% You can allow it by adding the options \verb+parapparatus+ when loading the package :
% \begin{verbatim}
% \usepackage[parapparatus]{eledmac}
@@ -2173,10 +2227,10 @@
%
% \textbf{Be careful, the standard \LaTeX\ footnote rule, which is used by \macpackage, decreases 3pt. These 3pt are not changed by this command.}
%
-% \DescribeMacro{\preXnotes}
+% \DescribeMacro{\Xprenotes}
% You can set the space before the first series of critical notes printed on each page
% and set a different amount of space for each subsequent series on the page.
-% You can do it with \protect\cs{preXnotes}\marg{l}. The default value is \verb+0pt+.
+% You can do it with \protect\cs{Xprenotes}\marg{l}. The default value is \verb+0pt+.
% You can disable this feature by setting the length to 0pt.
%
% \DescribeMacro{\prenotesX}
@@ -3621,7 +3675,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2016/06/03 v2.11.0a typeset critical editions]%
+\ProvidesPackage{reledmac}[2016/06/16 v2.12.0 typeset critical editions]%
% \end{macrocode}
%
% \subsection{Package options}
@@ -3719,6 +3773,10 @@
\DeclareOptionX{nopenalties}{%
\AtBeginDocument{\let\add@penalties\relax}%
}
+\def\l@auxdir{}%
+\DeclareOptionX{auxdir}{%
+ \xdef\l@auxdir{#1/}%
+}%
% \end{macrocode}
% We use the starred form of \protect\cs{ProcessOptionsX} which executes options in
% the order listed in the source file: class options, then listed package
@@ -3860,7 +3918,7 @@
% \begin{macro}{\led@err@edtextoutsidepstart}
% \begin{macrocode}
\newcommand*{\led@err@edtextoutsidepstart}{%
- \reledmac@error{\string\edtext\space outside numbered paragraph (\pstart\ldots\pend)}{\@ehc}}%
+ \reledmac@error{\string\edtext\space outside numbered paragraph (\pstart…\pend)}{\@ehc}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\led@mess@NotesChanged}
@@ -3988,7 +4046,7 @@
% \end{macro}
%
% \begin{macro}{\led@warn@DuplicateLabel}
-% \begin{macro}{\led@warn@AppLabelOutEdtext}
+% \begin{macro}{\led@warn@AppLabelOutSecondArgEdtext}
% \begin{macro}{\led@warn@RefUndefined}
% \begin{macro}{\led@warn@RefUndefined}
% \begin{macrocode}
@@ -3996,8 +4054,8 @@
\reledmac@warning{Duplicate definition of label `#1'\@gobble}%
\@latex@warning@no@line{Label `#1' multiply defined}%
}%
-\newcommand*{\led@warn@AppLabelOutEdtext}[1]{%
- \reledmac@warning{\string\applabel\space outside of \string\edtext\space `#1' on page \the\pageno.}}%
+\newcommand*{\led@warn@AppLabelOutSecondArgEdtext}[1]{%
+ \reledmac@warning{\string\applabel\space outside of the second argument of an \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.%
@@ -4097,17 +4155,24 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\led@err@toendnotes@outsidenumbering}
+% \begin{macrocode}
+\newcommand{\led@err@toendnotes@outsidenumbering}{%
+ \reledmac@error{\string\toendnotes\space and related commands must be called inside a numbered texte (\string\beginnumbering…\string\endnumbering)}{\@ehc}%
+}%
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\led@err@EdtextWithoutFootnote}
% \begin{macrocode}
\newcommand{\led@err@EdtextWithoutFootnote}{%
- \reledmac@error{edtext without Xfootnote. Check syntaxis.}{\@ehc}%
+ \reledmac@error{edtext without Xfootnote. Check syntaxis}{\@ehc}%
}%
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\led@err@FootnoteWithoutEdtext}
+% \begin{macro}{\led@err@FootnoteNotInSecondArgEdtext}
% \begin{macrocode}
-\newcommand{\led@err@FootnoteWithoutEdtext}{%
- \reledmac@error{Xfootnote without edtext. Check syntax.}{\@ehc}%
+\newcommand{\led@err@FootnoteNotInSecondArgEdtext}[1]{%
+ \reledmac@error{#1footnote outside of the second argument of an edtext. Check syntax}{\@ehc}%
}%
% \end{macrocode}
% \end{macro}
@@ -4182,6 +4247,13 @@
}%
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\led@warning@preXnotes@deprecated}
+% \begin{macrocode}
+\newcommand{\led@warning@preXnotes@deprecated}{%
+ \reledmac@warning@preXnotes@deprecated%
+}%
+% \end{macrocode}
+% \end{macro}
% \subsection{Gobbling}
% \changes{v1.14.0}{2014/10/27}{Provide \protect\cs{@gobblefour}}
% \changes{v1.14.0}{2014/10/27}{Move gobbling command}
@@ -4415,8 +4487,8 @@
\fi
\gdef\eled@sections@@{}%
\if@noeled@sec\else%
- \makeatletter\InputIfFileExists{\jobname.eledsec\the\section@num}{}{}\makeatother%
- \immediate\openout\eled@sectioning@out=\jobname.eledsec\the\section@num\relax%
+ \makeatletter\InputIfFileExists{\l@auxdir\jobname.eledsec\the\section@num}{}{}\makeatother%
+ \immediate\openout\eled@sectioning@out=\l@auxdir\jobname.eledsec\the\section@num\relax%
\fi%
}
\newcommand*{\initnumbering@reg}{%
@@ -5481,12 +5553,12 @@
% \changes{v0.7.0}{2005/02/22}{Added \protect\cs{get@linelistfile}}
% \begin{macrocode}
\newcommand*{\get@linelistfile}[1]{%
- \InputIfFileExists{#1}{%
+ \InputIfFileExists{\l@auxdir#1}{%
\global\noteschanged@false
\begingroup
\catcode`\[=1 \catcode`\]=2
\makeatletter \catcode`\^^M=9}{%
- \led@warn@NoLineFile{#1}%
+ \led@warn@NoLineFile{\l@auxdir#1}%
\global\noteschanged@true
\begingroup}%
}
@@ -6030,8 +6102,11 @@
% \end{macro}
% \begin{macro}{\ifl@dhidenumber}
% \begin{macro}{\hidenumbering}
+% \begin{macro}{\hidenumberingonleftpage}
+% \begin{macro}{\hidenumberingonrightpage}
% \protect\cs{hidenumbering} hides number in margin.
% It uses action code 1009.
+% \cs{hidenumberingonleftpage} and \cs{hidenumberingonrightpage} ara variant, using action code only conditionnaly
% \begin{macro}{\h@num}
% \begin{macrocode}
\newif\ifl@dhidenumber
@@ -6051,10 +6126,56 @@
\xright@appenditem{-1009}\to\actions@list%
\fi%
}
+\newcommand*{\hidenumberingonleftpage}{%
+ \ifledRcol%
+ \write\linenum@outR{\string\hide@num@left}%
+ \else%
+ \write\linenum@out{\string\hide@num@left}%
+ \fi%
+}%
+
+\newcommand*{\hide@num@left}{%
+ \ifledRcol%
+ \ifodd\page@numR\else%
+ \xright@appenditem{\the\absline@numR}\to\actionlines@listR%
+ \xright@appenditem{-1009}\to\actions@listR%
+ \fi%
+ \else%
+ \ifodd\page@num\else%
+ \xright@appenditem{\the\absline@num}\to\actionlines@list%%
+ \xright@appenditem{-1009}\to\actions@list%
+ \fi%
+ \fi%
+}%
+
+\newcommand*{\hidenumberingonrightpage}{%
+ \ifledRcol%
+ \write\linenum@outR{\string\hide@num@right}%
+ \else%
+ \write\linenum@out{\string\hide@num@right}%
+ \fi%
+}%
+
+\newcommand*{\hide@num@right}{%
+ \ifledRcol%
+ \ifodd\page@numR%
+ \xright@appenditem{\the\absline@numR}\to\actionlines@listR%
+ \xright@appenditem{-1009}\to\actions@listR%
+ \fi%
+ \else%
+ \ifodd\page@num%
+ \xright@appenditem{\the\absline@num}\to\actionlines@list%%
+ \xright@appenditem{-1009}\to\actions@list%
+ \fi%
+ \fi%
+}%
+
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
% \begin{macro}{\@ref}
% \begin{macro}{\insert@count}
% \protect\cs{@ref}
@@ -6255,7 +6376,7 @@
\iffirst@linenum@out@
\immediate\closeout\linenum@out%
\global\first@linenum@out@false%
- \immediate\openout\linenum@out=#1\relax%
+ \immediate\openout\linenum@out=\l@auxdir#1\relax%
\immediate\write\linenum@out{\string\line@list@version{\this@line@list@version}}%
\ifl@dpaging%
\immediate\write\linenum@out{\string\@par@sync@option{\@par@this@sync@option}}%
@@ -6270,7 +6391,7 @@
\leavevmode%
\fi%
\closeout\linenum@out%
- \openout\linenum@out=#1\relax%
+ \openout\linenum@out=\l@auxdir#1\relax%
\write\linenum@out{\string\line@list@version{\this@line@list@version}}%
\ifl@dpaging%
\write\linenum@out{\string\@par@sync@option{\@par@this@sync@option}}%
@@ -6728,12 +6849,18 @@
% \changes{v1.15.0}{2015/01/12}{New boolean \protect\cs{if@edtext@}.}
% \changes{v1.23.0}{2015/05/18}{The boolean \protect\cs{if@edtext@} becomes the counter \protect\cs{edtext@level}.}
% This counter is increased by 1 at each level of \protect\cs{edtext}.
-% That is useful for some commands which can have a different behavior if called inside or outside of the \marg{lemma} argument.
% \begin{macrocode}
\newcount\@edtext@level%
\@edtext@level=0%
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\if@edtext@secondarg@}
+% This boolean is set to TRUE before reading the second argument of a \cs{edtext}.
+% It is tested on some macro which must be executed only inside a second argument.
+% \begin{macrocode}
+\newif\if@edtext@secondarg@%
+% \end{macrocode}
+% \end{macro}
% \changes{v1.16.0}{2014/01/23}{\protect\cs{edtext} is now defined only in \eledmac, not in \eledpar. Debug wrong numbering when using \protect\cs{sameword} + \protect\package{eledpar} + \protect\cs{tag} command.}
%
%
@@ -6828,7 +6955,9 @@
% \protect\cs{ignorespaces} as well, to skip any spaces between macros when
% several are used in series.
% \begin{macrocode}
+ \@edtext@secondarg@true%
\ignorespaces #2\relax%
+ \@edtext@secondarg@false%
% \end{macrocode}
% With \protect\package{polyglossia}, you must track whether the language reads left to right (English) or right to left (Arabic).
% \begin{macrocode}
@@ -6860,7 +6989,7 @@
\endgroup%
\ifdef{\hypertarget}%
{%
- \csedef{thisedtext@\the\@edtext@level}{\theedtext}%
+ \csedef{thisedtext@\the\@edtext@level}{\theedtext}%We need one macro by level, as #1 can contain new \edtext
\Hy@raisedlink@left{\hypertarget{\csuse{thisedtext@\the\@edtext@level}:start}{}}%
\showlemma{#1}%
\Hy@raisedlink{\hypertarget{\csuse{thisedtext@\the\@edtext@level}:end}{}}%
@@ -8915,9 +9044,10 @@
\notbool{parapparatus@}{\newcommand*}{\newcommand}{\normalfootfmt}[4]{%
\Xledsetnormalparstuff{#4}%
- \hangindent=\csuse{Xhangindent@#4}
+ \hangindent=\csuse{Xhangindent@#4}%
\everypar{\hangindent=\csuse{Xhangindent@#4}}%
- \strut{\printlinefootnote{#1}{#4}}%
+ \rule\z@\splittopskip%
+ {\printlinefootnote{#1}{#4}}%
\print@lemma{#1}{#2}{#4}%
\csuse{Xwrapcontent@#4}{#3}%
\strut\par}
@@ -8938,7 +9068,7 @@
% spacing problems if what you add takes up a different amount of
% space.
%
-% But if the skip \protect\cs{preXnotes@} is greater than 0~pt,
+% But if the skip \protect\cs{Xprenotes@} is greater than 0~pt,
% it is used instead of \protect\cs{skip}\protect\cs{footins} for the first printed series in one page.
%
% The \protect\cs{leftskip} and \protect\cs{rightskip} values
@@ -8960,12 +9090,12 @@
% In order to insert this specific skip without overlap the bottom margin of the page, Maïeul Rouquette have defined an algorithm explained in \reff{skipfirstseries}.
% Here is part of this algorithm, when the block of notes are ready to be printed.
% \begin{macrocode}
- \ifdimequal{0pt}{\preXnotes@}{}%
+ \ifdimequal{0pt}{\Xprenotes@}{}%
{%
- \iftoggle{preXnotes@}{%
- \togglefalse{preXnotes@}%
+ \iftoggle{Xprenotes@}{%
+ \togglefalse{Xprenotes@}%
\skip\csname #1footins\endcsname=%
- \glueexpr\csuse{preXnotes@}+\csuse{Xafterrule@#1}\relax%
+ \glueexpr\csuse{Xprenotes@}+\csuse{Xafterrule@#1}\relax%
}%
{}%
}%
@@ -9141,12 +9271,12 @@
\newcommand*{\parafootstart}[1]{%
\rightskip=0pt \leftskip=0pt%
\nottoggle{Xparindent@#1}{\parindent=\z@}{}%
- \ifdimequal{0pt}{\preXnotes@}{}%
+ \ifdimequal{0pt}{\Xprenotes@}{}%
{%
- \iftoggle{preXnotes@}{%
- \togglefalse{preXnotes@}%
+ \iftoggle{Xprenotes@}{%
+ \togglefalse{Xprenotes@}%
\skip\csname #1footins\endcsname=%
- \glueexpr\csuse{preXnotes@}+\csuse{Xafterrule@#1}\relax%
+ \glueexpr\csuse{Xprenotes@}+\csuse{Xafterrule@#1}\relax%
}%
{}%
}%
@@ -10527,26 +10657,26 @@
{\footnote}%
{\stepcounter\@mpfn}%
{%
- \ifl@dpairing%
- \global\advance\footnote@reading by \@ne%
- \get@thisfootnote%
- \get@fnmark{\thisfootnote}%
- \ifcsdef{footnotereading\the\footnote@reading=typeset}%
- {\setcounter{\@mpfn}{\csuse{footnotereading\the\footnote@reading=typeset}}}%
- {\setcounter{\@mpfn}{\footnote@reading}}%
- \else%
- \stepcounter\@mpfn%
- \fi%
+ \ifboolexpr{bool{l@dpairing} or bool{l@dprintingpages} or bool{l@dprintingcolumns}}{%
+ \global\advance\footnote@reading by \@ne%
+ \get@thisfootnote%
+ \get@fnmark{\thisfootnote}%
+ \ifcsdef{footnotereading\the\footnote@reading=typeset}%
+ {\setcounter{\@mpfn}{\csuse{footnotereading\the\footnote@reading=typeset}}}%
+ {\setcounter{\@mpfn}{\footnote@reading}}%
+ }{%
+ \stepcounter\@mpfn%
+ }%
}%
{}
{}
\newcommand{\get@thisfootnote}{%
- \ifl@dpairing
+ \ifboolexpr{bool{l@dpairing} or bool{l@dprintingpages} or bool{l@dprintingcolumns}}{%
\protected@xdef\thisfootnote{\the\footnote@reading}%
- \else%
- \protected@xdef\thisfootnote{\thefootnote}%
- \fi%
+ }{%
+ \protected@xdef\thisfootnote{\the\c@footnote}%
+ }%
}%
\newcommand{\l@dbfnote}[1]{%
@@ -10580,7 +10710,7 @@
\stepcounter{footnote@typeset}%
\setcounter{footnote}{\c@footnote@typeset}%
\immediate\write\@mainaux{%
- \global\csdef{footnotereading#1=typeset}{\the\c@footnote@typeset}%
+ \csgdef{footnotereading#1=typeset}{\the\c@footnote@typeset}%
}%
\def\@thefnmark{\thefootnote}%
}%
@@ -10730,7 +10860,8 @@
\ledsetnormalparstuffX{#1}%
\hangindent=\csuse{hangindentX@#1}%
\everypar{\hangindent=\csuse{hangindentX@#1}}%
- {{\csuse{notenumfontX@#1}\wrapped@footfootmarkX{#1}}\strut%
+ \rule\z@\splittopskip%
+ {{\csuse{notenumfontX@#1}\wrapped@footfootmarkX{#1}}%
\csuse{wrapcontentX@#1}{#2}%
\strut\par}}
@@ -10872,11 +11003,11 @@
% The macro \cs{get@thisfootnote} command just saves the footnote number in the \cs{thisfootnote} macro, depending on the use of pairing environments.
% \begin{macrocode}
\newcommand{\get@thisfootnoteX}[1]{%
- \ifl@dpairing%
+ \ifboolexpr{bool{l@dpairing} or bool{l@dprintingpages} or bool{l@dprintingcolumns}}{%
\protected@xdef\thisfootnote{\the\csname footnote#1@reading\endcsname}%
- \else%
- \protected@xdef\thisfootnote{\csuse{thefootnote#1}}%
- \fi%
+ }{%
+ \protected@xdef\thisfootnote{\the\csname c@footnote#1\endcsname}%
+ }%
}%
% \end{macrocode}
% \end{macro}
@@ -10902,7 +11033,7 @@
\setcounter{footnote#1}{\value{footnote#1@typeset}}%
\@namedef{@thefnmark#1}{\csuse{thefootnote#1}}%
\immediate\write\@mainaux{%
- \global\csdef{footnote#1reading#2=typeset}{\the\csname c@footnote#1@typeset\endcsname}%
+ \csgdef{footnote#1reading#2=typeset}{\the\csname c@footnote#1@typeset\endcsname}%
}%
}%
{%
@@ -10920,6 +11051,8 @@
\edtext{}{\normalbfnoteX{#1}{#2}}%
\else
\def\this@footnoteX@reading{\the\csname footnote#1@reading\endcsname}%
+ \get@thisfootnoteX{#1}%
+ \get@fnmarkX{#1}{\expandonce\thisfootnote}%
\@nameuse{regvfootnote#1}{#1}{#2}%
\fi}
@@ -11629,7 +11762,7 @@
% \section{Specific skip for first series of footnotes}\label{skipfirstseries}
% \subsubsection{Overview}
% \protect\cs{Xbeforenotes} inserts a specific skip for the first series of notes in a page.
-% As we can't know in advance which series will be the first, we call \protect\cs{prepare@preXnotes} before inserting any critical notes, in order to prevent page number overlapping.
+% As we can't know in advance which series will be the first, we call \protect\cs{prepare@Xprenotes} before inserting any critical notes, in order to prevent page number overlapping.
% \begin{enumerate}
% \item If it is the first note of the current page, it changes the footnote skip for the series to the value specified to \protect\cs{Xbeforenotes}. It also keeps the series of the note as the first one of the current page.
% \item If it is not the first note of the current page:
@@ -11651,24 +11784,25 @@
%
% And now, implementation !
% \subsubsection{User level command}
-% \begin{macro}{\preXnotes@}
-% \begin{macro}{\preXnotes}
-% \changes{v1.1.0}{2012/09/25}{New skip \protect\cs{preXnotes@}}
+% \begin{macro}{\Xprenotes@}
+% \begin{macro}{\Xprenotes}
+% \changes{v1.1.0}{2012/09/25}{New skip \protect\cs{Xprenotes@}}
% \changes{v1.2.0}{2012/10/08}{Debug in familiar footnotes (bug introduced by v1.1).}
-% If user redefines \protect\cs{preXnotes@}, via \protect\cs{preXnotes} to a value greater than 0~pt,
+% If user redefines \protect\cs{Xprenotes@}, via \protect\cs{Xprenotes} to a value greater than 0~pt,
% this skip will be added before first series notes
% instead of the notes skip.
% \begin{macrocode}
-\newtoggle{preXnotes@}
-\toggletrue{preXnotes@}
-\newcommand{\preXnotes@}{0pt}
-\newcommand*{\preXnotes}[1]{\renewcommand{\preXnotes@}{#1}}
+\newtoggle{Xprenotes@}%
+\toggletrue{Xprenotes@}%
+\newcommand{\Xprenotes@}{0pt}%
+\newcommand*{\Xprenotes}[1]{\renewcommand{\Xprenotes@}{#1}}%
+\newcommand{\preXnotes}[1]{\led@warning@preXnotes@deprecated\Xprenotes{#1}}%For compatibility
% \end{macrocode}
% \end{macro}
% \end{macro}
% The same, but for familiar footnotes.
-% \begin{macro}{\preXnotes}
-% \begin{macro}{\preXnotes@}
+% \begin{macro}{\Xprenotes}
+% \begin{macro}{\Xprenotes@}
% \begin{macrocode}
\newtoggle{prenotesX@}
\toggletrue{prenotesX@}
@@ -11680,15 +11814,15 @@
%
% \subsubsection{Internal commands}
% \begin{macro}{firstXseries@}
-% \begin{macro}{prepare@preXnotes}
+% \begin{macro}{prepare@Xprenotes}
% \begin{macrocode}
\gdef\firstXseries@{}
-\newcommand{\prepare@preXnotes}[1]{%
- \ifdimequal{0pt}{\preXnotes@}%
+\newcommand{\prepare@Xprenotes}[1]{%
+ \ifdimequal{0pt}{\Xprenotes@}%
{}%
{%
\IfStrEq{\firstXseries@}{}{%
- \global\skip\csuse{#1footins}=\preXnotes@%
+ \global\skip\csuse{#1footins}=\Xprenotes@%
\global\advance\skip\csname #1footins\endcsname by\csuse{Xafterrule@#1}%
\gdef\firstXseries@{#1}%
}%
@@ -11745,6 +11879,7 @@
\ifbool{noend@}{}{%Used instead of \ifnoend@ to prevent expansion problem
% \end{macrocode}
%
+% \subsection{Internal commands}
% \begin{macro}{\l@dend@open}
% \begin{macro}{\l@dend@close}
% \protect\cs{l@dend@open} and \protect\cs{l@dend@close} are the
@@ -11760,7 +11895,7 @@
\expandafter\immediate%
\expandafter\openout%
\csname l@d@#1end\endcsname%
- =\jobname.#1end\relax%
+ =\l@auxdir\jobname.#1end\relax%
}%
\newcommand{\l@dend@close}[1]{%
\global\boolfalse{l@dend@#1}%
@@ -11947,6 +12082,42 @@
}%
% \end{macrocode}
% \end{macro}
+% \subsection{User level commands}
+% \subsubsection{Inserting contents to endnotes}
+% The \cs{Xendnotes} commands are defined upper, when defining apparatus commands by series.
+% Here, we define.
+% only \cs{toendnotes} command not specific to a series, in order to insert arbitrary code.
+% The regular version writes an unexpanded argument, while the regular version writes a once-expanded argument.
+%
+% \begin{macro}{\toendnotes*}
+% \begin{macro}{\toendnotes*}
+% \begin{macrocode}
+\newcommandx{\toendnotes}[2][1,usedefault]{%
+ \ifboolexpr{bool{numbering} or bool{numberingR}}{%
+ \def\do##1{%
+ \reledmac@warning{toto}\expandafter\immediate\expandafter\write\csname l@d@##1end\endcsname%
+ {\unexpanded{#2}\@percentchar}%
+ }%
+ \ifstrempty{#1}%
+ {\dolistloop{\@series}}%
+ {\docsvlist{#1}}%
+ }{\led@err@toendnotes@outsidenumbering}%
+}%
+\WithSuffix\newcommandx\toendnotes*[2][1,usedefault]{%
+ \ifboolexpr{bool{numbering} or bool{numberingR}}{%
+ \def\do##1{%
+ \reledmac@warning{toto}\expandafter\immediate\expandafter\write\csname l@d@##1end\endcsname%
+ {#2\@percentchar}%
+ }%
+ \ifstrempty{#1}%
+ {\dolistloop{\@series}}%
+ {\docsvlist{#1}}%
+ }{\led@err@toendnotes@outsidenumbering}%
+}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \subsubsection{Printing endnotes}
% \begin{macro}{\doendnotes}
% \begin{macro}{\ifXendinsertsep@}
% \protect\cs{doendnotes} is
@@ -11961,7 +12132,7 @@
\begingroup
\makeatletter
\expandafter\let\csname #1end\endcsname=\endprint
- \input\jobname.#1end%
+ \input\l@auxdir\jobname.#1end%
\global\Xendinsertsep@false%
\endgroup}
% \end{macrocode}
@@ -11982,7 +12153,7 @@
{\cslet{#1end}{\endprint}}%
{\cslet{#1end}{\@gobblefive}}%
}%
- \input\jobname.#1end%
+ \input\l@auxdir\jobname.#1end%
\global\Xendinsertsep@false%
\endgroup%
}%
@@ -12302,7 +12473,12 @@
% \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][]{%
- \ifnum\@edtext@level>0%
+ \if@edtext@secondarg@%
+ \ifledRcol%
+ \ifcsstring{Xonlyside@#1}{L}{\led@error@note@called@onrightside{#1footnote}}{}%
+ \else%
+ \ifcsstring{Xonlyside@#1}{R}{\led@error@note@called@onleftside{#1footnote}}{}%
+ \fi%
\begingroup%
\newcommand{\content}{##2}%
\ifnumberedpar@%
@@ -12322,7 +12498,7 @@
{\unexpanded{\let\index\nindex}}%There is no note number… so
{}%
\noexpand\Xnote@true%
- \noexpand\prepare@preXnotes{#1}%
+ \noexpand\prepare@Xprenotes{#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
@@ -12358,7 +12534,7 @@
{\unexpanded{\let\index\nindex}}%There is no note number… so
{}%
\noexpand\Xnote@true%
- \noexpand\prepare@preXnotes{#1}%
+ \noexpand\prepare@Xprenotes{#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.
\ifl@dpairing%
@@ -12387,7 +12563,7 @@
\fi%
\endgroup%
\else%
- \led@err@FootnoteWithoutEdtext%
+ \led@err@FootnoteNotInSecondArgEdtext{#1}%
\fi%
\ignorespaces%
}
@@ -12454,13 +12630,21 @@
% Read \parpackage's handbook about that (\reff{reledpar-familiarfootnotenumber}).
% \begin{macrocode}
\global\expandafter\advance\csname footnote#1@reading\endcsname by \@ne%
- \ifl@dpairing%
+ \ifboolexpr{bool{l@dpairing} or bool{l@dprintingpages} or bool{l@dprintingcolumns}}{%
\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}
+% We also have to check consistency with \cs{onlysideX} setting.
+% \begin{macrocode}
+ \ifledRcol%
+ \ifcsstring{onlysideX@#1}{L}{\led@error@note@called@onrightside{footnote#1}}{}%
+ \else%
+ \ifcsstring{onlysideX@#1}{R}{\led@error@note@called@onleftside{footnote#1}}{}%
+ \fi%
% \end{macrocode}
% And now, the feature not depending of wether we are preparing parallel typesetting
% \begin{macrocode}
@@ -12539,6 +12723,7 @@
\newcommand{\content}{##2}%
\stepcounter{labidx}%
\expandafter\immediate\expandafter\write\csname l@d@#1end\endcsname{%
+ \unexpanded{\def\sw@list@inedtext}{\expandafter\unexpanded\expandafter{\sw@inthisedtext}} %Volountary space, to add linebreak in the output file
\expandafter\string\csname #1end\endcsname%
{\ifnumberedpar@\l@d@nums\fi}%
{\ifnumberedpar@\expandonce\@tag\fi}%
@@ -12553,6 +12738,21 @@
\ignorespaces%
}%
% \end{macrocode}
+% \subsubsection{Tools}
+% The \cs{Xtoendnotes} command inserts any arbitrary content into the endnote file.
+% It is an alias of the more generalist \cs{addtoennotes}
+% \begin{macrocode}
+
+ \global\expandafter\newcommand\csname #1toendnotes\endcsname[1]{%
+ \toendnotes[#1]{##1}%
+ }%
+
+ \expandafter\WithSuffix\expandafter\newcommand\csname #1toendnotes\endcsname*[1]{%
+ \toendnotes*[#1]{##1}%
+ }%
+
+% \end{macrocode}
+% \subsubsection{Internal commands}
% \protect\cs{Xendnote} commands called \protect\cs{Xend} commands on to the endnote file; these are analogous to the various
% \verb"footfmt" commands above, and they take the same arguments.
% When we process this file, we want to pick out the notes of one
@@ -12568,6 +12768,7 @@
% \begin{macrocode}
\global\expandafter\newcount\csname #1end@bysection\endcsname%
% \end{macrocode}
+%
% \subsubsection{The options}
% \begin{macrocode}
\csgdef{Xendwraplemma@#1}{}
@@ -13614,7 +13815,7 @@
% \protect\cs{applabel}, if called in \protect\cs{edtext} will insert automatically both a start and an end label for the current edtext lines.
% \begin{macrocode}
\newcommand*{\applabel}[1]{%
- \ifnum\@edtext@level>0%
+ \if@edtext@secondarg@%
% \end{macrocode}
% Label should not be already defined.
% \begin{macrocode}
@@ -13660,7 +13861,7 @@
% Warning if \protect\cs{applabel} is called outside of \protect\cs{edtext}.
% \begin{macrocode}
\else%
- \led@warn@AppLabelOutEdtext{#1}%
+ \led@warn@AppLabelOutSecondArgEdtext{#1}%
\fi%
% \end{macrocode}
% End of \protect\cs{applabel}
@@ -14199,10 +14400,10 @@
% the default for line numbers).
% \protect\cs{l@dgetsidenote@margin} returns the number associated to side note margin:
% \begin{description}
-% \item[left]: 0
-% \item[right]: 1
-% \item[outer]: 2
-% \item[inner]: 3
+% \item[left:] 0
+% \item[right:] 1
+% \item[outer:] 2
+% \item[inner:] 3
% \end{description}
% \changes{v0.5.1}{2004/04/10}{Added \protect\cs{sidenotemargin} and \protect\cs{sidenote@margin}}
% \changes{v0.7.0}{2005/02/23}{Added \protect\cs{l@dgetsidenote@margin}}
@@ -14298,24 +14499,9 @@
% \begin{macrocode}
\newcommand*{\ledleftnote}[1]{\edtext{}{\l@dlsnote{#1}}}
\newcommand*{\ledrightnote}[1]{\edtext{}{\l@drsnote{#1}}}
-
-\newcommand*{\ledinnernote}[1]{%
- \ifodd\c@page% Do not use \page@num, because it is not yet calculated when command is called
- \ledleftnote{#1}%
- \else%
- \ledrightnote{#1}%
- \fi%
-}
-
-\newcommand*{\ledouternote}[1]{%
- \ifodd\c@page% Do not use \page@num, because it is not yet calculated when command is called
- \ledrightnote{#1}%
- \else%
- \ledleftnote{#1}%
- \fi%
-}
-
-\newcommand*{\ledsidenote}[1]{\edtext{}{\l@dcsnote{#1}}}
+\newcommand*{\ledsidenote}[1]{\edtext{}{\l@dcsnote{#1}}}%
+\newcommand*{\ledinnernote}[1]{\edtext{}{\l@disnote{#1}}}%
+\newcommand*{\ledouternote}[1]{\edtext{}{\l@dosnote{#1}}}%
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -14327,6 +14513,8 @@
% \begin{macro}{\l@dlsnote}
% \begin{macro}{\l@drsnote}
% \begin{macro}{\l@dcsnote}
+% \begin{macro}{\l@desnote}
+% \begin{macro}{\l@disnote}
% \changes{v1.12.0}{2014/08/05}{\protect\cs{l@dlsnote},\protect\cs{l@drsnote} and \protect\cs{l@dcsnote} defined only one time, in \eledmac, including needs for eledpar case.}.
% The `footnotes' for left, right, and moveable sidenotes. The whole
% scheme is reminiscent of the critical footnotes code.
@@ -14347,7 +14535,10 @@
\to\inserts@list
\global\advance\insert@count \@ne%
\fi
- \fi\ignorespaces\endgroup}
+ \fi%
+ \ignorespaces%
+ \endgroup%
+}%
\newcommand*{\l@drsnote}[1]{%
\begingroup%
@@ -14362,7 +14553,9 @@
\to\inserts@list
\global\advance\insert@count \@ne%
\fi
- \fi\ignorespaces\endgroup}
+ \fi\ignorespaces%
+ \endgroup%
+}%
\newcommand*{\l@dcsnote}[1]{%
\begingroup%
@@ -14377,16 +14570,56 @@
\to\inserts@list
\global\advance\insert@count \@ne%
\fi
- \fi\ignorespaces\endgroup}
+ \fi\ignorespaces%
+ \endgroup%
+}%
+
+\newcommand*{\l@disnote}[1]{%
+ \begingroup%
+ \newcommand{\content}{#1}%
+ \ifnumberedpar@%
+ \ifledRcol%
+ \xright@appenditem{\noexpand\vl@disnote{\expandonce\content}}%
+ \to\inserts@listR%
+ \global\advance\insert@countR \@ne%
+ \else%
+ \xright@appenditem{\noexpand\vl@disnote{\expandonce\content}}%
+ \to\inserts@list%
+ \global\advance\insert@count \@ne%
+ \fi%
+ \fi\ignorespaces%
+ \endgroup%
+}%
+
+\newcommand*{\l@dosnote}[1]{%
+ \begingroup%
+ \newcommand{\content}{#1}%
+ \ifnumberedpar@%
+ \ifledRcol%
+ \xright@appenditem{\noexpand\vl@dosnote{\expandonce\content}}%
+ \to\inserts@listR%
+ \global\advance\insert@countR \@ne%
+ \else%
+ \xright@appenditem{\noexpand\vl@dosnote{\expandonce\content}}%
+ \to\inserts@list%
+ \global\advance\insert@count \@ne%
+ \fi%
+ \fi\ignorespaces%
+ \endgroup%
+}%
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\vl@dlsnote}
% \begin{macro}{\vl@drsnote}
% \begin{macro}{\vl@dcsnote}
+% \begin{macro}{\vl@disnote}
+% \begin{macro}{\vl@dosnote}
% Put the left/right text into boxes, but just save the moveable text.
% \protect\cs{l@dcsnotetext}, \protect\cs{l@dcsnotetext@l} and \protect\cs{l@dcsnotetext@r} are \protect\package{etoolbox}'s lists which will store the content of side notes.
% We store the content in lists, because we need to loop later on them, in case many sidenote co-exist for the same line.
@@ -14404,6 +14637,7 @@
% \item \protect\cs{l@dcsnotetext@l} if \protect\cs{ledsidenote} is to be put on right.
% \end{itemize}
% \end{itemize}
+% \cs{vl@disnote} and \cs{vl@dosnote} just call \cs{vl@dlsnote} or \cs{vl@drsnote}, depending of the page.
% \begin{macrocode}
\newcommand*{\vl@dlsnote}[1]{%
\ifledRcol@%
@@ -14443,10 +14677,38 @@
}
\newcommand*{\vl@dcsnote}[1]{\listgadd{\l@dcsnotetext}{#1}}
+\newcommand{\vl@disnote}[1]{%
+ \ifledRcol@%
+ \@tempcnta=\page@numR%
+ \else%
+ \@tempcnta=\page@num%
+ \fi%
+ \ifodd\@tempcnta% ODD => right page => inner side = left side
+ \vl@dlsnote{#1}%
+ \else%
+ \vl@drsnote{#1}%
+ \fi%
+}%
+
+\newcommand{\vl@dosnote}[1]{%
+ \ifledRcol@%
+ \@tempcnta=\page@numR%
+ \else%
+ \@tempcnta=\page@num%
+ \fi%
+ \ifodd\@tempcnta% ODD => right page => outer side = right side
+ \vl@drsnote{#1}%
+ \else%
+ \vl@dlsnote{#1}%
+ \fi%
+}%
+
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
%
% \begin{macro}{\setl@dlp@rbox}
@@ -17573,12 +17835,6 @@
% \end{macrocode}
% \end{macro}
% \subsection{Auxiliary commands}
-% \begin{macro}{\if@eled@sectioning}
-% The boolean \protect\cs{if@eled@sectioning} is set to true when a sectioning command is called by a \protect\cs{eledxxx} command, and set to false after. It is used to enable/disable line number printing.
-% \begin{macrocode}
-\newif\if@eled@sectioning
-% \end{macrocode}
-% \end{macro}
% \begin{macro}{\print@leftmargin@eledsection}
% \begin{macro}{\print@rightmargin@eledsection}
% \protect\cs{print@leftmargin@eledsection} and \protect\cs{print@rightmargin@eledsection} are added by \macpackage inside the code of sectioning command, in order to affix lines numbers.
@@ -17619,7 +17875,6 @@
% \end{macro}
% \end{macro}
% \subsection{Patching standard commands}
-% \begin{macro}{\chapter}
% \begin{macro}{\M@sect}
% \begin{macro}{\@mem@old@ssect}
% \begin{macro}{\@makechapterhead}
@@ -17640,15 +17895,6 @@
%
% \begin{macrocode}
\AtBeginDocument{%
-\patchcmd{\chapter}{\clearforchapter}{%
- \if@eled@sectioning\else%
- \ifl@dprintingpages\else%
- \clearforchapter%
- \fi%
- \fi%
- }
- {}
- {}
\pretocmd{\M@sect}
@@ -17695,15 +17941,7 @@
{}
{}
-\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{%
- \if@eled@sectioning\else%
- \ifl@dprintingpages\else%
- \if@openright\cleardoublepage\else\clearpage\fi%No clearpage inside a \Pages: will keep critical notes from printing on the title page. Here for classical classes
- \fi%
- \fi%
- }%
- {}%
- {}%
+
\patchcmd{\scr@startchapter}{\if@openright\cleardoublepage\else\clearpage\fi}{%
\if@eled@sectioning\else%
@@ -17837,13 +18075,13 @@
{}
{}
}%
-}
+}%
% \end{macrocode}
-% Now, we have finished to patch the commands, using \# with a catcode equals to 12. We close the \verb+\notbool{@noeled@sec}+ statement, restore the normal catcode for \# and reopen a new \verb+\notbool{@noeled@sec}+ statement.
+% Close the \verb+\notbool{@noeled@sec}+ statement.
+% Also, we have finished patching the commands, using \# with a catcode equal to 12, so we are restoring the normal catcode for \#.
% \begin{macrocode}
{}}%
\protect\catcode`\#=6 %Space NEEDS by \catcode
-\notbool{@noeled@sec}{%
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -17852,7 +18090,44 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \begin{macro}{\chapter}
+% We patch the \protect\cs{chapter} command even if the \option{noeledsec} option is called, because we can use \cs{chapter} in the optional argument of a \cs{pstart} in parallel typesetting.
+% \begin{macrocode}
+\AtBeginDocument{%
+\patchcmd{\chapter}{\clearforchapter}{%
+ \if@eled@sectioning\else%
+ \ifl@dprintingpages\else%
+ \clearforchapter%
+ \fi%
+ \fi%
+ }%
+ {}%
+ {}%
+
+\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{%
+ \if@eled@sectioning\else%
+ \ifl@dprintingpages%
+ \endgraf%
+ \else%
+ \if@openright\cleardoublepage\else\clearpage\fi%No clearpage inside a \Pages: will keep critical notes from printing on the title page. Here for classical classes
+ \fi%
+ \fi%
+ }%
+ {}%
+ {}%
+}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\if@eled@sectioning}
+% The boolean \protect\cs{if@eled@sectioning} is set to true when a sectioning command is called by a \protect\cs{eledxxx} command, and set to false after. It is used to enable/disable line number printing.
+% \begin{macrocode}
+\newif\if@eled@sectioning%
+% \end{macrocode}
% \end{macro}
+% We reopen a new \verb+\notbool{@noeled@sec}+ statement, as we will define the \cs{elesection} commands.
+% \begin{macrocode}
+\notbool{@noeled@sec}{%
+% \end{macrocode}
% \subsection{Main code of \protect\cs{eledxxx} commands}
% \begin{macro}{\eled@sectioning@out}
% \protect\cs{eled@sectioning@out} is the output file, to dump the pstarts where a sectioning command is used.
@@ -18001,18 +18276,18 @@
{%
\ifstrempty{#1}%
{%
- \global\csdef{eled@sectioning@#3#5}{\let\edtext=\dummy@edtext@showlemma\chapter{#2}}%
- \global\csdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\chaptermark{#2}}%
+ \csgdef{eled@sectioning@#3#5}{\let\edtext=\dummy@edtext@showlemma\chapter{#2}}%
+ \csgdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\chaptermark{#2}}%
}%Need for \pairs, because of using parbox.
{%
- \global\csdef{eled@sectioning@#3#5}{\let\edtext=\dummy@edtext@showlemma\chapter[#1]{#2}}%
- \global\csdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\chaptermark{#2}}%Need for \pairs, because of using parbox.
+ \csgdef{eled@sectioning@#3#5}{\let\edtext=\dummy@edtext@showlemma\chapter[#1]{#2}}%
+ \csgdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\chaptermark{#2}}%Need for \pairs, because of using parbox.
}%
}%
{%
\ifstrempty{#1}%
- {\global\csdef{eled@sectioning@#3#5}{\let\edtext=\dummy@edtext@showlemma\chapter*{#2}}}%
- {\global\csdef{eled@sectioning@#3#5}{\let\edtext=\dummy@edtext@showlemma\chapter*[#1]{#2}}}%Bug in LaTeX!
+ {\csgdef{eled@sectioning@#3#5}{\let\edtext=\dummy@edtext@showlemma\chapter*{#2}}}%
+ {\csgdef{eled@sectioning@#3#5}{\let\edtext=\dummy@edtext@showlemma\chapter*[#1]{#2}}}%Bug in LaTeX!
}%
\listcsgadd{eled@sections#5@@}{#3}%
}
@@ -18020,17 +18295,17 @@
\ifstrempty{#4}%
{\ifstrempty{#1}%
{%
- \global\csdef{eled@sectioning@#3#5}{\section{#2}}%
- \global\csdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\sectionmark{#2}}%Need for \pairs, because of using parbox.
+ \csgdef{eled@sectioning@#3#5}{\section{#2}}%
+ \csgdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\sectionmark{#2}}%Need for \pairs, because of using parbox.
}%
{%
- \global\csdef{eled@sectioning@#3#5}{\section[#1]{#2}}%
- \global\csdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\sectionmark{#1}}%Need for \pairs, because of using parbox.
+ \csgdef{eled@sectioning@#3#5}{\section[#1]{#2}}%
+ \csgdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\sectionmark{#1}}%Need for \pairs, because of using parbox.
}%
}%
{\ifstrempty{#1}%
- {\global\csdef{eled@sectioning@#3#5}{\section*{#2}}}%
- {\global\csdef{eled@sectioning@#3#5}{\section*[#1]{#2}}}%Bug in LaTeX!
+ {\csgdef{eled@sectioning@#3#5}{\section*{#2}}}%
+ {\csgdef{eled@sectioning@#3#5}{\section*[#1]{#2}}}%Bug in LaTeX!
}
\listcsgadd{eled@sections#5@@}{#3}%
}
@@ -18038,29 +18313,29 @@
\ifstrempty{#4}%
{\ifstrempty{#1}%
{%
- \global\csdef{eled@sectioning@#3#5}{\subsection{#2}}%
- \global\csdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\csuse{subsectionmark}{#2}}%Need for \pairs, because of using parbox. \csuse in case of \subsectionmark is not defined (book)
+ \csgdef{eled@sectioning@#3#5}{\subsection{#2}}%
+ \csgdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\csuse{subsectionmark}{#2}}%Need for \pairs, because of using parbox. \csuse in case of \subsectionmark is not defined (book)
}%
{%
- \global\csdef{eled@sectioning@#3#5}{\subsection[#1]{#2}}%
- \global\csdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\csuse{subsectionmark}{#1}}%Need for \pairs, because of using parbox. \csuse in case of \subsectionmark is not defined (book)
+ \csgdef{eled@sectioning@#3#5}{\subsection[#1]{#2}}%
+ \csgdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\csuse{subsectionmark}{#1}}%Need for \pairs, because of using parbox. \csuse in case of \subsectionmark is not defined (book)
}%
}%
{\ifstrempty{#1}%
- {\global\csdef{eled@sectioning@#3#5}{\subsection*{#2}}}%
- {\global\csdef{eled@sectioning@#3#5}{\subsection*[#1]{#2}}}%Bug in LaTeX!
+ {\csgdef{eled@sectioning@#3#5}{\subsection*{#2}}}%
+ {\csgdef{eled@sectioning@#3#5}{\subsection*[#1]{#2}}}%Bug in LaTeX!
}
\listcsgadd{eled@sections#5@@}{#3}%
}
\def\eled@subsubsection#1#2#3#4#5{%
\ifstrempty{#4}%
{\ifstrempty{#1}%
- {\global\csdef{eled@sectioning@#3#5}{\subsubsection{#2}}}%
- {\global\csdef{eled@sectioning@#3#5}{\subsubsection[#1]{#2}}}%
+ {\csgdef{eled@sectioning@#3#5}{\subsubsection{#2}}}%
+ {\csgdef{eled@sectioning@#3#5}{\subsubsection[#1]{#2}}}%
}%
{\ifstrempty{#1}%
- {\global\csdef{eled@sectioning@#3#5}{\subsubsection*{#2}}}%
- {\global\csdef{eled@sectioning@#3#5}{\subsubsection*[#1]{#2}}}%Bug in LaTeX!
+ {\csgdef{eled@sectioning@#3#5}{\subsubsection*{#2}}}%
+ {\csgdef{eled@sectioning@#3#5}{\subsubsection*[#1]{#2}}}%Bug in LaTeX!
}
\listcsgadd{eled@sections#5@@}{#3}%
}