summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-01-22 22:19:50 +0000
committerKarl Berry <karl@freefriends.org>2019-01-22 22:19:50 +0000
commitc8e8fe4cb53b2b726916ac8c976c6f9f41b8f6ea (patch)
treec94a51435dd1ce510a300c051feb11c2992268f4 /Master/texmf-dist/source/latex/reledmac/reledpar.dtx
parent515dfa25529631975742790e3c35b272f3ea42c8 (diff)
reledmac (22jan19)
git-svn-id: svn://tug.org/texlive/trunk@49792 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/reledmac/reledpar.dtx')
-rw-r--r--Master/texmf-dist/source/latex/reledmac/reledpar.dtx62
1 files changed, 42 insertions, 20 deletions
diff --git a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
index 951b1e45917..3fc339e156f 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
@@ -336,6 +336,7 @@
% \changes{v2.21.9}{2018/07/19}{Fix (little) bug when using \protect\package{calc} package.}
% \changes{v2.22.0}{2018/09/13}{Compatibility with \protect\cs{doinsidethislinehook} macro.}
% \changes{v2.22.1}{2019/01/08}{Really reset line number annotation at each line}
+% \changes{v2.22.2}{2019/01/22}{Fix bug with \protect\cs{Xonlyside} and \protect\cs{onlysideX}}
% ^^A PW added following as the definitions are at some unknown elsewhere
%
% \newcommand{\egstart}{%
@@ -1384,7 +1385,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2019/01/08 v2.22.1 reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2019/01/22 v2.22.2 reledmac extension for parallel texts]%
% \end{macrocode}
% \subsection{Package's requirement}
@@ -4836,8 +4837,10 @@
% \subsection{Footnotes output specific to \protect\cs{Pages}}
% \begin{macro}{\print@Xnotes@forpages}
+% \begin{macro}{\restore@Xnotes@settings}
% \begin{macro}{\correct@Xfootins@box}
% \begin{macro}{\print@notesX@forpages}
+% \begin{macro}{\restore@notesX@settings}
% \begin{macro}{\correct@footinsX@box}
% \changes{v1.13.1}{2015/03/12}{Correct \protect\cs{correct@footinsX@box} and \protect\cs{correct@Xfootins@box}}
% \changes{v1.13.1}{2015/03/12}{Call \protect\cs{correct@footinsX@box} and \protect\cs{correct@Xfootins@box} directly in \protect\cs{print@notesX@forpages} and \protect\cs{print@Xnotes@forpages}.}
@@ -4894,19 +4897,10 @@
}%
% \end{macrocode}
% In case we are on a page where notes must NOT be printed.
-% First restore expected rooms for notes on the next page. Also reset expected vertical size allowed to notes.
+% We reset the settings of the notes for one side.
% \begin{macrocode}
{%
- \global\count\csuse{#1footins}=\csuse{default@#1footins}%
- \global\skip\csuse{#1footins}=\csuse{Xbeforenotes@#1}%
- \bgroup%
- \csuse{Xnotefontsize@#1}%
- \global\dimen\csuse{#1footins}=\csuse{Xmaxhnotes@#1}%
- \egroup%
-% \end{macrocode}
-% Then, save the current insert box to a temporary insert box.
-% \begin{macrocode}
- \global\setnamebox{#1footins@kept}=\box\namebox{#1footins}%
+ \restore@Xnotes@settings{#1}%
}%
% \end{macrocode}
% End of \protect\cs{print@Xnotes@forpages}.
@@ -4914,6 +4908,21 @@
}%
}%
% \end{macrocode}
+% The macro which restore the note settings.
+% \#1 = series
+% \begin{macrocode}
+\newcommand{\restore@Xnotes@settings}[1]{%
+ \unless\ifnocritical@
+ \global\count\csuse{#1footins}=\csuse{default@#1footins}%
+ \global\skip\csuse{#1footins}=\csuse{Xbeforenotes@#1}%
+ \bgroup%
+ \csuse{Xnotefontsize@#1}%
+ \global\dimen\csuse{#1footins}=\csuse{Xmaxhnotes@#1}%
+ \egroup%
+ \global\setnamebox{#1footins@kept}=\box\namebox{#1footins}%
+ \fi
+}%
+% \end{macrocode}
% And now, the same for familiar footnotes.
% \begin{macrocode}
\newcommand\print@notesX@forpages[1]{%
@@ -4933,24 +4942,30 @@
\global\count\csuse{footins#1}=\z@%
\global\skip\csuse{footins#1}=\z@%
\global\dimen\csuse{footins#1}=\maxdimen%
-
}%
{%
- \global\count\csuse{footins#1}=\csuse{default@footins#1}%
- \global\skip\csuse{footins#1}=\csuse{beforenotesX@#1}%
- \bgroup%
- \csuse{Xnotefontsize@#1}%
- \global\dimen\csuse{footins#1}=\csuse{maxhnotesX@#1}%
- \egroup%
- \global\setnamebox{footins#1@kept}=\box\namebox{footins#1}%
+ \restore@notesX@settings{#1}%
}%
}%
}%
+\newcommand{\restore@notesX@settings}[1]{%
+ \unless\ifnofamiliar@
+ \global\count\csuse{footins#1}=\csuse{default@footins#1}%
+ \global\skip\csuse{footins#1}=\csuse{beforenotesX@#1}%
+ \bgroup%
+ \csuse{Xnotefontsize@#1}%
+ \global\dimen\csuse{footins#1}=\csuse{maxhnotesX@#1}%
+ \egroup%
+ \global\setnamebox{footins#1@kept}=\box\namebox{footins#1}%
+ \fi
+}%
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
% \begin{macro}{\insert@notes@for@onlyside}
% \cs{insert@notes@for@onlyside} is everytime \cs{Pages} go to the next side.
% It just reinsert the notes note printed on the previous side because of \protect{Xonlyside} or \cs{onlysideX} setting.
@@ -4964,6 +4979,7 @@
\unvnamebox{##1footins@kept}%
\egroup%
\fi%
+ \restore@Xnotes@settings{##1}%
\fi%
\unless\ifnofamiliar@%
\ifvoid\csuse{footins##1@kept}\else%
@@ -4972,6 +4988,7 @@
\unvnamebox{footins##1@kept}%
\egroup%
\fi%
+ \restore@notesX@settings{##1}%
\fi%
}%
\dolistloop{\@series}%
@@ -6712,6 +6729,11 @@
\global\newnamebox{footins##1}%
\fi
% \end{macrocode}
+% We must also restore the settings for the footnotes in case of using onlyside option.
+% \begin{macrocode}
+ \restore@Xnotes@settings{##1}%
+ \restore@notesX@settings{##1}%
+% \end{macrocode}
% And now, add a \protect\cs{newpage} if there is no more footnote to print.
% \begin{macrocode}
\ifvoid\csuse{##1footins}%