summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/paracol
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-12-31 22:11:23 +0000
committerKarl Berry <karl@freefriends.org>2018-12-31 22:11:23 +0000
commit9eae0ca750e90444fd2bd73f570a005120851d46 (patch)
treeec339829b2785e0ac3d401dfcd0e207103d74601 /Master/texmf-dist/tex/latex/paracol
parentd6727e0f48e4842c43c673f92d9859e291cec5ed (diff)
paracol (31dec18)
git-svn-id: svn://tug.org/texlive/trunk@49560 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/paracol')
-rw-r--r--Master/texmf-dist/tex/latex/paracol/paracol.sty56
1 files changed, 47 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/paracol/paracol.sty b/Master/texmf-dist/tex/latex/paracol/paracol.sty
index 16f777532c7..fb4c1a7ae23 100644
--- a/Master/texmf-dist/tex/latex/paracol/paracol.sty
+++ b/Master/texmf-dist/tex/latex/paracol/paracol.sty
@@ -9,7 +9,7 @@
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{paracol}
-[2018/05/07 v1.34 ]
+[2018/12/31 v1.35 ]
%% Register Declaration
@@ -55,6 +55,7 @@
\newdimen\pcol@lrmargin
\newdimen\pagerim \pagerim\z@
\newskip\pcol@topskip
+\newskip\belowfootnoteskip \belowfootnoteskip\z@
\newbox\pcol@topfnotes
\newbox\pcol@prespan \setbox\pcol@prespan\box\voidb@x
\newbox\pcol@rightpage \global\setbox\pcol@rightpage\box\voidb@x
@@ -872,6 +873,7 @@
\ifvoid\footins\else
\advance\@tempdima-\skip\footins
\advance\@tempdima-\ht\footins \advance\@tempdima-\dp\footins
+ \advance\@tempdima-\belowfootnoteskip
\fi
\ifx\@botlist\@empty\else \advance\@tempdima-\textfloatsep \fi
\ifdim\@tempdima<1.5\baselineskip
@@ -936,7 +938,8 @@
\ifvoid\footins\else
\pcol@Log\pcol@output@start{insert}\footins
\insert\footins{\box\footins\penalty\interlinepenalty}%
- \fi}
+ \fi
+ \if@nobreak \nobreak \else \addpenalty\interlinepenalty \fi}
\def\pcol@makenormalcol{%
\ifpcol@mgfnote \setbox\@tempboxa\box\footins \fi
@@ -1264,10 +1267,11 @@
\fi\fi}
\def\pcol@combinefootins#1#2{%
- \setbox\@outputbox\vbox{
+ \setbox\@outputbox\vbox{%
\boxmaxdepth\@maxdepth
\unvbox#1\relax
- \pcol@putfootins#2\unskip}}
+ \pcol@putfootins#2\unskip
+ \ifdim\belowfootnoteskip=\z@\else \vskip\belowfootnoteskip \fi}}
\def\pcol@putfootins#1{%
\vskip\skip#1\relax
\color@begingroup
@@ -1310,8 +1314,10 @@
\advance\marginparsep\textwidth \advance\marginparsep-\@tempdima
\advance\marginparsep-\columnwidth
\fi
- \if@firstcolumn\let\pcol@marbox\@currbox \else\let\pcol@marbox\@marbox \fi
+ \expandafter\@xnext\@currlist\@@\pcol@marbox\@gtempa
+ \if@firstcolumn\let\pcol@marbox\@currbox \fi
\@tempdima\@pageht \advance\@tempdima-\ht\pcol@marbox
+ \advance\@tempdima\dimen\@currbox
\@tempdimb\ht\pcol@marbox \advance\@tempdimb\dp\pcol@marbox
\advance\@tempdimb\marginparpush
\pcol@getmparbottom\@tempdima\@tempdimb
@@ -1321,6 +1327,12 @@
\global\let\pcol@pages\@empty \global\let\pcol@currpage\@empty
\let\@elt\pcol@setmpbelt \reserved@a
\endgroup
+ \ifdim\dimen\@currbox=\z@\else
+ \ifdim\dimen\@currbox>\ht\pcol@marbox
+ \advance\@mparbottom-\dimen\pcol@marbox
+ \fi
+ \setbox\pcol@marbox\hbox{\lower\dimen\@currbox\box\pcol@marbox}%
+ \fi
\pcol@@addmarginpar}
\def\pcol@getmparbottom#1#2{%
@@ -1979,11 +1991,15 @@
\@ifstar{\global\pcol@pairedfalse \pcol@zparacol[#1]}%
{\pcol@zparacol[#1]}}
\def\pcol@zparacol[#1]#2{\par
+ \ifinner \@parmoderr \fi
+ \if@twocolumn \PackageError{paracol}{%
+ Environment paracol cannot work with ordinary two-column
+ typesetting.}\@ehb\fi
\global\pcol@ncolleft#1\relax \global\pcol@ncol#2\relax
\ifnum\pcol@ncolleft>\pcol@ncol \global\pcol@ncolleft\pcol@ncol \fi
\ifnum\pcol@ncolleft<\pcol@ncol\else \global\pcol@pairedtrue \fi
\ifpcol@paired\else \pcol@swapcolumnfalse \fi
- \if@newlist
+ \if@newlist \if@inlabel\else
\if@nobreak \@nbitem
\else
\addpenalty\@beginparpenalty
@@ -1991,7 +2007,7 @@
\addvspace{-\parskip}\addvspace{-\itemsep}%
\fi
\global\@newlistfalse
- \fi
+ \fi\fi
\global\let\pcol@counters\cl@@ckpt
\let\@elt\pcol@remctrelt \pcol@gcounters
\let\@elt\pcol@thectrelt \pcol@counters
@@ -2039,6 +2055,9 @@
\def\footnoterule{{\columnwidth\textwidth \pcol@footnoterule}}%
\fi
\let\@footnotetext\pcol@fntext
+ \let\pcol@@marginpar\marginpar \let\marginpar\pcol@marginpar
+ \let\@mn@@marginnote\pcol@marginnote
+ \let\pcol@@xympar\@xympar \let\@xympar\pcol@xympar
\def\pcol@twosided[#1]{\pcol@ignore\twosided}%
\def\swapcolumninevenpages{\pcol@ignore\swapcolumninevenpages}%
\def\noswapcolumninevenpages{\pcol@ignore\noswapcolumninevenpages}%
@@ -2060,7 +2079,7 @@
\pcol@invokeoutput\pcol@op@start
\pcol@nextcol\z@
\@ifnextchar[%]
- \pcol@sptext\relax}
+ \pcol@sptext{\@nameuse{pcol@colpream0}}}
\let\pcol@paracol\paracol
\def\thecolumn{\number\pcol@currcol}
@@ -2404,7 +2423,8 @@
\fi
\let\@elt\pcol@setctrelt
\csname pcol@counters\number\pcol@currcol\endcsname
- \let\@elt\pcol@aconlyelt \pcol@aconly \let\@elt\relax}
+ \let\@elt\pcol@aconlyelt \pcol@aconly \let\@elt\relax
+ \@nameuse{pcol@colpream\ifpcol@sptextstart-1\else\number\pcol@currcol\fi}}
\def\pcol@visitallcols#1{\begingroup
\@tempcnta\z@ \@tempcntb\pcol@currcol
@@ -2442,6 +2462,9 @@
\let\pcol@com@endrightcolumn\pcol@com@endcolumn
\expandafter\let\csname pcol@com@endrightcolumn*\endcsname\pcol@com@endcolumn
+\def\definecolumnpreamble#1#2{\@tempcnta#1\relax
+ \expandafter\gdef\csname pcol@colpream\number\@tempcnta\endcsname{#2}}
+
\def\ensurevspace#1{{\@tempdima#1\relax \gdef\pcol@ensurevspace{#1}}}
\ensurevspace{\baselineskip}
@@ -2585,6 +2608,21 @@
\def\pcol@iifootnotetext[#1]{\pcol@calcfnctr#1\@nil
\expandafter\pcol@@footnotetext\expandafter[\number\@tempcnta]}
+%% Commands for Marginal Notes
+
+\def\pcol@marginpar{\let\pcol@mparoffset\z@ \pcol@@marginpar}
+\long\def\pcol@marginnote[#1]#2[#3]{\endgroup
+ \pcol@mn@warning \global\let\pcol@mn@warning\relax
+ \def\pcol@mparoffset{#3}%
+ \pcol@@marginpar[\marginfont\raggedleftmarginnote#1]%
+ {\marginfont\raggedrightmarginnote#2}}
+\def\pcol@mn@warning{%
+ \PackageWarning{paracol}{\string\margninnote\space is emulated by
+ \string\marginpar.}}
+\def\pcol@xympar{%
+ \ifnum\@floatpenalty<\z@ \global\dimen\@marbox\pcol@mparoffset\relax \fi
+ \pcol@@xympar}
+
%% Column Swapping
\def\twosided{\@ifnextchar[%]