summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-06-18 15:50:00 +0000
committerKarl Berry <karl@freefriends.org>2016-06-18 15:50:00 +0000
commit03876315ff094126d2d525b57a4f6324bbf8ef66 (patch)
tree081de0611c406525f64e65fdc3e079bb4c323cd1 /Master/texmf-dist/tex/latex/reledmac/reledpar.sty
parent562ded580dece699235a00d600ec26bccb0b8383 (diff)
reledmac (16jun16)
git-svn-id: svn://tug.org/texlive/trunk@41481 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/reledmac/reledpar.sty')
-rw-r--r--Master/texmf-dist/tex/latex/reledmac/reledpar.sty130
1 files changed, 66 insertions, 64 deletions
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
index d01c69337ba..02d69fc1c6e 100644
--- a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
+++ b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
@@ -29,7 +29,7 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2016/06/03 v2.10.0a reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2016/06/16 v2.11.0 reledmac extension for parallel texts]%
\RequirePackage{xspace}%
\RequirePackage{xkeyval}
@@ -108,6 +108,12 @@
\newcommand{\led@error@fail@patch@pagenumbering}{%
\reledpar@error{Fail to patch \string\pagenumbering\space command.}{\@ehc}%
}%
+\newcommand{\led@error@note@called@onrightside}[1]{%
+ \reledpar@error{#1 called on right side, despite your configuring it to be for the left side only}{\@ehc}%
+}%
+\newcommand{\led@error@note@called@onleftside}[1]{%
+ \reledpar@error{#1 called on left side, despite your configuring it to be for the right side only}{\@ehc}%
+}%
\newcommand{\led@error@fail@patch@@mempnum}{%
\reledpar@error{Fail to patch \string\@mempnum\space command.}{\@ehc}%
}%
@@ -125,6 +131,22 @@
\newcommand{\led@error@missing@numbering}[1]{%
\reledpar@error{Missing \string\pstart…\string\pend\space inside `#1` environment}{\@ehc}%
}%
+\providecommand*{\newnamebox}[1]{%
+ \expandafter\newbox\csname #1\endcsname}
+\providecommand*{\setnamebox}[1]{%
+ \expandafter\setbox\csname #1\endcsname}
+\providecommand*{\unhnamebox}[1]{%
+ \expandafter\unhbox\csname #1\endcsname}
+\providecommand*{\unvnamebox}[1]{%
+ \expandafter\unvbox\csname #1\endcsname}
+\providecommand*{\namebox}[1]{%
+ \csname #1\endcsname}
+
+\providecommand*{\newnamecount}[1]{%
+ \expandafter\newcount\csname #1\endcsname}
+\providecommand*{\usenamecount}[1]{%
+ \csname #1\endcsname}
+
\newcount\section@numR
\section@numR=\z@
\pst@rtedLfalse
@@ -160,7 +182,7 @@
\gdef\eled@sectionsR@@{}%
\if@noeled@sec\else%
\makeatletter\InputIfFileExists{\jobname.eledsec\the\section@numR R}{}{}\makeatother%
- \immediate\openout\eled@sectioningR@out=\jobname.eledsec\the\section@numR R\relax%
+ \immediate\openout\eled@sectioningR@out=\l@auxdir\jobname.eledsec\the\section@numR R\relax%
\fi%
}
\def\endnumberingR{%
@@ -608,7 +630,7 @@
\iffirst@linenum@out@R
\immediate\closeout\linenum@outR
\global\first@linenum@out@Rfalse
- \immediate\openout\linenum@outR=#1
+ \immediate\openout\linenum@outR=\l@auxdir#1%
\immediate\write\linenum@outR{\string\line@list@version{\this@line@list@version}}%
\ifl@dpaging%
\immediate\write\linenum@outR{\string\@par@sync@option{\@par@this@sync@option}}%
@@ -618,7 +640,7 @@
\leavevmode%
\fi%
\closeout\linenum@outR%
- \openout\linenum@outR=#1%
+ \openout\linenum@outR=\l@auxdir#1%
\fi}
\newcommand*{\new@lineL}{%
@@ -629,11 +651,11 @@
\newcommand{\newseries@par}[1]{%
\unless\ifnofamiliar@%
\csgdef{onlysideX@#1}{}%
- \global\newbool{keepforsideX@#1}%
+ \newnamebox{footins#1@kept}%
\fi%
\unless\ifnocritical@%
- \global\newbool{keepforXside@#1}%
\csgdef{Xonlyside@#1}{}%
+ \newnamebox{#1footins@kept}%
\fi%
\unless\ifnofamiliar@%
\newcounter{footnote#1@typeset}%
@@ -1001,8 +1023,8 @@
\set@Xtxtbeforenotes%
\global\@firstlineofpagefalse%
\fi%
- \add@inserts%
\insert@msdata%
+ \add@inserts%
\affixside@note%
}%
{\print@lineL}%
@@ -1544,37 +1566,23 @@
(test {\ifcsstring{Xonlyside@#1}{R}} and test{\ifnumodd{\c@page}}))%
}%
{%
- \correct@Xfootins@box{#1}%
\csuse{#1footstart}{#1}%
\csuse{#1footgroup}{#1}%
- \global\count\csuse{#1footins}=0%
- \global\skip\csuse{#1footins}=0pt%
- \csuse{Xnotefontsize@#1}%
- \global\advance\dimen\csuse{#1footins} by -\baselineskip%
- \global\boolfalse{keepforXside@#1}%
- }%
+ \global\count\csuse{#1footins}=\z@%
+ \global\skip\csuse{#1footins}=\z@%
+ \global\dimen\csuse{#1footins}=\maxdimen%
+ }%
{%
- \global\booltrue{keepforXside@#1}%
\global\count\csuse{#1footins}=\csuse{default@#1footins}%
\global\skip\csuse{#1footins}=\csuse{Xbeforenotes@#1}%
\bgroup%
\csuse{Xnotefontsize@#1}%
- \global\advance\dimen\csuse{#1footins} by \baselineskip%
+ \global\dimen\csuse{#1footins}=\csuse{Xmaxhnotes@#1}%
\egroup%
+ \global\setnamebox{#1footins@kept}=\box\namebox{#1footins}%
}%
}%
}%
-\newcommand{\correct@Xfootins@box}[1]{%
- \ifbool{keepforXside@#1}{%
- \csuse{Xnotefontsize@#1}%
- \splittopskip=0pt%
- \global\setbox\csuse{#1footins}=\vbox{%
- \vsplit\csuse{#1footins} to \dimexpr\ht\csuse{#1footins}-1pt\relax%
- \vskip \dimexpr-0.5\baselineskip-0.5\lineskip-0.5pt\relax%
- \unvbox\csuse{#1footins}%
- }%
- }{}%
-}%
\newcommand\print@notesX@forpages[1]{%
\ifcsempty{onlysideX@#1}{%
\csuse{footstart#1}{#1}%
@@ -1587,36 +1595,44 @@
(test {\ifcsstring{onlysideX@#1}{R}} and test{\ifnumodd{\c@page}}))%
}%
{%
- \correct@footinsX@box{#1}%
\csuse{footstart#1}{#1}%
\csuse{footgroup#1}{#1}%
- \global\count\csuse{footins#1}=0%
- \global\skip\csuse{footins#1}=0pt%
- \csuse{notefontsizeX@#1}%
- \global\advance\dimen\csuse{footins#1} by -\baselineskip%
- \global\boolfalse{keepforsideX@#1}%
+ \global\count\csuse{footins#1}=\z@%
+ \global\skip\csuse{footins#1}=\z@%
+ \global\dimen\csuse{footins#1}=\maxdimen%
+
}%
{%
- \global\booltrue{keepforsideX@#1}%
\global\count\csuse{footins#1}=\csuse{default@footins#1}%
\global\skip\csuse{footins#1}=\csuse{beforenotesX@#1}%
\bgroup%
- \csuse{notefontsizeX@#1}%
- \global\advance\dimen\csuse{footins#1} by \baselineskip%
+ \csuse{Xnotefontsize@#1}%
+ \global\dimen\csuse{footins#1}=\csuse{maxhnotesX@#1}%
\egroup%
+ \global\setnamebox{footins#1@kept}=\box\namebox{footins#1}%
}%
}%
}%
-\newcommand{\correct@footinsX@box}[1]{%
- \ifbool{keepforsideX@#1}{%
- \csuse{notefontsizeX@#1}%
- \splittopskip=0pt%
- \global\setbox\csuse{footins#1}=\vbox{%
- \vsplit\csuse{footins#1} to \dimexpr\ht\csuse{footins#1}-1pt\relax%
- \vskip \dimexpr-0.5\baselineskip-0.5\lineskip-0.5pt\relax%
- \unvbox\csuse{footins#1}%
- }%
- }{}%
+\newcommand{\insert@notes@for@onlyside}{%
+ \def\do##1{%
+ \unless\ifnocritical@%
+ \ifvoid\csuse{##1footins@kept}\else%
+ \expandafter\insert\csname ##1footins\endcsname%
+ \bgroup%
+ \unvnamebox{##1footins@kept}%
+ \egroup%
+ \fi%
+ \fi%
+ \unless\ifnofamiliar@%
+ \ifvoid\csuse{footins##1@kept}\else%
+ \expandafter\insert\csname footins##1\endcsname%
+ \bgroup%
+ \unvnamebox{footins##1@kept}%
+ \egroup%
+ \fi%
+ \fi%
+ }%
+ \dolistloop{\@series}%
}%
\list@create{\labelref@listR}
@@ -1763,22 +1779,6 @@
\renewcommand{\thestanzaR}{%
\textbf{\arabic{stanzaR}}%
}
-\providecommand*{\newnamebox}[1]{%
- \expandafter\newbox\csname #1\endcsname}
-\providecommand*{\setnamebox}[1]{%
- \expandafter\setbox\csname #1\endcsname}
-\providecommand*{\unhnamebox}[1]{%
- \expandafter\unhbox\csname #1\endcsname}
-\providecommand*{\unvnamebox}[1]{%
- \expandafter\unvbox\csname #1\endcsname}
-\providecommand*{\namebox}[1]{%
- \csname #1\endcsname}
-
-\providecommand*{\newnamecount}[1]{%
- \expandafter\newcount\csname #1\endcsname}
-\providecommand*{\usenamecount}[1]{%
- \csname #1\endcsname}
-
\newif\ifl@dusedbabel
\patchcmd{\bbl@set@language}%
{\select@language{\languagename}}%
@@ -2381,10 +2381,10 @@
\newcommand{\finish@Pages@notes}{%
\def\do##1{%
\ifnocritical@%
- \global\newnamebox{##1footins}
+ \global\newnamebox{##1footins}%
\fi
\ifnofamiliar@%
- \global\newnamebox{footins##1}
+ \global\newnamebox{footins##1}%
\fi
\ifvoid\csuse{##1footins}%
\ifvoid\csuse{footins##1}\else%
@@ -2422,6 +2422,7 @@
\newcommand*{\clearl@dleftpage}{%
\ifdim\pagetotal=0pt\hbox{}\fi%
\newpage%
+ \insert@notes@for@onlyside%
\ifodd\c@page\else
\led@err@LeftOnRightPage
\hbox{}%
@@ -2431,6 +2432,7 @@
\newcommand*{\clearl@drightpage}{%
\ifdim\pagetotal=0pt\hbox{}\fi%
\newpage%
+ \insert@notes@for@onlyside%
\ifodd\c@page
\led@err@RightOnLeftPage
\hbox{}%