summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-10-12 22:17:41 +0000
committerKarl Berry <karl@freefriends.org>2015-10-12 22:17:41 +0000
commit46d0f1b567232fe2d47924b58b532ce87b671c6e (patch)
tree61f4368d47a1ffe759dfa2364892a269a1631a08 /Master/texmf-dist/tex
parentfed5afdcdbbb42457a5a2515e008be46a54575a6 (diff)
paracol (13oct15)
git-svn-id: svn://tug.org/texlive/trunk@38620 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/paracol/paracol.sty138
1 files changed, 124 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/latex/paracol/paracol.sty b/Master/texmf-dist/tex/latex/paracol/paracol.sty
index 3abdb891ee8..17a55ec5a2e 100644
--- a/Master/texmf-dist/tex/latex/paracol/paracol.sty
+++ b/Master/texmf-dist/tex/latex/paracol/paracol.sty
@@ -1,5 +1,5 @@
%% Style file `paracol'.
-%% Copyright (C) 2005-2013
+%% Copyright (C) 2005-2015
%% Hiroshi Nakashima <h.nakashima@DOMAIN; DOMAIN=media.kyoto-u.ac.jp>
%% (Kyoto University)
%% This program can be redistributed and/or modified under the terms
@@ -9,7 +9,7 @@
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{paracol}
-[2013/10/10 v1.31 ]
+[2015/10/10 v1.32 ]
%% Register Declaration
@@ -88,6 +88,23 @@
\def\pcol@Logfn@i#1{}
\pcol@LogLevel111
+\iffalse
+\newwrite\pcol@F@write
+\immediate\openout\pcol@F@write\jobname.fls
+\fi
+\def\pcol@F#1{\pcol@FF{#1}{}}
+\def\pcol@FF#1#2{\pcol@F@count
+ \immediate\write\pcol@F@write{#1(\number\pcol@page:\number\pcol@currcol/%
+ \number\pcol@toppage:\number\c@page)=\pcol@F@n #2}}
+\def\pcol@F@count{{\@tempcnta\z@
+ \def\@elt##1{\advance\@tempcnta\@ne}\@freelist
+ \xdef\pcol@F@n{\number\@tempcnta}}}
+\let\pcol@Fb\pcol@F@count
+\def\pcol@Fe#1{{\let\reserved@a\pcol@F@n \pcol@FF{#1}{<=\reserved@a}}}
+\let\pcol@F\@gobble
+\let\pcol@Fb\relax
+\let\pcol@Fe\@gobble
+
%% \output Routine
\def\pcol@ovf{%
@@ -160,7 +177,9 @@
\setbox\@cclv\vbox{\pcol@unvbox@cclv\footins}%
\ifnum\pcol@page=\pcol@toppage
\pcol@Log\pcol@makecol{save}\footins
+ \pcol@Fb
\pcol@savefootins\pcol@currfoot
+ \pcol@Fe{makecol(pagefn)}%
\else
\pcol@Log\pcol@makecol{discard}\footins
\setbox\@tempboxa\box\footins
@@ -205,13 +224,17 @@
\vskip\pcol@textfloatsep
\unvbox\@outputbox}%
\let\@elt\relax
+ \pcol@Fb
\xdef\@freelist{\@freelist\@toplist}%
+ \pcol@Fe{cflt}%
\global\let\@toplist\@empty}
\def\pcol@opcol{%
+ \pcol@Fb
\@next\@currbox\@freelist{\global\setbox\@currbox\vbox to\@colht{
\boxmaxdepth\@maxdepth
\pcol@clearcst@unvbox\@outputbox}}\pcol@ovf
+ \pcol@Fe{opcol}%
\expandafter\@cons\csname pcol@shipped\number\pcol@currcol\endcsname\@currbox
\ifnum\pcol@currcol=\z@ \pcol@setpageno \fi
\pcol@nextpage
@@ -300,11 +323,13 @@
\fi
\global\@colht\textheight
\global\topskip\pcol@topskip
- \@dblfloatplacement
+ \@dblfloatplacement \let\f@depth\z@
\@tryfcolumn\@dbldeferlist
\@whilesw\if@fcolmade\fi{%
+ \pcol@Fb
\@next\@currbox\@freelist{%
\global\setbox\@currbox\box\@outputbox}\pcol@ovf
+ \pcol@Fe{startpage(fcol)}%
\global\dimen\@currbox-\maxdimen
\global\skip\@currbox\pcol@topskip
\@cons\pcol@pages{{\number\c@page}\@currbox\voidb@x{}{}}%
@@ -312,10 +337,12 @@
\global\advance\pcol@page\@ne \global\pcol@toppage\pcol@page
\@tryfcolumn\@dbldeferlist}%
\begingroup
- \let\reserved@b\@dbldeferlist
- \global\let\@dbldeferlist\@empty
+ \let\reserved@b\@dbldeferlist \let\reserved@c\@deferlist
+ \global\let\@dbldeferlist\@empty \global\let\@deferlist\@empty
\let\@elt\@sdblcolelt
\reserved@b
+ \let\@elt\relax \xdef\@dbldeferlist{\@dbldeferlist\@deferlist}%
+ \global\let\@deferlist\reserved@c
\endgroup
\ifx\@dbltoplist\@empty
\pcol@defcurrpage{\number\c@page}\voidb@x\voidb@x{}{}%
@@ -325,11 +352,15 @@
\let\@elt\@comdblflelt
\@dbltoplist
\let\@elt\relax
+ \pcol@Fb
\xdef\@freelist{\@freelist\@dbltoplist}%
+ \pcol@Fe{startpage(dbltop)}%
\global\let\@dbltoplist\@empty
+ \pcol@Fb
\@next\@currbox\@freelist{\global\setbox\@currbox\vbox{%
\unvbox\@tempboxa \vskip-\dblfloatsep \dblfigrule
\vskip\dbltextfloatsep}}\pcol@ovf
+ \pcol@Fe{startpage(spanning)}%
\global\dimen\@currbox\@colht
\global\skip\@currbox\pcol@topskip
\pcol@defcurrpage{\number\c@page}\@currbox\voidb@x{}{}%
@@ -352,7 +383,9 @@
\def\pcol@bg@floatheight{\pcol@bg@textheight}%
\setbox\@outputbox\vbox to\textheight{%
\pcol@bg@paintbox{Ff}\unvbox\pcol@spanning}%
+ \pcol@Fb
\@cons\@freelist\pcol@spanning
+ \pcol@Fe{outputelt(spanning)}%
\ifnum\pcol@ncolleft<\pcol@ncol
\setbox\pcol@rightpage\vbox to\textheight{%
\ifpcol@paired\else \advance\c@page\@ne \fi
@@ -393,7 +426,9 @@
\@tempdimb\ht\pcol@spanning \advance\@tempdimb\dp\pcol@spanning
\ifnum#1=\z@
\ifpcol@firstpage\else \pcol@bg@paintbox{Ff}\fi
+ \pcol@Fb
\@cons\@freelist\pcol@spanning \unvbox\pcol@spanning
+ \pcol@Fe{ioutputelt(spanning)}%
\else\ifpcol@firstpage
\ht\pcol@rightpage\ht\pcol@spanning
\dp\pcol@rightpage\dp\pcol@spanning
@@ -411,7 +446,11 @@
\expandafter\@next\expandafter\@currbox
\csname pcol@shipped\number\@tempcntb\endcsname
\relax{\let\@currbox\voidb@x}%
- \ifvoid\@currbox\else \@cons\@freelist\@currbox \fi
+ \ifvoid\@currbox\else
+ \pcol@Fb
+ \@cons\@freelist\@currbox
+ \pcol@Fe{ioutputelt(page)}%
+ \fi
\expandafter\@tempdima
\csname pcol@columnwidth\number\@tempcntb \endcsname
\pcol@@hfil \hb@xt@\@tempdima{\box\@currbox\hss}%
@@ -421,7 +460,9 @@
\ifnum#1=\z@
\pcol@Log\pcol@outputelt{output}\pcol@footins
\pcol@putfootins\pcol@footins
+ \pcol@Fb
\@cons\@freelist\pcol@footins
+ \pcol@Fe{ioutputelt(footins)}%
\else
\vskip\skip\pcol@footins \nointerlineskip
\pcol@phantom\pcol@footins \vskip\z@
@@ -577,6 +618,11 @@
\pcol@getcurrfoot\copy
\pcol@Log\pcol@startcolumn{insert}\footins
\insert\footins{\unvbox\footins}%
+ \ifnum\pcol@page=\pcol@toppage
+ \pcol@Fb
+ \@cons\@freelist\pcol@footins
+ \pcol@Fe{startcolumn(pagefn)}%
+ \fi
\fi
\ifnum\pcol@page=\pcol@toppage
\pcol@deferredfootins\pcol@startcolumn \fi
@@ -834,6 +880,7 @@
\global\pcol@page\z@ \global\pcol@toppage\z@ \global\pcol@basepage\z@
\global\let\pcol@pages\@empty
\global\let\@dbldeferlist\@deferlist \global\let\@deferlist\@empty
+ {\def\@elt##1{\global\dp##1\z@}\@dbldeferlist}%
\setbox\z@\box\pcol@topfnotes
\@tempdima\@colroom
\advance\@tempdima-\ht\@holdpg \advance\@tempdima-\dp\@holdpg
@@ -862,9 +909,11 @@
\let\pcol@bg@preposttop\pcol@bg@preposttop@right
\reserved@a \unvbox\pcol@rightpage}%
\fi
+ \pcol@Fb
\@next\@currbox\@freelist{\global\setbox\@currbox\vbox{%
\let\pcol@bg@preposttop\pcol@bg@preposttop@left
\reserved@a \unvbox\@outputbox}}\pcol@ovf
+ \pcol@Fe{output@start(preenv)}%
\global\dimen\@currbox\@colht
\ifdim\@tempdima=\z@ \@tempskipa\topskip \else \@tempskipa\z@ \fi
\global\skip\@currbox\@tempskipa \global\topskip\@tempskipa
@@ -878,8 +927,10 @@
\fi
\global\@colroom\@colht \pcol@floatplacement
\pcol@currcol\z@ \@whilenum\pcol@currcol<\pcol@ncol\do{%
+ \pcol@Fb
\@next\@currbox\@freelist{\global\setbox\@currbox\vbox{%
\ifdim\topskip=\z@ \hrule\@height\z@\@width\z@ \fi}}\pcol@ovf
+ \pcol@Fe{output@start(col)}%
\pcol@setcurrcolnf
\global\count\@currbox\z@
\global\dimen\@currbox\@colroom
@@ -888,7 +939,9 @@
\global\pcol@currcol\z@
\pcol@getcurrcol
\pcol@savecolorstack
+ \pcol@Fb
\@cons\@freelist\@currbox \unvbox\@currbox
+ \pcol@Fe{output@start(col)}%
\ifvoid\footins\else
\pcol@Log\pcol@output@start{insert}\footins
\insert\footins{\box\footins\penalty\interlinepenalty}%
@@ -901,7 +954,9 @@
\ifvoid\footins \setbox\@outputbox\box\@holdpg
\else \pcol@combinefootins\@holdpg\footins
\fi
+ \pcol@Fb
\let\@elt\relax \xdef\@freelist{\@freelist\@midlist}%
+ \pcol@Fe{makenormalcol}%
\global\let\@midlist\@empty
\pcol@combinefloats
\else
@@ -927,15 +982,19 @@
\pcol@shiftspanning\@holdpg
\setbox\@holdpg\vbox{\unvbox\pcol@prespan \unvbox\@holdpg}%
\fi\fi
+ \pcol@Fb
\@next\@currbox\@freelist{\global\setbox\@currbox\vbox{
\pcol@clearcst@unvbox\@holdpg}}\pcol@ovf
+ \pcol@Fe{output@switch}%
\def\pcol@currfoot{\voidb@x}%
\ifvoid\footins\else
\ifpcol@scfnote
\ifnum\pcol@page=\pcol@toppage
\pcol@getcurrpinfo\@tempcnta\@tempdima\@tempskipa
\pcol@Log\pcol@output@switch{save}\footins
+ \pcol@Fb
\pcol@savefootins\pcol@footins
+ \pcol@Fe{output@switch(pagefn)}%
\pcol@defcurrpage{\number\@tempcnta}\pcol@spanning\pcol@footins
{\pcol@sptextlist}{\pcol@mparbottom}%
\else
@@ -944,7 +1003,9 @@
\fi
\else
\pcol@Log\pcol@output@switch{save}\footins
+ \pcol@Fb
\pcol@savefootins\pcol@currfoot
+ \pcol@Fe{output@switch(colfn)}%
\fi
\fi
\ifnum\pcol@currcol=\z@ \pcol@setpageno \fi
@@ -980,7 +1041,9 @@
\pcol@getcurrcol
\global\pcol@page\count\@currbox
\global\@colroom\dimen\@currbox
+ \pcol@Fb
\@cons\@freelist\@currbox
+ \pcol@Fe{restartcolumn(col)}%
\pcol@getcurrpage
\ifpcol@scfnote
\edef\pcol@currfoot{\pcol@footins}%
@@ -989,7 +1052,9 @@
\pcol@putbackmvl
\if@nobreak \nobreak \else \addpenalty\interlinepenalty \fi
\ifvoid\pcol@footins\else
+ \pcol@Fb
\pcol@getcurrfoot\box \@cons\@freelist\pcol@currfoot
+ \pcol@Fe{restartcolumn(pagefn)}%
\pcol@Log\pcol@restartcolumn{insert}\footins
\pcol@shrinkcolbyfn\@colht\footins\@tempdimb
\insert\footins{\unvbox\footins}%
@@ -1008,9 +1073,11 @@
\else
\pcol@putbackmvl
\ifvoid\pcol@currfoot\else
- \pcol@getcurrfoot\box \@cons\@freelist\pcol@currfoot
- \pcol@Log\pcol@restartcolumn{insert}\footins
- \insert\footins{\unvbox\footins}%
+ \pcol@Fb
+ \pcol@getcurrfoot\box \@cons\@freelist\pcol@currfoot
+ \pcol@Fe{restartcolumn(colfn)}%
+ \pcol@Log\pcol@restartcolumn{insert}\footins
+ \insert\footins{\unvbox\footins}%
\fi
\if@nobreak \nobreak \else \addpenalty\interlinepenalty \fi
\fi}
@@ -1394,7 +1461,11 @@
\pcol@lastpagefalse
\pcol@page\count\@currbox
\setbox\@cclv\vbox{\unvbox\@currbox \vfil}%
- \ifvoid\pcol@currfoot\else \@cons\@freelist\pcol@currfoot \fi
+ \ifvoid\pcol@currfoot\else
+ \pcol@Fb
+ \@cons\@freelist\pcol@currfoot
+ \pcol@Fe{flushcolumn(colfn)}%
+ \fi
\pcol@getcurrfoot\box
\pcol@getcurrpage
\ifvoid\pcol@footins
@@ -1424,15 +1495,19 @@
\fi
\@makefcolumn\@deferlist
\if@fcolmade
+ \pcol@Fb
\@next\@currbox\@freelist{\global\setbox\@currbox\box\@outputbox}%
\pcol@ovf
+ \pcol@Fe{flushcolumn(fcol)}%
\expandafter\@cons
\csname pcol@shipped\number\pcol@currcol\endcsname\@currbox
\fi
\advance\pcol@page\@ne}%
\fi
\ifpcol@lastpagesave \pcol@lastpagetrue \fi
+ \pcol@Fb
\@next\@currbox\@freelist{\global\setbox\@currbox\vbox{}}\pcol@ovf
+ \pcol@Fe{flushcolumn(col)}%
\pcol@getcurrpinfo\@tempcnta{\global\@colht}\@tempskipa
\@pageht\@colht
\ifvoid\pcol@footins\else \pcol@shrinkcolbyfn\@colht\pcol@footins\relax \fi
@@ -1476,7 +1551,10 @@
\def\pcol@makefcolpage{\vbox to\@colht{
\vskip\@fptop \vskip-\@fpsep
\def\@elt##1{\vskip\@fpsep\box##1}\@toplist \vskip\@fpbot}%
- \xdef\@freelist{\@freelist\@toplist}\global\let\@toplist\@empty}
+ \pcol@Fb
+ \xdef\@freelist{\@freelist\@toplist}\global\let\@toplist\@empty
+ \pcol@Fe{makefcolpage}%
+}
\def\pcol@measurecolumn{%
\pcol@getcurrcol
@@ -1545,9 +1623,11 @@
\ifx\@toplist\@empty
\textfloatsep\z@ \floatsep\z@ \let\topfigrule\relax
\fi
+ \pcol@Fb
\@next\pcol@float\@freelist{\global\setbox\pcol@float\vbox to\z@{
\vskip-\floatsep \topfigrule \vskip\textfloatsep
\unvbox\@currbox \vss}}\pcol@ovf
+ \pcol@Fe{synccolumn(topfloat)}%
\@cons\@toplist\pcol@float
\advance\@tempdimb\textfloatsep \advance\@tempdimb-\floatsep
\advance\@tempdimb\@M\p@
@@ -1599,7 +1679,7 @@
\pcol@flushfloats
\begingroup
\setbox\pcol@rightpage\box\voidb@x
- \@dblfloatplacement
+ \@dblfloatplacement \let\f@depth\z@
\@makefcolumn\@dbldeferlist
\@whilesw\if@fcolmade\fi{%
\def\pcol@bg@floatheight{\pcol@bg@textheight}%
@@ -1635,7 +1715,9 @@
\reserved@a \unvbox\pcol@spanning
\ifpcol@firstpage\else \if@tempswa\else \unskip \fi\fi}%
\global\setbox\@outputbox\vbox{\box\@outputbox}%
+ \pcol@Fb
\@cons\@freelist\pcol@spanning
+ \pcol@Fe{makeflushedpage(spanning)}%
\ifnum\pcol@ncolleft<\pcol@ncol
\global\setbox\pcol@rightpage\vbox{%
\ifpcol@paired\else \advance\c@page\@ne \fi
@@ -1678,7 +1760,9 @@
\fi
\global\setbox\@outputbox\vbox{%
\unvbox\@outputbox \pcol@putfootins\pcol@footins}%
+ \pcol@Fb
\@cons\@freelist\pcol@footins \gdef\pcol@footins{\voidb@x}%
+ \pcol@Fe{makeflushedpage(pagefn)}%
\ifdim\pcol@colht=-\maxdimen \global\pcol@colht\z@ \fi
\fi
\fi
@@ -1701,7 +1785,11 @@
\pcol@swapcolumn\@tempcntb\pcol@currcol#1#2\relax
\pcol@getcurrcol
\setbox\@cclv\box\@currbox
- \ifvoid\pcol@currfoot\else \@cons\@freelist\pcol@currfoot \fi
+ \ifvoid\pcol@currfoot\else
+ \pcol@Fb
+ \@cons\@freelist\pcol@currfoot
+ \pcol@Fe{imakeflushedpage(colfn)}%
+ \fi
\pcol@getcurrfoot\box
\@tempswafalse
\begingroup
@@ -1796,8 +1884,10 @@
\@tempswatrue \@pagedp\@m\p@ \global\@mparbottom\z@
\global\let\pcol@mparbottom@out\pcol@mparbottom@zero
\ifpcol@nospan\else
+ \pcol@Fb
\@next\@currbox\@freelist{\global\setbox\@currbox\box\@outputbox}%
\pcol@ovf
+ \pcol@Fe{output@end(spanning)}%
\count\@currbox10\relax
{\let\@elt\relax \xdef\@dbldeferlist{\@elt\@currbox\@dbldeferlist}}%
\global\setbox\pcol@rightpage\box\voidb@x
@@ -1827,13 +1917,17 @@
\fi
\ifvoid\pcol@footins\else
\pcol@Log\pcol@output@end{insert}\pcol@footins
+ \pcol@Fb
\insert\footins{\unvbox\pcol@footins}\@cons\@freelist\pcol@footins
+ \pcol@Fe{output@end(pagefn)}%
\fi
\ifvoid\pcol@topfnotes\else \insert\footins{\unvbox\pcol@topfnotes}\fi
\expandafter\let\csname pcol@columncolor\number\z@\endcsname\relax
\pcol@currcol\z@ \pcol@restorecolorstack
\@whilenum\pcol@currcol<\pcol@ncol\do{%
+ \pcol@Fb
\pcol@getcurrcol \@cons\@freelist\@currbox
+ \pcol@Fe{output@end(col)}%
\advance\pcol@currcol\@ne}%
\pcol@currcol\pcol@lastcol\relax \pcol@getcurrcol
\global\pcol@prevdepth\@pagedp
@@ -1902,6 +1996,7 @@
\pcol@lastpagefalse \xdef\pcol@firstprevdepth{\number\prevdepth}%
\let\pcol@@combinefloats\@combinefloats \let\@combinefloats\pcol@combinefloats
\let\pcol@@addmarginpar\@addmarginpar \let\@addmarginpar\pcol@addmarginpar
+ \let\end@dblfloat\pcol@end@dblfloat
\global\let\pcol@set@color\set@color
\ifx\set@color\relax
\let\pcol@bg@paintpage\relax \let\pcol@bg@paintbox\@gobble
@@ -1970,6 +2065,19 @@
\expandafter\let\expandafter\reserved@a\csname pcol@com@#1\endcsname
\expandafter\let\csname #1\endcsname\reserved@a}
+\gdef\@dbldeferlist{}
+\def\pcol@end@dblfloat{%
+ \if@twocolumn
+ \@endfloatbox
+ \ifnum\@floatpenalty <\z@
+ \@largefloatcheck
+ \@cons\@dbldeferlist\@currbox
+ \fi
+ \ifnum \@floatpenalty =-\@Mii \@Esphack\fi
+ \else
+ \end@float
+ \fi
+}
%% Column Width Setting
\def\columnratio#1{\global\let\pcol@colwidthspecleft\relax
@@ -2130,7 +2238,9 @@
%% Counter Operations
-\def\globalcounter#1{{%
+\def\globalcounter{\@ifstar\pcol@globalcounter@s\pcol@globalcounter}
+\def\pcol@globalcounter@s{\global\let\pcol@gcounters\cl@@ckpt}
+\def\pcol@globalcounter#1{{%
\@tempswafalse \def\reserved@a{#1}%
\def\@elt##1{\def\reserved@b{##1}%
\ifx\reserved@a\reserved@b \@tempswatrue \fi}%