diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/eledmac/eledmac.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/eledmac/eledmac.dtx | 357 |
1 files changed, 289 insertions, 68 deletions
diff --git a/Master/texmf-dist/source/latex/eledmac/eledmac.dtx b/Master/texmf-dist/source/latex/eledmac/eledmac.dtx index 6ebb4ad6c22..c7d383b7086 100644 --- a/Master/texmf-dist/source/latex/eledmac/eledmac.dtx +++ b/Master/texmf-dist/source/latex/eledmac/eledmac.dtx @@ -51,7 +51,7 @@ % % \fi % -% \CheckSum{10117} +% \CheckSum{10305} % % \makeatletter % \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters @@ -206,7 +206,7 @@ % \changes{v1.12.3}{2014/08/15}{Correct bug with side and familiar notes in tabular environments.} % \changes{v1.12.3}{2014/08/15}{Debug left and right notes (bugs added by 1.12.0)} % \changes{v1.12.3}{2014/08/15}{Debug \cs{eledxxx} with some paper size} -% \changes{v1.12.4}{2014/08/25}{Debug spurious page breaking before \cs{chapter} (bug added by 1.12.0)} +% \changes{v1.12.4}{2014/08/25}{Debug spurious page breaks before \cs{chapter} (bug added by 1.12.0)} % \hyphenation{man-u-script man-u-scripts} % % @@ -1235,25 +1235,25 @@ % \subsubsection{Control line number printing} % \DescribeMacro{\numberonlyfirstinline} % \changes{v1.0.1}{2012/09/16}{Correction on \cs{numberonlyfirstinline} with lineation by pstart or by page.} -% By default, the line number is printed in every note. If you want to print it only the first time for a value (i.e one time for line 1, one time for line 2 etc.), you can use \cs{numberonlyfirstinline}\oarg{s}. Use \cs{numberonlyfirstinline}\oarg{s}\oarg{false} to cancel it (\verb|<s>| can be empty if you want to disable it for every series). +% By default, the line number is printed in every note. If you want to print it only the first time for a value (i.e one time for line 1, one time for line 2 etc.), you can use \cs{numberonlyfirstinline}\oarg{s}. Use \cs{numberonlyfirstinline}\oarg{s}\verb+[false]+ to cancel it (\verb|<s>| can be empty if you want to disable it for every series). % % \DescribeMacro{\numberonlyfirstintwolines} % \changes{v1.1}{2012/09/25}{Add \cs{numberonlyfirstintwolines}} % Suppose you have a lemma on line~2 and a lemma between line~2 and line~3. % With \cs{numberonlyfirstinline}, the second lemma is considered to be on the same line as the first lemma. % But if you use both \cs{numberonlyfirstinline}\oarg{s} and \cs{numberonlyfirstintwolines}\oarg{s}, the distinction is made. -% Use \cs{numberonlyfirstintwolines}\oarg{s}\oarg{false} to cancel it (\verb|<s>| can be empty if you want to disable it for every series). +% Use \cs{numberonlyfirstintwolines}\oarg{s}\verb+[false]+ to cancel it (\verb|<s>| can be empty if you want to disable it for every series). % % \DescribeMacro{\symlinenum} % For setting a particular symbol in place of the line number, you can use \cs{symlinenum}\oarg{s}\marg{symbol} in combination with \cs{numberonlyfirstinline}\oarg{s}. From the second lemma of the same line, the symbol will be used instead of line number. % % \DescribeMacro{\nonumberinfootnote} -% You can use \cs{nonumberinfootnote}\oarg{s} if you don't want to have the line number in a footnote. To cancel it, use \cs{nonumberinfootnote}\oarg{s}\oarg{false}. +% You can use \cs{nonumberinfootnote}\oarg{s} if you don't want to have the line number in a footnote. To cancel it, use \cs{nonumberinfootnote}\oarg{s}\verb+[false]+. % % \changes{v1.1}{2012/09/25}{Add \cs{pstartinfootnote} and \cs{onlypstartinfootnote}} % \DescribeMacro{\pstartinfootnote} % You can use \cs{pstartinfootnote}\oarg{s} if you want to print the pstart number in the footnote, before the line and subline number. -% Use \cs{pstartinfootnote}\oarg{s}\oarg{false} to cancel it (\verb|<s>| can be empty if you want to disable it for every series). +% Use \cs{pstartinfootnote}\oarg{s}\verb+[false]+ to cancel it (\verb|<s>| can be empty if you want to disable it for every series). % Note that when you change the lineation system, the option is automatically switched : % \begin{itemize} % \item If you use lineation by pstart, the option is enabled. @@ -1262,7 +1262,7 @@ % % \DescribeMacro{\onlypstartinfootnote} % In combination with \cs{pstartinfootnote}, you can use \cs{onlypstartinfootnote}\oarg{s} if you want to print only the pstart number in the footnote, and not the line and subline number. -% Use \cs{onlypstartinfootnote}\oarg{s}\oarg{false} to cancel it (\verb|<s>| can be empty if you want to disable it for every series). +% Use \cs{onlypstartinfootnote}\oarg{s}\verb+[false]+ to cancel it (\verb|<s>| can be empty if you want to disable it for every series). % % \DescribeMacro{\beforenumberinfootnote} % With \cs{beforenumberinfootnote}\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. @@ -1272,7 +1272,7 @@ % %\changes{v1.4.3}{2012/12/18}{Add \cs{nonbreakableafternumber}.} %\DescribeMacro{\nonbreakableafternumber} -% By default, the space defined by \cs{afternumberinfootnote} is breakable. With \cs{nonbreakableafternumber}\oarg{s} it becomes nonbreakable. Use \cs{nonbreakableafternumber}\oarg{s}\oarg{false} to cancel it (\verb|<s>| can be empty if you want to disable it for every series). +% By default, the space defined by \cs{afternumberinfootnote} is breakable. With \cs{nonbreakableafternumber}\oarg{s} it becomes nonbreakable. Use \cs{nonbreakableafternumber}\oarg{s}\verb+[false]+ to cancel it (\verb|<s>| can be empty if you want to disable it for every series). % % \DescribeMacro{\beforesymlinenum} % With \cs{beforesymlinenum}\oarg{s}\marg{l} you can add some space before the line symbol in a footnote. The default value is value set by \cs{beforenumberinfootnote}. @@ -1482,7 +1482,13 @@ % the trick. Page \pageref{nobreak} explains why this restriction % is necessary.} % -% +% \changes{v1.13.0}{2014/09/16}{Add \cs{Xnoteswidthliketwocolumns} and \cs{notesXwidthliketwocolumns}} +% \DescribeMacro{Xnoteswidthliketwocolumns}\DescribeMacro{notesXwidthliketwocolumns} +% If you use \Lpack{eledpar} \cs{columns} macro, you can call : +% \begin{itemize} +% \item \cs{Xnoteswidthliketwocolumns}\oarg{s} to create critical notes with a two-column size width. Use \cs{Xnoteswidthliketwocolumns}\oarg{s}\verb+[false]+ to disable it. +% \item \cs{notesXwidthliketwocolumns}\oarg{s} to create familiar notes with a two-column size width. Use \cs{notesXwidthliketwocolumns}\oarg{s}\verb+[false]+ to disable it. +% \end{itemize} % \subsection{Fonts}\label{fonts} % One of the most important features of the appearance of the notes, % and indeed of your whole document, will be the fonts used. We will @@ -1954,7 +1960,7 @@ % % \DescribeMacro{\ledinnernote} % \DescribeMacro{\ledouternote} -% \cs{ledleftnote}\marg{text} will put \meta{text} into the inner margin level +% \cs{ledinnernote}\marg{text} will put \meta{text} into the inner margin level % with where the command was issued. Similarly, \cs{ledouternote}\marg{text} % puts \meta{text} in the outer margin. % @@ -2439,7 +2445,7 @@ % At the second run, you will see the formating. % And consequently, at the third run, you will see the table of contents. % -% For technical reason, the page break before \cs{elechapter} can't be added automatically. You have to insert it manually via \cs{beforeeledchapter}, which must be called outside of a numbering section. +% For technical reasons, the page break before \cs{elechapter} can't be added automatically. You have to insert it manually via \cs{beforeeledchapter}, which must be called outside of a numbering section. % \DescribeMacro{\noeledsec} % If you aren't going to have any \cs{eledxxx} commands, you can say \cs{noeledsec} % in your file, before the first \cs{beginnumbering}, to suppress the @@ -2844,7 +2850,7 @@ % \begin{macrocode} %<*code> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{eledmac}[2014/09/12 v1.12.8 LaTeX port of EDMAC]% +\ProvidesPackage{eledmac}[2014/09/16 v1.13.0 LaTeX port of EDMAC]% % \end{macrocode} % % Generally, these are the modifications to the original. @@ -2864,15 +2870,22 @@ % % \begin{macro}{\ifledfinal} % \begin{macro}{\ifparapparatus@} +% \begin{macro}{\ifnoquotation@} +% \begin{macro}{\iflednopbinverse} +% \begin{macro}{\ifparledgroup} +% \begin{macro}{\ifwidthliketwocolumns} +% \begin{macro}{\ifledsecnolinenumber} % Use this to remember which option is used, set and execute the options % with final as the default. % \changes{v0.4}{2004/02/29}{Added final/draft options} +% \changes{v1.13.0}{2014/09/16}{Added widthliketwocolumns option} % \begin{macrocode} \newif\ifledfinal \newif\ifparapparatus@ \newif\ifnoquotation@ \newif\iflednopbinverse \newif\ifparledgroup +\newif\ifwidthliketwocolumns% \newif\ifledsecnolinenumber \parapparatus@false \DeclareOption{noquotation}{\noquotation@true} @@ -2881,6 +2894,7 @@ \DeclareOption{parapparatus}{\parapparatus@true} \DeclareOption{nopbinverse}{\lednopbinversetrue} \DeclareOption{ledsecnolinenumber}{\ledsecnolinenumbertrue} +\DeclareOption{widthliketwocolumns}{\widthliketwocolumnstrue}% \ExecuteOptions{final} % \end{macrocode} % Use the starred form of \verb?\ProcessOptions? which executes options in @@ -2894,6 +2908,11 @@ % \end{macrocode} % \end{macro} % \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} % Loading package \emph{xargs} to declare commands with optional arguments. % \emph {Etoolbox} is also used to make code clearer - for example, in dynamic command names (which can replace \cs{csname} etc.). % Use \emph{suffix} to declare commands with a starred version, \Lpack{xstring} to work with strings and \emph{iflutex} to test if LuaLaTeX is running, and \Lpack{ragged2e} to manage ragging for paragraphed notes. @@ -3405,6 +3424,10 @@ \else \begingroup \initnumbering@sectcmd + \ifwidthliketwocolumns% + \csuse{setwidthliketwocolumns@\columns@position}% + \csuse{setpositionliketwocolumns@\columns@position}% + \fi% \fi \gdef\eled@sections@@{}% \if@noeled@sec\else% @@ -3440,6 +3463,7 @@ % input that require running the file through again to move everything % to the right place. % \changes{v0.7}{2005/02/24}{Changed \cs{endnumbering} for eledpar} +% \changes{v1.12.5}{2014/08/31}{Allow to mix parallel columns and normal text when using \cs{pausenumbering}} % \begin{macrocode} \def\endnumbering{% \ifnumbering @@ -3466,6 +3490,7 @@ \immediate\closeout\eled@sectioning@out% \fi% \ifl@dpairing\else + \global\l@dnumpstartsL=\z@% \endgroup \fi } @@ -3490,6 +3515,7 @@ % by \cs{resumenumbering} to ensure that \cs{pausenumbering} was actually % invoked. % \changes{v0.7}{2005/02/24}{Changed \cs{resumenumbering} for eledpar} +% \changes{v1.12.5}{2014/08/31}{Debug \cs{resumenumbering}} % \begin{macrocode} \newcommand*{\resumenumbering}{% \ifnumbering @@ -3499,8 +3525,14 @@ \led@mess@SectionContinued{\the\section@num}% \line@list@stuff{\jobname.\extensionchars\the\section@num}% \l@dend@stuff - \begingroup - \initnumbering@sectcmd + \ifl@dpairing\else% + \begingroup% + \initnumbering@sectcmd% + \ifwidthliketwocolumns% + \csuse{setwidthliketwocolumns@\columns@position}% + \csuse{setpositionliketwocolumns@\columns@position}% + \fi% + \fi% \else \led@err@NumberingShouldHaveStarted \endnumbering @@ -5953,6 +5985,18 @@ } % \end{macrocode} % \end{macro} +% \begin{macro}{\dolinehook} +% \begin{macro}{\doinsidelinehook} +% These hight level commands just redefine the low level commands. +% They have to be used be user, without \cs{makeatletter}. +% \changes{v1.12.5}{2014/08/31}{Added \cs{dolinehook} and \cs{doinsidelinehook}} +% \begin{macrocode} +\newcommand*{\dolinehook}[1]{\gdef\do@linehook{#1}}% +\newcommand*{\doinsidelinehook}[1]{\gdef\do@insidelinehook{#1}}% + +% \end{macrocode} +% \end{macro} +% \end{macro} % \begin{macro}{\do@linehook} % \begin{macro}{\do@insidelinehook} % Two hooks into \cs{do@line}. The first is called at the beginning of \cs{do@line}, the second is called in the line box. @@ -6707,7 +6751,7 @@ % \end{macrocode} % \end{macro} % -% \section{Footnotes} +% \section{Critical footnotes} % \label{footnotes}\relax % % The footnote macros are adapted from those in \PlainTeX, but they @@ -6854,6 +6898,10 @@ \csuse{bhookXnote@#1} \csuse{Xnotefontsize@#1} \footsplitskips + \ifl@dpairing% + \csuse{setwidthliketwocolumns@\columns@position}% + \fi% + \setXnotespositionliketwocolumns@{#1}% \spaceskip=\z@skip \xspaceskip=\z@skip \csname #1footfmt\endcsname #2[#1]\egroup} % \end{macrocode} @@ -7210,7 +7258,12 @@ }% \vskip\skip\csname #1footins\endcsname% \leftskip0pt \rightskip0pt - \csname #1footnoterule\endcsname% + \ifl@dpairing\else% + \hsize=\old@hsize% + \fi% + \setXnoteswidthliketwocolumns@{#1}% + \setXnotespositionliketwocolumns@{#1}% + \print@Xfootnoterule{#1}%% \vskip\csuse{afterXrule@#1}% \noindent\leavevmode} % \end{macrocode} @@ -7231,7 +7284,11 @@ % contents of the footnote-insert box to the output page without % alteration. % \begin{macrocode} -\newcommand*{\normalfootgroup}[1]{{\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\unvbox\csname #1footins\endcsname} +\newcommand*{\normalfootgroup}[1]{% + {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}% + \unvbox\csname #1footins\endcsname% + \hsize=\old@hsize% + }% % \end{macrocode} % \end{macro} @@ -7250,11 +7307,15 @@ \ifparledgroup% \ifl@dpairing% \else% - \@nameuse{#1footnoterule}% - \vskip\csuse{afterXrule@#1}% + \setXnoteswidthliketwocolumns@{#1}% + \setXnotespositionliketwocolumns@{#1}% + \print@Xfootnoterule{#1}%% + \vskip\csuse{afterXrule@#1}% \fi% \else% - \@nameuse{#1footnoterule}% + \setXnoteswidthliketwocolumns@{#1}% + \setXnotespositionliketwocolumns@{#1}% + \print@Xfootnoterule{#1}%% \vskip\csuse{afterXrule@#1}% \fi% \setlength{\parindent}{0pt} @@ -7446,11 +7507,11 @@ % \changes{v0.2.2}{2003/11/04}{Added \cs{footfudgefiddle} to \cs{para@footsetup}} % \begin{macrocode} \newcommand*{\para@footsetup}[1]{{\csuse{Xnotefontsize@#1} + \setXnoteswidthliketwocolumns@{#1}% \dimen0=\baselineskip \multiply\dimen0 by 1024 \divide \dimen0 by \columnwidth \multiply\dimen0 by \footfudgefiddle\relax - \expandafter - \xdef\csname #1footfudgefactor\endcsname{% + \csxdef{#1footfudgefactor}{% \expandafter\strip@pt\dimen0 }}} % \end{macrocode} @@ -7481,7 +7542,9 @@ {}% }% \vskip\skip\csname #1footins\endcsname% - \csname #1footnoterule\endcsname% + \setXnoteswidthliketwocolumns@{#1}% + \setXnotespositionliketwocolumns@{#1}% + \print@Xfootnoterule{#1}%% \vskip\csuse{afterXrule@#1}% \noindent\leavevmode} % \end{macrocode} @@ -7696,7 +7759,9 @@ \makehboxofhboxes \setbox0=\hbox{{\csuse{Xnotefontsize@#1}\csuse{txtbeforeXnotes@#1}}\unhbox0 \removehboxes}% \csuse{Xnotefontsize@#1} - \noindent\unhbox0\par} + \noindent\unhbox0\par% + \global\hsize=\old@hsize% + }% % \end{macrocode} % \end{macro} @@ -7705,6 +7770,7 @@ % The minipage version. % \begin{macrocode} \newcommand*{\mppara@footgroup}[1]{{% + \setXnoteswidthliketwocolumns@{#1}% \vskip\skip\@nameuse{mp#1footins} \ifl@dpairing\ifparledgroup% \leavevmode\marks\parledgroup@{begin}% @@ -7714,12 +7780,16 @@ \ifparledgroup% \ifl@dpairing% \else% - \@nameuse{#1footnoterule}% - \vskip\csuse{afterXrule@#1}% + \setXnoteswidthliketwocolumns@{#1}% + \setXnotespositionliketwocolumns@{#1}% + \print@Xfootnoterule{#1}%% + \vskip\csuse{afterXrule@#1}% \fi% \else% - \@nameuse{#1footnoterule}% - \vskip\csuse{afterXrule@#1}% + \setXnoteswidthliketwocolumns@{#1}% + \setXnotespositionliketwocolumns@{#1}% + \print@Xfootnoterule{#1}%% + \vskip\csuse{afterXrule@#1}% \fi% \unvbox\csname mp#1footins\endcsname \ifcsstring{Xragged@#1}{L}{\RaggedLeft}{}% @@ -7965,11 +8035,15 @@ \ifparledgroup% \ifl@dpairing% \else% - \@nameuse{#1footnoterule}% - \vskip\csuse{afterXrule@#1}% + \setXnoteswidthliketwocolumns@{#1}% + \setXnotespositionliketwocolumns@{#1}% + \print@Xfootnoterule{#1}%% + \vskip\csuse{afterXrule@#1}% \fi% \else% - \@nameuse{#1footnoterule}% + \setXnoteswidthliketwocolumns@{#1}% + \setXnotespositionliketwocolumns@{#1}% + \print@Xfootnoterule{#1}%% \vskip\csuse{afterXrule@#1}% \fi% {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par @@ -8074,11 +8148,15 @@ \ifparledgroup% \ifl@dpairing% \else% - \@nameuse{#1footnoterule}% - \vskip\csuse{afterXrule@#1}% + \setXnoteswidthliketwocolumns@{#1}% + \setXnotespositionliketwocolumns@{#1}% + \print@Xfootnoterule{#1}%% + \vskip\csuse{afterXrule@#1}% \fi% \else% - \@nameuse{#1footnoterule}% + \setXnoteswidthliketwocolumns@{#1}% + \setXnotespositionliketwocolumns@{#1}% + \print@Xfootnoterule{#1}%% \vskip\csuse{afterXrule@#1}% \fi% {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par @@ -8285,6 +8363,10 @@ \csuse{bhooknoteX@#1} \csuse{notefontsizeX@#1} \footsplitskips + \ifl@dpairing% + \csuse{setwidthliketwocolumns@\columns@position}% + \fi% + \setnotesXpositionliketwocolumns@{#1}% \spaceskip=\z@skip \xspaceskip=\z@skip \csuse{\csuse{footnote@dir}}\if@RTL\else\noindent\leavevmode\fi\@nameuse{footfmt#1}{#1}{#2}\egroup} @@ -8347,7 +8429,12 @@ \vskip\skip\csname footins#1\endcsname% \leftskip=\z@ \rightskip=\z@ - \@nameuse{footnoterule#1}% + \ifl@dpairing\else% + \hsize=\old@hsize% + \fi% + \setnotesXwidthliketwocolumns@{#1}% + \setnotesXpositionliketwocolumns@{#1}% + \print@footnoteXrule{#1}% \vskip\csuse{afterruleX@#1}} % \end{macrocode} @@ -8366,7 +8453,9 @@ % insert box to the output page without alteration. % \begin{macrocode} \newcommand*{\normalfootgroupX}[1]{% - \unvbox\@nameuse{footins#1}} + \unvbox\@nameuse{footins#1}% + \hsize=\old@hsize% + }% % \end{macrocode} % \end{macro} @@ -8384,11 +8473,15 @@ \ifparledgroup% \ifl@dpairing% \else% - \@nameuse{footnoterule#1}% - \vskip\csuse{afterruleX@#1}% + \setnotesXwidthliketwocolumns@{#1}% + \setnotesXpositionliketwocolumns@{#1}% + \print@footnoteXrule{#1}% + \vskip\csuse{afterruleX@#1}% \fi% \else% - \@nameuse{footnoterule#1}% + \setnotesXwidthliketwocolumns@{#1}% + \setnotesXpositionliketwocolumns@{#1}% + \print@footnoteXrule{#1}% \vskip\csuse{afterruleX@#1}% \fi% \unvbox\@nameuse{mpfootins#1}} @@ -8558,11 +8651,15 @@ \ifparledgroup% \ifl@dpairing% \else% - \@nameuse{footnoterule#1}% - \vskip\csuse{afterruleX@#1}% + \setnotesXwidthliketwocolumns@{#1}% + \setnotesXpositionliketwocolumns@{#1}% + \print@footnoteXrule{#1}% + \vskip\csuse{afterruleX@#1}% \fi% \else% - \@nameuse{footnoterule#1}% + \setnotesXwidthliketwocolumns@{#1}% + \setnotesXpositionliketwocolumns@{#1}% + \print@footnoteXrule{#1}% \vskip\csuse{afterruleX@#1}% \fi% \splittopskip=\ht\strutbox @@ -8661,11 +8758,15 @@ \ifparledgroup% \ifl@dpairing% \else% - \@nameuse{footnoterule#1}% - \vskip\csuse{afterruleX@#1}% + \setnotesXwidthliketwocolumns@{#1}% + \setnotesXpositionliketwocolumns@{#1}% + \print@footnoteXrule{#1}% + \vskip\csuse{afterruleX@#1}% \fi% \else% - \@nameuse{footnoterule#1}% + \setnotesXwidthliketwocolumns@{#1}% + \setnotesXpositionliketwocolumns@{#1}% + \print@footnoteXrule{#1}% \vskip\csuse{afterruleX@#1}% \fi% \splittopskip=\ht\strutbox @@ -8707,11 +8808,13 @@ % \begin{macro}{\para@footsetupX} % \cs{para@footsetupX}\marg{series} % \changes{v0.2.2}{2003/11/04}{Added \cs{footfudgefiddle} to \cs{para@footsetupX}} +% \changes{v1.13.0}{2014/09/16}{In \cs{para@footsetupX}, use \cs{columnwidth} instead of \cs{hsize}} % \begin{macrocode} \newcommand*{\para@footsetupX}[1]{{\csuse{notefontsizeX@#1} + \setnotesXwidthliketwocolumns@{#1}% \dimen0=\baselineskip \multiply\dimen0 by 1024 - \divide\dimen0 by \hsize \multiply\dimen0 by \footfudgefiddle\relax + \divide\dimen0 by \columnwidth \multiply\dimen0 by \footfudgefiddle\relax% \expandafter \xdef\csname footfudgefactor#1\endcsname{% \expandafter\strip@pt\dimen0 }}} @@ -8734,7 +8837,9 @@ \rightskip=\z@ \parindent=\z@ \vskip\skip\@nameuse{footins#1}% - \@nameuse{footnoterule#1}% + \setnotesXwidthliketwocolumns@{#1}% + \setnotesXpositionliketwocolumns@{#1}% + \print@footnoteXrule{#1}% \vskip\csuse{afterruleX@#1}% } @@ -8805,6 +8910,7 @@ \csuse{notefontsizeX@#1} \noindent\unhbox0\par} \newcommand*{\mppara@footgroupX}[1]{{% + \setnotesXwidthliketwocolumns@{#1}% \vskip\skip\@nameuse{mpfootins#1} \ifl@dpairing\ifparledgroup \leavevmode% @@ -8815,12 +8921,16 @@ \ifparledgroup% \ifl@dpairing% \else% - \@nameuse{footnoterule#1}% - \vskip\csuse{afterruleX@#1}% + \setnotesXwidthliketwocolumns@{#1}% + \setnotesXpositionliketwocolumns@{#1}% + \print@footnoteXrule{#1}% + \vskip\csuse{afterruleX@#1}% \fi% \else% - \@nameuse{footnoterule#1}% - \vskip\csuse{afterruleX@#1}% + \setnotesXwidthliketwocolumns@{#1}% + \setnotesXpositionliketwocolumns@{#1}% + \print@footnoteXrule{#1}% + \vskip\csuse{afterruleX@#1}% \fi% \unvbox\csname mpfootins#1\endcsname \ifcsstring{raggedX@#1}{L}{\RaggedLeft}{}% @@ -8834,8 +8944,72 @@ % \end{macro} % \end{macro} % -% -% \subsection{Footnotes' order} +% \section{Footnotes' width for two columns} +% We define here some commands which make sense only with \Lpack{eledpar}, but must be called when defining notes paramaters. +% These commands change the width of block notes to allow them to have the same size than two parallel columns. +% \begin{macro}{\old@hsize} +% \begin{macro}{\setXnoteswidthliketwocolumns@} +% \begin{macro}{\setnotesXwidthliketwocolumns@} +% These two commands are called at the beginning of critical or familiar notes groups. +% They set, if the option is enabled, the \cs{hsize}. They are also called at the on the setup for paragraphed notes. +% \begin{macrocode} + +\newdimen\old@hsize% +\old@hsize=\hsize% + +\newcommand{\setXnoteswidthliketwocolumns@}[1]{% + \global\let\hsize@fornote=\hsize% + \old@hsize=\hsize% + \iftoggle{Xnoteswidthliketwocolumns@#1}% + {% + \csuse{setwidthliketwocolumns@\columns@position}% + \global\let\hsize@fornote=\hsize% + }% + {}% + \let\hsize=\hsize@fornote% + \let\columnwidth=\hsize@fornote% +}% + +\newcommand{\setnotesXwidthliketwocolumns@}[1]{% + \global\let\hsize@fornote=\hsize% + \old@hsize=\hsize% + \iftoggle{notesXwidthliketwocolumns@#1}% + {% + \csuse{setwidthliketwocolumns@\columns@position}% + \global\let\hsize@fornote=\hsize% + }% + {}% + \let\hsize=\hsize@fornote% + \let\columnwidth=\hsize@fornote% +}% + +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\setXnotespositionliketwocolumns@} +% \begin{macro}{\setnotesXpositionliketwocolumns@} +% These two commands set the position of the critical / familiar +% footnotes, depending on the hooks +% \verb+Xnoteswidthliketwocolumns+ and \verb+notesXwidthliketwocolumns+. +% They call commands which are defined only in \Lpack{eledpar}, because this feature has no sens without \Lpack{eledpar}. +% \begin{macrocode} +\newcommand{\setXnotespositionliketwocolumns@}[1]{% + \iftoggle{Xnoteswidthliketwocolumns@#1}{% + \csuse{setnotespositionliketwocolumns@\columns@position}% + }{}% +}% + +\newcommand{\setnotesXpositionliketwocolumns@}[1]{% + \iftoggle{notesXwidthliketwocolumns@#1}{% + \csuse{setnotespositionliketwocolumns@\columns@position}% + }{}% +}% + +% \end{macrocode} +% \end{macro} +% \end{macro} +% \section{Footnotes' order} % \begin{macro}{\fnpos} % \begin{macro}{\mpfnpos} % \begin{macro}{\@fnpos} @@ -8851,12 +9025,27 @@ % \end{macro} % \end{macro} % \end{macro} -% \subsection{Footnotes' output} +% \section{Footnotes' rule} +% Because the footnotes' rules can be shifted to the right when footnotes are set like two columns, we don't print them directly, but we put them in a \cs{vbox}. % +% \begin{macro}{\print@Xfootnoterule} +% \begin{macro}{\print@footnoteXrule} +% \begin{macrocode} +\newcommand{\print@Xfootnoterule}[1]{% + \moveleft-\leftskip\vbox{\csuse{#1footnoterule}}% + \nointerlineskip% +}% +\newcommand{\print@footnoteXrule}[1]{% + \moveleft-\leftskip\vbox{\csuse{footnoterule#1}}% + \nointerlineskip% +}% + +% \end{macrocode} +% \end{macro} +% \end{macro} % -% -% +% \section{Footnotes' output} % \begin{macro}{\doxtrafeeti} % \begin{macro}{\doreinxtrafeeti} % We have to add all the new kinds of familiar footnotes to the output @@ -9171,6 +9360,8 @@ \csgdef{txtbeforeXnotes@#1}{} \csgdef{maxhnotesX@#1}{\ledfootinsdim}% \csgdef{maxhXnotes@#1}{\ledfootinsdim} + \newtoggle{Xnoteswidthliketwocolumns@#1}% + \newtoggle{notesXwidthliketwocolumns@#1}% % \end{macrocode} % \subsection{Create inserts, needed to add notes in foot} % Concerning inserts, see chapter 15 of the TeXBook by D. Knuth @@ -9331,10 +9522,20 @@ % \subsubsection{Options} % \begin{macro}{\settoggle@series} % \changes{v1.1}{2012/09/25}{\cs{settoggle@series} switch the global value of the toggle, not only the local value.} -% \cs{settoggle@series}\cs{series}{toggle}{value} is a generic command to switch one toggle for one series. +% \changes{v1.13.0}{2014/09/16}{\cs{settoggle@series} can take an optional arguments to reload series setup.} +% \cs{settoggle@series}\marg{series}\marg{toggle}\marg{value} is a generic command to switch toggles for some series. + % \begin{macrocode} -\newcommand{\settoggle@series}[3]{% - \def\do##1{\global\settoggle{#2@##1}{#3}} +\newcommandx{\settoggle@series}[4][4]{% + \def\do##1{% + \global\settoggle{#2@##1}{#3}% + \ifstrequal{#4}{reload}% + {% + \csuse{foot\csuse{series@display##1}}{##1}% + \csuse{foot\csuse{series@displayX##1}}{##1}% + }% + {}% + }% \ifstrempty{#1}{% \dolistloop{\@series}% }% @@ -9345,7 +9546,7 @@ % \end{macrocode} % \end{macro} % \begin{macro}{\setcommand@series} -% \cs{setcommand@series}\marg{series}\marg{command}\marg{value} is a generic command to change one command for one series. +% \cs{setcommand@series}\marg{series}\marg{command}\marg{value} is a generic command to change commands for some series. % \begin{macrocode} \newcommandx{\setcommand@series}[4][4]{% \def\do##1{ @@ -9367,7 +9568,9 @@ % \cs{newhookcommand@series}\cs{command names} is a generic command to add new commands for hooks, like \cs{hsizetwocol}. % \begin{macrocode} \newcommand{\newhookcommand@series}[1]{% - \global\expandafter\newcommand\expandafter*\csname #1\endcsname[2][]{\csuse{setcommand@series}{##1}{#1}{##2}}% + \global\expandafter\newcommand\expandafter*\csname #1\endcsname[2][]{% + \setcommand@series{##1}{#1}{##2}% + }% } \newhookcommand@series{Xhangindent} @@ -9448,7 +9651,7 @@ % \begin{macrocode} \newcommand{\newhookcommand@series@reload}[1]{% \global\expandafter\newcommand\expandafter*\csname #1\endcsname[2][]{% - \csuse{setcommand@series}{##1}{#1}{##2}[reload] + \setcommand@series{##1}{#1}{##2}[reload]% }% } \newhookcommand@series@reload{beforeXnotes} @@ -9464,7 +9667,9 @@ %\cs{newhooktoggle@series}\cs{command names} is a generic command to add new commands for new toggle hook, like \cs{numberonlyfirstinline}. % \begin{macrocode} \newcommand{\newhooktoggle@series}[1]{% - \global\expandafter\newcommandx\expandafter*\csname #1\endcsname[2][1,2={true},usedefault]{\settoggle@series{##1}{#1}{##2}}% + \global\expandafter\newcommandx\expandafter*\csname #1\endcsname[2][1,2={true},usedefault]{% + \settoggle@series{##1}{#1}{##2}% + }% } \newhooktoggle@series{numberonlyfirstinline} \newhooktoggle@series{numberonlyfirstintwolines} @@ -9476,6 +9681,22 @@ \newhooktoggle@series{Xendlemmadisablefontselection} % \end{macrocode} % \end{macro} +% \begin{macro}{\newhooktoggle@series} +% \changes{v1.13.0}{2014/09/16}{Add \cs{newhookcommand@toggle@reload}} +% \cs{newhookcommand@toggle@reload} does the same thing as \cs{newhooktoggle@series} +% but the commands created by this macro also reload the series displaying (normal, paragraph, twocol, threecol). +% \begin{macrocode} +\newcommand{\newhooktoggle@series@reload}[1]{% + \global\expandafter\newcommandx\expandafter*\csname #1\endcsname[2][1,2={true},usedefault]{% + \settoggle@series{##1}{#1}{##2}[reload]% + }% +}% + +\newhooktoggle@series@reload{Xnoteswidthliketwocolumns}% +\newhooktoggle@series@reload{notesXwidthliketwocolumns}% + +% \end{macrocode} +% \end{macro} % \subsection{Old commands, kept for backward compatibility} % The next commands are kept for ascendant compatibily, but should'nt be used anymore. % \begin{macro}{\notenumfont} @@ -10522,7 +10743,7 @@ \newcommand*{\ledrightnote}[1]{\edtext{}{\l@drsnote{#1}}} \newcommand*{\ledinnernote}[1]{% - \ifodd\c@page% Do not use \page@num, because not yet calculated when command is called + \ifodd\c@page% Do not use \page@num, because it is not yet calculated when command is called \ledleftnote{#1}% \else% \ledrightnote{#1}% @@ -10530,7 +10751,7 @@ } \newcommand*{\ledouternote}[1]{% - \ifodd\c@page% Do not use \page@num, because not yet calculated when command is called + \ifodd\c@page% Do not use \page@num, because it is not yet calculated when command is called \ledrightnote{#1}% \else% \ledleftnote{#1}% @@ -11298,7 +11519,7 @@ % \end{macrocode} % \end{macro} % \begin{macro}{\hyperlinkR} -% \cs{hyperlinkR} command is to be used to have both a internal hyperlink \cs{ledRflag}, when indexing. +% \cs{hyperlinkR} command is to be used to create a internal hyperlink and \cs{ledRflag}, when indexing. % \begin{macrocode} \newcommand{\hyperlinkR}[2]{% \hyperlink{#1}{#2\Rlineflag}% @@ -11307,7 +11528,7 @@ % \end{macrocode} % \end{macro} % \begin{macro}{\hyperlinkformatR} -% \cs{hyperlinkformatR} command is to be used to have both a internal hyperlink, a format and a \cs{Rlineflag}, when indexing. +% \cs{hyperlinkformatR} command is to be used to create a internal hyperlink, a format and a \cs{Rlineflag}, when indexing. % \begin{macrocode} \newcommand{\hyperlinkformatR}[3]{% \hyperlinkformat{#1}{#2}{#3\Rlineflag}% @@ -11317,7 +11538,7 @@ % \end{macro} % \begin{macro}{\get@edindex@hyperref} % \begin{macro}{\@edindex@hyperref} -% \changes{v1.12.5}{2014/08/28}{Debug \cs{edindex} when \Lpack{hyperref} is not load} +% \changes{v1.12.5}{2014/08/28}{Debug \cs{edindex} when \Lpack{hyperref} is not loaded} % \cs{get@edindex@hyperref} is to be used to define the \cs{@edindex@hyperref} macro, which, in index, links to the point where the index was called (with \Lpack{hyperref}. % \begin{macrocode} \newcommand{\get@edindex@hyperref}[1]{% |