summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-05-18 21:10:33 +0000
committerKarl Berry <karl@freefriends.org>2018-05-18 21:10:33 +0000
commit9424a02f7752bcd23d3fee2b2d7562c9673dd0b7 (patch)
tree07539f8dc0df715b3ee55742268918765094d02d
parentba6a7f3dac02de9bf3c4f3aaccff1ae255114de7 (diff)
paracol (18may18)
git-svn-id: svn://tug.org/texlive/trunk@47750 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/paracol/README6
-rw-r--r--Master/texmf-dist/doc/latex/paracol/paracol-man.pdfbin614626 -> 616478 bytes
-rw-r--r--Master/texmf-dist/doc/latex/paracol/paracol-man.tex4
-rw-r--r--Master/texmf-dist/source/latex/paracol/impl.dtx2766
-rw-r--r--Master/texmf-dist/source/latex/paracol/paracol.dtx102
-rw-r--r--Master/texmf-dist/source/latex/paracol/ppts.dtx66
-rw-r--r--Master/texmf-dist/source/latex/paracol/probs.dtx10
-rw-r--r--Master/texmf-dist/tex/latex/paracol/paracol.sty360
8 files changed, 1959 insertions, 1355 deletions
diff --git a/Master/texmf-dist/doc/latex/paracol/README b/Master/texmf-dist/doc/latex/paracol/README
index eeab4c20645..489ac70ad11 100644
--- a/Master/texmf-dist/doc/latex/paracol/README
+++ b/Master/texmf-dist/doc/latex/paracol/README
@@ -1,6 +1,6 @@
-paracol (v1.32): a multi-column package to typeset columns in "parallel".
+paracol (v1.34): a multi-column package to typeset columns in "parallel".
===
-Copyright (C) 2005-2013
+Copyright (C) 2005-2018
Hiroshi Nakashima <h.nakashima@DOMAIN; DOMAIN=media.kyoto-u.ac.jp>
(Kyoto Univerisity)
This package can be redistributed and/or modified under the terms
@@ -107,7 +107,7 @@ you need newvbtm.sty being also available in CTAN.
- Compatible with the new implemenatation of LaTeX (2015/01/10 or
later) now (*NEW* for v 1.32).
-- A bug found in v1.31 has been fixed.
+- A bug found in v1.32 has been fixed.
Enjoy!
diff --git a/Master/texmf-dist/doc/latex/paracol/paracol-man.pdf b/Master/texmf-dist/doc/latex/paracol/paracol-man.pdf
index 292e9f8f89f..34e1404d735 100644
--- a/Master/texmf-dist/doc/latex/paracol/paracol-man.pdf
+++ b/Master/texmf-dist/doc/latex/paracol/paracol-man.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/paracol/paracol-man.tex b/Master/texmf-dist/doc/latex/paracol/paracol-man.tex
index fd8abb5dc5d..bbaa1403e03 100644
--- a/Master/texmf-dist/doc/latex/paracol/paracol-man.tex
+++ b/Master/texmf-dist/doc/latex/paracol/paracol-man.tex
@@ -1,5 +1,5 @@
%% LaTeX file 'paracol-man'.
-%% Copyright (C) 2005-2015
+%% Copyright (C) 2005-2018
%% Hiroshi Nakashima <h.nakashima@DOMAIN; DOMAIN=media.kyoto-u.ac.jp>
%% (Kyoto University)
%% This program can be redistributed and/or modified under the terms
@@ -8,7 +8,7 @@
%% version 1 of the License, or any later version.
\ProvidesFile{paracol-man.tex}
-[2015/10/10 v1.32 ]
+[2018/05/07 v1.34 ]
\documentclass{ltxdoc}\normalmarginpar
\usepackage{color}
\usepackage{paracol}
diff --git a/Master/texmf-dist/source/latex/paracol/impl.dtx b/Master/texmf-dist/source/latex/paracol/impl.dtx
index d37e4cec6bb..6cd74e34619 100644
--- a/Master/texmf-dist/source/latex/paracol/impl.dtx
+++ b/Master/texmf-dist/source/latex/paracol/impl.dtx
@@ -228,7 +228,7 @@
% single-column {\em\Uidx\preenv} preceeding \beginparacol{} in the
% {\em\Uidx\spage} where it resides and spannig all columns. In this case
% $\pp^i(p)=i$ represents $\!\insert!{\cdot}i$, often {\em cached}
-% in the macro \Midx{\!\pcol@spanning!}, for such {\em\Uidx\spanning}
+% in the macro \!\pcol@spanning!, for such {\em\Uidx\spanning}
% whose registers have the followings.
% 
% \begin{itemize}
@@ -267,7 +267,7 @@
% emptied by \!\pcol@startpage!, and then the elements are added by
% \!\pcol@makecol! (only for the last one) and \!\pcol@output@switch!
% whenever they find a \mctext{} completes. The element is often {\em
-% cached} in the macro \Midx{\!\pcol@sptextlist!} and is referred to by
+% cached} in the macro \!\pcol@sptextlist! and is referred to by
% \!\pcol@buildcolseprule! to draw \cseprule{} and to paint columns and
% \csepgap{} leaving spaces for \mctext{}s. The usage of this element is
% discussed in \secref{sec:imp-ovv-cswap} a little bit more detailedly.
@@ -298,7 +298,7 @@
% another examiner \!\pcol@output@end! lets the outside \!\@mparbottom! have
% a value based on $b_n$ of one of the element, according to \LaTeX's
% setting of marginal note placement. The whole elemnt $\pp^m(p)$ is often
-% {\em cached} in the macro \Midx{\!\pcol@mparbottom!}. The usage of this
+% {\em cached} in the macro \!\pcol@mparbottom!. The usage of this
% element is discussed in \secref{sec:imp-ovv-cswap} a little bit more
% detailedly.
% \end{itemize}
@@ -471,10 +471,10 @@
% $\pp^f(\ptop)$ through a list;
% $$
% \Uidx\df=\!\pcol@topfnotes!=
-% (f_1,f_2,\ldots,f_n)=|\vbox{|f_1\;f_2\;\cdots\;f_n|}|
+% (f_1,f_2,\ldots,f_n)=\!\vbox!|{|f_1\;f_2\;\cdots\;f_n|}|
% $$
-% where $f_i$ is a |\vbox| containing the deferred footnote preceded by
-% |\penalty\interlinepenalty| to allow \TeX{} to break footnotes to place
+% where $f_i$ is a \!\vbox! containing the deferred footnote preceded by
+% \!\penalty!\!\interlinepenalty! to allow \TeX{} to break footnotes to place
% them in two (or more) pages. That is, \!\footnote! or \!\footnotetext! in
% $p<\ptop$ adds an element for the footnote to $\df$, then all the elements
% 
@@ -510,7 +510,7 @@
% \!\pcol@shrinkcolbyfn!. Other and more subtle adjustment is to add the
% stretch and shrink factors of $\!\skip!\cdot\pp^f(p)$ at the tail of the
% \colpage{} by \!\pcol@unvbox@cclv!. This is necessary because \TeX{} has
-% broken the \colpage{} taking acount the stretch and, more essentially,
+% broken the \colpage{} taking account of the stretch and, more essentially,
% shrink factors, and thus without the factors the main vertical list in the
% \colpage{} could be a little bit taller than \!\@colht! causing overfull.
%
@@ -563,6 +563,9 @@
%
% \subsubsection{Fundamental Mechanism}
% \label{sec:imp-ovv-color-fundamental}
+% \changes{v1.34}{2018/05/07}
+% {Revise the description of \Sec1.6.1 according to the new
+% implementation with \cs{insert}.}
%
% Text coloring done by \textsf{color} package and its relatives using
% \!\special! stands on the fact that the main vertical list is {\em
@@ -608,29 +611,34 @@
% when a group surrounding the coloring \!\special! is closed. Therefore we
% have to keep track of the \colorctext{} with {\em\Uidx\colorstack}
% $$
-% \Uidx\cst=\Midx{\!\pcol@colorstack!}=(\Uidx\celt_1,\celt_2,\ldots,\celt_n)=
-% \!\@elt!|{|\celt_1|}|\;\!\@elt!|{|\celt_2|}|\;\cdots\!\@elt!|{|\celt_n|}|
+% \Uidx\cst=
+% (\Uidx\celt_1,\celt_1,\ldots,\celt_n)=
+% \!\vbox!|{|\celt_1\;\celt_2\;\ldots\;\celt_n|}|
% $$
-% to which we push $\celt=\!\current@color!$ when \!\set@color! is invoked
-% and from which we pop it when the corresponding \!\reset@color! appears.
-% Then when we encounter an out-of-order jump, at first we rewind the
-% \colorstack{} in |.dvi| by putting \!\special!s which \!\reset@color!
-% would put, and then reestablish the \colorstack{} by putting \!\special!s
-% as if \!\set@color! for $\celt_i$ is invoked for all $\celt_i\in\cst$.
-% Therefore from the viewpoint of a {\em printer}, it will see
-% stack-rewinding at the end of each \colpage{} and the leaving points of
-% \cswitch{}, while the beginning of each \colpage{} and the entry points of
-% \cswitch{} should have the sequence of coloring \!\special!s to regain the
-% \colorstack{} which the {\em printer} must have at each of the points.
-%
-% \SpecialArrayMainIndex{c}{\pcol@columncolor}
-% 
-% In addition, for each column $c$ we keept
-% $\Uidx\Celt^c=|\pcol@columncolor|\cdot c$ as the {\em default} color of
-% the column $c$, optionally given by the API macro \!\columncolor!. If
-% given for $c$, it is assumed to be at the bottom of the \colorstack{}
-% denoted by $\Uidx\CST^c=(\Celt^c,\celt_1,\ldots,\celt_n)$ which we
-% rewind\slash reestablish at each out-of-order jump in the column $c$.
+% where $\celt_i$ is a \!\vbox! of 1\,|sp| tall, 0 deep and 0 wide containing
+% a coloring \!\special! which \!\set@color! puts into the main vertical
+% list. That is, when \!\set@color! is invoked we push $\celt$ to the tail
+% of $\cst$, while when the corresponding \!\reset@color! appears we pop it
+% from $\cst$\@. Then when we encounter an out-of-order jump, at first we
+% rewind the \colorstack{} in |.dvi| by putting \!\special!s which
+% \!\reset@color! would put, and then reestablish the \colorstack{} by
+% putting \!\special!s in $\celt_i$ as if \!\set@color! for it is invoked
+% for all $\celt_i\in\cst$. Therefore from the viewpoint of a {\em
+% printer}, it will see stack-rewinding at the end of each \colpage{} and
+% the leaving points of \cswitch{}, while the beginning of each \colpage{}
+% and the entry points of \cswitch{} should have the sequence of coloring
+% \!\special!s to regain the \colorstack{} which the {\em printer} must have
+% at each of the points.
+%
+% \SpecialArrayMainIndex{c}{\pcol@columncolor@box}
+% 
+% In addition, for each column $c$ we keep
+% $\Uidx\Celt^c=|\pcol@columncolor@box|\cdot c$ as the {\em default} color
+% of the column $c$, optionally given by the API macro \!\columncolor! or
+% \!\normalcolumncolor!. If given for $c$, it is assumed to be at the bottom
+% of the \colorstack{} denoted by
+% $\Uidx\CST^c=(\Celt^c,\celt_1,\ldots,\celt_n)$ which we rewind\slash
+% reestablish at each out-of-order jump in the column $c$.
%
%
%
@@ -638,6 +646,9 @@
% \label{sec:imp-ovv-color-hmode}
% \changes{v1.22}{2013/06/30}
% {Add the subsection ``Coloring in Horizontal Mode''.}
+% \changes{v1.34}{2018/05/07}
+% {Revise the description of \Sec1.6.2 according to the new
+% implementation with \cs{insert}.}
%
% We have to pay attention to the fact a coloring command can appear in
% horizontal mode of course, and thus push/pop operations in a \colpage{}
@@ -645,41 +656,60 @@
% \!\reset@color! is in the second half of a page-crossing paragraph and if
% we immediately performed push\slash pop of the \colorstack{} in these
% macros. In addition, even in vertical mode these macros can appear before
-% a page break after which they must be in effect, if they are preceded by a
-% vertical item to make a break before it and an inhibiting penalty 10000
-% which {\em delays} \TeX{} examining the break and thus invoking \!\output!.
-%
-% In order to solve the problem of push/pop timing, we maintain a list
-% $\Uidx{\cstb}={}$\!\pcol@colorstack@buf!
-% 
-% \SpecialMainIndex{\pcol@colorstack@buf}
-% 
-% of colors to be pushed in $\cst$, and raise a special \!\output!
-% request, via \!\vadjust! if in horizontal mode, for \colorstack{}
-% manipulation rather than performing it immediately. That is, at the
-% request itself or at the completion of the paragraph having these macros,
-% we have a sequence of \!\output! requests for pushes and pops toghether
-% with the list $\cstb$ for pushes, and possibly a request for a page break
-% in the sequence or at its tail and/or that for \cswitch{} at the tail.
-% Since a request for push moves the first element of $\cstb$ to the tail of
-% $\cst$ while that for pop simply pops $\cst$, \!\output! for a page
-% break or \cswitch{} should see $\cst$ perfectly consistent with coloring
-% \!\special!s in the main vertical list given to the \!\output!.
+% \TeX{} finds a page break after which they must be in effect, if they are
+% preceded by a sequece of non-breakable vertical items by which \TeX{}'s
+% examination of the page break is {\em delayed} as well as the invocation
+% of \!\output! at the break.
+%
+% In order to solve the problem of push/pop timing, we perform push\slash
+% pop operations through \!\insert! to our own register set
+% \!\pcol@colorins!. That is, we \!\insert! $\celt$ to \!\pcol@colorins!
+% when we encounter a \!\set@color! for $\celt$, while its corresponding
+% \!\reset@color! also \!\insert!s another \!\vbox! $\Uidx\celtpop$ of
+% null-height\slash depth\slash width having a \!\special! which the
+% \!\reset@color! puts into the main vertical list. Since we let
+% $\!\count!\!\pcol@colorins!=0$ and $\!\skip!\!\pcol@colorins!=0$ to keep
+% the \!\insert!iion from affecting the growth of \!\pagetotal!, it is
+% guaranteed that an inserted $\celt$ or $\celtpop$ is given to \!\output!
+% through \!\pcol@colorins! together with |\box255| containing the
+% corresponding \!\special!.
+%
+% When \!\output! is invoked, \!\pcol@colorins! has $\Uidx\cstraw$
+% containing $\celt_i$ and possibly its corresponding $\celtpop_i$.
+% Therefore, if \!\output! is for a page break or a \cswitch, we remove all
+% pairs of $\celt_i$ and $\celtpop_i$ from \!\pcol@colorins! to let it have
+% $\cst$ only with $\celt_j$ whose corresponding $\celt_j^-$ is not in
+% $\cstraw$. For this removal, we scan $\cstraw$ from its tail
+% incrementing\slash decrementing a counter $\Uidx\npop$ which we initialize
+% to 0 before scanning. In the scan, we remove all $\celtpop$
+% unconditionally incrementing $\npop$, and $\celt$ such that $\npop>0$ on
+% the encounter with it decrementing $\npop$. This scan is done by
+% \!\pcol@clearcolorstack!, invoked from \!\pcol@opcol! for a page break and
+% \!\pcol@output@switch! for a \cswitch{} through \!\pcol@clearcst@unvbox!,
+% and is for rewinding the \colorstack{}
+% $(\Celt^c,\cstraw)=\Uidx\CSTraw^c$. Therefore, for each $\celt$ to be kept
+% because of $\npop=0$ on the encoutner with it we put \!\special! for
+% \!\reset@color!. Note that on another scan for stack reestablishment,
+% \!\pcol@colorins! has $\cst$ and is kept unchanged. Also note that other
+% \!\output! invocations such as that for floats do not touch $\cstraw$ to
+% allow it grows with $\celt$ and $\celtpop$ corresponding to \!\set@color!
+% and \!\reset@color! in the \colpage{} in which the invocation
+% happens\footnote{
+% 
+% Unlike \cs{footins} which becomes void by putting its contents back to the
+% main vertical list to reexamine the footnote placement possibly with
+% splitting.}.
%
% The mechanism above especially for horizontal mode has subtle issues as
% follows.
% 
% \begin{itemize}
% \item
-% If \!\set@color! appears in a \!\vbox!, the \!\output! request for pushing
+% If \!\set@color! appears in a \!\vbox!, the \!\insert!ion for pushing
% is not effective but corresponding \!\reset@color! can be outside of the
% \!\vbox! to make pushes and pops unbalanced because \!\aftergroup! for it
% inserts it just after the closing of the \!\vbox! if \!\set@color! is not
-% surrounded by an inner group. Another problem with this ineffective
-% \!\output! request is that the {\em protection} by a dummy request of
-% $-10004$ and an empty \!\vbox! from the elimination just after a page
-% break should causes a trouble by the latter because the empty \!\vbox!
-% is added to the \!\vbox! in question.
+% surrounded by an inner group.
%
% \item
% If we are in vertical mode, we can know if we are in a \!\vbox! by
@@ -692,18 +722,18 @@
% To solve the problem above, we introduced a trick with \!\everyvbox! to
% turn a switch $\CSIndex{ifpcol@inner}=\true$ at the beginning of every
% \!\vbox! in a \env{paracol} environment, by which we supress the
-% \!\output! request for \!\set@color! because a \!\vbox! cannot cross a
+% \!\insert!ion for \!\set@color! because a \!\vbox! cannot cross a
% page boundary. As for that of \!\reset@color!, we suppress it by not
-% reserving our own macro \!\pcol@reset@color@pop! for the request by
+% reserving our own macro \!\pcol@reset@color@pop! for the \!\insert!ion by
% \!\aftergroup!. That is, we reserve both \!\reset@color! and
% \!\pcol@reset@color@pop! with \!\aftergroup! if we are outside of any
% \!\vbox!es, while does the former only otherwise. By the same reason, we
-% supress the requests if we are in restricted horizontal mode, i.e., if
-% both \CSIndex{ifhmode} and \CSIndex{ifinner} are true. On the other hand,
-% we cannot supress the request when we are in an in-text math because it
-% can cross a page boundary\footnote{
+% supress the \!\insert!ion if we are in restricted horizontal mode, i.e.,
+% if both \CSIndex{ifhmode} and \CSIndex{ifinner} are true. On the other
+% hand, we cannot supress the \!\insert!ion when we are in an in-text math
+% because it can cross a page boundary\footnote{
% 
-% If an in-text math is in a \!\hbox!, making the \!\output! request is not
+% If an in-text math is in a \cs{hbox}, \cs{insert}ion is not
% necessary because the math cannot cross a page boundary. Though we can
% detect it by a trick with \!\everyhbox!, we abandon this idea because the
% request is not harmful. Another and more serious issue of coloring in
@@ -713,28 +743,6 @@
% does not interfere the use of \!\everyvbox! inside/outside of
% \env{paracol} environments or is not affected by the use.
%
-% The implemntation of \!\columncolor! and \!\normalcolumncolor! has issues
-% similar to above but a little bit more complicated because we need to
-% update $\Celt^c$ at the bottom of \colorstack{} if we are in the column
-% $c$. That is, in addition to adding the specified color to the tail of
-% $\cstb$ and making a special \!\output! request for update, we need to
-% rewind the stack before updating $\Celt^c$ and then reestablish the stack
-% with the updated $\Celt^c$. A complication is in the fact that the
-% \colorstack{} $\cst$ may not be up-to-date at the occurrence of the
-% commands. More complicatedly, the existence of $\Celt^c$ itself is not
-% up-to-date because we have to update it by the special \!\output! request.
-% This problem is solved by having {\em shadows} of $\cst$ and $\Celt^c$,
-% namely {$\Uidx{\cstshadow}=\Midx{\!\pcol@colorstack@shadow!}$} and
-% $\Uidx{\Celtshadow^c}=|\pcol@columncolor@shadow|{\cdot}c$,
-% 
-% \SpecialArrayMainIndex{c}{\pcol@columncolor@shadow}
-% 
-% into which we push or set a color immediately, and referring to them for
-% rewinding and reestablishing the up-to-date \colorstack{} in the
-% column-color commands. Note that the shadows are referred to only outside
-% \!\output! routine and thus popping is done automatically by doing push
-% operations locally.
-%
% Another attention we should pay is that \!\color! will leave \!\aftergroup!
% tokens of \!\reset@color! and thus they are invoked just after
% \Endparacol. However, since we have completed all \colpage{}s in the
@@ -743,8 +751,65 @@
% elements in the stack are popped by \!\reset@color! invoked with the
% \!\aftergroup! mechanism. We also take care of our own \colorstack{}
% popper \!\pcol@reset@color@pop! which must do nothing, i.e., must not make
-% a \!\output! request, after we completed the \lpage, i.e.,
-% if \CSIndex{ifpcol@output} is $\false$.
+% an \!\insert!ion, after we completed the \lpage, i.e., if
+% \CSIndex{ifpcol@output} is $\false$.
+%
+%
+%
+% \subsubsection{Changing Default Column Color}
+% \label{sec:imp-ovv-color-colcolor}
+% \changes{v1.34}{2018/05/07}
+% {Split the description of \cs{columncolor} from \Sec1.6.2 to have
+% new \Sec1.6.3 ``Changing Default Column Color'' because we have
+% serveral new issues in the new implementation with \cs{insert}.}
+%
+% The implemntation of \!\columncolor! and \!\normalcolumncolor! is
+% relatively easy for the cases that they appear outside
+% \env{paracol} environment or they define the default color of a
+% column different from the current column. That is, for the default color
+% of a column $c$ we simply \!\def!ine
+% ${\Uidx\Celtshadow}^c=|pcol@columncolor|\cdot c$ to let it have what
+% \!\current@color! has for the color. Then, in \beginparacol{} in the
+% former case or immediately in the latter, we let
+% $\Celt^c=|pcol@coloumncolor@box|\cdot c$ have the coloring \!\special! for
+% the color acquiring an \!\insert! from \!\@freelist! if the box is
+% $\bot$.
+% 
+% \SpecialArrayMainIndex{c}{\pcol@columncolor}
+% \SpecialArrayIndex{c}{\pcol@columncolor@box}
+%
+% On the other hand, when the API commands are to define the default color
+% of the current column $c$, we need to place the coloring at the bottom of
+% \colorstack{}s in terms of |.tex| and |.dvi|. That is, for the former we
+% have to rewind and reestablish the stack which can be different from
+% $\CST^c$ because the API command can follow a page break which \TeX{} does
+% not yet find. Therefore, we maintain a {\em shadow} of $\cst$ namely;
+% $$
+% {\Uidx\cstshadow}={\Midx{\!\pcol@colorstack@shadow!}}
+% =({\Uidx\celtshadow}_1,\celtshadow_2,\ldots,\celtshadow_n)
+% =\!\@elt!\Arg{\celtshadow_1}\;\!\@elt!\Arg{\celtshadow_2}\;\cdots\;
+% \!\@elt!\Arg{\celtshadow_n}
+% $$
+% to which our version of \!\set@color! pushes $\celtshadow_i$ being
+% \!\current@color! which the original one defines, while popping is done
+% automatically by \TeX's grouping mechanism because pushes are done by
+% \!\edef! rather than \!\xdef!. Then before we \!\def!ine $\Celtshadow^c$
+% we rewind
+% ${\Uidx\CSTshadow}^c=(\Celtshadow^c,\celtshadow_1,\ldots,\celtshadow_n)$
+% putting \!\special! for pop to the main vertical list for each elements,
+% and then after the \!\def!initon of $\Celtshadow^c$ we reestablish
+% $\CSTshadow^c$ putting coloring \!\special! for each element.
+%
+% As for placing $\Celt^c$ at the bottom of $\CST^c$, we must ensure that
+% the placement is done for the \colpage{} in which the API command
+% belongs to, as we did in ordinary push\slash pop of the \colorstack.
+% Therefore the API command \!\insert!s $\Celt^c$ to $\cstraw$ in the form
+% of a \!\vbox!, whose height and depth are 1\,|sp| and width is 0,
+% containing the coloring \!\special! for $\Celt^c$. Then when $\cstraw$ is
+% scanned for rewinding in \!\output!, this \!\vbox! is found to let
+% $\Celt^c$ have the \!\special! acquiring an \!\insert! from \!\@freelist!
+% it was $\bot$. Note that $\cstraw$ may have multiple \!\vbox!es to update
+% $\Celt^c$ and if so the last one is effective.
%
%
%
@@ -752,15 +817,17 @@
% \label{sec:imp-ovv-color-mmode}
% \changes{v1.24}{2013/07/27}
% {Add the subsection ``Coloring in Math Mode''.}
+% \changes{v1.34}{2018/05/07}
+% {Revise the description of \Sec1.6.4 according to the new
+% implementation with \cs{insert}.}
%
% Unfortunately the solution above is imperfect because \TeX{} builds an
% implicit \!\hbox! for a |{|\textit{math stuff}|}| construct in math mode
-% and the contents of \!\vadjust! in the construct does not contribute to
+% and an \!\insert! in the construct does not contribute to
% the main vertical list at all\footnote{
% 
-% The contents is not thrown away but \cs{vadjust} construct itself is added
-% to the list rather than the contents taking away the chance of the
-% contribution.}.
+% The contents is not thrown away but \cs{insert}ion itself is added
+% to the list rather than given to \cs{output}.}.
% 
% Since the implicit \!\hbox! does not care about \!\everyhbox!, we cannot
% use the trick similar to that with \!\everyvbox!. Another bad news is
@@ -768,58 +835,76 @@
% have $\CSIndex{ifvmode}=\CSIndex{ifhmode}=\false$ and
% $\CSIndex{ifmmode}=\true$ while $\CSIndex{ifinner}$ is $\true$ or $\false$
% when we are in in-text or displayed math mode respectively. Therefore, we
-% have to take care of the potential loss and unbalance of \!\output!
-% requests for push and pop.
-%
-% Since \!\output! requests can be lost, we cannot use $\cstb$ to carry
-% colors to be pushed to the stack $\cst$. We also have to remember that,
-% in the cases like |${|\!\color!$\Arg{c}\textit{text}$|}$| or
-% |$|\!\textcolor!$\Arg{c}\ARg{text}$|$| expanded to the former, the
-% \!\output! request for push is lost while its counterpart for pop survives
+% have to take care of the potential loss of \!\insert!ion for pushes and
+% thus unmatched pops in $\cstraw$.
+%
+% For example, we have to remember that, in the cases like
+% |${|\!\color!$\Arg{c}\textit{text}$|}$| or
+% |$|\!\textcolor!$\~\Arg{c}\ARg{text}$|$| expanded to the former, the
+% \!\insert!ion for push is lost while its counterpart for pop survives
% making it necessary to check the existance of pushing counterpart for each
-% pop\footnote{
+% pop in $\cstraw$\footnote{
% 
% Since a pop is always in a group one level outer from its push
% counterpart, the pop request should be presented if the push does.}.
% 
-% Therefore, we have to find a means for an \!\output! request of a push or
-% pop to carry the color to be pushed and the identifier to associate the
-% push and its counterpart pop.
+% Note that the fact that the pop in the examples is in the in-text math
+% does not help us, because the pop in
+% |$|\!\begingroup!\!\color!\Arg{c}\textit{text}\!\endgroup!|$| is also in
+% the in-text math while its pushing counterpart performs an effective
+% \!\insert!ion, and two \!\insert!ions must be presented in $\cstraw$
+% because we can have a page-break in \textit{text}. Therefore, we have to
+% find a means to examine whether a pop $\celtpop_i$ has its counterpart
+% $\celt_i$ in $\cstraw$ to remove $\celt_i$ from $\cstraw$ if exists or to
+% igonore $\celtpop_i$ otherwise. That is, we have to attach an identifier
+% $m$ to $\celt_i$ and $\celtpop_i$, i.e., to make them $\Uidx\mcelt_{i,m}$
+% and $\Uidx\mceltpop_{i,m}$.
%
% Since the only means we have for the communication with \!\output! routine
-% is the page break \!\penalty!, we reserve a set of negative penalties
-% $\LP\Uidx\mppush{-}\mplimit,\mppush\RB$ for pushes and
-% $\LP\Uidx\mppop{-}\mplimit,\mppop\RB$ for pops to give the identifier $i$ to
-% a push, where $i\In0\mplimit$, $\mppush=-10100=-\!\pcol@op@mcpush!$,
-% $\mppop=-10200=-\!\pcol@op@mcpop!$, and
-% $\Uidx{\mplimit}=\!\pcol@mcpushlimit!=100$. That is, a coloring operation
-% in math mode attempts to make an \!\output! request with
-% $\!\penalty!=\mppush-i$ while the \!\penalty! for its counterpart pop is
-% $\mppop-i$. The color $\Uidx\mcelt_i$ and the identifier $i$ is kept in the
-% macro $\cs{pcol@reset@color@mpop@}{\cdot}i=
-% \!\pcol@reset@color@mpop!\Arg{i}\~\Arg{\mcelt_i}$
-% 
-% \SpecialArrayMainIndex{i}{\pcol@reset@color@mpop@}
-% 
-% which is also used as the token given to \!\aftergroup! in the coloring
-% operation. Then the \!\output! routine for $\mppush-i$ appends $i$ to the
-% tail of the list
-% $\Uidx{\mplist}=\Midx{\!\pcol@colorstack@mpushed!}=(i_1,i_2,\ldots,i_k)$
-% of identifiers of pushes which have been done in the last pargraph made
-% just before the invocation of the \!\output! routine, and pushes $\mcelt_i$
-% to the \colorstack{} $\cst$. The routine for $\mppop-i$ invoked by the
-% macro $\!\pcol@reset@color@mpop!\Arg{i}\Arg{\mcelt_i}$, on the other hand,
-% pops $\cst$ if $i$ is found in $\mplist$, i.e., its push counterpart is
-% processed by \!\output! routine to ensure the balance of push and pop.
-%
-% To give unique identifier to each push in a paragraph, we maintain the
-% counter $\!\pcol@mcid!$ which is incremented after (the attempt of)
-% \!\output! request of each push. Then the counter is zero-cleared by
-% \!\output! routine in order to keep it less than $L$ unless, roughly
-% speaking, a \colpage{} has a unexpectedly large number of math constructs
-% having coloring commands in them. Then at a push for $i=0$, we clear the
-% list $\mplist$ because pushes recorded in it should have been processed by
-% the last \!\output! routine and/or its predecessors.
+% is what we \!\insert! to $\cstraw$, the \!\insert!ed \!\vbox! must carry an
+% identifier $m$ for a push\slash pop in math mode. To do that, we make
+% \!\vbox! $m$\,|sp| wide ($m>0$) if our version of \!\set@color! is in math
+% mode to represent $\mcelt_{i,m}$ and $\mceltpop_{i,m}$, while the width is
+% 0 otherwise as described in \secref{sec:imp-ovv-color-hmode}. Then in the
+% scan of $\cstraw$ for rewinding in \!\output!, we supress
+% incrementing\slash decrementing $\npop$ for $\mcelt_{i,m}$ and
+% $\mceltpop_{i,m}$, but remove $\mcelt_{i,m}$ if $\mceltpop_{i,m}$ is in
+% $\cstraw$ as a successor while we keep it in $\cstraw$ otherwise putting a
+% \!\special! of pop for it to the main vertical list.
+%
+% To ensure that $\mcelt_{i,m}$ has its counterpart $\mceltpop_{i,m}$ in
+% $\cstraw$ iff the push and pop are in a \colpage, we maintain the counter
+% \!\pcol@mcid! incremented before (the attempt of) the \!\insert!ion of
+% $\mcelt_{i,m}$ with $m=\!\pcol@mcid!$ and the \!\aftergroup! reservaion
+% for that of $\mceltpop_{i,m}$. Then the counter is zero-cleared by
+% \!\output! routine in order to keep it less than
+% $\!\pcol@mcpushlimit!=1000$ unless, roughly speaking, a \colpage{} has a
+% unexpectedly large number of math constructs having coloring commands in
+% them. Note that this zero-clearing does not ensure that an identifier $m$
+% is unique in $\cstraw$. That is, it can happen that $\cstraw$ has
+% $\mcelt_{i,m}$, $\mceltpop_{i,m}$, $\mcelt_{j,m}$ and/or $\mceltpop_{j,m}$
+% in this order for $i<j$, when two math constructs with coloring for $i$
+% and $j$ are in different paragraphs and \!\output! is invoked at or after
+% the end of the paragraph with the math for $i$. This potential
+% duplication is, however, unharmful because of the following.
+% 
+% \begin{itemize}
+% \item
+% Since a math construct cannot have immediate \!\output! invocations in it,
+% the order of the elements in $\cstraw$ must be $\mcelt_{i,m}$,
+% $\mceltpop_{i,m}$, $\mcelt_{j,m}$ and $\mceltpop_{j,m}$ from its bottom to
+% top, though some of them could be missing. Therefore, if
+% $\mceltpop_{i,m}$ is in $\cstraw$, $\mcelt_{j,m}$ must follow it if
+% exsits not causing accidental matching with $\mceltpop_{i,m}$.
+%
+% \item
+% If $\mcelt_{i,m}$ is in $\cstraw$ but $\mceltpop_{i,m}$ is not, it means
+% we have a page break between vertical items corresponding to
+% $\mcelt_{i,m}$ and $\mceltpop_{i,m}$ to keep the \!\insert!ion of
+% $\mceltpop_{i,m}$ and anything following it from appended into $\cstraw$.
+% Therefore, $\cstraw$ cannot have $\mceltpop_{j,m}$ not causing accidental
+% matching with $\mcelt_{i,m}$.
+% \end{itemize}
%
%
%
@@ -841,19 +926,19 @@
% \colpage{}s just having such \!\special!s as follows. When we start a new
% \colpage{}, we don't put \!\special!s for establishing immediately but
% save the \colorstack{} $\CST^c$ into
-% $\Uidx\csts=\Midx{\!\pcol@colorstack@saved!}$. Then when we leave the
+% $\Uidx\csts=\!\pcol@colorstack@saved!$. Then when we leave the
% \colpage{} by switching or page breaking, we examine the emptiness of the
% \colpage{} and if so we do nothing, while otherwise we put the
-% \!\special!s for reestablishing $\csts$ at the top of the \colpage{}, and
-% those for rewinding at the bottom. Similary, when we revisit a \colpage,
-% we examine its emptiness and if so we save $\CST^c$ into $\csts$, while
-% otherwise we put \!\special!s for reestablishing $\CST^c$ and nullify
-% $\csts$ so that nothing will be put at the top of the \colpage{} when we
-% leave it. By these mechanisms, an empty \colpage{} should not have
-% coloring \!\special!s, while non-empty ones should have a sequence of
-% triples; reestablishing \!\special!s; ordinary main vertical list items
-% including coloring \!\special!s inserted by \!\color! etc.; and then
-% rewinding \!\special!s.
+% \!\special!s for reestablishing $\csts$ at the top of the \colpage{} and
+% those for rewinding $\cstraw$ at the bottom. Similary, when we revisit a
+% \colpage, we examine its emptiness and if so we save $\CST^c$ into
+% $\csts$, while otherwise we put \!\special!s for reestablishing $\CST^c$
+% and nullify $\csts$ so that nothing will be put at the top of the
+% \colpage{} when we leave it. By these mechanisms, an empty \colpage{}
+% should not have coloring \!\special!s, while non-empty ones should have a
+% sequence of triples; reestablishing \!\special!s; ordinary main vertical
+% list items including coloring \!\special!s inserted by \!\color! etc.; and
+% then rewinding \!\special!s.
%
%
%
@@ -1236,17 +1321,17 @@
% |1sp|, while depth of \cwise{} floats are 0 since \!\@endfloatbox! add a
% \!\vskip! of 0 at the end of the box of floats.
%
-% Then all macros invoked in \!\output!-routine examine the depth of floats
-% in the list they are working on against a newly introduced macro
-% \!\f@depth! by also newly introduced \!\@testwrongwidth!, so that they
-% process only floats of a page/column category specified by \!\f@depth!,
-% while those not matching to \!\f@depth! are let go to \!\@deferlist! to
-% inhibit succeeding floats of the same type to overtake them. The
-% \!\def!inition of \!\f@depth! is done only by modified
-% \!\@dblfloatplacement!, always invoked in a group, to let it have |1sp| so
-% that float placement macros usually work on \cwise{} ones with the default
-% setting of $\!\f@depth!=\!\z@!$ except for special occasions in which the
-% placement of \pwise{} floats is tried.
+% Then all float placement macros invoked in \!\output!-routine examine the
+% depth of floats in the list they are working on against a newly introduced
+% macro \!\f@depth! by also newly introduced \!\@testwrongwidth!, so that
+% they process only floats of a page/column category specified by
+% \!\f@depth!, while those not matching to \!\f@depth! are let go to
+% \!\@deferlist! to inhibit succeeding floats of the same type from
+% overtaking them. The \!\def!inition of \!\f@depth! is done only by
+% modified \!\@dblfloatplacement!, always invoked in a group, to let it have
+% |1sp| so that float placement macros usually work on \cwise{} ones with
+% the default setting of $\!\f@depth!=\!\z@!$ except for special occasions
+% in which the placement of \pwise{} floats is tried.
%
% Though the mechanism should work well with {\em ordinary\/} multi-columned
% documents, it is incompatible with \Paracol{} almost inherently. That is,
@@ -1311,7 +1396,7 @@
% \item
% \label{item:ovv-float-@output@start}
% We convert \!\@deferlist! to \!\@dbldeferlist! in \!\pcol@output@start! to
-% start a \env{paracol} environment, and peforms the reverse operation in
+% start a \env{paracol} environment, and perform the reverse operation in
% \!\pcol@output@end! to close the environment. Though it is very unlikely
% (or maybe impossible) that the \!\@deferlist! {\em imported\/} in the
% former operation has \LaTeX's (i.e., not \Paracol's) double-column floats
@@ -1325,7 +1410,7 @@
% Therefore, if one try to {\em smuggle\/} a double-column float of the new
% scheme into a \env{paracol} and to pass it through the environment to
% another double-column world, the float will become a single-column one.
-% Even if such guy really exists and complains abount this transformation,
+% Even if such guy a really exists and complains abount this transformation,
% however, we have good right to say ``don't do that''.}.
% \end{enumerate}
% 
@@ -1416,16 +1501,21 @@
% \end{itemize}
%
% \item[\rm\Uidx{\!\bx@A!}, \ldots, \Uidx{\!\bx@R!}]
-% have floats created by \!\@xfloat! in the ordinary usage of \LaTeX. In
-% addtion to it, we use these registers for completed \colpage{}s $s_c(p)$
-% (\!\pcol@opcol!, \!\pcol@flushcolumn!), main vertical list $\cc_c(\vb)$
-% (\!\pcol@output@start!, \!\pcol@output@switch!, \!\pcol@flushcolumn!)
-% and \Mcfnote{}s $\cc_c(\ft)$ (\!\pcol@output@switch!) in \ccolpage{}s,
-% \spanning{} including \preenv{} $\pp^i(p)$ (\!\pcol@startpage!,
-% \!\pcol@output@start!) and \Scfnote{}s $\pp^f(p)$ (\!\pcol@makecol!,
-% \!\pcol@output@switch!) in pages, \mvlfloat{}s for main vertical lists in
-% \sync{}ed pages (\!\pcol@synccolumn!), and \pwise{} floats deferred
-% from \env{paracol} to \postenv{} (\!\pcol@output@end!).
+% have floats created by \!\@xfloat! in the ordinary usage of {\em
+% fundamental\/} \LaTeX{} of 2014 or earlier or that without the extension
+% of e-\TeX{} or its relatives. On the other hand, in \LaTeX{} of 2015 or
+% later and with e-\TeX{} or its relatives, the set is \!\bx@A!, \ldots,
+% \Uidx{\!\bx@Z!}, \Uidx{\!\bx@AA!}, \ldots, \Uidx{\!\bx@ZZ!}\@. In addtion
+% to the use in \LaTeX, we use these registers for completed \colpage{}s
+% $s_c(p)$ (\!\pcol@opcol!, \!\pcol@flushcolumn!), main vertical list
+% $\cc_c(\vb)$ (\!\pcol@output@start!, \!\pcol@output@switch!,
+% \!\pcol@flushcolumn!) and \Mcfnote{}s $\cc_c(\ft)$
+% (\!\pcol@output@switch!) in \ccolpage{}s, \spanning{} including \preenv{}
+% $\pp^i(p)$ (\!\pcol@startpage!, \!\pcol@output@start!) and \Scfnote{}s
+% $\pp^f(p)$ (\!\pcol@makecol!, \!\pcol@output@switch!) in pages,
+% \mvlfloat{}s for main vertical lists in \sync{}ed pages
+% (\!\pcol@synccolumn!), and \pwise{} floats deferred from \env{paracol} to
+% \postenv{} (\!\pcol@output@end!).
% \end{description}
%
%
@@ -1453,13 +1543,12 @@
% is \TeX's primitive register to have the page-break penalty inserted
% between two lines. The register is referred to in \!\pcol@output@start!
% to make \Preenv{} \Mgfnote{}s followed by this \!\penalty! on the
-% \!\insert!ion, in \!\pcol@restartcolumn! and \!\pcol@return@from@color! to
-% insert the \!\penalty! in the register to resume a \colpage{} unless it is
-% suspended after a sectioning command, i.e., $\CSIndex{if@nobreak}=\true$,
-% in \!\pcol@deferredfootins! to let the secnod half of split $\df$ have
-% this \!\penalty! as the very first element, in
-% \!\pcol@fntexttop!\marg{text} to make the footnote $\arg{text}$ followed
-% by this \!\penalty! on the \!\insert!ion, in
+% \!\insert!ion, in \!\pcol@restartcolumn! to insert the \!\penalty! in the
+% register to resume a \colpage{} unless it is suspended after a sectioning
+% command, i.e., $\CSIndex{if@nobreak}=\true$, in \!\pcol@deferredfootins!
+% to let the secnod half of split $\df$ have this \!\penalty! as the very
+% first element, in \!\pcol@fntexttop!\marg{text} to make the footnote
+% $\arg{text}$ followed by this \!\penalty! on the \!\insert!ion, in
% \!\pcol@fntextother!\marg{text} to make the footnote $\arg{text}$ preceded
% by this \!\penalty! in $\df$, and in \!\pcol@fntextbody! to let it have
% \!\interfootnotelinepenalty!.
@@ -1514,6 +1603,7 @@
% \!\pcol@makenormalcol!,
% \!\pcol@output@switch!,
% \!\pcol@setcurrcol!,
+% \!\pcol@iscancst!,
% \!\pcol@addmarginpar!,
% \!\pcol@do@mpbout@i!,
% \!\pcol@sync!,
@@ -1542,10 +1632,6 @@
% \!\pcol@swapcolumn!,
% \!\pcol@set@color@push!,
% \end{quote}
-% 
-% In addition, the register is used for the top level definition of
-% $\!\pcol@op@mcpop!=-\!\pcol@op@mcpush@pone!+1+\mplimit=
-% -(\mppush+1)+1+\mplimit=-(\mppush-\mplimit)$.
%
% \item[\Uidx{\!\tw@!}]
% is a \!\chardef! register to have 2. It is used in \!\pcol@setcurrcol! to
@@ -1570,6 +1656,9 @@
% scanning range $\LBRP\CBfrom{\CBto{-}1}$.
%
% \item
+% \!\pcol@iscancst! to decrement $\npop$ by one.
+%
+% \item
% \!\pcol@do@mpbout@i! to let \!\@tempcnta! have it to indicate left margin.
%
% \item
@@ -1582,10 +1671,6 @@
% \item
% \!\pcol@iadjustfnctr! to decrement \!\c@footnote!.
% \end{itemize}
-% 
-% The register is also used for the top level definition of
-% $\!\pcol@op@mcpush@pone!=-(-\mppush-1)=\mppush+1$ and
-% $\!\pcol@op@mcpop@pone!=-(-\mppop-1)=\mppop+1$.
%
% \item[\Uidx{\!\sixt@@n!}]
% is a \!\chardef! register to have 16. It is used in
@@ -1608,11 +1693,11 @@
% \begin{itemize}
% \item
% \!\pcol@ShowBox! to let \!\showboxdepth! and \!\showboxbreadth! have
-% 10000 for full logging of a box having footnotes.
+% 10000 for full logging of a box.
%
% \item
% \!\pcol@output! to examine if $\!\outputpenalty!<-10000$ to mean a special
-% \!\output! request.
+% \!\output! request.
%
% \item
% \!\pcol@specialoutput! to let $\!\outputpenalty!=-10000$ to tell
@@ -1635,22 +1720,19 @@
% $\!\pcol@setcw@calcf!\<x\>\<y\>\<z\>$ to let $Z=z\times1\,|pt|=10000\,|pt|$
% if $x/y$ is too large.
% \end{itemize}
-% 
-% In addition, the register is used for the top level definition of
-% $\!\pcol@op@mcpush!=10000+\mplimit$.
%
% \item[\Uidx{\!\@Mii!}]
% is a \!\mathchardef! register to have 10002. It is used in
% \!\pcol@end@dblfloat! to examine if $\!\@floatpenalty!=-10002$ to mean the
-% float environment to be closed is in horizontal mode.
+% float environment to be closed is given in horizontal mode.
%
% \item[\Uidx{\!\@Miv!}]
% is a \!\mathchardef! register to have 10004. It is used in \!\pcol@output!
% to examine if $\!\outputpenalty!=-10004$ for a dummy \!\output! request
-% made by \LaTeX's float-related macros and our \!\pcol@invokeoutput! and
-% \!\pcol@color@invokeoutput! to ensure the real request is not eliminated
-% when it is made at the very beginning of a page or a \colpage. It is also
-% used in \!\pcol@specialoutput! for footnote logging when
+% made by \LaTeX's float-related macros and our \!\pcol@invokeoutput! to
+% ensure the real request is not eliminated when it is made at the very
+% beginning of a page or a \colpage. It is also used in
+% \!\pcol@specialoutput! for footnote logging when
% $\!\outputpenalty!=-10004$.
%
% \item[\Uidx{\!\@MM!}]
@@ -1713,7 +1795,7 @@
% 
% \begin{itemize}
% \item
-% our own \!\@outputpage! to give $\page(p)$ or $\page(p)+1$ to
+% Our own \!\@outputpage! to give $\page(p)$ or $\page(p)+1$ to
% \!\pcol@outputpage@l! and \!\pcol@outputpage@r! which finally let the
% register have the value to be referred to by \!\pcol@@outputpage! being
% \LaTeX's \!\@outputpage!.
@@ -1784,6 +1866,7 @@
%
% \item[\Uidx{\!\count@!}]
% is a \!\count! register for temporary use. It is used in
+% \!\pcol@iscancst! to have $m$ of $\mcelt_{i,m}$,
% \!\pcol@addmarginpar! to have the physical column position of the current
% column $c$ in which \!\marginpar! is given, and in
% $\!\pcol@extract@fil@i!\<s\>\!\@nil!$ to exract the unit of the stretch
@@ -1823,19 +1906,12 @@
% \item
% In \!\@outputpage!, it has $\page(p)$ or $\page(p)+1$ to be given to
% \!\pcol@outputpage@l! or \!\pcol@outputpage@r! as their argument when they
-% are used to ship out the second (not alwways right) component of a
+% are used to ship out the second (not always right) component of a
% \parapag{}e pair.
%
% \item
% In \!\pcol@bg@columnleft!, it has a value in $\LBRP\CBfrom{c}$ to sum up
-% the width of columns and \csepgap{}s of in the range.
-%
-% \item
-% In \!\pcol@specialoutput!, it has $i=-(\!\outputpenalty!-P_x)$ where
-% $P_x\in\{\mppush,\mppop\}$ when $\!\outputpenalty!\leq\mppush$ to pass $i$
-% to \!\pcol@output@mcpush! or \!\pcol@output@mcpop! as the identifier of
-% the push operation. Then the register referred to by the former directly
-% and by \!\pcol@output@mcpop@elt! invoked from the latter.
+% the width of columns and \csepgap{}s in the range.
%
% \item
% In \!\pcol@output@switch!, it is used to have $\page(p)$ obtained by
@@ -1851,6 +1927,12 @@
% \SpecialIndex{\if@afterindent}
%
% \item
+% In $\!\pcol@scancst!\arg{box}$, it is let have
+% $\arg{box}\in\{\!\pcol@colorins!,|\pcol@color|\~|stack@saved|\}$ and then is
+% referred to in \!\pcol@iscancst!.
+% \SpecialIndex{\pcol@colorstack@saved}
+%
+% \item
% In \!\pcol@addmarginpar! besides the page scan shown above, it is used to
% scan all columns whose physical position is left from the current
% colum $c$ to measure the distance between the left edges of the leftmost
@@ -1909,21 +1991,7 @@
% In $\!\marginparthreshold!\Arg{t_l}|[|t_r|]|$ it is let have $t_l$, while
% in the related macro $\!\pcol@marginparthreshold!|[|t_r|]|$ it is let have
% $t_r$.
-%
-% \item
-% In \!\pcol@set@color@push!, it is used to calculate the \!\penalty!
-% $\mppush-i$ for the \!\output! request of $i$-th math-mode color push.
-%
-% \item
-% In \!\pcol@reset@color@mpop!, it is used to calculate the \!\penalty!
-% $\mppop-i$ for the \!\output! request to pop \colorstack{} element pushed
-% by $i$-th math-mode coloring operation.
% \end{itemize}
-% 
-% In addition, the register is used in the top level definition of
-% \!\pcol@op@mcpush!, \!\pcol@op@mcpush@pone!, \!\pcol@op@mcpop! and
-% \!\pcol@op@mcpop@pone! to have $P_x$ or $P_x-1$ where
-% $P_x\in\{\mppush,\mppop\}$.
%
% \item[\Uidx{\!\@tempcntb!}]
% is a \!\count! register for temporary use. It is used in the following
@@ -1937,6 +2005,9 @@
% $c'\In\Cfrom\Cto$, where $(\Cfrom,\Cto)\in\{(0,\CL),(\CL,\C)\}$.
%
% \item
+% In \!\pcol@scancst! and \!\pcol@iscancst!, it has $\npop$.
+%
+% \item
% In \!\pcol@addmarginpar!, it is let have the column number $d$ whose
% phisical position is left from the current colum $c$ to measure the
% distance between the left edges of the leftmost column and $c$.
@@ -1988,11 +2059,11 @@
% temporary setting for a page with bottom floats has some reasonability but
% its implementation for \env{paracol} environments having \cswitch{}
% from/to a \colpage{} with bottom floats to/from another one without
-% them\footnote{
+% them is too costly\footnote{
% 
-% Unless we incorporate \cs{maxdepth} as a member of \cctext, but we don't
-% because the idea of temporary setting itself is too vague to pay the
-% effort and a precious membership in \cctext.}.
+% That is, we would need to incorporate \cs{maxdepth} as a member of
+% \cctext, but we don't because the idea of temporary setting itself is too
+% vague to pay the effort and a precious membership in \cctext.}.
% 
% Therefore, we let the register have \!\@maxdepth! in \!\pcol@output! and
% \!\pcol@combinefloats! to cancel the temporary setting done in
@@ -2026,12 +2097,23 @@
% \!\pcol@zparacol! also refers to it to save it in \!\pcol@firstprevdepth!
% for the \preenv.
%
+% \item[\Uidx{\!\vfuzz!}]
+% is \TeX's primitive register to have the threshold height of overfull
+% messaging. It is set to 0 in $\!\pcol@ShowBox!\arg{b}$ to ensure overfull
+% for any \!\box! $b$ of non-null height.
+%
% \item[\Uidx{\!\maxdimen!}]
% is a \!\dimen! register to have $16383.99999\,|pt|$ being the largest
% legal dimensional value. The usages of this register are as follows.
% 
% \begin{itemize}
% \item
+% For the \!\insert! register set $\!\pcol@colorins!=\cstraw$,
+% \!\dimen!\!\pcol@colorins! is let be \!\maxdimen! for the consistency with
+% our intention that a \colpage{} can have virtually infinite number of
+% \!\insert!ions for text coloring.
+%
+% \item
% In \!\pcol@output!, it is set into \!\vsize! when $\!\outputpenalty!=-10004$
% for the dummy \!\output! request so that no page break should occur
% between the dummy and real requests.
@@ -2235,7 +2317,9 @@
% \!\pcol@bg@paperwidth! to calculate $\WP-2\WR$.
%
% \item[\Uidx{\!\z@!}]
-% is a \!\dimen! register to have 0\,|pt| and is used in the following macros.
+% is a \!\dimen! register to have 0\,|pt| to initialize \!\pagerim! and
+% \!\skip!\!\pcol@colorins! at their declarations, and is used in the
+% following macros.
% 
% \begin{quote}\raggedright
% \!\pcol@ShowBox!,
@@ -2256,6 +2340,7 @@
% \!\pcol@bg@paintregion!,
% \!\pcol@output@start!,
% \!\pcol@putbackmvl!,
+% \!\pcol@iscancst!,
% \!\pcol@deferredfootins!,
% \!\pcol@addmarginpar!,
% \!\pcol@getmparbottom!,
@@ -2272,12 +2357,17 @@
% \!\pcol@extract@fil@ii!,
% \!\pcol@sptext!,
% \!\pcol@fntextbody!.
+% \!\pcol@icolumncolor!,
% \!\pcol@set@color@push!,
+% \!\pcol@reset@color@pop!,
+% \!\pcol@reset@color@mpop!,
% \!\pcol@backgroundcolor@iii!.
% \end{quote}
% 
-% It is also used to give the number 0 to initialize \!\pcol@currcol! at its
-% declaration, and in the following macros.
+% It is also used to give the number 0 for the initializations of
+% \!\pcol@currcol!, \!\pcol@ncol!, \!\pcol@ncolleft! and
+% \!\count!\!\pcol@colorins! at their declarations, and in the following
+% macros.
% 
% \begin{quote}\raggedright
% \!\pcol@ShowBox!,
@@ -2295,6 +2385,7 @@
% \!\pcol@output@start!,
% \!\pcol@output@switch!,
% \!\pcol@setcurrcol!,
+% \!\pcol@iscancst!,
% \!\pcol@addmarginpar!,
% \!\pcol@setmpbelt!,
% \!\pcol@do@mpbout@i!,
@@ -2318,15 +2409,14 @@
% \!\pcol@sptext!,
% \!\pcol@switchcol!,
% \!\pcol@visitallcols!,
-% \!\pcol@set@color@push!,
% \!\endparacol!.
% \end{quote}
%
% \item[\Uidx{\!\p@!}]
% \begin{Sloppy}{3950}%
-% is a \!\dimen! register to have 1\,|pt|. It is used in \!\pcol@cflt!,
-% \!\pcol@addflhd!, \!\pcol@synccolumn!, \!\pcol@output@end!,
-% \!\pcol@setcolwidth@s!, \!\pcol@setcw@getspec@i!, \!\pcol@setcw@fill! and
+% is a \!\dimen! register to have 1\,|pt|. It is used in \!\pcol@ShowBox!,
+% \!\pcol@cflt!, \!\pcol@addflhd!, \!\pcol@synccolumn!, \!\pcol@output@end!,
+% \!\pcol@setcolwidth@s!, \!\pcol@setcw@getspec@i!, \!\pcol@setcw@fill! and
% \!\pcol@setcw@calcf!, and the top level assignment to \!\@tempskipa! for
% the invocation of \!\pcol@defkw!, as the shorthand of |pt|.
% \end{Sloppy}
@@ -2498,7 +2588,7 @@
% \begin{itemize}
% \item
% \!\pcol@buildcolseprule!, \!\pcol@buildcselt@S! and \!\pcol@buildcselt! to
-% have the argument $d\in\{\!\@maxdepth!,0\}$ of the former macro.
+% have the argument $d\in\{\!\@maxdepth!,0\}$ of the first macro.
%
% \item
% \!\pcol@bg@paintregion@i! to have $y_1$ of $\bgr_a^{[c]}$.
@@ -2507,6 +2597,10 @@
% $\!\pcol@bias@mpbout@i!\Arg{y}\Arg{t}\Arg{b}$ to have $t$ and then $t+y$.
%
% \item
+% \!\pcol@output@switch! to have the height of \prespan{} in
+% \!\pcol@prespan!, or 0 if it is $\bot$.
+%
+% \item
% \!\pcol@sync! to have $V$ or $V-\DT+\VE$.
%
% \item
@@ -2573,9 +2667,9 @@
% In \!\pcol@outputelt!, it has $\pp^h(p)$ to examine if $p$ is a \fpage.
%
% \item
-% In \!\pcol@outputelt!, it has $\pp^h(p)$ possibly shrunk by \Scfnote{}s
+% In \!\pcol@ioutputelt!, it has $\pp^h(p)$ possibly shrunk by \Scfnote{}s
% to know the \bground{}s to be painted for columns etc. After that it has
-% $\w_c$ being the width of each |\hbox| into which the \colpage{} of each
+% $\w_c$ being the width of each \!\hbox! into which the \colpage{} of each
% column $c$ is put.
%
% \item
@@ -2667,9 +2761,9 @@
% are scaling parameters for good approximation.
%
% \item
-% In \!\pcol@switchcol!, it is let have \!\pcol@ensurevspace! so that
-% registers in it is evaluated in the macro and the evaluateion result is
-% assigned to $\VE=\!\pcol@@ensurevspace!$.
+% In \!\pcol@switchcol!, it is let have what \!\pcol@ensurevspace! has so
+% that the dimensional expression in it is evaluated in the macro and the
+% evaluateion result is assigned to $\VE=\!\pcol@@ensurevspace!$.
%
% \item
% In $\!\ensurevspace!\ARg{space}$, it is let have $\arg{space}$ to ensure
@@ -2680,6 +2774,11 @@
% which the footnote is encapsulated.
%
% \item
+% In \!\pcol@set@color@push!, it has the width of the \!\vbox! to be
+% \!\insert!ed, which is $m$\,|sp| for a math-mode push of $\mcelt_{i,m}$ or
+% 0 for a non-math one $\celt_i$.
+%
+% \item
% In $\!\pcol@bg@defext!\Arg{d}\Arg{e}$, it is let have $e$ to confirm $e$
% is a proper dimension.
% \end{itemize}
@@ -2968,8 +3067,9 @@
% skip above \Scfnote{}s.
%
% \item[\Uidx{\!\voidb@x!}]
-% is a \!\box! register to be void ($\bot$) always. It is referred to
-% by the following macros.
+% is a \!\box! register to be void ($\bot$) always. It is used to
+% initialize \!\pcol@prespan! and \!\pcol@rightpage! at their declaration,
+% and is referred to by the following macros.
% 
% \begin{itemize}
% \item
@@ -2988,11 +3088,12 @@
% \!\pcol@ioutputelt! to examine if $\S_c$ is empty.
%
% \item
-% \!\pcol@output@start! to let $\pp^f(0)=\bot$.
+% \!\pcol@output@start! to let $\pp^f(0)=\bot$, and $\Celt^c=\bot$ if
+% $\Celtshadow^c$ is undefined.
%
% \item
-% \!\pcol@output@switch! to let $\cc_c(\ft^b)=\bot$ if a column does not
-% have \Mcfnote{}s.
+% \!\pcol@output@switch! to let $\cc_c(\ft^b)=\bot$ if the column does
+% not have \Mcfnote{}s.
%
% \item
% \!\pcol@getcurrfoot! to let \!\footins! be void if so.
@@ -3003,7 +3104,12 @@
%
% \item
% \!\pcol@putbackmvl! to let $\!\pcol@prespan!=\bot$ if a \mctext{} really
-% starts from the top of a \colpage.
+% starts from the top of a \colpage, and $\csts=\bot$ if the \colpage{}
+% $\cc_c(\vb)$ to be restarted is non-empty.
+%
+% \item
+% \!\pcol@savecolorstack! to let $\csts=\bot$ or its first item be $\bot$ if
+% $\CST^c$ or $\Celt^c$ is $\bot$, resepectively.
%
% \item
% \!\pcol@savefootins! to let its argument macro have a void box if
@@ -3023,7 +3129,8 @@
% \item
% \!\pcol@output@end! to let $\!\pcol@rightpage!=\bot$ if
% the last page has nothing other than \spanning{} being \pwise{} floats
-% and thus we don't have the right \parapag{}e.
+% and thus we don't have the right \parapag{}e. The macro also lets
+% $\Celt^c=\bot$ for all $c$ and $\cst=\bot$.
%
% \item
% \!\pcol@com@flushpage! and \!\pcol@com@clearpage! gives the void box to
@@ -3036,9 +3143,8 @@
% is a \!\box! register to have the main vertical list when \!\output! is
% invoked with a special \!\penalty! code. It is let have that by
% \!\pcol@specialoutput!, and is referred to by \!\pcol@output@start! and
-% \!\pcol@makenormalcol! for \preenv{}, by \!\pcol@output@switch! for the
-% column from which we are leaving, and by \!\pcol@return@from@color! to put
-% its contents back to the main vertical list.
+% \!\pcol@makenormalcol! for \preenv{}, and by \!\pcol@output@switch! for the
+% column from which we are leaving.
%
% \item[\Uidx{\!\@outputbox!}]
% is a \!\box! register to have a partial or the complete ship-out image
@@ -3160,12 +3266,33 @@
% if $\arg{box}$ is empty.
%
% \item
+% In $\!\pcol@scancst!\arg{box}$ and \!\pcol@iscancst!, it is used to have
+% what $\cst$ or $\csts$ has after the scan of $\arg{box}\in\{\cst,\csts\}$.
+%
+% \item
+% In \!\pcol@savecolorstack!, it is used to have the \!\vbox! for $\Celt^c$
+% to be placed at the top of $\csts$.
+%
+% \item
% In \!\pcol@deferredfootins!, it is used to have the first half split from
% $\df$ being the deferred footnotes to be \!\insert!ed.
%
% \item
% In \!\pcol@fntextbody!\marg{text}, it is used to encapsulate $\arg{text}$
% in it.
+%
+% \item
+% In \!\pcol@icolumncolor!, it is used to have a \!\vbox! to be \!\insert!ed
+% for the update of $\Celt^c$.
+%
+% \item
+% In \!\pcol@set@color@push!, it is used to have a \!\vbox! to be \!\insert!ed
+% to push $\celt_i$ or $\mcelt_{i,m}$ to $\cstraw$.
+%
+% \item
+% In \!\pcol@reset@color@pop! and \!\pcol@reset@color@mpop!, it is used to
+% have a \!\vbox! to be \!\insert!ed to add $\celtpop_i$ or
+% $\mceltpop_{i,m}$ to $\cstraw$.
% \end{itemize}
% \end{description}
%
@@ -3271,12 +3398,15 @@
% \CSIndex{if@afterindent} by \!\pcol@setcurrcol!, and then restored from
% it by \!\pcol@iigetcurrcol!. The macro \!\pcol@output@switch! refers to
% it to broadcast its value set by a \mctext{} to $\cc_c(\sw)$ for all
-% $c\In0\C$, while \!\pcol@restartcolumn! and \!\pcol@return@from@color!
-% insert $\!\penalty!=10000$ by \!\nobreak! if the switch is $\true$. The
-% macro \!\pcol@zparacol! also exmaines the switch, but with the truth value
-% in it given outside \env{paracol} environment, to invoke \!\@nbitem! if
-% $\true$ when the macro finds the \env{paracol} environment to start is at
-% the very beginning of a \env{list}-like environment.
+% $c\In0\C$, while \!\pcol@restartcolumn! inserts $\!\penalty!=10000$ by
+% \!\nobreak! if the switch is $\true$. This conditional \!\nobreak!
+% is also done by \!\pcol@icolumncolor!, \!\pcol@set@color@push!,
+% \!\pcol@reset@color@pop! and \!\pcol@reset@color@mpop! to avoid a break
+% after an \!\insert!. The macro \!\pcol@zparacol! also exmaines the
+% switch, but with the truth value in it given outside \env{paracol}
+% environment, to invoke \!\@nbitem! if $\true$ when the macro finds the
+% \env{paracol} environment to start is at the very beginning of a
+% \env{list}-like environment.
%
% \item[\Uidx{\CSIndex{if@newlist}}]
% is a switch to be $\true$ in the duration after a \env{list}-like
@@ -3355,12 +3485,13 @@
% is \scfnote{} and $p<\ptop$.
%
% \item
-% In \!\pcol@icolumncolor!, it is turned $\true$ iff we are in a \!\vbox! or
-% in restricted horizontal or math mode.
+% In \!\pcol@scancst!, it is initialized to be $\true$. Then it is referred
+% to by \!\pcol@iscancst! for each $\celt\in\cstraw$ to update $\Celt^c$ and
+% then turned $\false$ when the first one is found.
%
% \item
-% It is turned $\false$ by \!\pcol@output@mcpop! for $\mppop-i$, and then
-% turned $\true$ by \!\pcol@output@mcpop@elt! iff $i\in\mplist$.
+% In \!\pcol@savecolorstack!, it is $\true$ iff either $\cst\neq\bot$ or
+% $\Celt^c\neq\bot$, i.e., $\CST^c$ to be saved is not $\bot$.
%
% \item
% In \!\pcol@getmparbottom!, it is intialized to be $\false$ and then may be
@@ -3438,6 +3569,10 @@
% \!\@tempswatrue! as the default.
%
% \item
+% In \!\pcol@icolumncolor!, it is turned $\true$ iff we are in a \!\vbox! or
+% in restricted horizontal or math mode.
+%
+% \item
% In \!\pcol@backgroundcolor@i!, it is exmained if the root of the
% invocation chain is \!\backgroundcolor! which turns the switch $\true$, or
% \!\nobackgroundcolor! which turns it $\false$, to determine whether the
@@ -3456,9 +3591,9 @@
% \item[\Uidx{\CSIndex{par}}]
% is \TeX's primitive to end\slash start paragraphs, but may be modified by
% \LaTeX{} to have some special functionality occasionally. The macro
-% \!\pcol@output! makes it \!\let!-equal to \!\@@par! in which the \TeX's
-% orinigal definition is kept, while \!\pcol@zparacol! and \!\pcol@par! use
-% it as is.
+% \!\pcol@output! makes it \!\let!-equal to \hbox{\!\@@par!} in which the
+% \TeX's orinigal definition is kept, while \!\pcol@zparacol! and
+% \!\pcol@par! use it as is.
%
% \item[\Uidx{\!\space!}]
% is an API macro to have a space token. It is used in \!\pcol@output!,
@@ -3523,8 +3658,9 @@
%
% \item[\Uidx{\!\nobreak!}]
% is an API macro to insert $\!\penalty!=10000$ to inhibit line or page
-% breaks. It is used in \!\pcol@restartcolumn! and
-% \!\pcol@return@from@color! to meet the page-break inhibition request made
+% breaks. It is used in \!\pcol@restartcolumn!, \!\pcol@icolumncolor!,
+% \!\pcol@set@color@push!, \!\pcol@reset@color@pop! and
+% \!\pcol@reset@color@mpop! to meet the page-break inhibition request made
% by $\CSIndex{if@nobreak}=\true$.
%
% \item[\Uidx{$\!\addvspace!$\marg{skip}}]
@@ -3539,11 +3675,10 @@
% is an API macro to insert a page break $\!\penalty!=\arg{pen}$ if
% $\CSIndex{if@nobreak}={\false}$. The \!\penalty! is inserted removing the
% last vertical skip which is reinserted after the \!\penalty!. The macro
-% is used in \!\pcol@restartcolumn! and \!\pcol@return@from@color! to insert
-% \!\interlinepenalty! if $\CSIndex{if@nobreak}=\false$, while
-% \!\pcol@zparacol! uses it to insert \!\@beginparpenalty! when it finds the
-% \env{paracol} environment to start is at the very beginning of a
-% \env{list}-like environment.
+% is used in \!\pcol@restartcolumn! to insert \!\interlinepenalty! if
+% $\CSIndex{if@nobreak}=\false$, while \!\pcol@zparacol! uses it to insert
+% \!\@beginparpenalty! when it finds the \env{paracol} environment to start
+% is at the very beginning of a \env{list}-like environment.
%
% \item[\Uidx{\!\footnotesize!}]
% is an API macro to set the font size for footnotes. It is used in
@@ -3644,7 +3779,7 @@
% message $\arg{msg}$ with the package identification $\arg{pkg}$ and the
% help mssage $\arg{hlp}$. The macro is used in the following macros;
% \!\pcol@ovf! on \!\@freelist! shortage; \!\pcol@set@color@push! on too
-% many math-mode colorings, in \!\pcol@zparacol! on illegal nesting;
+% many math-mode colorings; in \!\pcol@zparacol! on illegal nesting;
% $\!\pcol@setcw@calcf!\<x\>\<y\>\<z\>$ on too large $x/y$;
% \!\pcol@switchcolumn! on invalid target column; \!\pcol@switchenv! on
% illegal \cswitch{} commands\slash environments in a \csenv;
@@ -3828,15 +3963,12 @@
% \SpecialArrayIndex{c}{\pcol@columnsep}
%
% \item
-% \!\pcol@output@mcpush! with $\mppush-i$ for
-% $|\pcol@reset@color@mpop@|{\cdot}i$.
-% 
-% \SpecialArrayIndex{i}{\pcol@reset@color@mpop@}
-%
-% \item
-% \!\pcol@colorstack@full! for $\Celt^c=~|\pcol@column|\~|color|{\cdot}c$.
+% \!\pcol@ccuse! for
+% $\Celt^c=|\pcol@columncolor@box|{\cdot}c$ or
+% $\Celtshadow^c=|\pcol@columncolor|{\cdot}c$.
% 
% \SpecialArrayIndex{c}{\pcol@columncolor}
+% \SpecialArrayIndex{c}{\pcol@columncolor@box}
%
% \item
% \!\column*! for \!\pcol@com@column*!.
@@ -3881,7 +4013,7 @@
% \SpecialIndex{\pcol@ac@def@lof}\SpecialIndex{\pcol@ac@def@lot}
%
% \item
-% $\!\pcol@ac@def@lof!\arg{eord}$ and $\!\pcol@ac@def@lot!{\cdot}\arg{eord}$
+% $\!\pcol@ac@def@lof!\arg{eord}$ and $\!\pcol@ac@def@lot!\arg{eord}$
% for $|\pcol@ac@caption@|{\cdot}\~\arg{eord}$.
% 
% \SpecialIndex{\pcol@ac@caption@enable}
@@ -3917,14 +4049,15 @@
% \end{itemize}
%
% \item[\Uidx{$\!\@gobble!\arg{arg}$}]
-% discards its argument $\arg{arg}$. It is used in \!\pcol@set@color@elt!
-% for temporarily letting \!\aftergroup! be \!\@gobble! to nullify
-% \!\aftergroup! with \!\reset@color! invoked in \!\pcol@set@color!, being
-% the original version of \!\set@color!, and in \!\pcol@zparacol! to make
-% \!\pcol@bg@paintbox! \!\let!-equal to \!\@gobble! to nullify it if any
-% coloring packages have not been loaded. In addition, the macros
-% \!\pcol@F! and \!\pcol@Fe! for logging are made \!\let!-equial to
-% \!\@gobble! at the top level to nullify them.
+% discards its argument $\arg{arg}$. It is used in \!\pcol@output@start!,
+% \!\pcol@icolumncolor! and \!\pcol@set@color@push! for temporarily letting
+% \!\aftergroup! be \!\@gobble! to nullify \!\aftergroup! with
+% \!\reset@color! invoked in \!\pcol@set@color!, being the original version
+% of \!\set@color!, and in \!\pcol@zparacol! to make \!\pcol@bg@paintbox!
+% \!\let!-equal to \!\@gobble! to nullify it if any coloring packages have
+% not been loaded. In addition, the macros \!\pcol@F! and \!\pcol@Fe! for
+% logging are made \!\let!-equial to \!\@gobble! at the top level to nullify
+% them.
%
% \item[\Uidx{$\!\@ifundefined!\arg{cs}\arg{then}\arg{else}$}]
% \begin{Hfuzz}{0.8pt}%
@@ -4101,12 +4234,16 @@
% floats.
%
% \item
-% \!\pcol@output@start! for the \preenv{} and \colpage{}s of all columns.
+% \!\pcol@output@start! for the \preenv{}, and \colpage{}s and $\Celt^c$ of
+% all columns.
%
% \item
% \!\pcol@output@switch! for the \colpage{} from which we are leaving.
%
% \item
+% \!\pcol@iscancst! for $\Celt^c$.
+%
+% \item
% \!\pcol@savefootins! for footnotes.
%
% \item
@@ -4119,6 +4256,9 @@
% \item
% \!\pcol@output@end! for the \pwise{} floats in the \lpage{} if the
% main vertical list of the page is empty.
+%
+% \item
+% \!\pcol@icolumncolor! for $\Celt^c$.
% \end{itemize}
% 
% The macro is also used in \!\pcol@ioutputelt! to obtain completed
@@ -4158,17 +4298,6 @@
% and its footnotes $\cc_c(\ft)$ if any, to \!\@freelist!.
%
% \item
-% \!\pcol@set@color@push! to push $\gamma$ in \!\current@color! to the
-% \colorstack{} pushing list $\cstb=\!\pcol@colorstack@buf!$.
-%
-% \item
-% \!\pcol@output@icpush! to push $\gamma$ at the head of $\cstb$ into $\cst$.
-%
-% \item
-% $\!\pcol@reset@color@elt!\!\@elt!\Arg{\celt_i}\!\@elt!\Arg{\celt_{i+1}}$ to
-% repush the non-top $\celt_i$ into $\cst$.
-%
-% \item
% $\!\pcol@getmparbottom!\<t\>\<h\>$ to add
% $\mpar(\max(t,b_n),\max(t,b_n){+}h)$ to the tail of the list
% $\mpb_{\{L,R\}}^{\{l,r\}}$, and its callee
@@ -4198,8 +4327,8 @@
% $\cc_c(\vb^p)=\ptop$ to \!\@freelist! if any.
%
% \item
-% \!\pcol@output@end! to return $\pp^f(\ptop)$ and all \ccolpage{}s
-% $\cc_c(\vb)$ to \!\@free~list!.
+% \!\pcol@output@end! to return $\pp^f(\ptop)$, all \ccolpage{}s
+% $\cc_c(\vb)$, and all $\Celt^c\neq\bot$ to \!\@freelist!.
%
% \item
% \!\pcol@end@dblfloat! to add a \pwise{} float in \!\@currbox! to
@@ -4250,8 +4379,8 @@
%
% \item[\Uidx{\!\@ehb!}]
% is an internal macro having a help message saying the error causes a
-% serious problem. It is used in \!\pcol@ovf! as the argument of
-% \!\PackageError!.
+% serious problem. It is used in \!\pcol@ovf! and \!\pcol@set@color@push!
+% as the argument of \!\PackageError!.
%
% \item[\Uidx{$\!\@latex@warning@no@line!\arg{msg}$}]
% is an internal macro to report a warning message $\arg{msg}$ without the
@@ -4292,10 +4421,15 @@
%
% \item
% \!\pcol@icolumncolor! complains that no color packages have been loaded if
-% \!\set@color!${}={}$\!\relax!, while otherwise its descendent
-% \!\pcol@iicolumncolor! temporarily lets $\!\set@color!=\!\relax!$ so that
+% \!\set@color!${}={}$\!\relax!, and then otherwise temporarily lets it be
+% the original saved in \!\pcol@set@color! to \!\insert! a \!\vbox! to
+% update $\Celt^c$ or to do the update immediately.
+%
+% \item
+% \!\pcol@iicolumncolor! temporarily lets $\!\set@color!=\!\relax!$ so that
% \!\color! or \!\normalcolor! invoked in the macro just defines
-% \!\current@color! without doing any other coloring operations.
+% \!\current@color! to be set into $\Celtshadow^c$ without doing any other
+% coloring operations.
%
% \item
% \!\pcol@defcseprulecolor@i! complains that no color packages have been
@@ -4318,7 +4452,11 @@
% is an internal macro to finish text coloring started by \!\set@color!. By
% default it is undefined but may have some definition to put a \!\special!
% to finish coloring. It is used in \!\pcol@clearcolorstack! so as to apply
-% it to all elements in $\CST^c$.
+% it to all elements in $\CST^c$, in \!\pcol@iscancst! to put it to the
+% main vertical list in the case that $\Celt^c$ was $\bot$ and then updated,
+% in \!\pcol@icolumncolor! to apply it to all elements in $\CSTshadow^c$,
+% and in \!\pcol@reset@color@pop! and \!\pcol@reset@color@mpop! to have an
+% uncoloring \!\special! in the \!\vbox! for $\celt_i$ and $\mcelt_{i,m}$.
%
% \item[\Uidx{\!\color@begingroup!}]
% is an internal macro to open a group in which a color is specified. It is
@@ -4416,7 +4554,7 @@
% \!\pcol@output@clear! prior to processing \pwise{} floats in
% \!\@dbldeferlist!. As discussed in
% item-(\ref{item:ovv-float-@dblfloatplacement}) of
-% Section~\ref{sec:imp-ovv-float}, this macro in 2015 or later version of
+% \secref{sec:imp-ovv-float}, this macro in 2015 or later version of
% \LaTeX{} lets $\!\f@depth!=|1sp|$.
%
% \item[\Uidx{\!\p@footnote!}]
@@ -4473,12 +4611,6 @@
% \!\pcol@makecol! for an ordinary \colpage{}, and in \!\pcol@output@start!
% and \!\pcol@makenormalcol! for \preenv{}.
%
-% \item[\Uidx{\!\@reinserts!}]
-% in an internal macro for \!\output! routine to put \!\footins! and
-% \!\@kludgeins! back to the main vertical list if they have something. It
-% is used in \!\pcol@return@from@color! to go back to the building process
-% of the main vertical list as if it were not interrupted.
-%
% \item[\Uidx{\!\@textbottom!}]
% is an internal macro for \!\output! routine to be put at the bottom of
% \!\@outputbox! in which a \colpage{} is stored, by \!\@makecol!. This
@@ -4497,7 +4629,7 @@
% is an internal macro for \!\output! routine to output a page kept in
% \!\@outputbox! together with the header and footer. The original
% definition of this macro is saved in \!\pcol@@outputpage! to be used in
-% \!\pcol@outputpage@l! and \!\pcol@outputpage@r! being calles of our own
+% \!\pcol@outputpage@l! and \!\pcol@outputpage@r! being callees of our own
% revised version of \!\@outputpage!. Therefore, any \!\output! request to
% result in page ship-out reaches our own \!\@outputpage! and then \LaTeX's
% one after we perform operations for \parapag{}ing and \bgpaint{} onto the
@@ -4585,7 +4717,7 @@
% list of the floats to be put at the top of a page, and if so, adds
% $\arg{flt}$ to \!\@dbltoplist!, while it is added to \!\@dbldeferlist! or
% \!\@deferlist! depending on \LaTeX's version otherwise as discussed in
-% item-\ref{item:ovv-float-@addtodblcol} of Section \ref{sec:imp-ovv-float}.
+% item-(\ref{item:ovv-float-@addtodblcol}) of \secref{sec:imp-ovv-float}.
% It is used in \!\pcol@startpage! to apply to each element of (the copy of)
% \!\@dbldeferlist!.
%
@@ -4712,31 +4844,10 @@
% $\cc_c(\bl)=\!\@botlist!$ and $\cc_c(\dl)=\!\@deferlist!$.
%
% \item
-% \!\pcol@output@icpush! and \!\pcol@output@icset! have \!\@elt! in their
-% argument specifications to pick the first element of $\cstb$.
-%
-% \item
-% \!\pcol@output@cpop! uses \!\@elt! to invoke \!\pcol@reset@color@elt!,
-% which also uses it for recursive invocatoin of itself.
-%
-% \item
-% \!\pcol@output@mcpop! for $\mppop-i$ lets
-% $\!\@elt!=\!\pcol@output@mcpop@elt!$ for each $i_k\in\mplist$ to examine
-% if $\exists i_k=i$.
-%
-% \item
-% \!\pcol@clearcolorstack! lets $\!\@elt!=\!\reset@color!$ for $\celt_i$ in
-% $\CST^c$ to rewind printer's \colorstack.
-%
-% \item
-% \!\pcol@restorecst!$\<\mathit{\Gamma}'\>$ lets
-% $\!\@elt!=\!\pcol@set@color@elt!$ for $\celt_i$
-% in $\mathit{\Gamma}'\in\{\CST^c,\csts\}$ to reestablish printer's
-% \colorstack.
-%
-% \item
-% \!\pcol@savecolorstack! lets $\!\@elt!=\!\relax!$ to save $\CST^c$ into
-% $\csts$.
+% \!\pcol@scancst! and \!\pcol@iscancst! let $\!\@elt!=\!\relax!$ to
+% \!\edef!ine the list $M=(m\,\Bar\,\mceltpop_{j,m}\in\cstraw,\;j\geq i)$ for
+% $\mceltpop_{i,*}$, and then the latter \!\def!ines \!\@elt! as a macro with
+% an argument $m$ to examine $m\in M$ for $\mcelt_{i,m}$.
%
% \item
% \!\pcol@addmarginpar! lets $\!\@elt!=\!\pcol@setmpbelt!$ for $\PPP$.
@@ -4852,20 +4963,19 @@
% for $\T$, and then $\!\@elt!=\!\relax!$ to give the default.
%
% \item
+% \!\pcol@icolumncolor! \!\def!ines $\!\@elt!\arg{\celtshadow_i}$ to apply
+% \!\reset@color! for rewinding and \!\pcol@set@color! for reestablishing
+% to each $\celtshadow_i\in\CSTshadow^c=(\Celtshadow^c,\cstshadow)$
+% by \!\pcol@scancst@shadow!, in which \!\@elt! is explicitly applied to
+% $\Celtshadow^c$ if it is defined and then implicitly done to
+% $\cstshadow=\!\pcol@colorstack@shadow!$.
+%
+% \item
% \!\pcol@set@color@push! lets $\!\@elt!=\!\relax!$ to push a color
% information into $\cstshadow$, with save\slash restore of its original
% value.
%
% \item
-% \!\pcol@icolumncolor! lets $\!\@elt!=\!\relax!$ to \!\xdef!ine
-% $\Celt^c=|\pcol@columncolor|{\cdot}\~c$,
-% $\Celtshadow^c=|\pcol@columncolor@shadow|{\cdot}\~c$ and
-% $\cstb=\!\pcol@colorstack@buf!$ in \!\pcol@iicolumncolor!.
-% 
-% \SpecialArrayIndex{c}{\pcol@columncolor}
-% \SpecialArrayIndex{c}{\pcol@columncolor@shadow}
-%
-% \item
% \!\resetbackgroundcolor! lets $\!\@elt!=\!\pcol@resetbackgroundcolor!$ to
% scan \!\pcol@bg@defined! containing $\!\@elt!\Arg{a'_i}$ to let
% $|\pcol@bg@color|{\cdot}a'_i$ for each of $i$.
@@ -4920,9 +5030,6 @@
% ($\mathit{\Theta}'\in\{\CG,\CL\}$)\\
% \!\pcol@sscounters! ($\Cc_c$)
% \end{quote}
-% 
-% It is also used in \!\pcol@colorstack@full! to replace undefined $\Celt^c$
-% with it.
%
% \item[\Uidx{\!\@currentlabel!}]
% is an internal macro to have the reference to be associated with the
@@ -4950,12 +5057,13 @@
% \!\pcol@opcol! ($\cc_c(\vb)$)\\
% \!\pcol@startpage! ($\pp^i(\ptop)$)\\
% \!\pcol@ioutputelt! ($\s_c(q)$)\\
-% \!\pcol@output@start! ($\pp^i(0)$, $\cc_c(\vb)$)\\
+% \!\pcol@output@start! ($\pp^i(0)$, $\cc_c(\vb)$, $\Celt^c$)\\
% \!\pcol@output@switch! ($\cc_c(\vb)$)\\
% \!\pcol@restartcolumn! ($\cc_c(\vb)$)\\
% \!\pcol@igetcurrcol! ($\cc_c(\vb)$)\\
% \!\pcol@setcurrcol! ($\cc_c(\vb)$)\\
% \!\pcol@putbackmvl! ($\cc_c(\vb)$)\\
+% \!\pcol@iscancst! ($\Celt^c$)\\
% \!\pcol@addmarginpar! (left marginal note)\\
% \!\pcol@flushcolumn! ($\cc_c(\vb), \s_c(q)$)\\
% \!\pcol@makefcolumn! ($\cc_c(\vb)$)\\
@@ -4964,7 +5072,8 @@
% \!\pcol@imakeflushedpage! ($\cc_c(\vb)$)\\
% \!\pcol@freshpage! ($\cc_c(\vb)$)\\
% \!\pcol@output@end! (top float, $\cc_c(\vb)$)\\
-% \!\pcol@end@dblfloat! (\pwise{} float)
+% \!\pcol@end@dblfloat! (\pwise{} float)\\
+% \!\pcol@icolumncolor! ($\Celt^c$)
% \end{quote}
%
% \item[\Uidx{\!\@marbox!}]
@@ -4973,10 +5082,10 @@
%
% \item[\Uidx{\!\@freelist!}]
% is an internal macro having available \!\insert!s for floats originially,
-% but also \colpage{}s, \spanning{} and footnotes in our usage. Besides the
-% acquisition of an \!\insert! from it shown in the description of
-% \!\@next!, it is used by the following macros to return the the objects in
-% parentheses to \!\@freelist!.
+% but also \colpage{}s, \spanning{}, footnotes and default column-color in
+% our usage. Besides the acquisition of an \!\insert! from it shown in the
+% description of \!\@next!, it is used by the following macros to return the
+% the objects in parentheses to \!\@freelist!.
% 
% \begin{quote}
% \!\pcol@cflt! ($\cc_c(\tl)$)\\
@@ -4992,7 +5101,7 @@
% \!\pcol@makefcolpage! ($\cc_c(\tl)$)\\
% \!\pcol@makeflushedpage! ($\pp^i(\ptop)$, $\pp^f(\ptop)$)\\
% \!\pcol@imakeflushedpage! ($\cc_c(\ft)$)\\
-% \!\pcol@output@end! ($\pp^f(\ptop)$, $\cc_c(\vb)$)
+% \!\pcol@output@end! ($\pp^f(\ptop)$, $\cc_c(\vb)$, $\Celt^c$)
% \end{quote}
% 
% In addition \!\pcol@F@count! scans its element to have its cardinality.
@@ -5006,16 +5115,8 @@
% \!\pcol@getcurrpinfo! for the invocation of \!\@cdr!.
%
% \item
-% \!\pcol@output@cpush! and \!\pcol@output@cset! to remove the first
-% element of $\cstb$ by \!\pcol@output@icpush! and \!\pcol@output@icset!
-% respectively.
-%
-% \item
-% \!\pcol@output@cpop! to terminate $\cst$.
-%
-% \item
% $\!\pcol@bias@mpbout@i!\Arg{y}\!\@elt!\Arg{t}\Arg{b}\!\@nil!$ to capture
-% $t$ and $b$ following the convetion in \!\pcol@do@mpb@all@ii!.
+% $t$ and $b$ following the convention in \!\pcol@do@mpb@all@ii!.
%
% \item
% \begingroup\def\,{\mskip0mu plus2mu\relax}
@@ -5068,19 +5169,14 @@
% everything not processed by their ancestors.
% \end{itemize}
%
-% \item[\Uidx{\!\@nnil!}]
-% is an internal macro having \!\@nil!. It is referred to by
-% \!\pcol@reset@color@elt! to examine if it acts on the last element of the
-% \colorstack{} $\cst$ followed by the tail sentinel \!\@elt!\!\@nil!.
-%
% \item[\Uidx{\!\current@color!}]
% is an internal macro having color information to be put into |.dvi| as a
% part of the argument of coloring \!\special!. It is referred to by
% \!\pcol@bg@paintregion@i!,
-% \!\pcol@set@color@push!,
-% \!\pcol@set@color@elt!,
+% \!\pcol@output@start!,
% \!\pcol@icolumncolor!,
% \!\pcol@iicolumncolor!, and
+% \!\pcol@set@color@push!,
% \!\pcol@backgroundcolor@y!.
%
% \item[\Uidx{\!\@dbldeferlist!}]
@@ -5090,7 +5186,7 @@
% lets it have \!\@deferlist! made before \beginparacol, and
% \!\pcol@output@end! adds \pwise{} floats to be put in the empty
% \lpage{} to it and then move the whole of the list to \!\@deferlist!.
-% As discussed in Section~\ref{sec:imp-ovv-float}, 2015 or later version of
+% As discussed in \secref{sec:imp-ovv-float}, 2015 or later version of
% \LaTeX{} no longer uses this list, but we stick with it for \pwise{}
% floats produced in \env{paracol} environments and thus have its top level
% definition with empty body in \Paracol.
@@ -5118,7 +5214,7 @@
% \!\pcol@startpage! uses it as the interface with \!\@addtodblcol! of 2015
% or later version of \LaTeX{} as discussed in
% item-(\ref{item:ovv-float-@addtodblcol}) of
-% Section~\ref{sec:imp-ovv-float}.
+% \secref{sec:imp-ovv-float}.
%
% \item
% \!\pcol@setcurrcol! and \!\pcol@igetcurrcol! saves\slash restores it
@@ -5181,7 +5277,7 @@
% specify the float category, \pwise{} or \cwise{} respectively, which
% float-related macros work on. As discussed in
% item-(\ref{item:ovv-float-@dblfloatplacement}) of
-% Section~\ref{sec:imp-ovv-float}, this feature introduced in 2015 version
+% \secref{sec:imp-ovv-float}, this feature introduced in 2015 version
% of \LaTeX{} is nullified in \env{paracol} environments and thus the
% setting with |1sp| done by \!\@dblfloatplacement! is overriden by
% \!\pcol@startpage! and \!\pcol@output@clear! when they invoke the macro.
@@ -5264,13 +5360,19 @@
% to broadcast it to other columns.
%
% \item
-% In \!\pcol@output@cpop!, it has $\cst$ from which we remove its tail.
-%
-% \item
% In \!\pcol@ifempty!$\arg{box}\arg{then}\arg{else}$, it has $\arg{then}$ or
% $\arg{else}$ according to the emptiness of $\arg{box}$.
%
% \item
+% In \!\pcol@clearcolorstack!, it is \!\def!ined to put an uncoloring
+% \!\special! by \!\reset@color! for its argument $\celt_i$ in
+% \!\pcol@iscancst!.
+%
+% \item
+% In \!\pcol@restorecst!, it is \!\def!ined to put a coloring \!\special! in
+% its argument $\celt_i$ by \!\unvbox! done in \!\pcol@iscancst!.
+%
+% \item
% In \!\pcol@addmarginpar!, at first it is made let equal to 0 or $\CL$
% according to $c<\CL$ or not. Then it is let have $\PPP$ to be scanned to
% find $\pp^m(p)$.
@@ -5392,13 +5494,6 @@
% \item
% In $\!\pcol@twosided!|[|T|]|$, it is let have each non-space token in $T$
% given by a \!\@tfor! loop.
-%
-% \item
-% In \!\pcol@getshadowcc!, it is used implement
-% $\!\let!|\pcol@columncolor|{\cdot}c=|\pcol@|\~|columncolor@shadow|{\cdot}c$.
-% 
-% \SpecialArrayIndex{c}{\pcol@columncolor}
-% \SpecialArrayIndex{c}{\pcol@columncolor@shadow}
% \end{itemize}
%
% \item[\Uidx{\!\reserved@b!}]
@@ -5434,11 +5529,19 @@
% leaving column to broadcast it to other columns.
%
% \item
-% In
-% \!\pcol@reset@color@elt!\!\@elt!$\Arg{\celt_i}$\!\@elt!$\Arg{\celt_{i+1}}$,
-% it has $\celt_{i+1}\in\CST$ or \!\@nil! for \CSIndex{ifx}-comparison with
-% \!\@nnil!. Then it is let have \!\@elt!$\Arg{\celt_{i+1}}$ or \!\relax!
-% respectively for the recursive invocation of the macro itself.
+% In \!\pcol@clearcolorstack!, it is \!\def!ined to put an uncoloring
+% \!\special! by \!\reset@color! for its argument $\Celt^c$ in
+% \!\pcol@scancst!.
+%
+% \item
+% In \!\pcol@restorecst!, it is \!\def!ined to put a coloring \!\special! in
+% its argument $\Celt^c$ by \!\unvcopy! done in \!\pcol@scancst!.
+%
+% \item
+% In \!\pcol@scancst! and \!\pcol@iscancst!, after the reference for the
+% purposes shown in the two items above, it has
+% $M=(m\,\Bar\,\mceltpop_{j,m}\in\cstraw,\;j\geq i)$ for $\mceltpop_{i,*}$
+% and in the latter is scanned to find $m$ for $\mcelt_{i,m}$ in $M$.
%
% \item
% In \!\pcol@addmarginpar!, it is made let equal to $\CL$ or $\C$
@@ -5482,7 +5585,15 @@
%
% \item[\Uidx{\!\reserved@c!}]
% is an internal macro for temporary use. It is used in \!\pcol@startpage!
-% to save \!\@deferlist! in it and then to restore the list from it.
+% to save \!\@deferlist! in it and then to restore the list from it, and in
+% \!\pcol@iscancst! to have \!\relax! or the macro itself to iterate the
+% macro recursively.
+%
+% \item[\Uidx{\!\reserved@d!}]
+% is an internal macro for temporary use. It is used in
+% \!\pcol@iscancst! as a \!\chardef! register to have 0 if $m$ for
+% $\mcelt_{i,m}$ is not in the list
+% $M=(n\,\Bar\,\mceltpop_{j,n}\in\cstraw,\;j\geq i)$, or 1 if found.
%
% \item[\Uidx{\!\@gtempa!}]
% is an internal macro used as a \!\global!ly modifiable scratchpad. Its
@@ -5490,11 +5601,6 @@
% 
% \begin{itemize}
% \item
-% In \!\pcol@output@mcpop! for $\mppop-i$, it is made \!\let!-equal to
-% \!\pcol@output@cpop! if $i\in\mplist$ or to \!\pcol@return@from@color!
-% otherwise, to define what we do after the group for scanning $\mplist$.
-%
-% \item
% In \!\pcol@ifempty!$\arg{box}\arg{then}\arg{else}$, it has \!\lastpenalty!
% in a \!\vbox! whose value is examined outside the \!\vbox! for the
% emptiness check of $\arg{box}$.
@@ -5554,7 +5660,6 @@
% \!\pcol@output@switch!,
% \!\pcol@getcurrcol!,
% \!\pcol@setcurrcol!,
-% \!\pcol@output@icset!,
% \!\pcol@clearcolorstack!,
% \!\pcol@restorecolorstack!,
% \!\pcol@addmarginpar!,
@@ -5604,6 +5709,15 @@
% The macros \!\pcol@imakeflushedpage! and \!\pcol@iflushfloats! also use
% the register for scanning but for $\LBRP\Cfrom\Cto$ given by their
% arguments.
+%
+% In addition \!\pcol@ccuse!, \!\pcol@ifccdefined! and \!\pcol@ccxdef!
+% refer to the register to have the control sequence
+% $|\pcol@columncolor|\cdot c=\Celtshadow^c$ or
+% $|\pcol@columncolor@box|\cdot c=\Celt^c$ where $c$ is for the current
+% column or for all columns depending on their invokers.
+% 
+% \SpecialArrayIndex{c}{\pcol@columncolor}
+% \SpecialArrayIndex{c}{\pcol@columncolor@box}
% \end{macro}
% 
% \begin{macro}{\pcol@nextcol}
@@ -5798,18 +5912,21 @@
% \begin{macro}{\pcol@mcid}
% \changes{v1.24}{2013/07/27}
% {Introduced for coloring specified in math mode.}
+% \changes{v1.34}{2018/05/07}
+% {Change its meaning and operations with it a little bit according to
+% the new text coloring with \cs{insert}.}
% 
-% The register \!\pcol@mcid! has the number of pending pushes of
-% \colorstack{} requested by coloring commands in math mode. The register is
+% The register \!\pcol@mcid! has the number of pushes of
+% \colorstack{} by coloring commands in math mode between two consecutive
+% invocations of \!\output!. The register is
% zero-cleared by \!\pcol@output! because we are definitely in the main
-% vertical mode and thus all requests must have been processed or will have
-% to be processed before the next coloring in math mode. Then the register
+% vertical mode and thus all pops corresponding to pushes in math mode must
+% have been applied to |.tex|'s \colorstack. Then the register
% is referred to by \!\pcol@set@color@push! when it is invoked in math mode,
-% to examine if it is zero to mean that the list $\mplist$ can be cleared,
-% and if less than $\mplimit$ to mean the request still can be made. The
-% macro also uses the value of the register as the identifier of the pushing
-% \!\output! request made by the macro, and then increments the register to
-% make the identifier unique.
+% to increment it and then examine if it does not exceed the limit
+% \!\pcol@mcpushlimit! to mean the math-mode coloring still can be made. The
+% macro then uses the value of the register as the identifier of the push
+% operation given to \!\output! through an \!\insert!ion.
% \end{macro}
% \begin{macrocode}
@@ -5836,6 +5953,9 @@
% \begin{macro}{\ifpcol@output}
% \changes{v1.2-7}{2013/05/11}
% {Introduced to solve the \cs{output} request sneaking.}
+% \changes{v1.22}{2013/06/30}
+% {Add a user \cs{pcol@reset@color@pop} to inhibit uncoloring if
+% $\mathit{false}$.}
% \changes{v1.3-2}{2013/09/17}
% {Add a user \cs{@outputpage} for parallel-paging.}
% \changes{v1.3-3}{2013/09/17}
@@ -5845,11 +5965,11 @@
% which turns the switch $\true$ has been invoked but \!\pcol@output@end!
% which does $\false$ has not yet. Then the switch is examined by
% \!\pcol@output! to detect an \!\output! request sneaked from outside of
-% the \env{paracol} environment. The other user \!\@outputpage! examine
-% this switch to know if the macro is invoked inside or outside of
-% \env{paracol} environment, and the macro \!\pcol@output@start!
-% temporarily turns the switch $\false$ when it ships out a page having
-% \preenv{} only.
+% the \env{paracol} environment. The other users \!\@outputpage! and
+% \!\pcol@reset@color@pop! examine this switch to know if the macro is
+% invoked inside or outside of \env{paracol} environment, while the macro
+% \!\pcol@output@start! temporarily turns the switch $\false$ when it ships
+% out a page having \preenv{} only.
% \end{macro}
%
% \begin{macro}{\ifpcol@nospan}
@@ -5924,7 +6044,7 @@
% The macro \!\pcol@sptext! then \!\global!ly turns another switch
% \CSIndex{ifpcol@sptext} $\true$ before putting the \mctext{} into the main
% vertical list so that \!\pcol@makecol! for the page break in the text and
-% \!\pcol@output@switch! for closing it captures it to place it
+% \!\pcol@output@switch! for closing capture the text to place it
% appropriately especially when \cswap{} is in effect. Then the switch
% is \!\global!ly turned $\false$ by \!\pcol@output@switch! to give the
% default state after it {\em broadcasts} \CSIndex{if@nobreak},
@@ -6281,14 +6401,14 @@
% \SpecialIndex{\swapcolumninevenpages}
% \SpecialIndex{\noswapcolumninevenpages}
% 
-% The switch \CSIndex{pcol@swapcolumn} is also turned $\false$ by
+% The switch \CSIndex{ifpcol@swapcolumn} is also turned $\false$ by
% \!\pcol@zparacol! but locally if \npaired{} \parapag{}ing is specified
% because \cswap{} is meaningless in the environment. Another modifier is (our
% own version of) \!\@outputpage!, but setting and examining the switch in
% this macro is also local and is to decide the ship-out order of left and
% right \parapag{}es.
%
-% Besides the local use by \!\@outputpage!, \CSIndex{pcol@swapcolumn} is
+% Besides the local use by \!\@outputpage!, \CSIndex{ifpcol@swapcolumn} is
% then examined by the following macros to do special operations if it is
% $\true$ and we are in an even numbered page.
% 
@@ -6514,7 +6634,7 @@
%
%
%
-% \subsection{\cs{box} Register}
+% \subsection{\cs{box} Registers}
%
% The next declaration group is for the following \!\box! registers.
% 
@@ -6594,12 +6714,39 @@
% its implementation, incidentally.}.
% \end{macro}
% 
-% \begin{macro}{\pcol@tempbox}
+% \begin{macro}{\pcol@colorstack@saved}
+% \changes{v1.34}{2018/05/07}
+% {Introduced as $\mathit{\Gamma}_s$ to keep the color stack
+% $\mathit{\Gamma}^c$ until a column-page of $c$ becomes non-empty.}
+% 
+% The \!\box! register \!\pcol@colorstack@saved! is $\csts$ to keep the
+% \colorctext{} $\CST^c$ of column $c$ until its \ccolpage{} becomes non-empty
+% to avoid that the \colpage{} only has coloring \!\special!s for
+% \colorstack{} establishing and rewinding to let \!\pcol@ifempty! misjudge
+% the \colpage{} is non-empty. It is let have $\Celt^c$, if defined,
+% and $\cst$ by \!\pcol@savecolorstack! invoked from \!\pcol@startcolumn!
+% and \!\pcol@output@start!, and from \!\pcol@restartcolumn! through
+% \!\pcol@putbackmvl! when we know or find the (re)starting \colpage{} is
+% empty. The macro \!\pcol@putbackmvl! also makes the \!\box! register
+% $\bot$ when the restarting \colpage{} is not empty and thus the \colpage{}
+% has had coloring \!\special!s for establishing \colorctext{} at its
+% beginning. Then the register is given to \!\pcol@restorecst! by
+% \!\pcol@clearcst@unvbox! to put leading coloring \!\special!s for
+% establishing of the \colpage{} when we complete it by \!\pcol@opcol! or
+% leave from it by \!\pcol@output@switch!.
+% \end{macro}
+% 
+% \begin{macro}{\pcol@tempboxa}
% \changes{v1.3-3}{2013/09/17}
% {Introduced to have materials temporarily for column-separatig rule
% drawing or background painting.}
+% \changes{v1.34}{2018/05/07}
+% {Renamed from \cs{pcol@tempbox} because its relative
+% \cs{pcol@tempboxb} is introduced.}
+% \changes{v1.34}{2018/05/07}
+% {Add ussage in \cs{pcol@scancst} and \cs{pcol@iscancst}.}
% 
-% The \!\box! register \!\pcol@tempbox! is used to have stuff temporarily as
+% The \!\box! register \!\pcol@tempboxa! is used to have stuff temporarily as
% follows.
% 
% \begin{itemize}
@@ -6617,18 +6764,76 @@
% which is inserted into the ship-out image by its callee
% \!\pcol@outputpage@l! through \!\everyvbox! and its contents
% \!\pcol@outputpage@ev!.
+%
+% \item
+% In \!\pcol@scancst! and its callee \!\pcol@iscancst! to scan $\CSTraw^c$,
+% $\CST^c$ or $\csts$, the sequence of (un)coloring \!\special!s to be put
+% into the main vertical list is build in it.
% \end{itemize}
% \end{macro}
% 
+% \begin{macro}{\pcol@tempboxb}
+% \changes{v1.34}{2018/05/07}
+% {Introduced to extract the top of color stack $\mathit{\Gamma}$,
+% $\mathit{\Gamma}_r$ or $\mathit{\Gamma}_s$.}
+% 
+% The \!\box! register \!\pcol@tempboxb! is used in \!\pcol@iscancst!
+% to extract the top (last) element of $\cst$, $\cstraw$ or $\csts$.
+% \end{macro}
+% 
% \begin{macrocode}
\newbox\pcol@topfnotes
\newbox\pcol@prespan \setbox\pcol@prespan\box\voidb@x
\newbox\pcol@rightpage \global\setbox\pcol@rightpage\box\voidb@x
-\newbox\pcol@tempbox
+\newbox\pcol@colorstack@saved
+\newbox\pcol@tempboxa
+\newbox\pcol@tempboxb
% \end{macrocode}
%
%
%
+% \subsection{\cs{insert} Register Set}
+% \changes{v1.34}{2018/05/07}
+% {Add \Sec3.6 ``\cs{insert} Register Set'' for \cs{pcol@colorins}.}
+%
+% The next declaration is for the following \!\insert! register set.
+% 
+% \begin{macro}{\pcol@colorins}
+% \changes{v1.34}{2018/05/07}
+% {Introduced to present text-coloring operations to \cs{output}
+% synchronously with column-pages.}
+% 
+% The register set \!\pcol@colorins! is to \!\insert! a \!\vbox! containing a
+% (un)coloring \!\special! for color pushing or popping, or the definition
+% of a new default color of the current column. In order to make it sure
+% that an \!\insert!ion does not affect \!\pagetotal! and is given to
+% \!\output! with |\box255| containing the corresponding coloring
+% \!\special! put in the main vertical list, \!\count!\!\pcol@colorins! and
+% \!\skip!\!\pcol@colorins! are let be 0, while \!\dimen!\!\pcol@colorins! is
+% let be \!\maxdimen! to allow a \colpage{} to have vitually infinite number
+% of \!\insert!ions.
+%
+% The \!\insert!ion is done by \!\pcol@icolumncolor! for a default color
+% definition, \!\pcol@set@color@push! for color pushing, and
+% \!\pcol@reset@color@pop! and \!\pcol@reset@color@mpop! for color popping
+% in non-math and math mode respectrively. Then \!\insert!ed \!\vbox!es are
+% packed into \!\box!\!\pcol@colorins! and is given to \!\output! as
+% $\cstraw$ to be scanned by \!\pcol@clearcolorstack! to reform it as
+% $\cst$, and then scanned by \!\pcol@restorecolorstack! or saved into
+% $\csts=\!\pcol@colorstack@saved!$ by \!\pcol@savecolorstack!. The
+% register is also referred to by $\!\pcol@scancst!\arg{box}$ to examine if
+% $\arg{box}$ is this register or \!\pcol@colorstack@saved!, and is made
+% $\bot$ by \!\pcol@output@end! after the final reestablishment of the
+% \colorstack.
+% 
+% \begin{macrocode}
+\newinsert\pcol@colorins
+\count\pcol@colorins\z@ \skip\pcol@colorins\z@ \dimen\pcol@colorins\maxdimen
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
% \subsection{\cs{toks} Register}
%
% The last declaration is for the following \!\toks! register.
@@ -6659,7 +6864,7 @@
% \section{Logging Tools}
% \label{sec:imp-logging}
%
-% Prior to the |\def|initions of macros to implement \textsf{paracol}'s
+% Prior to the \!\def!initions of macros to implement \textsf{paracol}'s
% functions, we define a few macros for debug logging.
% 
% \begin{macro}{\pcol@ShowBox}
@@ -6669,11 +6874,17 @@
% {Change \cs{unvcopy} to \cs{copy} to make sure the argument box
% causes overfull if its height is positive and even if it has
% nothing.}
-% 
-% The macro $\!\pcol@ShowBox!\arg{f}$ puts a logging \!\message! showing the
-% height, depth and width of the \!\insert! register $f$ containing
-% footnotes and dump its contents into |.log| file by making overfull
-% intentionally.
+% \changes{v1.34}{2018/05/07}
+% {Add messaging {\tt (VOID)} if $\langle b\rangle\EQ\bot$,
+% $\cs{vfuzz}\gets0$ to ensure overfull, and \cs{vskip} of 1\,{\tt
+% pt} if $\langle b\rangle$'s height is 0 to ensure overfull too.}
+% 
+% The macro $\!\pcol@ShowBox!\arg{b}$ puts a logging \!\message! showing the
+% height, depth and width of the \!\box! (or \!\insert!) register $b$, or
+% ``|(VOID)|'' if $b=\bot$. Then, if $b\neq\bot$, $b$'s contents is dumped
+% into |.log| file making overfull intentionally by putting $b$ into
+% \!\box!|0| of null height, together with \!\vskip! of 1\,|pt| if $b$'s
+% height is 0, with setting $\!\vfuzz!=0$.
% \end{macro}
% 
% \KeepSpace{13}
@@ -6762,8 +6973,13 @@
% \begin{macrocode}
%% Logging Tools
-\def\pcol@ShowBox#1{\message{(\the\ht#1+\the\dp#1)x(\the\wd#1)}%
- {\showboxdepth\@M \showboxbreadth\@M \setbox\z@\vbox to\z@{\copy#1}}}
+\def\pcol@ShowBox#1{%
+ \ifvoid#1\message{(VOID)}%
+ \else
+ \message{(\the\ht#1+\the\dp#1)x(\the\wd#1)}%
+ {\vfuzz\z@ \showboxdepth\@M \showboxbreadth\@M
+ \setbox\z@\vbox to\z@{\ifdim\ht#1=\z@ \vskip1\p@\fi \copy#1}}%
+ \fi}
\def\pcol@LogLevel#1#2#3{%
\pcol@iLogLevel{#1}{pcol@Log}%
\pcol@iLogLevel{#2}{pcol@Logstart}%
@@ -6822,19 +7038,21 @@
% release of \!\insert! registers into a file named $\arg{job}|.fls|$
% associated with \!\pcol@F@write! where $\arg{job}$ is given by
% \!\jobname!. After opened when \Paracol{} is loaded, the file is written by
-% $\!\pcol@FF!\arg{msg_a}\arg{msg_b}$ with a line of the following form,
-% where $p=\!\pcol@page!$, $c=\!\pcol@currcol!$, $\ptop=\!\pcol@toppage!$,
-% $\page(p)=\!\c@page!$, and $\arg{n}_b=\!\pcol@F@n!$ is the cardinality of
-% \!\@deferlist! counted by \!\pcol@F@count!.
+% $\!\pcol@FF!\Arg{m_a}\Arg{m_b}$ with a line of the following form with
+% text messages $m_a$ and $m_b$, where $p=\!\pcol@page!$,
+% $c=\!\pcol@currcol!$, $\ptop=\!\pcol@toppage!$, $\pi=\page(p)=\!\c@page!$,
+% and $n_b=\!\pcol@F@n!$ is the cardinality of \!\@deferlist! counted by
+% \!\pcol@F@count!.
% 
% \begin{itemize}\item[]
-% $\arg{msg_a}|(|p|:|c|/|\ptop|:|\page(p)|)|=\arg{n_b}\arg{msg_b}$
+% $\arg{m_a}|(|\arg{p}|:|\arg{c}|/|\arg{\ptop}|:|\arg{\pi}|)=|
+% \arg{n_b}\arg{m_b}$
% \end{itemize}
% 
-% The argument $\arg{msg_b}$ is empty when $\!\pcol@FF!$ is invoked from
-% $\!\pcol@F!\arg{msg_a}$ for snapshot, while
-% $\arg{msg_b}=\hbox{`|<=|$\arg{n_b}$'}$ when invoked from
-% $\!\pcol@Fe!\arg{msg_a}$ paired by $\!\pcol@Fb!=\!\pcol@F@count!$ by which
+% The argument $\arg{m_b}$ is empty when $\!\pcol@FF!$ is invoked from
+% $\!\pcol@F!\arg{m_a}$ for snapshot, while
+% $\arg{m_b}=\hbox{`|<=|$\arg{n_b}$'}$ when invoked from
+% $\!\pcol@Fe!\arg{m_a}$ paired by $\!\pcol@Fb!=\!\pcol@F@count!$ by which
% the cardinality of \!\@freelist! is given to $\arg{n_b}$ through
% \!\pcol@F@n! and then \!\reserved@a!. Therefore, by the pair of
% \!\pcol@Fb! and \!\pcol@Fe!, the consumption or restitution in a series of
@@ -6878,8 +7096,9 @@
% \!\PackageError! with a message notifying the shortage. The additional
% help message is \!\@ehb! as in \!\@fltovf!. This macro is used in
% \!\pcol@opcol!, \!\pcol@startpage!, \!\pcol@output@start!,
-% \!\pcol@output@switch!, \!\pcol@savefootins!, \!\pcol@flushcolumn!,
-% \!\pcol@synccolumn! and \!\pcol@output@end!.
+% \!\pcol@output@switch!, \!\pcol@iscancst!, \!\pcol@savefootins!,
+% \!\pcol@flushcolumn!, \!\pcol@synccolumn!, \!\pcol@output@end! and
+% \!\pcol@icolumncolor!.
% \end{macro}
% 
% \begin{macrocode}
@@ -6900,6 +7119,8 @@
% \changes{v1.2-7}{2013/05/11}
% {Add the assignment of \cs{@maxdepth} to \cs{maxdepth} to nullify
% the temproary setting done by \cs{@addtobot}.}
+% \changes{v1.33-2}{2016/11/19}
+% {Add a space after \cs{@opcol} to obey the coding convention.}
% 
% The macro \!\pcol@output! is the \Paracol's version of \!\output! which
% is let have this macro as its sole token by \!\pcol@zparacol!. The
@@ -6959,9 +7180,8 @@
% do it for clearity.}.
% 
% The other is to zero-clear the counter \!\pcol@mcid! because we are
-% definitely in the main (non-internal) vertical mode and thus all requests
-% must have been processed or will have to be processed before the next
-% coloring in math mode.
+% definitely in the main (non-internal) vertical mode and thus all push/pop
+% pairs of the coloring in math mode have been processed.
%
% Further, before we start the sequence for non-special \!\output! request
% on page breaks, we examine if $\CSIndex{ifpcol@output}=\true$ to mean
@@ -7025,7 +7245,7 @@
\@makecol
\@opcol
\@startcolumn
- \@whilesw\if@fcolmade\fi{\@opcol\@startcolumn}%
+ \@whilesw\if@fcolmade\fi{\@opcol \@startcolumn}%
\fi\fi
\global\maxdepth\@maxdepth
\ifnum\outputpenalty>-\@Miv
@@ -7109,6 +7329,10 @@
% \cs{pcol@shrinkcolbyfn}.}
% \changes{v1.32-2}{2015/10/10}
% {Add \cs{pcol@Fb}/\cs{pcol@Fe} pair(s).}
+% \changes{v1.33-2}{2016/11/19}
+% {Move down the \cs{def}inition of \cs{pcol@currfoot} with $\bot$ to
+% place it just before the \cs{ifpcol@scfnote}/\cs{fi} construct to
+% make it clear how \cs{pcol@currfoot} is \cs{def}ined.}
% 
% The macro \!\pcol@makecol! is invoked solely from \!\pcol@output! to build
% the shipping image of the \ccolpage{} which just has completed in
@@ -7177,9 +7401,9 @@
% \sync{}ation point in $\ptop$. Then we let \!\box!|255| have the
% \prespan{} followed by the \mctext{} being the original contents of
% \!\box!|255|, which may be shifted left by
-% $\WT-w_c=\!\textwidth!-\!\columnwidth!$ if \cswap{} is in effect so that
-% its left edge is aligned to that of the leftmost column, i.e., of the text
-% area.
+% $\WT-w_c=\!\textwidth!-\!\columnwidth!$ by the macro
+% \!\pcol@shiftspanning! if \cswap{} is in effect so that its left edge is
+% aligned to that of the leftmost column, i.e., of the text area.
%
% The third addition is for \Scfnote{}s. If they are presented in
% \!\footins!, we shrink \!\@colht! by its height plus depth
@@ -7198,12 +7422,18 @@
% \!\footins! otherwise because $\pp^f(p)$ has already been fixed. Note
% that these saving\slash discarding make \!\footins! void and thus
% \!\@makecol! will not put footnotes.
+%
+% On the other hand, if footnote typesetting is \mcfnote{}, \!\footins! is
+% kept unchanged so that its contents will be put by \!\@makecol! if it has
+% something. As for \!\pcol@currfoot!, it should have its default value
+% $\!\voidb@x!=\bot$ assigned to it beforehand, so that, if $p=\ptop$,
+% \!\pcol@startpage! will make $\pp^f(p)=\bot$ unless \Scfnote{s} are given
+% in \!\footins!.
% 
% \begin{macrocode}
\def\pcol@makecol{\let\pcol@textbottom\@textbottom
\ifdim\pcol@textfloatsep=\maxdimen\else
\def\@textbottom{\vskip\z@\@plus.0001fil\@minus.0001fil}\fi
- \def\pcol@currfoot{\voidb@x}%
\ifpcol@sptext \ifnum\pcol@currcol=\z@
\pcol@getcurrpinfo\@tempcnta\@tempdima\@tempskipa
\setbox\@tempboxa\vbox{\unvcopy\@cclv}%
@@ -7218,6 +7448,7 @@
\setbox\@cclv\vbox{\unvbox\pcol@prespan \pcol@shiftspanning\@cclv
\unvbox\@cclv}%
\fi\fi
+ \def\pcol@currfoot{\voidb@x}%
\ifpcol@scfnote \ifvoid\footins\else
\pcol@shrinkcolbyfn\@colht\footins\relax
\setbox\@cclv\vbox{\pcol@unvbox@cclv\footins}%
@@ -7260,9 +7491,9 @@
% \changes{v1.2-7}{2013/05/11}
% {Introduced to solve the \cs{output} request sneaking.}
% 
-% The macro \!\pcol@combinefloats! is our own version of \!\@combinefloats!
+% The macro \!\pcol@combinefloats! being our own version of \!\@combinefloats!
% is used in \LaTeX's \!\@makecol! because the original and our
-% own are made \!\let!-equal by \!\pcol@zparacol!, and in
+% own are made \!\let!-equal by \!\pcol@zparacol!, and also used in
% \!\pcol@makenormalcol! explicitly. The customization is twofold for both
% of top and bottom floats.
%
@@ -7341,6 +7572,9 @@
% {Replace \cs{maxdepth} with \cs{@maxdepth}.}
% \changes{v1.32-2}{2015/10/10}
% {Add \cs{pcol@Fb}/\cs{pcol@Fe} pair(s).}
+% \changes{v1.33-2}{2016/11/19}
+% {Add {\tt\%} to the end of the line to open \cs{vbox} for
+% \cs{@outputbox} to obey the coding convention.}
% 
% The macro \!\pcol@cflt! is invoked solely from \!\pcol@combinefloats! if
% the \colpage{} for which the macro combines the top floats has
@@ -7373,7 +7607,7 @@
\let\@elt\@comflelt
\setbox\@tempboxa\vbox{}%
\@toplist
- \setbox\@outputbox\vbox{
+ \setbox\@outputbox\vbox{%
\boxmaxdepth\@maxdepth
\box\@tempboxa
\vskip-\floatsep
@@ -7406,6 +7640,9 @@
% {Rename \cs{pcol@outputpage} as \cs{pcol@outputcolumns}.}
% \changes{v1.32-2}{2015/10/10}
% {Add \cs{pcol@Fb}/\cs{pcol@Fe} pair(s).}
+% \changes{v1.33-2}{2016/11/19}
+% {Add {\tt\%} to the end of the line to open \cs{vbox} for
+% \cs{@currbox} to obey the coding convention.}
% 
% The macro \!\pcol@opcol! is invoked from \!\pcol@output! for the ordinary
% completed \colpage{} built by \!\pcol@makecol!, or from the loop creating
@@ -7450,7 +7687,7 @@
% \begin{macrocode}
\def\pcol@opcol{%
\pcol@Fb
- \@next\@currbox\@freelist{\global\setbox\@currbox\vbox to\@colht{
+ \@next\@currbox\@freelist{\global\setbox\@currbox\vbox to\@colht{%
\boxmaxdepth\@maxdepth
\pcol@clearcst@unvbox\@outputbox}}\pcol@ovf
\pcol@Fe{opcol}%
@@ -7468,6 +7705,9 @@
% \end{macro}
%
% \begin{macro}{\pcol@setpageno}
+% \changes{v1.33-2}{2016/11/19}
+% {Add \cs{let}\cs{@elt}\cs{relax} before \cs{edef} of \cs{reserved@a}
+% for the sake of clarity.}
% \begin{macro}{\pcol@setpnoelt}
% \changes{v1.0}{2011/10/10}
% {Rename \cs{ifpcol@textonly} as \cs{ifpcol@nospan}.}
@@ -7499,14 +7739,15 @@
% Then we scan $\pi'(q)\in\mathit{\Pi}'$ for all $q\in[\pbase,\ptop]$ by
% applying \!\pcol@setpnoelt! to each $\pi'(q)$ giving its five components
% to the macro, so that the macro updates $\pp(q)$ by \!\pcol@defcurrpage!
-% letting $\pp^p(q)=\page'(q)$ if $q\geq p$. Note that we let \!\c@page!
-% have $\page'(q)$, but this assignment is temporary and \!\c@page! will
-% regain the value $\page(p)$ after \!\pcol@setpageno! finishes.
+% letting $\pp^p(q)=\page'(q)$ if $q\geq p$, or equivalently $p-q\leq0$.
+% Note that we let \!\c@page! have $\page'(q)$, but this assignment is
+% temporary and \!\c@page! will regain the value $\page(p)$ after
+% \!\pcol@setpageno! finishes.
% 
% \begin{macrocode}
\def\pcol@setpageno{\begingroup
\@tempcnta\pcol@page \advance\@tempcnta-\pcol@basepage
- \edef\reserved@a{\pcol@pages\pcol@currpage}%
+ \let\@elt\relax \edef\reserved@a{\pcol@pages\pcol@currpage}%
\global\let\pcol@pages\@empty \global\let\pcol@currpage\@empty
\let\@elt\pcol@setpnoelt \reserved@a
\endgroup}
@@ -7565,11 +7806,11 @@
% 
% The macro \!\pcol@nextpage! is invoked solely in \!\pcol@opcol! to let
% $p$ be $p+k+1$ where $k$ is the number of \fpage{}s directly following
-% $p$. For this update, the macro scans $\pp(q)\in\PP$ for all
-% $q\In\pbase\ptop$ applying \!\pcol@nextpelt! to $\pp(q)$, to perform
-% the following where $p_0$ is $p$ before update and
-% $f=\CSIndex{if@tempswa}$ being $\true$ at initial, to let $p\gets p+k$,
-% and then increments $p$ to have $p+k+1$.
+% $p$, i.e., $k=\Abs{\Set{q>p}{p<\forall q'\leq q:\pp(q')^h<0}}$. For
+% this update, the macro scans $\pp(q)\in\PP$ for all $q\In\pbase\ptop$
+% applying \!\pcol@nextpelt! to $\pp(q)$, to perform the following where
+% $p_0$ is $p$ before update and $f=\CSIndex{if@tempswa}$ being $\true$ at
+% initial, to let $p\gets p+k$, and then increments $p$ to have $p+k+1$.
% $$
% \<p,f\>\gets\cases{
% \<p,f\>& $q\leq p_0$\cr
@@ -7600,7 +7841,8 @@
%
% \begin{macro}{\pcol@checkshipped}
% The macro \!\pcol@checkshipped! is invoked solely in \!\pcol@opcol! to let
-% \CSIndex{if@tempswa} be $\true$ iff $S_c=|\pcol@shipped|{\cdot}c\neq()$
+% \CSIndex{if@tempswa} be $\true$ iff
+% $S_c=|\pcol@shipped|{\cdot}c\neq\emptyset$
% 
% \SpecialArrayIndex{c}{\pcol@shipped}
% 
@@ -7814,8 +8056,8 @@
% \!\@dblfloatplacement! to reinitialize the parameters for \pwise{} float
% placement. In addition, we let $\!\f@depth!=0$ to nullify the
% setting $\!\f@depth!=|1sp|$ possiblly done by \!\@dblfloatplacement! as
-% discussed in the item-(\ref{item:ovv-float-@dblfloatplacement}) of Section
-% \ref{sec:imp-ovv-float}. Then we repeat \!\@tryfcolumn! giving it
+% discussed in the item-(\ref{item:ovv-float-@dblfloatplacement}) of
+% \secref{sec:imp-ovv-float}. Then we repeat \!\@tryfcolumn! giving it
% \!\@dbldeferlist! having \pwise{} floats not contributed to previous
% pages yet, while $\CSIndex{if@fcolmade}=\true$ meaning it builds \fpage{}s
% in \!\@outputbox!. For each \fpage{}, we acquire an \!\insert! from
@@ -7858,16 +8100,16 @@
% element to invoke \!\@addtodblcol! for adding the element to \!\@dbltoplist!
% or keeping it in \!\@dbldeferlist! or \!\@deferlist! depending on \LaTeX's
% version, as \LaTeX's \!\@startdblcolumn! does. In addition, as discussed
-% in item-(\ref{item:ovv-float-@addtodblcol}) of Section
-% \ref{sec:imp-ovv-float}, we also clear \!\@deferlist! after saving it in
+% in item-(\ref{item:ovv-float-@addtodblcol}) of
+% \secref{sec:imp-ovv-float}, we also clear \!\@deferlist! after saving it in
% \!\reserved@c! prior to the scan, and then after the scan we concatenate
% \!\@dbldeferlist! and \!\@deferlist! to let the former have the result and
% restore \!\@deferlist! from \!\reserved@c!.
%
% Then If this scan results in empty \!\@dbltoplist! to mean the new page
% does not have any \spanning, we invoke \!\pcol@defcurrpage! with
-% $\pp^i(\ptop)=\pp^f(\ptop)=\bot$ so that $\pp(\ptop)$ reprsents a page
-% without \spanning{} nor \Scfnote{}s.
+% $\pp^i(\ptop)=\pp^f(\ptop)=\bot$ and $\pp^s(\ptop)=\pp^m(\ptop)=\emptyset$
+% so that $\pp(\ptop)$ reprsents a page perfectly empty.
% 
% \begin{macrocode}
\begingroup
@@ -8004,7 +8246,7 @@
% let \!\pcol@rightpage! be an empty box but paint its \bground{} too, because
% the right counterpart of left parallel float page should be always blank.
% Note that we temporarily increment $\page(q)$ by one for \npaired{} right
-% \parapag{}ee so that the paiting macro peforms page-parity dependent
+% \parapag{}ee so that the paiting macro performs page-parity dependent
% operations correctly.
% 
% \Index{parallel-paging}
@@ -8151,8 +8393,8 @@
% We do the painting at this earliest stage of the image building in order
% to use the left-top corner of the text area where we are now at as the
% origin for painting, and to let the region may be overlaid by those of
-% columns and \csepgap{}s. We also let $h=\pp^h(q)$ shrunk by the
-% height-plus-depth by \!\pcol@shrinkcolbyfn!.
+% columns and \csepgap{}s. We also let $h=\pp^h(q)=\!\@tempdima!$ shrunk by
+% the height-plus-depth by \!\pcol@shrinkcolbyfn!.
% 
% \begin{macrocode}
\def\pcol@ioutputelt#1#2#3{\setbox#3\vbox to\textheight{%
@@ -8225,7 +8467,7 @@
% Third, we invoke \!\pcol@buildcolseprule! giving it $h$ being $\pp^h(q)$
% but possibly shrunk by \Scfnote{}s, the column range $\LBRP\Cfrom\Cto$,
% and \!\@maxdepth! to mean $q$ is non-\lpage, to draw a \cseprule{}
-% possibly broken by the speces for \mctext{}s in the box \!\pcol@tempbox!
+% possibly broken by the speces for \mctext{}s in the box \!\pcol@tempboxa!
% and to paint the \bground{}s of columns, \csepgap{}s and \mctext{} in the
% box \!\@tempboxa! which we put into $b$ immediately.
%
@@ -8285,8 +8527,9 @@
% $\pp^f(q)$ to \!\@freelist!, if $\Cfrom=0$ meaning left \parapag{}e.
% Otherwise for the right \parapag{}e, we simply put an empty box whose
% height and depth equal to those of $\pp^f(q)$ by \!\pcol@phantom!,
-% preceded by \!\nointerlineskip! to inhibit baseline skip insertion above
-% the box and followed by null \!\vskip! as done in \!\pcol@putfootins!.
+% preceded by a vertical skip of $\!\skip!{\cdot}\pp^f(q)$ and then
+% \!\nointerlineskip! to inhibit baseline skip insertion above the box, and
+% followed by null \!\vskip! as done in \!\pcol@putfootins!.
%
% Sixth and finally\footnote{
% 
@@ -8344,6 +8587,8 @@
% painting for columns, column-separating gaps and spanning texts.}
% \changes{v1.3-4}{2013/09/17}
% {Introduced for non-uniform column-separating gaps.}
+% \changes{v1.34}{2018/05/07}
+% {Rename \cs{pcol@tempbox} as \cs{pcol@tempboxa}.}
% \begin{macro}{\pcol@buildcselt@S}
% \changes{v1.3-3}{2013/09/17}
% {Introduced for background under-painting for spanning texts.}
@@ -8353,6 +8598,8 @@
% painting for columns, column-separating gaps and spanning texts.}
% \changes{v1.3-4}{2013/09/17}
% {Introduced for non-uniform column-separating gaps.}
+% \changes{v1.34}{2018/05/07}
+% {Rename \cs{pcol@tempbox} as \cs{pcol@tempboxa}.}
% 
% The macro $\!\pcol@buildcolseprule!\<H_{n+1}\>\<\Cfrom\>\<\Cto\>\<d\>$ is
% used in \!\pcol@ioutputelt!, \!\pcol@imakeflushedpage! and
@@ -8365,7 +8612,7 @@
% For initializing the drawing and painting process, we let
% $\!\@tempdimb!=H_0+h_0=0$,
% $(\!\pcol@bg@from!,\!\pcol@bg@to!)=(\CBfrom,\CBto)=(\Cfrom,\Cto)$, and
-% make boxes $b_r=\!\pcol@tempbox!$ for the rule and $b_b=\!\@tempboxa!$ for
+% make boxes $b_r=\!\pcol@tempboxa!$ for the rule and $b_b=\!\@tempboxa!$ for
% the \bground{} empty. Then we apply
% \!\pcol@buildcselt@S!$\<H_i\>\<h_i\>$ to each element $\spt(H_i,h_i)$ of
% $\pp^s(p)$ to under-paint the \bground{} of each \mctext{} by
@@ -8410,12 +8657,12 @@
\def\pcol@buildcolseprule#1#2#3#4{%
\@tempdima#1\relax \dimen@#4\relax
\let\pcol@bg@from#2\relax \let\pcol@bg@to#3\relax
- \setbox\pcol@tempbox\vbox{}\setbox\@tempboxa\vbox{}%
+ \setbox\pcol@tempboxa\vbox{}\setbox\@tempboxa\vbox{}%
\let\@elt\pcol@buildcselt@S \pcol@sptextlist
\@tempdimb\z@ \let\@elt\pcol@buildcselt \pcol@sptextlist
\let\@elt\relax \advance\@tempdima-\@tempdimb
\ifdim\@tempdima>\z@
- \setbox\pcol@tempbox\vbox{\unvbox\pcol@tempbox
+ \setbox\pcol@tempboxa\vbox{\unvbox\pcol@tempboxa
\hrule\@height\@tempdima\@width\columnseprule}%
\setbox\@tempboxa\vbox{\unvbox\@tempboxa
\let\@elt\relax
@@ -8435,7 +8682,7 @@
\pcol@bg@paintbox{S}}}
\def\pcol@buildcselt#1#2{%
\@tempdimc#1sp \advance\@tempdimc-\@tempdimb
- \setbox\pcol@tempbox\vbox{\unvbox\pcol@tempbox
+ \setbox\pcol@tempboxa\vbox{\unvbox\pcol@tempboxa
\ifdim\@tempdimc>\z@ \hrule\@height\@tempdimc\@width\columnseprule \fi
\vskip#2sp}%
\setbox\@tempboxa\vbox{\unvbox\@tempboxa
@@ -8459,6 +8706,8 @@
% {Introduced for column-separating rule drawing.}
% \changes{v1.3-4}{2013/09/17}
% {Introduced for non-uniform column-separating gaps.}
+% \changes{v1.34}{2018/05/07}
+% {Rename \cs{pcol@tempbox} as \cs{pcol@tempboxa}.}
% 
% The macro $\!\pcol@hfil!\<c\>$ is used in \!\pcol@ioutputelt!,
% \!\pcol@imakeflushedpage! and \!\pcol@iflushfloats! to separate column
@@ -8473,7 +8722,7 @@
% \SpecialArrayIndex{c}{\pcol@columnsep}
% 
% followed by a skip $-r/2$ to nullify the width of the rule; the rule in
-% \!\pcol@tempbox! which \!\pcol@buildcolseprule! built, with color
+% \!\pcol@tempboxa! which \!\pcol@buildcolseprule! built, with color
% $|\pcol@colseprulecolor|{\cdot}c$
% 
% \SpecialArrayIndex{c}{\pcol@columnsep}
@@ -8498,7 +8747,7 @@
\hskip-.5\columnseprule
\@ifundefined{pcol@colseprulecolor#1}%
{\pcol@colseprulecolor}{\@nameuse{pcol@colseprulecolor#1}}%
- \copy\pcol@tempbox \hskip-.5\columnseprule
+ \copy\pcol@tempboxa \hskip-.5\columnseprule
\hskip.5\@tempdima\@plus1fil\relax
\else \hskip\@tempdima\@plus1fil\relax
\fi}}
@@ -8520,6 +8769,8 @@
% {Redefined for background painting.}
% \changes{v1.3-4}{2013/09/17}
% {Redefined for marginal note placement.}
+% \changes{v1.34}{2018/05/07}
+% {Rename \cs{pcol@tempbox} as \cs{pcol@tempboxa}.}
% 
% The macro \!\@outputpage!, being our own version of \LaTeX's one kept in
% \!\pcol@@outputpage!, ships out a page $p$ or \parapag{}e pair in $p$.
@@ -8540,7 +8791,7 @@
% assumes as a page, i.e., shifted 1\,inch down from the real page. Then if
% $\CSIndex{ifpcol@output}=\true$ to mean this macro is used in a
% \env{paracol} environment, we build the painted \bground{}s of left and
-% right \parapag{}es in $\!\pcol@tempbox!=b_l$ and $\!\@tempboxa!=b_r$ by
+% right \parapag{}es in $\!\pcol@tempboxa!=b_l$ and $\!\@tempboxa!=b_r$ by
% putting a vertical skip of $H'_M$, and invoking \!\pcol@bg@paintpage!
% with the setting $(\!\pcol@bg@from!,\!\pcol@bg@to!)=(\CBfrom,\CBto)$ be
% $(0,\CL)$ and $(\CL,\C)$ respectively. Note that \!\pcol@bg@paintpage!
@@ -8626,7 +8877,7 @@
\def\@outputpage{\begingroup
\@tempdima\topmargin \advance\@tempdima\headheight \advance\@tempdima\headsep
\ifpcol@output
- \setbox\pcol@tempbox\vtop{\vskip\@tempdima \global\pcol@bg@paintedfalse
+ \setbox\pcol@tempboxa\vtop{\vskip\@tempdima \global\pcol@bg@paintedfalse
\let\pcol@bg@from\z@ \let\pcol@bg@to\pcol@ncolleft
\pcol@bg@paintpage}%
\ifpcol@bg@painted \@tempswatrue \else \@tempswafalse \fi
@@ -8639,7 +8890,7 @@
\ifpcol@havelastpage \ifx\set@color\relax\else
\pcol@bg@@paintpage \pcol@bg@@paintbox{Pp}%
\fi\fi}%
- \setbox\pcol@tempbox\vbox{%
+ \setbox\pcol@tempboxa\vbox{%
\let\pcol@bg@preposttop\pcol@bg@preposttop@left
\let\pcol@bg@from\z@ \let\pcol@bg@to\pcol@ncolleft \reserved@a}%
\ifpcol@bg@painted \@tempswatrue \else \@tempswafalse \fi
@@ -8653,7 +8904,7 @@
\pcol@Logend{\@outputpage{rightset}}%
\fi
\fi
- \ht\pcol@tempbox\z@ \dp\pcol@tempbox\z@
+ \ht\pcol@tempboxa\z@ \dp\pcol@tempboxa\z@
\ht\@tempboxa\z@ \dp\@tempboxa\z@
\ifodd\c@page \pcol@swapcolumnfalse \fi
\ifnum\pcol@ncolleft<\pcol@ncol\else \pcol@swapcolumnfalse \fi
@@ -8678,6 +8929,8 @@
% \changes{v1.3-3}{2013/09/17}
% {Introduced for column-separating rule drawing and background
% painting in left parallel-pages.}
+% \changes{v1.34}{2018/05/07}
+% {Rename \cs{pcol@tempbox} as \cs{pcol@tempboxa}.}
% \begin{macro}{\pcol@outputpage@r}
% \changes{v1.3-2}{2013/09/17}
% {Introduced for shipping out right parallel-pages.}
@@ -8759,7 +9012,7 @@
\global\c@page#1\relax
\let\@themargin\oddsidemargin
\if@twoside\ifodd\c@page\else \let\@themargin\evensidemargin \fi\fi
- \if@tempswa \everyvbox{\pcol@outputpage@ev\pcol@tempbox}\fi
+ \if@tempswa \everyvbox{\pcol@outputpage@ev\pcol@tempboxa}\fi
\pcol@@outputpage
\pcol@Logend{\@outputpage{left}}}
\def\pcol@outputpage@r#1{%
@@ -9177,8 +9430,11 @@
% $y_0=\!\@tempdimb!$, $x_1=\!\@tempdimc!$ and $y_1=\!\dimen@!$ of the
% region $\bgr_a^{[c]}$ by $\!\pcol@bg@calculate!\arg{z}\arg{z_0}\Arg{F}$
% giving it
-% $(z,z_0,F)\in\{(x_0,0,F_x),(y_0,0,F_y),(x_1,x_0,F_w),(y_1,y_0,F_h)\}$. Next
-% we modify $\{x,y\}_{\{0,1\}}$ for \bgext{} by
+% $(z,z_0,F)\in\{(x_0,0,F_x),(y_0,0,F_y),(x_1,x_0,F_w),(y_1,y_0,F_h)\}$,
+% where $(x_0,y_0)$ and $(x_1,y_1)$ is the left-top and right-bottom corner
+% of the painting region in the text-area coordinate, i.e., left-right and
+% top-down coordinate whose origin is at the left-top corner of the leftmost
+% column. Next we modify $\{x,y\}_{\{0,1\}}$ for \bgext{} by
% $\!\pcol@bg@addext!\arg{z}\Arg{s}\Arg{d}$ with $(z,s,d)\in
% \{(x_0,\hbox{`|-|'},|l|),(y_0,\hbox{`|-|'},|t|),
% (x_1,\emptyset,|r|),\~(y_1,\emptyset,|b|)\}$.
@@ -9195,8 +9451,8 @@
% \SpecialArrayIndex{a}{\pcol@bg@color@}
% 
% On the other hand if \mirror{}ing is to be done, the region should be
-% $[(\WT{-}x_1,y_0)(\WT{-}x_0,y)]$ and thus the shift amount for
-% \!\moveright! of the \!\hbox! is $(x_1-\WT)$.
+% $[(\WT{-}x_1,y_0)(\WT{-}x_0,y_1)]$ and thus the shift amount for
+% \!\moveright! of the \!\hbox! is $(\WT-x_1)$.
%
% Then after \!\pcol@bg@paintregion@i! finshes its work,
% \!\pcol@bg@paintregion! lets the switch
@@ -9347,8 +9603,8 @@
% \HP-(\HM-\HR)&$d=|b|$\cr}
% $$
% where $\WM-\WR$ is specified by \!\pcol@bg@pageleft! and $\HM-\HR$ by
-% \!\pcol@bg@pagetop!. Then we let $z=e'\pm(10000\PT-e)$ according to $s$
-% again.
+% \!\pcol@bg@pagetop!. Then we let $z=e'\pm(e-10000\PT)$ according to $s$
+% again, i.e., move $z$ {\em inside\/} by $(10000\PT-e)$ from $e'$.
% 
% \begin{macrocode}
\def\pcol@bg@addext#1#2#3{%
@@ -9600,7 +9856,7 @@
% \bgr_{\{s,S\}}&:&(0\;,\;H^s)\ +\ (\WT\;,\;h^s)\\
% \bgr_{\{t,T\}}&:&(-(\WM-\WR)\;,\;-(\HM-\HR))\ +\ ((\WP-2\WR)\;,\;\HM-\HR)\\
% \bgr_{\{b,B\}}&:&(-(\WM-\WR)\;,\;\HT)\ +\
-% ((\WP-2\WR)\;,\;(\HP-2\WR)-((\HM-\HR)+\HT))\\
+% ((\WP-2\WR)\;,\;(\HP-2\HR)-((\HM-\HR)+\HT))\\
% \bgr_{\{l,L\}}&:&(-(\WM-\WR)\;,\;0)\ +\ ((\WM-\WR)\;,\;\HT)\\
% \bgr_{\{r,R\}}&:&(\WT\;,\;0)\ +\ ((\WP-2\WR)-((\WM-\WR)+\WT)\;,\;\HT)\\
% \bgr_{\{f,F\}}&:&(0\;,\;0)\ +\ (\WT\;,\;h^f)\\
@@ -9696,32 +9952,40 @@
% \subsection{Dispatcher}
% \label{sec:imp-sout-disp}
%
+% \changes{v1.22}{2013/06/30}
+% {\cs{pcol@op@cpush} was introduced for output request to push color
+% stack but removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@op@cpush} is removed according to the change of text
+% coloring from \cs{output} to \cs{insert}.}
+% \changes{v1.22}{2013/06/30}
+% {\cs{pcol@op@cpop} was introduced for output request to pop color
+% stack but removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@op@cpop} is removed according to the change of text
+% coloring from \cs{output} to \cs{insert}.}
+% \changes{v1.22}{2013/06/30}
+% {\cs{pcol@op@cset} was introduced for output request to set
+% $\gamma_0^c$ but removed in v1.34}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@op@cpop} is removed according to the change of text
+% coloring from \cs{output} to \cs{insert}.}
+%
% \begin{macro}{\pcol@op@start}
% \begin{macro}{\pcol@op@switch}
% \begin{macro}{\pcol@op@flush}
% \begin{macro}{\pcol@op@clear}
% \begin{macro}{\pcol@op@end}
-% \begin{macro}{\pcol@op@cpush}
-% \changes{v1.22}{2013/06/30}
-% {Introduced for output request to push color stack.}
-% \begin{macro}{\pcol@op@cpop}
-% \changes{v1.22}{2013/06/30}
-% {Introduced for output request to pop color stack.}
-% \begin{macro}{\pcol@op@cset}
-% \changes{v1.22}{2013/06/30}
-% {Introduced for output request to set $\gamma_0^c$}
% 
% The macro $|\pcol@op@|{\cdot}f$ where $f\in
-% F=\{|start|,|switch|,|flush|,|clear|,|end|,|cpush|,|cpop|,|cset|\}$ has
+% F=\{|start|,|switch|,|flush|,|clear|,|end|\}$ has
% our own \!\outputpenalty! code less than $-10000$ to invoke the
% corresponding macro $|\pcol@output@|{\cdot}f$. The code macros are given
% to \!\pcol@invokeoutput! as its argument by \!\pcol@zparacol! ($f=|start|$),
% \!\pcol@switchcol! ($f=|switch|$), \!\pcol@visitallcols! ($f=|switch|$),
% \!\pcol@com@flushpage! ($f=|flush|$), \!\pcol@com@clearpage!
-% ($f=|clear|$), \!\pcol@flushclear! ($f=|switch|$), \!\endparacol!
-% ($f=|end|$), \!\pcol@set@color@push! ($f=|cpush|$),
-% \!\pcol@reset@color@pop! ($f=|cpop|$), and \!\pcol@icolumncolor!
-% ($f=|cset|$) to set one of them into \!\outputpenalty!, so that the other
+% ($f=|clear|$), \!\pcol@flushclear! ($f=|switch|$), and \!\endparacol!
+% ($f=|end|$) to set one of them into \!\outputpenalty!, so that the other
% user \!\pcol@specialoutput! examines which special function is invoked.
% 
% \SpecialIndex{\pcol@output@start}
@@ -9729,9 +9993,6 @@
% \SpecialIndex{\pcol@output@flush}
% \SpecialIndex{\pcol@output@clear}
% \SpecialIndex{\pcol@output@end}
-% \SpecialIndex{\pcol@output@cpush}
-% \SpecialIndex{\pcol@output@cpop}
-% \SpecialIndex{\pcol@output@cset}
% 
% \begin{macrocode}
%% Special Output Routines: Dispatcher
@@ -9741,56 +10002,34 @@
\def\pcol@op@flush{-10012}
\def\pcol@op@clear{-10013}
\def\pcol@op@end{-10014}
-\def\pcol@op@cpush{-10015}
-\def\pcol@op@cpop{-10016}
-\def\pcol@op@cset{-10017}
% \end{macrocode}
% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
-% \end{macro}\end{macro}\end{macro}
%
-% \KeepSpace{3}
-% \begin{macro}{\pcol@mcpushlimit}
% \changes{v1.24}{2013/07/27}
-% {Introduced for coloring specified in math mode.}
-% \begin{macro}{\pcol@op@mcpush}
+% {\cs{pcol@op@mcpush} was introduced for coloring specified in math
+% mode but removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@op@mcpush} is removed according to the change of text
+% coloring from \cs{output} to \cs{insert}.}
% \changes{v1.24}{2013/07/27}
-% {Introduced for coloring specified in math mode.}
-% \begin{macro}{\pcol@op@mcpush@pone}
+% {\cs{pcol@op@mcpush@pone} was introduced for coloring specified in
+% math mode but removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@op@mcpush@pone} is removed according to the change of text
+% coloring from \cs{output} to \cs{insert}.}
% \changes{v1.24}{2013/07/27}
-% {Introduced for coloring specified in math mode.}
-% \begin{macro}{\pcol@op@mcpop}
-% \changes{v1.24}{2013/07/27}
-% {Introduced for coloring specified in math mode.}
-% \begin{macro}{\pcol@op@mcpop@pone}
+% {\cs{pcol@op@mcpop} was introduced for coloring specified in math
+% mode but removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@op@mcpop} is removed according to the change of text
+% coloring from \cs{output} to \cs{insert}.}
% \changes{v1.24}{2013/07/27}
-% {Introduced for coloring specified in math mode.}
-% 
-% Another set of macros $|\pcol@op@|{\cdot}f$ where
-% $f\in\{|mcpush|,|mcpop|\}$ is for \!\output! penalties $\mppush$
-% ($f=|mcpush|$) and $\mppop$ ($f=|mcpop|$) but they carry positive
-% counterparts $-\mppush=10000+\mplimit$ and $-\mppop=-\mppush+\mplimit$ for
-% the calculation of $i=-P+P_x=-(P-P_x)$ in \!\pcol@specialoutput! and
-% $P=P_x-i=-(-P_x+i)$ in \!\pcol@set@color@push! and
-% \!\pcol@reset@color@mpop!, where $\mplimit=\!\pcol@mcpushlimit!$,
-% $P_x\in\{\mppush,\mppop\}$, $P=\!\outputpenalty!$, and $i$ is the
-% identifier of pushing. The other related set of macros
-% $|\pcol@op@|{\cdot}f{\cdot}|@pone|$ is for $\mppush+1$ ($f=|mcpush|$) and
-% $\mppop+1$ ($f=|mcpop|$) for the examination of $P\leq P_x\Leftrightarrow
-% P<P_x+1$ in \!\pcol@specialoutput!.
-% 
-% \begin{macrocode}
-\def\pcol@mcpushlimit{100}
-\@tempcnta\@M
-\advance\@tempcnta\pcol@mcpushlimit
-\edef\pcol@op@mcpush{\number\@tempcnta}\advance\@tempcnta\m@ne
-\edef\pcol@op@mcpush@pone{\number-\@tempcnta}\advance\@tempcnta\@ne
-\advance\@tempcnta\pcol@mcpushlimit
-\edef\pcol@op@mcpop{\number\@tempcnta}\advance\@tempcnta\m@ne
-\edef\pcol@op@mcpop@pone{\number-\@tempcnta}\advance\@tempcnta\@ne
-
-% \end{macrocode}
-% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
+% {\cs{pcol@op@mcpop@pone} was introduced for coloring specified in
+% math mode but removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@op@mcpop@pone} is removed according to the change of text
+% coloring from \cs{output} to \cs{insert}.}
%
% \begin{macro}{\pcol@specialoutput}
% \changes{v1.0}{2011/10/10}
@@ -9805,27 +10044,25 @@
% {Add examination with $P_{\string\rm{push}}$ and $P_{\string\rm{pop}}$
% and invocation of \cs{pcol@output@mcpush} and
% \cs{pcol@output@mcpop}.}
+% \changes{v1.34}{2018/05/07}
+% {Remove examinations related to $f\in\{{\tt cpush},{\tt cpop},{\tt
+% mcpush},{\tt mcpop}\}$.}
% 
% The macro \!\pcol@specialoutput! is invoked solely in \!\pcol@output! to
% invoke our own or \LaTeX's special output routine. It examines if
-% $P=\!\outputpenalty!\in\Set{\cs{pcol@op@}{\cdot}f}{f\in F}$,
-% $P\in\LP\mppush{-}\mplimit,\mppush\RB$ for $f=|mcpush|$, or
-% $P\in\LP\mppop{-}\mplimit,\mppop\RB$\footnote{
-% 
-% In reality, we omit the examination of $P>\mppop-\mplimit$.}
-% 
-% for $f=|mcpop|$. If so, before invoking $|\pcol@output@|{\cdot}f$, we
-% rebuild \!\@holdpg! removing \!\lastbox! and the last vertical skip as
-% done in \LaTeX's \!\@specialoutput!. We also let
-% $\!\outputpenalty!=-10000$\footnote{
+% $P=\!\outputpenalty!\in\Set{\cs{pcol@op@}{\cdot}f}{f\in F}$ and then, if
+% so, before invoking $|\pcol@output@|{\cdot}f$, we rebuild \!\@holdpg!
+% removing \!\lastbox! and the last vertical skip as done in \LaTeX's
+% \!\@specialoutput!. We also let $\!\outputpenalty!=-10000$\footnote{
% 
% It can be any value larger than -10004.}
% 
% so that \!\vsize! is correctly set to \!\@colroom! in the second half of
% \!\pcol@output! after this macro finishes.
%
-% Otherwise, i.e., if $P\notin\Set{\cs{pcol@op@}{\cdot}f}{f\in{}F}$ and
-% $P>\mppush$, we simply invokes \LaTeX's \!\@specialoutput!\footnote{
+% \hfuzz9pt
+% Otherwise, i.e., if $P\notin\Set{\cs{pcol@op@}{\cdot}f}{f\in{}F}$,
+% we simply invokes \LaTeX's \!\@specialoutput!\footnote{
% 
% With footnote logging if $\cs{outputpenalty}=-10004$.}.
% 
@@ -9841,20 +10078,8 @@
\let\reserved@a\pcol@output@clear
\else\ifnum\outputpenalty=\pcol@op@end\relax
\let\reserved@a\pcol@output@end
- \else\ifnum\outputpenalty=\pcol@op@cpush\relax
- \let\reserved@a\pcol@output@cpush
- \else\ifnum\outputpenalty=\pcol@op@cpop\relax
- \let\reserved@a\pcol@output@cpop
- \else\ifnum\outputpenalty=\pcol@op@cset\relax
- \let\reserved@a\pcol@output@cset
- \else\ifnum\outputpenalty<\pcol@op@mcpop@pone\relax
- \advance\outputpenalty\pcol@op@mcpop\relax \@tempcnta-\outputpenalty
- \let\reserved@a\pcol@output@mcpop
- \else\ifnum\outputpenalty<\pcol@op@mcpush@pone\relax
- \advance\outputpenalty\pcol@op@mcpush\relax \@tempcnta-\outputpenalty
- \let\reserved@a\pcol@output@mcpush
\else \let\reserved@a\@specialoutput
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi\fi\fi\fi\fi
\ifnum\outputpenalty=-\@Miv\relax
\ifvoid\footins\else \pcol@Log\dummy{dummy}\footins \fi
\fi
@@ -9865,7 +10090,8 @@
\fi
\reserved@a}
-% \end{macrocode} \end{macro}
+% \end{macrocode}
+% \end{macro}
%
%
%
@@ -9899,7 +10125,7 @@
% \string\texttt{paracol} envrionments.}
% \changes{v1.32-3}{2015/10/10}
% {Add depth clearing of imported deferred floats in case that some of
-% them has \texttt{1sp}.}
+% them has \texttt{1sp}.}
% 
% The macro \!\pcol@output@start! is invoked solely from
% \!\pcol@specialoutput! to process the special \!\output! request made in
@@ -9908,12 +10134,12 @@
% {\em\Uidx\preenv} in short. First, we turn
% $\CSIndex{ifpcol@output}=\true$ so that \!\output! requests for page
% breaks are processed by our own macros such as \!\pcol@makecol! hereafter.
-% Then we let $p=\pbase={\ptop}=0$ and $\PP=()$ because we have nothing for
-% $q<\ptop=0$. We also move \!\@deferlist! to \!\@dbldeferlist! and then
-% let \!\@deferlist! be empty because all \cwise{} dererred floats become
-% \pwise{}. In this float importation, as discussed in
+% Then we let $p=\pbase={\ptop}=0$ and $\PP=\emptyset$ because we have
+% nothing for $q<\ptop=0$. We also move \!\@deferlist! to \!\@dbldeferlist!
+% and then let \!\@deferlist! be empty because all \cwise{} dererred floats
+% become \pwise{}. In this float importation, as discussed in
% item-(\ref{item:ovv-float-@output@start}) of
-% Section~\ref{sec:imp-ovv-float}, we force all floats in the list have
+% \secref{sec:imp-ovv-float}, we force all floats in the list have
% depth 0 to ensure no one has |1sp| to conform our own and old-fashioned
% \pwise{} float placement mechanism\footnote{
% 
@@ -9940,13 +10166,22 @@
% \!\@outputbox!. Then the box is passed to \!\@outputbox! for which we
% temporarily let $\CSIndex{ifpcol@output}=\false$ because the page is
% assumed to be outside the \env{paracol} environment having just started.
-% After that we invoke \!\pcol@startpage! for the \spage{} $\ptop=0$ letting
-% $\pp(0)$ be empty so that the macro will not refer to it. We also let
-% $\!\topskip!=\!\pcol@topskip!$ being the value at \beginparacol, and
-% $\CSIndex{ifpcol@firstpage}={\false}$, because we have the \spage{}
+%
+% After that we invoke \!\pcol@startpage! to let it produce $\pp(\ptop)$ for
+% the \spage{} $\ptop=0$ letting $\!\pcol@currpage!$ be empty so that the
+% macro will not refer to it. The page $\pp(0)$ is usually empty but can
+% have non-empty $\pp^i(0)$ with imported deferred floats which are now
+% \pwise. Moreover, we can have two or more pages if deferred \pwise{}
+% floats produce \fpage{s}. However, we can be unaware of these effects of
+% floats because the resulting $\PP^+$ with them is correct of course.
+%
+% Then let $\!\topskip!=\!\pcol@topskip!$ being the value at \beginparacol,
+% and $\cs{ifpcol@}\~|firstpage|={\false}$, because we have the \spage{}
% without \preenv{} and thus the first item of each column will be at its
% top.
% 
+% \CSINDEX{ifpcol@firstpage}
+% 
% \begin{macrocode}
%% Special Output Routines: Building First Page
@@ -10004,27 +10239,39 @@
% together with \!\topskip! to inhibit the ordinary \!\topskip! insertion.
%
% As for $\pp^m(0)$, we define it as follows, referring to
-% $\mpbout=\!\pcol@mparbottom@out!$ possibly having the positions of the
-% last marginal notes in the last \env{paracol} environment in the page we
-% are working on, and to $B=\!\@mparbottom!$ having the bottom edge of the
+% $\mpbout=\!\pcol@mparbottom@out!=\{\mpb_L^l,\mpb_L^r,\mpb_R^l,\mpb_R^r\}$,
+% where $\mpb_X^x$ has exactly one element $\mpar(h,t)$ which may be the
+% position of last marginal notes in the last \env{paracol} environment in
+% the page we are working on, or $\mpb_X^x=\{\mpar(0,0)\}$ if such marginal
+% note or the environment itself does not exist in the page. On the other
+% hand, $B=\!\@mparbottom!$ may have non-zero for the bottom edge of the
% last marginal note in \preenv{} including the last \env{paracol}
-% environment if any. First we \!\def!fine $\!\pcol@do@mpbout@whole!
-% \<\mpb_L^l\>\<\mpb_L^r\>\<\mpb_R^l\>\<\mpb_R^r\>$ so that it redefines
-% $\mpbout$ to let it have the arguments in the body, and \!\def!ine
-% $\!\pcol@do@mpbout@elem!\@elt\Arg{t}\Arg{b}$ to let it have
-% $\!\@elt!\Arg{0}\Arg{B}$ to be replaced with $\mpb_L^l$ or $\mpb_L^r$ in
-% $\mpbout$. Second, we invoke \!\pcol@do@mpbout! to update $\mpbout$ with
-% the replacement using two macros above. Third and finally, we invoke
-% \!\pcol@bias@mpbout! giving it $-h$ to replace each $\mpar(t,b)$ in each
-% element $\mpb_{\{L,R\}}^{\{l,r\}}$ in $\mpbout$, which we let $\pp^m(0)$
-% have shortly, with $\mpar(t-h,b-h)$. This replacement transforms the
-% coordinates for text area to that for columns and make it possible the
-% first marginal note in each margin to exploit the space for \preenv{} if
-% it is tall extraordinarily.
-%
-% Then we let $\pp(0)$ have those elements shown above and
+% environment if any. Therefore, what we need to do is to let
+% $\mpb_L^x=\{\mpar(0,B)\}$ to reflect the marginal node whose bottom is at
+% $B$ and which can be different from what $\mpb_L^x$ had, where $x$ is the
+% target margin in the \preenv{} determined by \CSIndex{if@mparswitch}, the
+% parity of $\page(0)$ and \CSIndex{if@reversemargin}.
+%
+% The replacement is done by \!\pcol@do@mpbout! which invokes
+% $\!\pcol@do@mpbout@whole!\arg{m_L^l}\~\arg{m_L^r}\arg{\mpb_R^l}\arg{\mpb_R^r}$
+% where $m_L^x\in\{M_L^x,\,\!\pcol@do@mpbout@elem!\arg{M_L^x}\}$ whose choice
+% is made according that $x\in\{l,r\}$ is the target margin (latter) or not
+% (former). Therefore, prior to the invocation of \!\pcol@do@mpbout!, we
+% \!\def!fine \!\pcol@do@mpbout@whole! so that it \!\xdef!ines
+% $\mpbout=\!\pcol@mparbottom@out!$ with its four arguments, and
+% \!\pcol@do@mpbout@elem! to let it be expanded to
+% $\!\@elt!\Arg{0}\Arg{B}=\mpar(0,B)$. After that, we also invoke
+% \!\pcol@bias@mpbout! giving it $-h$ to replace $\mpar(t,b)$ being the sole
+% element of each $\mpb_{\{L,R\}}^{\{l,r\}}$ in the resulting $\mpbout$ with
+% $\mpar(t-h,b-h)$ to have what we give to $\pp^m(0)$. This replacement
+% transforms the coordinates for text area to that for columns, and makes it
+% possible for the first marginal note in each margin in the \env{paracol}
+% environment we now start to exploit the space for \preenv{} even if it is
+% tall extraordinarily.
+%
+% Then we let $\pp(0)$ have $\pp^i(0)$ and $\pp^m(0)$ shown above, and
% $\pp^p(0)=\!\c@page!$, $\pp^f(0)=\bot$ and $\pp^s(0)=\emptyset$ by
-% \!\pcol@defcurrpage!, and $\CSIndex{ifpcol@firstpage}=\true$ because
+% \!\pcol@defcurrpage!, and let $\CSIndex{ifpcol@firstpage}=\true$ because
% $\pp^b(0)$ has \preenv.
% 
% \changes{v1.3-6}{2013/09/17}
@@ -10104,11 +10351,12 @@
% Then we invoke \!\pcol@setcurrcolnf! to save the following values for
% $\cc_c(e)$ ($e\neq\vb$); $\cc_c(\ft)=\!\voidb@x!$ because $c$ does not
% have \Mcfnote{}s so far; $\cc_c(\pd)=\!\prevdepth!$ as discussed above;
-% $\cc_c(\tl)=\cc_c(\ml)=\cc_c(\bl)=()$ because \!\pcol@makenormalcol! and
-% \!\@combinefloats! invoked from it emptied them; $\cc_c(\dl)=()$ as
-% discussed above; $\cc_c(\tn)=\!\c@topnumber!$,
-% $\cc_c(\bn)=\!\c@botnumber!$ and $\cc_c(\tn)=\!\c@totalnumber!$ as
-% initialized by \!\@floatplacement! invoked from \!\pcol@floatplacement!;
+% $\cc_c(\tl)=\cc_c(\ml)=\cc_c(\bl)=\emptyset$ because
+% \!\pcol@makenormalcol! and \!\@combinefloats! invoked from it emptied
+% them; $\cc_c(\dl)=\emptyset$ as discussed above;
+% $\cc_c(\tn)=\!\c@topnumber!$, $\cc_c(\bn)=\!\c@botnumber!$ and
+% $\cc_c(\tn)=\!\c@totalnumber!$ as initialized by \!\@floatplacement!
+% invoked from \!\pcol@floatplacement!;
% $\cc_c(\tr)=\!\topfraction!\times\!\@colht!$ and
% $\cc_c(\br)=\!\bottomfraction!\times\!\@colht!$ as initialized by
% \!\@floatplacement!; $\cc_c(\sw)$ is defined by \CSIndex{if@nobreak} and
@@ -10119,13 +10367,25 @@
% at the time of \beginparacol; and
% $\cc_c(\ep)=\!\everypar!$ at the time of \beginparacol. We also let
% $\cc_c(\vb^p)=0$ because $p=0$ and $\cc_c(\vb^r)=\!\@colroom!$ defined
-% above. In addition, we let $\S_c=\phi$ because we don't have any
+% above. In addition, we let $\S_c=\emptyset$ because we don't have any
% \colpage{} having been completed.
+%
+% \SpecialArrayIndex{c}{\pcol@columncolor}
+% \SpecialArrayIndex{c}{\pcol@columncolor@box}
+% We also examine if $\Celtshadow^c=\cs{pcol@columncolor}\cdot c$ is defined
+% and, if so, acquire an \!\insert! from \!\@freelist! to let
+% $\Celt^c=\cs{pcol@columncolor@box}\cdot c$ have the coloring \!\special!
+% for the color defined in $\Celtshadow^c$ by invoking \!\pcol@set@color!
+% being the origina \!\set@color! with nullification of \!\aftergroup!.
+% Otherwise, we let $\Celt^c=\bot$ .
% 
% \changes{v1.0}{2011/10/10}
% {Add clearing of $S_c$.}
% \changes{v1.32-2}{2015/10/10}
% {Add \cs{pcol@Fb}/\cs{pcol@Fe} pair(s).}
+% \changes{v1.34}{2018/05/07}
+% {Add initialization of
+% $\gamma_0^c\EQ\cs{pcol@columncolor@box}\cdot c$.} 
% 
% \begin{macrocode}
\global\@colroom\@colht \pcol@floatplacement
@@ -10138,6 +10398,12 @@
\global\count\@currbox\z@
\global\dimen\@currbox\@colroom
\expandafter\gdef\csname pcol@shipped\number\pcol@currcol\endcsname{}%
+ \pcol@ifccdefined
+ {\@next\@currbox\@freelist{\global\setbox\@currbox\vbox{%
+ \def\current@color{\pcol@ccuse{}}\let\aftergroup\@gobble
+ \pcol@set@color}}\pcol@ovf}%
+ {\def\@currbox{\voidb@x}}%
+ \pcol@ccxdef{\@currbox}%
\advance\pcol@currcol\@ne}%
% \end{macrocode}
%
@@ -10157,15 +10423,16 @@
% parameters in $\cc_0$ by \!\pcol@getcurrcol!. Then before putting
% $\cc_0(\vb^b)$ to the main vertical list by \!\unvbox! returning
% $\cc_0(\vb)$ to \!\@freelist! by \!\@cons! because it has become useless
-% so far, we save the \colorctext{} just with $\Celt^0$ into $\csts$ by
-% \!\pcol@savecolorstack!. Then we \!\insert! \!\footins! through itself to
-% the main vertical list if it is not $\bot$ and thus has footnotes to be
-% \mgfnote{}. This \!\insert!ion is different from other footnote
-% \!\insert!ion because \!\footins! is not \!\unvbox!ed but is put as a
-% whole and is followed by \!\penalty!\!\interlinepenalty!, so that
-% footnotes will not be broken by \TeX's page builder to prevent the
-% reconnection of a broken footnote with innapropriate glue discarding,
-% which we will discuss in \secref{sec:imp-fnote}.
+% so far, we save the \colorctext{} just with $\Celt^c$ into $\csts$ by
+% \!\pcol@savecolorstack! because $\CST$ is emptied by \!\pcol@zparacol!.
+% Then we \!\insert! \!\footins! through itself to the main vertical list if
+% it is not $\bot$ and thus has footnotes to be \mgfnote{}. This
+% \!\insert!ion is different from other footnote \!\insert!ion because
+% \!\footins! is not \!\unvbox!ed but is put as a whole and is followed by
+% \!\penalty!\!\interlinepenalty!, so that footnotes will not be broken by
+% \TeX's page builder to prevent the reconnection of a broken footnote with
+% innapropriate glue discarding, which we will discuss in
+% \secref{sec:imp-fnote}.
% 
% \begin{macrocode}
\global\pcol@currcol\z@
@@ -10314,6 +10581,9 @@
% \cs{pcol@defcurrpage}.}
% \changes{v1.32-2}{2015/10/10}
% {Add \cs{pcol@Fb}/\cs{pcol@Fe} pair(s).}
+% \changes{v1.33-2}{2016/11/19}
+% {Let \cs{dimen@} have the height of \cs{pcol@prespan} if it is not
+% $\bot$, or 0 if $\bot$ for the sake of clarity.}
% 
% The macro \!\pcol@output@switch! is invoked from
% \!\pcol@specialoutput! to process the special \!\output! request made in
@@ -10324,21 +10594,30 @@
%
% First, we examine if the \cswitch{} is to close a \mctext, i.e.,
% $\CSIndex{ifpcol@sptext}={\true}$ and $c=0$, and if so we do the
-% followings; add the height of \!\pcol@prespan! having \prespan{} to
-% \!\@colroom! which we temporarily shrank when the \mctext{} starts unless
-% the box is void to mean we have had a page break in the \mctext; add an
-% elemnent $\spt(H,h)$ to the tail of $\pp^s(\ptop)=\!\pcol@sptextlist!$ by
-% \!\pcol@getcurrpage! and \!\pcol@defcurrpage!, where $H$ is the height of
-% \!\pcol@prespan! plus the total height of top floats measured by
-% \!\pcol@addflhd!, and $h$ is the height-plus-depth of \!\@holdpg! having
-% (a part of) \mctext, represented in the form of integers and thus expanded
-% with \!\number!; shift \!\@holdpg! left by \!\pcol@shiftspanning! if
-% the column-0 is not the leftmost due to \cswap; and then put \prespan{}
-% and (maybe shifted) \!\@holdpg! into \!\@holdpg! itself so as to let
-% \!\@holdpg! have everything in the \colpage{} 0 as usual. Note that we
-% perform these operations at the first \cswitch{} for \cscan{}ing from
-% $c=0$ with $\CSIndex{ifpcol@sptext}=\true$, i.e., not for \sync{}ation
-% taking place afterword as explained shortly.
+% following; let $h_p$ be the height of \!\pcol@prespan! having \prespan{}
+% if it is not $\bot$, or 0 if $\bot$ to mean we have had a page break in
+% the \mctext; add $h_p$ to \!\@colroom! which we temporarily shrank when
+% the \mctext{} starts; add an elemnent $\spt(H,h)$ to the tail of
+% $\pp^s(\ptop)=\!\pcol@sptextlist!$ by \!\pcol@getcurrpage! and
+% \!\pcol@defcurrpage!, where $H$ is $h_p$ plus the total height of top
+% floats measured by \!\pcol@addflhd!, and $h$ is the height-plus-depth of
+% \!\@holdpg! having (a part of) \mctext, represented in the form of
+% integers and thus expanded with \!\number!; shift \!\@holdpg! left by
+% \!\pcol@shiftspanning! if the column-0 is not the leftmost due to \cswap;
+% and then put \prespan{} and (maybe shifted) \!\@holdpg! into \!\@holdpg!
+% itself so as to let \!\@holdpg! have everything in the \colpage{} 0 as
+% usual.
+%
+% Note that it can be $\!\pcol@prespan!=\bot$ if \mctext{} had a page break
+% (or multiple ones) in it as shown above. This empty \prespan{}, however,
+% does not always means that we have no top floats because the page break in
+% the \mctext{} can produce a \colpage{} with top floats which are deferred
+% from the previous page(s), or though unlikely the \mctext{} itself has
+% float environments. Therefore, the measurement of the total height of top
+% floats are always necessary. Also note that we perform these operations
+% at the first \cswitch{} for \cscan{}ing from $c=0$ with
+% $\CSIndex{ifpcol@sptext}=\true$, i.e., prior to the \sync{}ation itself
+% which takes place afterword, as explained shortly.
%
% Then regardless of the operations above, we acquire an \!\insert! from
% \!\@freelist! by \!\@next! for $\cc_c(\vb)$ to store the \ccolpage{} in
@@ -10379,10 +10658,11 @@
\def\pcol@output@switch{%
\ifpcol@sptext\ifnum\pcol@currcol=\z@
- \ifvoid\pcol@prespan\else \global\advance\@colroom\ht\pcol@prespan \fi
+ \ifvoid\pcol@prespan \dimen@\z@ \else \dimen@\ht\pcol@prespan \fi
+ \global\advance\@colroom\dimen@
+ \pcol@addflhd\@toplist\pcol@textfloatsep
\pcol@getcurrpinfo\@tempcnta\@tempdima\@tempskipa
\@tempdimb\ht\@holdpg \advance\@tempdimb\dp\@holdpg
- \dimen@\ht\pcol@prespan \pcol@addflhd\@toplist\pcol@textfloatsep
\@cons\pcol@sptextlist{{\number\dimen@}{\number\@tempdimb}}%
\pcol@defcurrpage{\number\@tempcnta}\pcol@spanning\pcol@footins
{\pcol@sptextlist}{\pcol@mparbottom}%
@@ -10442,9 +10722,22 @@
% \mctext. Also note that, as mentioned in the explanation of the first
% examination at the beginning of this macro, we perform these operations at
% the first \cswitch{} for \cscan{}ning from $c=0$ with
-% $\CSIndex{ifpcol@sptext}=\true$, i.e., not for \sync{}ation taking place
-% afterward, so that the \cscan{} will not insert penalties to allow page
-% break inappropriately if $\CSIndex{if@nobreak}={\true}$.
+% $\CSIndex{ifpcol@sptext}=\true$ prior to the \sync{ation} following the
+% \mctext. This means, if $\CSIndex{if@nobreak}={\true}$,
+% $\!\penalty!=10000$ is inserted at the top and bottom end of the space for
+% \mctext{} in the columns such that $c\neq0$, the former by this \cscan{}
+% and the latter by the \cswitch{} to $c$ made after the synchronization.
+% Therefore, if our \sync{ation} mechanism and \TeX's page builder once
+% agreed both end can be in a page, both end will not chosen as page
+% break points\footnote{
+% 
+% As for $c=0$, its top end of \mctext{} is a feasible break point to make
+% the penalty insertion asymmetric. Therefore, we need to reinvestigate if
+% the condition of the broadcast is really appropriate, and, if
+% inappropriate, have to go back to the old implementation in which
+% \cs{ifpcol@sync} is included in the condition. Otherwise, if proved
+% appropriate, we will have to consider to make the penalty insertion
+% symmetric by adding \cs{nobreak} at the top of \mctext{} in $c=0$.}.
% 
% \changes{v1.0}{2011/10/10}
% {Restrict the broadcast of \cs{if@nobreak} and \cs{everypar} only
@@ -10883,6 +11176,13 @@
% \changes{v1.3-1}{2013/09/17}
% {Renamed from \cs{pcol@restorecst@restart} and the operations to
% save pre-spanning-text stuff is added.}
+% \changes{v1.33-2}{2016/11/19}
+% {Add {\tt\%} to the end of the line to open \cs{vbox} for
+% \cs{pcol@prespan} to obey the coding convention.}
+% \changes{v1.34}{2018/05/07}
+% {Change nullification of
+% $\mathit{\Gamma}_s\EQ\cs{pcol@colorstack@saved}$ from \cs{gdef} to
+% \cs{box}-assignment of $\bot$ because it is now a \cs{vbox}.}
% 
% The macro \!\pcol@putbackmvl!, solely used in
% \!\pcol@restartcolumn!, has two functions; \colorstack{} restoration and
@@ -10892,27 +11192,36 @@
% \!\pcol@savecolorstack! as the opening \colorctext{} of the \colpage{},
% and \!\pcol@prespan! for \prespan{} is made $\bot$.
%
-% Otherwise, $\csts$ is nullified because the opening \colorctext{} has
+% Otherwise, $\csts$ is let $\bot$ because the opening \colorctext{} has
% already been put when we left from the \colpage{}. Then if
% $\CSIndex{ifpcol@sptextstart}=\true$ to mean a \mctext{} is to start, we
% save $\cc_c(\vb)$ into \!\pcol@prespan! adding the colorling \!\special!s
-% to restore \colorctext{} from $\CST^c$ by \!\pcol@restorecolorstack!. We
-% also shrink $\cc_c(\vb^r)=\!\@colroom!$ by the height of the \prespan{} so
-% that \mctext{} will be captured by \!\pcol@makecol! if it is broken into
-% two (or more) pages, and put a invisible \!\hrule! to the main vertical
-% list letting $\!\topskip!=0$ to supress \!\topskip! insertion prior to the
-% \mctext{} but instead to make the text led by \!\baselineskip! (or
-% \!\lineskip!) according to the \!\prevdepth! being the depth of the
-% tallest column and the height of the first \!\hbox! in the \mctext.
-% Otherwise, i.e., if $\CSIndex{ifpcol@sptextstart}=\false$, we simply put
-% back $\cc_c(\vb)$ into the main vertical list and then the coloring
-% \!\special!s by \!\pcol@restorecolorstack!.
+% to restore \colorctext{} from $\CST^c$ by
+% \!\pcol@restorecolorstack!\footnote{
+% 
+% If \cs{pcol@prespan} is connected to (the first part of) the \mctext,
+% the reestablishment of the \colorstack{} here correctly places coloring
+% \cs{special}s in \texttt{.dvi}. On the other hand, if the \mctext{} is
+% slown away to the next page as a whole, the reestablishment here is
+% essential for the correct paring of the pushes and pops, the latter of
+% which are at the bottom of the \colpage{} whose tail is \cs{pcol@prespan}.}.
+% 
+% We also shrink $\cc_c(\vb^r)=\!\@colroom!$ by the height of the \prespan{}
+% so that \mctext{} will be captured by \!\pcol@makecol! if it is broken
+% into two (or more) pages, and put a invisible \!\hrule! to the main
+% vertical list letting $\!\topskip!=0$ to supress \!\topskip! insertion
+% prior to the \mctext{} but instead to make the text led by
+% \!\baselineskip! (or \!\lineskip!) according to the \!\prevdepth! being
+% the depth of the tallest column and the height of the first \!\hbox! in
+% the \mctext. Otherwise, i.e., if $\CSIndex{ifpcol@sptextstart}=\false$,
+% we simply put back $\cc_c(\vb)$ into the main vertical list and then the
+% coloring \!\special!s by \!\pcol@restorecolorstack!.
%
% Note that $\CSIndex{ifpcol@sptextstart}$ is temporarily made $\false$ by
% this macro if the \!\pcol@output@switch! invoking \!\pcol@restartcolumn!
% did not make \sync{}ed \cswitch{}, i.e., if $\CSIndex{ifpcol@flush}=\true$
% to mean the page is flushed before the \sync{}ation, or
-% $\CSIndex{pcol@sync}=\false$ for \cscan{}ning prior to the \sync{}ation.
+% $\CSIndex{ifpcol@sync}=\false$ for \cscan{}ning prior to the \sync{}ation.
% 
% \begin{macrocode}
\def\pcol@putbackmvl{%
@@ -10921,9 +11230,9 @@
\pcol@ifempty\@currbox
{\pcol@savecolorstack
\ifpcol@sptextstart \global\setbox\pcol@prespan\box\voidb@x \fi}%
- {\gdef\pcol@colorstack@saved{}%
+ {\global\setbox\pcol@colorstack@saved\box\voidb@x
\ifpcol@sptextstart
- \global\setbox\pcol@prespan\vbox{
+ \global\setbox\pcol@prespan\vbox{%
\unvbox\@currbox \pcol@restorecolorstack}%
\global\advance\@colroom-\ht\pcol@prespan
\global\topskip\z@ \hrule\@height\z@\@width\z@
@@ -10947,156 +11256,78 @@
% {Move commands outside \cs{output} routine to the newly introduced
% section ``Commands for Text Coloring'' to distinguish
% macros inside and outside \cs{output} routine.}
-%
-% \KeepSpace{2}
-% \begin{macro}{\pcol@output@cpush}
% \changes{v1.22}{2013/06/30}
-% {Introduced for color stack pushing.}
-% \begin{macro}{\pcol@output@icpush}
+% {\cs{pcol@output@cpush} was introduced for color stack pushing but
+% removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@output@cpush} is removed according to the change of text
+% coloring from \cs{output} to \cs{insert}.}
% \changes{v1.22}{2013/06/30}
-% {Introduced to implement \cs{pcol@output@cpush}.}
-% \begin{macro}{\pcol@output@mcpush}
+% {\cs{pcol@output@icpush} was introduced to implement
+% \cs{pcol@output@cpush} but removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@output@icpush} is removed according to the change of text
+% coloring from \cs{output} to \cs{insert}.}
% \changes{v1.24}{2013/07/27}
-% {Introduced for coloring specified in math mode.}
-% \begin{macro}{\pcol@output@imcpush}
+% {\cs{pcol@output@mcpush} was introduced for coloring specified in
+% math mode but removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@output@mcpush} is removed according to the change of text
+% coloring from \cs{output} to \cs{insert}.}
% \changes{v1.24}{2013/07/27}
-% {Introduced for coloring specified in math mode.}
-% 
-% The macro \!\pcol@output@cpush! and its math-mode relative
-% \!\pcol@output@mcpush! are invoked solely from
-% \!\pcol@specialoutput! to process the \!\output! requests
-% \!\pcol@op@cpush! and $\mppush-i$ respectively for \colorstack{} pushing.
-% The former macro \!\pcol@output@cpush! removes the first element from
-% $\cstb$ and pushes it into $\cst$ by \!\pcol@output@icpush!. The latter
-% macro \!\pcol@output@mcpush! invokes $|\pcol@reset@color@mpop@|{\cdot}i$,
-% 
-% \SpecialArrayIndex{i}{\pcol@reset@color@mpop@}
-% 
-% whose body is $\!\pcol@reset@color@mpop!\Arg{i}\Arg{\mcelt_i}$ which is
-% temporarily redefined as \!\pcol@output@imcpush! to
-% push $\mcelt_i$ to $\cst=\!\pcol@colorstack!$, and to append $i$ to
-% $\mplist=\!\pcol@colorstack@mpushed!$ so that corresponding popper
-% \!\pcol@output@mcpop! for $i$ finds $i\in\mplist$.
-% 
-% \begin{macrocode}
-%% Special Output Routines: Color Management
-
-\def\pcol@output@cpush{%
- \expandafter\pcol@output@icpush\pcol@colorstack@buf\@nil
- \pcol@return@from@color}
-\def\pcol@output@icpush\@elt#1#2\@nil{%
- \@cons\pcol@colorstack{{#1}}\gdef\pcol@colorstack@buf{#2}}
-\def\pcol@output@mcpush{\begingroup
- \let\pcol@reset@color@mpop\pcol@output@imcpush
- \@nameuse{pcol@reset@color@mpop@\number\@tempcnta}%
- \endgroup
- \pcol@return@from@color}
-\def\pcol@output@imcpush#1#2{%
- \@cons\pcol@colorstack{{#2}}%
- \@cons\pcol@colorstack@mpushed{{#1}}}
-
-% \end{macrocode}
-% \end{macro}\end{macro}\end{macro}\end{macro}
-%
-% \KeepSpace{2}
-% \begin{macro}{\pcol@output@cpop}
+% {\cs{pcol@output@imcpush} was introduced for coloring specified in
+% math mode but removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@output@imcpush} is removed according to the change of text
+% coloring from \cs{output} to \cs{insert}.}
% \changes{v1.22}{2013/06/30}
-% {Introduced for color stack popping.}
-% \begin{macro}{\pcol@reset@color@elt}
+% {\cs{pcol@output@cpop} was introduced for color stack popping but
+% removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@output@cpop} is removed according to the change of text
+% coloring from \cs{output} to \cs{insert}.}
% \changes{v1.2-1}{2013/05/11}
-% {Introduced to implement \cs{pcol@reset@color@pop}.}
+% {\cs{pcol@reset@color@elt} was introduced to implement
+% \cs{pcol@reset@color@pop} but removed in v1.34.}
% \changes{v1.22}{2013/06/30}
-% {Moved from the position where \cs{pcol@reset@color@pop} is defined
-% because it is now used only by \cs{pcol@output@cpop}.}
-% \begin{macro}{\pcol@output@mcpop}
+% {\cs{pcol@reset@color@elt} was moved from the position where
+% \cs{pcol@reset@color@pop} was defined
+% because it became to be used only by \cs{pcol@output@cpop}, but
+% removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@reset@color@elt} is removed according to the change of text
+% coloring from \cs{output} to \cs{insert}.}
% \changes{v1.24}{2013/07/27}
-% {Introduced for coloring specified in math mode.}
-% \begin{macro}{\pcol@output@mcpop@elt}
+% {\cs{pcol@output@mcpop} was introduced for coloring specified in
+% math mode but removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@output@mcpop} is removed according to the change of text
+% coloring from \cs{output} to \cs{insert}.}
% \changes{v1.24}{2013/07/27}
-% {Introduced for coloring specified in math mode.}
-% 
-% The macro \!\pcol@output@cpop! is invoked by \!\pcol@specialoutput!
-% to process the \!\output! request \!\pcol@op@cpop! for popping the
-% \colorstack{} $\cst$. To do that, we temporarily make $\cst$ empty and
-% then scan its copy by \!\pcol@reset@color@elt! to add each element to the
-% tail of $\cst$ until the last element is found. The macro
-% \!\pcol@output@cpop! is also used in its math-mode counterpart
-% \!\pcol@output@mcpop! solely invoked from \!\pcol@specialoutput! with
-% $\!\outputpenalty!=\mppop-i$, if $i\in\mplist=\!\pcol@colorstack@mpushed!$
-% is confirmed by scanning $\mplist$ with \!\pcol@output@mcpop@elt! to mean
-% the counterpart push has been processed by \!\pcol@output@mcpush!.
-% 
-% \begin{macrocode}
-\def\pcol@output@cpop{\begingroup
- \let\reserved@a\pcol@colorstack
- \gdef\pcol@colorstack{}\let\@elt\pcol@reset@color@elt
- \reserved@a\@elt\@nil
- \endgroup
- \pcol@return@from@color}
-\def\pcol@reset@color@elt#1\@elt#2{\def\reserved@b{#2}%
- \ifx\reserved@b\@nnil \let\reserved@b\relax
- \else \@cons\pcol@colorstack{{#1}}\def\reserved@b{\@elt{#2}}%
- \fi
- \reserved@b}
-\def\pcol@output@mcpop{\begingroup
- \let\@elt\pcol@output@mcpop@elt \@tempswafalse
- \pcol@colorstack@mpushed
- \if@tempswa \global\let\@gtempa\pcol@output@cpop
- \else \global\let\@gtempa\pcol@return@from@color
- \fi
- \endgroup
- \@gtempa}
-\def\pcol@output@mcpop@elt#1{\ifnum#1=\@tempcnta \@tempswatrue \fi}
-
-% \end{macrocode}
-% \end{macro}\end{macro}\end{macro}\end{macro}
-%
-% \begin{macro}{\pcol@output@cset}
+% {\cs{pcol@output@mcpop@elt} was introduced for coloring specified in
+% math mode but removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@output@mcpop@elt} is removed according to the change of text
+% coloring from \cs{output} to \cs{insert}.}
% \changes{v1.22}{2013/06/30}
-% {Introduced to set $\gamma_0^c$.}
-% \begin{macro}{\pcol@output@icset}
+% {\cs{pcol@output@cset} was introduced to set $\gamma_0^c$ but
+% removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@output@cset} is removed according to the change of text
+% coloring from \cs{output} to \cs{insert}.}
% \changes{v1.22}{2013/06/30}
-% {Introduced to implement \cs{pcol@output@cset}.}
-% 
-% The macro \!\pcol@output@cset!, invoked solely from \!\pcol@specialoutput!
-% to process the \!\output! request \!\pcol@op@cset!, lets
-% $\Celt^c=\cs{pcol@columncolor}{\cdot}c$
-% 
-% \SpecialArrayIndex{c}{\pcol@columncolor}
-% 
-% have the first element of $\cstb$ by \!\pcol@output@icset!.
-% 
-% \begin{macrocode}
-\def\pcol@output@cset{%
- \expandafter\pcol@output@icset\pcol@colorstack@buf\@nil
- \pcol@return@from@color}
-\def\pcol@output@icset\@elt#1#2\@nil{{\let\@elt\relax
- \expandafter\xdef\csname pcol@columncolor\number\pcol@currcol\endcsname{%
- \@elt{#1}}%
- \gdef\pcol@colorstack@buf{#2}}}
-
-% \end{macrocode}
-% \end{macro}\end{macro}
-%
-% \begin{macro}{\pcol@return@from@color}
+% {\cs{pcol@output@icset} was introduced to implement
+% \cs{pcol@output@cset} but removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@output@icset} is removed according to the change of text
+% coloring from \cs{output} to \cs{insert}.}
% \changes{v1.22}{2013/06/30}
-% {Introduced to implement \cs{pcol@output@cpush},
-% \cs{pcol@output@cpop} and \cs{pcol@output@cset}.}
-% 
-% The macro \!\pcol@return@from@color! is invoked from macros for coloring
-% \!\output! request being \!\pcol@output@cpush!, \!\pcol@output@mcpush!,
-% \!\pcol@output@cpop!, \!\pcol@output@mcpop! and \!\pcol@output@cset!. The
-% macro puts the contents of \!\@holdpg! back to the main vertical list,
-% puts \!\footins! as well by \!\@reinserts!, and adds a penalty of 10000 or
-% \!\interlinepenalty! acoording to \CSIndex{if@nobreak}, to pretend as if
-% the building process of main vertical list were not interrupted.
-% 
-% \begin{macrocode}
-\def\pcol@return@from@color{\unvbox\@holdpg \@reinserts
- \if@nobreak\nobreak \else\addpenalty\interlinepenalty \fi}
-
-% \end{macrocode}
-% \end{macro}
+% {\cs{pcol@return@from@color} was introduced to implement
+% \cs{pcol@output@cpush}, \cs{pcol@output@cpop} and
+% \cs{pcol@output@cset} but removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@return@from@color} is removed according to the change of
+% text coloring from \cs{output} to \cs{insert}.}
%
% \begin{macro}{\pcol@magicpenalty}
% \begin{macro}{\pcol@ifempty}
@@ -11119,6 +11350,8 @@
% otherwise, $\!\@gtempa!=\!\pcol@magicpenalty!$ iff $\arg{box}$ is empty.
% 
% \begin{macrocode}
+%% Special Output Routines: Color Management
+
\def\pcol@magicpenalty{12345}
\def\pcol@ifempty#1#2#3{%
\setbox\@tempboxa\vbox{\penalty\pcol@magicpenalty
@@ -11138,122 +11371,352 @@
% \begin{macro}{\pcol@clearcolorstack}
% \changes{v1.2-1}{2013/05/11}
% {Introduced to clear color context.}
+% \changes{v1.34}{2018/05/07}
+% {Completely change its definition according to the new text coloring
+% with \cs{insert}.}
% 
% The macro \!\pcol@clearcst@unvbox!$\arg{box}$, invoked from \!\pcol@opcol!
-% and \!\pcol@output@switch!, puts the followings above and below
+% and \!\pcol@output@switch!, puts the following above and below
% $\arg{box}$ containing the main vertical list of a \colpage{} from which
% we are now leaving, if \!\pcol@ifempty! judges that $\arg{box}$ is not
% empty. Above the $\arg{box}$, we put coloring \!\special!s to establish
% the \colorstack{} of |.dvi| saved in $\csts=\!\pcol@colorstack@saved!$ by
% \!\pcol@restorecst! as the opening \colorctext{} of the \colpage{}. The
-% stack $\csts$, however, can be empty if $\arg{box}$ already has the
-% \!\special!s, i.e., when we visited the \colpage{} it had already had
+% stack $\csts$, however, can be $\bot$ if $\arg{box}$ already has the
+% \!\special!s, i.e., when we visit the \colpage{} it had already had
% some items. Below $\arg{box}$, on the other hand, we put uncoloring
-% \!\special!s by \!\pcol@clearcolorstack! to rewind $\CST^c$ to clear the
+% \!\special!s by \!\pcol@clearcolorstack! to rewind $\CSTraw^c$ to clear the
% \colorctext{} of the \colpage{} in |.dvi| temporarily so that afterward it
% is made consistent with that in |.tex|.
%
-% The macro \!\pcol@clearcolorstack!, also used in \!\pcol@icolumncolor!,
-% simply scans the \colorstack{} $\CST^c$ for the current column $c$, to
-% which \!\pcol@colorstack@full! is expanded, applying \!\reset@color!
-% to each element in it. That is, we invoke \!\reset@color! $\Abs{\CST^c}$
-% times ignoring the color information in each element and the order of
-% elements, expecting \!\reset@color! just pops printer's \colorstack{} or
-% lets printer's text color be \!\current@color!, as defined in all printer
-% |.def|inition files in \textsf{graphic} package. If the former is chosen
-% for a printer, its \colorstack{} is rewineded as we intend. Otherwise,
-% the sequence of \!\reset@color! is meaningless but harmless at the same
-% time.
+% The macro \!\pcol@clearcolorstack!, solely invoked from
+% \!\pcol@clearcst@unvbox! shown above\footnote{
+% 
+% But we have this macro to avoid the complication in \cs{def}ining
+% \cs{reserved@a} and \cs{reserved@b} with an argument if we did it in the
+% argument of \cs{pcol@ifempty} in \cs{pcol@clearcst@unvbox}.},
+% 
+% scans $\CSTraw^c=(\Celt^c,\cstraw)$ by \!\pcol@scancst! giving
+% $\cstraw=\!\pcol@colorins!$ to it as its argument. Since we gives
+% $\cstraw$ to the macro, this scan includes removals of all $\celtpop_i$
+% and $\mceltpop_{i,m}$, all $\celt_i$ having matching $\celtpop_i$, all
+% $\mcelt_{i,m}$ having matching $\mceltpop_{i,m}$, and all elements to
+% update $\Celt^c$, from $\cstraw$ to let \!\pcol@colorins! have $\cst$.
+% Prior to this invocation, we \!\def!ine $\!\reserved@a!\<\celt_i\>$ and
+% $\!\reserved@b!\<\Celt^c\>$ to let them have \!\reset@color! so that
+% uncoloring \!\special! will be put into the main vertical list for each
+% $\celt_i\in\cst$ and $\Celt^c$ before update if any, regardless of
+% coloring \!\special! they have. That is, we invoke \!\reset@color! as
+% many times as the appearance of $\celt_i\in\cst$ and once if
+% $\Celt^c\neq\bot$ before the invocation, ignoring the color information in
+% each element and the order of elements, expecting \!\reset@color! just
+% pops printer's \colorstack{} to rewind it as we intend.
+%
+% Note that in some printer |.def|inition could \!\def!ine \!\reset@color! to
+% let printer's text color be \!\current@color! to make the stack rewinding
+% resulting in the sequence of coloring operations with \!\current@color! at
+% the invocation of \!\output!. This meaningless operations might cause a
+% problem when a colored \colpage{} of $c_1$ is physically followed by another
+% \colpage{} of the succeeding column $c_2$ without any coloring, because the
+% \colpage{} of $c_2$ will be colored with \!\current@color! at the page break
+% in $c_1$. If this problem is serious, we could initialize $\Celt^c$ with
+% \!\current@color! at \beginparacol{} for all $c$ such that $\Celtshadow^c$
+% is undefined, in order to make sure that any \colpage{} has at least one
+% coloring \!\special! with $\Celt^c$ at its beginning so that, for example,
+% coloring operations at the tail of the \colpage{} of $c_1$ is overridden
+% by that of the default color of $c_2$ placed at the head of its \colpage{}.
% 
% \begin{macrocode}
\def\pcol@clearcst@unvbox#1{%
\pcol@ifempty#1\relax
- {\pcol@restorecst\pcol@colorstack@saved
- \unvbox#1\pcol@clearcolorstack}}
-\def\pcol@clearcolorstack{{\def\@elt##1{\reset@color}%
- \pcol@colorstack@full}}
+ {\pcol@restorecst\pcol@colorstack@saved \unvbox#1\pcol@clearcolorstack}}
+\def\pcol@clearcolorstack{%
+ \def\reserved@a##1{\reset@color}\def\reserved@b##1{\reset@color}%
+ \pcol@scancst\pcol@colorins}
% \end{macrocode}
% \end{macro}\end{macro}
%
-% \KeepSpace{1}
+% \changes{v1.2-1}{2013/05/11}
+% {\cs{pcol@set@color@elt} was introduced to implement color context
+% reestablishment but removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@set@color@elt} is removed according to the change of text
+% coloring from \cs{output} to \cs{insert}.}
+% 
% \begin{macro}{\pcol@restorecolorstack}
% \changes{v1.2-1}{2013/05/11}
% {Introduced to reestablish color context.}
+% \changes{v1.34}{2018/05/07}
+% {Completely change its definition according to the new text coloring
+% with \cs{insert}.}
% \begin{macro}{\pcol@restorecst}
% \changes{v1.2-1}{2013/05/11}
% {Introduced to reestablish color context.}
-% \begin{macro}{\pcol@set@color@elt}
-% \changes{v1.2-1}{2013/05/11}
-% {Introduced to implement color context reestablishment.}
-% 
-% The macro \!\pcol@restorecolorstack!, used in \!\pcol@putbackmvl!,
-% \!\pcol@icolumncolor! and \!\pcol@output@end!, makes \colorctext{} in
-% |.dvi| consistent with that in |.tex| by giving $\CST^c$, to which
-% \!\pcol@colorstack@full! is expanded, to \!\pcol@restorecst! which applies
-% \!\pcol@set@color@elt! to each element in its argument \colorstack{}
-% $\CST^c$ or $\csts$. That is for each $\celt$ in the stack,
-% \!\current@color! is defined as $\celt$ and then \!\pcol@set@color!, being
-% the original \!\set@color!, is invoked to push $\celt$ into the
-% \colorstack{} in the printer in use. Note that before the invocation of
-% \!\pcol@set@color!, we make \!\aftergroup! \!\let!-equal to \!\@gobble!
-% in order to nullify \!\aftergroup! with \!\reset@color! in the macro, so
-% that the macro simply puts some coloring \!\special! into the main
-% vertical list without taking care of popping the \colorstack{} in |.dvi|
-% because the real push/pop operations are done by \!\pcol@set@color@push!
-% and \!\pcol@reset@color@pop!.
+% \changes{v1.34}{2018/05/07}
+% {Completely change its definition according to the new text coloring
+% with \cs{insert}.}
+% 
+% The macro \!\pcol@restorecolorstack!, used in \!\pcol@putbackmvl!
+% and \!\pcol@output@end!, makes \colorctext{} in
+% |.dvi| consistent with that in |.tex| by giving $\cst=\!\pcol@colorins!$
+% to \!\pcol@restorecst! to let it scan $\CST^c=(\Celt^c,\cst)$.
+% The callee macro $\!\pcol@restorecst!\arg{box}$, also used in
+% \!\pcol@clearcst@unvbox! with $\arg{box}=\csts=\!\pcol@colorstack@saved!$,
+% invokes \!\pcol@scancst! after \!\def!ining $\!\reserved@a!\<\celt_i\>$ to
+% apply \!\unvbox! to $\celt_i$ in $\cst$ or $\csts$ and
+% $\!\reserved@b!\<\Celt^c\>$ to apply \!\unvcopy! to $\Celt^c$ so that
+% coloring \!\special!s they have will be put into the main vertical list.
% 
% \begin{macrocode}
-\def\pcol@restorecolorstack{\pcol@restorecst\pcol@colorstack@full}
-\def\pcol@restorecst#1{{\let\@elt\pcol@set@color@elt#1}}
-\def\pcol@set@color@elt#1{\def\current@color{#1}\let\aftergroup\@gobble
- \pcol@set@color}
+\def\pcol@restorecolorstack{\pcol@restorecst\pcol@colorins}
+\def\pcol@restorecst{%
+ \def\reserved@a##1{\unvbox##1}\def\reserved@b##1{\unvcopy##1}%
+ \pcol@scancst}
% \end{macrocode}
-% \end{macro}\end{macro}\end{macro}
+% \end{macro}\end{macro}
+%
+% \begin{macro}{\pcol@scancst}
+% \changes{v1.34}{2018/05/07}
+% {Introduced to implement new text coloring with \cs{insert}.}
+% \begin{macro}{\pcol@iscancst}
+% \changes{v1.34}{2018/05/07}
+% {Introduced to implement new text coloring with \cs{insert}.}
+%
+% \begin{Sloppy}{1500}
+% The macro $\!\pcol@scancst!\arg{box}$ is invoked from
+% \!\pcol@clearcolorstack! and \!\pcol@restorecst!. In the former
+% invocation, we have $\arg{box}=\cstraw=\!\pcol@colorins!$ to rewind
+% $\CSTraw=(\Celt^c,\cstraw)$ with $\!\reserved@a!\arg{\celt_i}$ and
+% $\!\reserved@b!\arg{\Celt^c}$ having \!\reset@color!. In the latter one,
+% we have
+% $\arg{box}\in\{\cst{=}\!\pcol@colorins!,\,\csts{=}\!\pcol@colorstack@saved!\}$
+% to reestablish $\CST^c=(\Celt^c,\cst)$ or $\csts$ with
+% $\!\reserved@a!\arg{\celt_i}$ to apply \!\unvbox! to $\celt_i$ and
+% $\!\reserved@b!\arg{\Celt^c}$ to apply \!\unvcopy! to $\Celt^c$.
+% Therefore, if $\arg{box}=\!\pcol@colorins!$, we at first put (un)coloring
+% \!\special! for $\Celt^c$, unless it is $\bot$, to the main vertical
+% list applying \!\reserved@b! to it. This means the \!\special! for
+% $\Celt^c$ is put first prior to those for elements in $\cstraw$ or $\cst$
+% consistently in reestablishing but not in rewinding. However as we
+% discussed in the description of \!\pcol@clearcolorstack!, the order of
+% rewinding does not affect the result for almost all printers because only
+% the number of pop operations is siginficant for them\footnote{
+% 
+% And even for the minority because multiple updates of printer's color with
+% one particular color are independent of the order of them.}.
+% 
+% Then if $\arg{box}\neq\bot$ we invoke \!\pcol@iscancst! to examine the
+% contents of $\arg{box}$ from its bottom to top. Prior to the invocation,
+% we do the following; let \!\@tempboxa! have an empty \!\vbox! as its initial
+% value of reformed $\arg{box}$; let \!\pcol@tempboxa! have an empty
+% \!\vbox! as its initial value of the sequence of \!\special!s to be put
+% into the main vertical list; let $\npop=\!\@tempcntb!=0$; let
+% $M=\!\reserved@b!=()$ as its initial value of the list of identifiers of
+% math-mode pops; $\CSIndex{if@tempswa}=\true$ to mean the first \!\vbox! to
+% update $\Celt^c$ found in the scan (i.e., the bottommost one) is
+% effective.
+% \end{Sloppy}
+%
+% In the macro \!\pcol@iscancst!, we repeatedly examine the last \!\vbox! in
+% $\arg{box}$ taken by \!\lastbox! into $\celt=\!\pcol@tempboxb!$ until
+% $\celt$ becomes $\bot$, and perform one of the following for $\celt$.
+% 
+% \begin{enumerate}\def\labelenumi{(\arabic{enumi})}
+% \def\HT{\mathit{height}}\def\DP{\mathit{depth}}\def\WD{\mathit{width}}
+% \item
+% If $\HT(\celt)=0$ and $\WD(\celt)=0$ to mean $\celt=\celtpop_i$, increment
+% $\npop$.
+%
+% \item
+% If $\HT(\celt)=0$ and $\WD(\celt)=m>0$ to mean $\celt=\mceltpop_{i,m}$, let
+% $M=(m,M)$.
+%
+% \item
+% If $\HT(\celt)\neq0$, $\DP(\celt)=0$ and $\WD(\celt)=0$ to mean
+% $\celt=\celt_i$, decrement $\npop$ if $\npop>0$, or otherwise add $\celt$
+% to the head of \!\@tempboxa! and apply $\!\reserved@a!\arg{\celt}$ to add
+% its result to the head of \!\pcol@tempboxa!.
+%
+% \item
+% If $\HT(\celt)\neq0$, $\DP(\celt)=0$ and $\WD(\celt)=m>0$ to mean
+% $\celt=\mcelt_{i,m}$, do nothing if $m\in M$, or otherwise add $\celt$
+% to the head of \!\@tempboxa! and apply $\!\reserved@a!\arg{\celt}$ to add
+% its result to the head of \!\pcol@tempboxa!.
+%
+% \item
+% If $\HT(\celt)\neq0$, $\DP(\celt)\neq0$ to mean $\celt$ has a \!\special!
+% with which $\Celt^c$ is updated. If $\CSIndex{if@tempswa}=\true$ to mean
+% $\celt$ is the first (bottommost) occurence, $\Celt^c$ is updated
+% acquiring an \!\insert! from \!\@freelist! if it was $\bot$. In this
+% case of $\bot$, we have to put an uncoloring \!\special! by
+% \!\reset@color!, because \!\pcol@scancst! did not do it but
+% \!\columncolor! or \!\normalcolumncolor! pushed the corresponding color
+% \!\special!. Then we let $\CSIndex{if@tempswa}=\false$.
+%
+% Otherwise, i.e., if $\CSIndex{if@tempswa}=\false$ for second or succeeding
+% occurences, we do nothing because updates by them are overridden by the
+% first one.
+% \end{enumerate}
+% 
+% Note that the cases other than (3) and (4) happen only in rewinding, and
+% thus in reestablishing we only have (3) and (4) with $\npop=0$ and $M=()$
+% always so that every $\celt$ is kept into new $\arg{box}$ and a coloring
+% \!\special! for it will be put into the main vertical list.
+%
+% Then we go back to \!\pcol@scancst! to let $\arg{box}=\!\@tempboxa!$,
+% meaningless in reestablishing but not harmful, and put the contents of
+% \!\pcol@tempboxa! to the main vertical list.
+%
+% 
+% \begin{macrocode}
+\def\pcol@scancst#1{%
+ \@tempcnta#1\relax
+ \ifnum\@tempcnta=\pcol@colorins
+ \ifvoid\pcol@ccuse{@box}\else
+ \reserved@b{\pcol@ccuse{@box}}\fi
+ \fi
+ \ifvoid\@tempcnta\else
+ \setbox\@tempboxa\vbox{}\setbox\pcol@tempboxa\vbox{}\@tempcntb\z@
+ \def\reserved@b{}\let\@elt\relax \@tempswatrue \pcol@iscancst
+ \global\setbox\@tempcnta\box\@tempboxa \unvbox\pcol@tempboxa
+ \fi}
+\def\pcol@iscancst{%
+ \setbox\@tempcnta\vbox{%
+ \unvbox\@tempcnta \global\setbox\pcol@tempboxb\lastbox}%
+ \ifvoid\pcol@tempboxb \let\reserved@c\relax
+ \else
+ \let\reserved@c\pcol@iscancst
+ \ifdim\ht\pcol@tempboxb=\z@
+ \ifdim\wd\pcol@tempboxb=\z@ \advance\@tempcntb\@ne
+ \else \edef\reserved@b{\@elt{\number\wd\pcol@tempboxb}\reserved@b}%
+ \fi
+ \else\ifdim\dp\pcol@tempboxb=\z@
+ \ifdim\wd\pcol@tempboxb=\z@
+ \ifnum\@tempcntb>\z@ \advance\@tempcntb\m@ne
+ \else
+ \setbox\@tempboxa\vbox{\copy\pcol@tempboxb \unvbox\@tempboxa}%
+ \setbox\pcol@tempboxa\vbox{%
+ \reserved@a\pcol@tempboxb \unvbox\pcol@tempboxa}%
+ \fi
+ \else
+ \count@\wd\pcol@tempboxb \chardef\reserved@d\z@
+ \def\@elt##1{\ifnum##1=\count@ \chardef\reserved@d\@ne \fi}%
+ \reserved@b \let\@elt\relax
+ \ifnum\reserved@d=\z@
+ \setbox\@tempboxa\vbox{\copy\pcol@tempboxb \unvbox\@tempboxa}%
+ \setbox\pcol@tempboxa\vbox{%
+ \reserved@a\pcol@tempboxb \unvbox\pcol@tempboxa}%
+ \fi
+ \fi
+ \else\if@tempswa
+ \ifvoid\pcol@ccuse{@box}%
+ \@next\@currbox\@freelist{\global\setbox\@currbox\vbox{}}\pcol@ovf
+ \pcol@ccxdef{\@currbox}\reset@color
+ \fi
+ \global\setbox\pcol@ccuse{@box}\vbox{\unvbox\pcol@tempboxb}%
+ \@tempswafalse
+ \fi\fi\fi
+ \fi
+ \reserved@c}
+
+% \end{macrocode}
+% \end{macro}\end{macro}
%
% \begin{macro}{\pcol@savecolorstack}
% \changes{v1.2-1}{2013/05/11}
% {Introduced to save the opening color context of a column-page.}
+% \changes{v1.34}{2018/05/07}
+% {Completely change its definition according to the new text coloring
+% with \cs{insert}.}
% 
% The macro \!\pcol@savecolorstack! is used in \!\pcol@startcolumn!,
% \!\pcol@output@start! and \!\pcol@putbackmvl! to save the opening
-% \colorctext{} in $\CST^c$ of a \ccolpage{} $c$ known to be or found empty.
-% The saving to $\csts=\!\pcol@colorstack@saved!$ is done by \!\xdef!ining it
-% with the expansion result of \!\pcol@colorstack@full!.
+% \colorctext{} in $\CST^c$ of a \ccolpage{} $c$ known to be or found empty
+% into $\csts=\!\pcol@colorstack@saved!$. If both of
+% $\Celt^c=|\pcol@columncolor@box|\cdot c$ and $\cst=\!\pcol@colorins!$ are
+% $\bot$, $\csts$ is let be $\bot$. Otherwise, $\csts$ is let be a \!\vbox!
+% having a \!\vbox! for $\Celt^c$ at the top if it is not $\bot$ and then the
+% contents of $\cst$ if it is not $\bot$.
+% 
+% \SpecialArrayIndex{c}{\pcol@columncolor@box}
% 
% \begin{macrocode}
-\def\pcol@savecolorstack{{\let\@elt\relax
- \xdef\pcol@colorstack@saved{\pcol@colorstack@full}}}
+\def\pcol@savecolorstack{%
+ \ifvoid\pcol@colorins \@tempswafalse \else \@tempswatrue \fi
+ \ifvoid\pcol@ccuse{@box}%
+ \setbox\@tempboxa\box\voidb@x
+ \else
+ \setbox\@tempboxa\vbox{\unvcopy\pcol@ccuse{@box}}%
+ \ht\@tempboxa1sp \dp\@tempboxa\z@ \wd\@tempboxa\z@
+ \@tempswatrue
+ \fi
+ \if@tempswa
+ \global\setbox\pcol@colorstack@saved\vbox{%
+ \ifvoid\@tempboxa\else \box\@tempboxa \fi
+ \ifvoid\pcol@colorins\else \unvcopy\pcol@colorins \fi}
+ \else \global\setbox\pcol@colorstack@saved\box\voidb@x
+ \fi}
+
% \end{macrocode}
% \end{macro}
% 
-% \begin{macro}{\pcol@colorstack@full}
% \changes{v1.2-1}{2013/05/11}
-% {Introduced to represent $\string\mathit{\Gamma}^c$.}
+% {\cs{pcol@colorstack@full} was introduced to represent
+% $\string\mathit{\Gamma}^c$ but removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@colorstack@full} is removed according to the change of text
+% coloring from \cs{output} to \cs{insert}.}
% 
-% The macro \!\pcol@colorstack@full!, used in \!\pcol@clearcolorstack!,
-% \!\pcol@restorecolor~stack! and \!\pcol@savecolorstack!, to represent the
-% color stack $\CST^c$ of the column $c$'s own, i.e., $(\Celt^c,\cst)$.
-% Therefore, the macro has the concatenation
-% $\Celt^c=|\pcol@columncolor|{\cdot}c$
+% \KeepSpace{3}
+% \begin{macro}{\pcol@ccuse}
+% \changes{v1.34}{2018/05/07}
+% {Introduced to implement new text coloring with \cs{insert}.}
+% \begin{macro}{\pcol@ifccdefined}
+% \changes{v1.34}{2018/05/07}
+% {Introduced to implement new text coloring with \cs{insert}.}
+% \begin{macro}{\pcol@ccxdef}
+% \changes{v1.34}{2018/05/07}
+% {Introduced to implement new text coloring with \cs{insert}.}
+% 
+% The macro $\!\pcol@ccuse!\arg{pfx}$ is to expand a macro
+% $|\pcol@columncolor|\cdot\arg{pfx}\cdot c$ for the current column $c$. It
+% is used in \!\pcol@output@start! and \!\pcol@scancst@shadow! with
+% $\arg{pfx}=\hbox{`'}$ to have $\Celtshadow^c$, and in \!\pcol@scancst!,
+% \!\pcol@iscancst!, \!\pcol@savecolorstack!, \!\pcol@output@end! and
+% \!\pcol@icolumncolor! with $\arg{pfx}=|@box|$ to have $\Celt^c$.
% 
% \SpecialArrayIndex{c}{\pcol@columncolor}
+% \SpecialArrayIndex{c}{\pcol@columncolor@box}
+%
+% The macro $\!\pcol@ifccdefined!\arg{then}\arg{else}$ is used in
+% \!\pcol@output@start! and \!\pcol@scancst@shadow! to examine whether
+% $\Celtshadow^c=|\pcol@columncolor|\cdot c$ is defined and to do
+% $\arg{then}$ if so or $\arg{else}$ otherwise.
% 
-% and $\cst=\!\pcol@colorstack!$, but we have to take care of the case
-% that $\Celt^c$ is undefined not to leaving the control sequece
-% $|\pcol@columncolor|{\cdot}c$ but to have nothing, especially for the
-% invocation from \!\pcol@savecolorstack!.
+% \SpecialArrayIndex{c}{\pcol@columncolor}
+%
+% The macro $\!\pcol@ccxdef!\arg{body}$ \!\xdef!ines a macro
+% $\Celt^c=|\pcol@columncolor@box|\cdot c$ as $\arg{body}$ for the current
+% column $c$. It is used in \!\pcol@output@start!, \!\pcol@iscancst! and
+% \!\pcol@icolumncolor! with $\arg{body}=\!\@currbox!$ when an \!\insert!
+% for $\Celt^c$ is acquired, and in \!\pcol@output@end! with
+% $\arg{body}=\!\voidb@x!$ after releasing $\Celt^c$ to \!\@freelist!.
+% 
+% \SpecialArrayIndex{c}{\pcol@columncolor@box}
% 
% \begin{macrocode}
-\def\pcol@colorstack@full{%
+\def\pcol@ccuse#1{\@nameuse{pcol@columncolor#1\number\pcol@currcol}}
+\def\pcol@ifccdefined#1#2{%
\expandafter\ifx\csname pcol@columncolor\number\pcol@currcol\endcsname\relax
- \@empty
- \else \@nameuse{pcol@columncolor\number\pcol@currcol}\fi
- \pcol@colorstack}
+ #2\else#1\fi}
+\def\pcol@ccxdef#1{%
+ \expandafter\xdef
+ \csname pcol@columncolor@box\number\pcol@currcol\endcsname{#1}}
% \end{macrocode}
-% \end{macro}
+% \end{macro}\end{macro}\end{macro}
%
%
%
@@ -11677,6 +12140,9 @@
% \begin{macro}{\pcol@getmpbelt}
% \changes{v1.3-4}{2013/09/17}
% {Introduced to find the space where a marginal note is placed.}
+% \changes{v1.33-1}{2016/11/19}
+% {Fix the bug by which $t_k$ such that $t_k\geq t$ and $t_k-t\geq h$
+% but $t_k-b_{k-1}<h$ is found.}
% 
% The macro $\!\pcol@getmparbottom!\<t\>\<h\>$ is solely used in
% \!\pcol@addmarginpar!\footnote{
@@ -11748,6 +12214,7 @@
\def\pcol@getmpbelt#1#2{%
\ifdim#1sp<\@tempdima
\global\@mparbottom#2sp\relax \@cons\pcol@mpblist{{#1}{#2}}%
+ \ifdim\@tempdima<#2sp\relax \@tempdima#2sp\relax \fi
\else
\@tempdimc\@tempdima \advance\@tempdimc\@tempdimb
\ifdim#1sp<\@tempdimc
@@ -11935,15 +12402,15 @@
% \!\pcol@output@end! with $y$ being that of \spanning{} in the \lpage, and
% in $\!\pcol@getmparbottom@last!\Arg{y}$ with its argument $y$. The macro
% modifies $\mpar(t,b)$ in all $M\in\Set{\mpb_X^x}{X\in\{L,R\},x\in\{l,r\}}$
-% of $\mpbout$ so that they have $\mpar(t+y,b+y)$ for the transformation
+% of $\mpbout$ so that they have $\mpar(t{+}y,b{+}y)$ for the transformation
% from text area coordinates to columns in the first and third, while for
% the reverse transformation in the second, by invoking \!\pcol@do@mpb@all!
% giving it $\mpbout$ and letting \!\reserved@a! have
% $\!\pcol@bias@mpbout@i!\Arg{y}$. That is,
% $\!\pcol@bias@mpbout@i!\Arg{y}\!\@elt!\Arg{t}\Arg{b}\!\@nil!$ is then
% invoked in \!\pcol@do@mpb@all@ii! with $t$ and $b$ from $\mpar(t,b)$ in
-% each $M$, and then it \!\def!ines \!\reserved@b! with $\mpar(t+y,b+y)$ so
-% that updated $M$ has it.
+% each $M$, and then it \!\def!ines \!\reserved@b! with $\mpar(t{+}y,b{+}y)$
+% so that updated $M$ has it.
% 
% \begin{macrocode}
\def\pcol@bias@mpbout#1{\def\reserved@a{\pcol@bias@mpbout@i{#1}}%
@@ -11980,13 +12447,13 @@
% then adding $y$ to each $t=b=0$ by \!\pcol@bias@mpbout! giving it $y$.
% Otherwise, i.e., if $\pp^m(\ptop)\neq\emptyset$, it invokes
% \!\pcol@do@mpb@all! giving it $\pp^m(\ptop)$ and letting \!\reserved@a!
-% have $\!\pcol@getmparbottom@i!\Arg{y}$. That is,
-% $\!\pcol@getmparbottom@i!\Arg{y}\~\mpar(t_1,b_1)\cdots\mpar(t_n,b_n)\!\@nil!$
-% is then invoked in \!\pcol@do@mpb@all@ii! for each $\mpb_X^x$ to let
-% \!\reserved@b! have $\mpar(y,y)$ at first and then to let it have
-% $\mpar(t_i,b_i)$ for all $i\in[1,n]$. Therefore, \!\reserved@b! should
-% finally have $\mpar(t_n,b_n)$ assuming $t_0=b_0=y$, and then becomes
-% $m_X^x$.
+% have $\!\pcol@getmparbottom@last@i!\Arg{y}$. That is,
+% $\!\pcol@getmparbottom@last@i!\Arg{y}\~\mpar(t_1,b_1)\cdots
+% \mpar(t_n,b_n)\!\@nil!$ is then invoked in \!\pcol@do@mpb@all@ii! for each
+% $\mpb_X^x$ to let \!\reserved@b! have $\mpar(y,y)$ at first and then to
+% let it have $\mpar(t_i,b_i)$ for all $i\in[1,n]$. Therefore,
+% \!\reserved@b! should finally have $\mpar(t_n,b_n)$ assuming $t_0=b_0=y$,
+% and then becomes $m_X^x$.
% \end{macro}\endgroup
% 
% \begin{macrocode}
@@ -12581,6 +13048,9 @@
% {Replace the sequence of operations to make a usual float column
% with \cs{@toplist} with the newly introduced
% \cs{pcol@makefcolpage}.}
+% \changes{v1.33-2}{2016/11/19}
+% {Remove a space after the \cs{vbox} to be assigned to \cs{@currbox}
+% to obey the coding convention.}
% 
% The macro \!\pcol@makefcolumn! is invoked solely from \!\pcol@flushcolumn!
% to put deferred floats in the currently empty \colpage{} of $c$ in the
@@ -12613,6 +13083,9 @@
% It can happen if the first float is larger than $\pp^h(\ptop)$.},
% 
% we examine if $\ptop$ is the \lpage{} ($|\ifpcol@|\~|lastpage|=\true$)
+% 
+% \SpecialIndex{\ifpcol@lastpage}
+% 
% and $\cc_c(\dl)$ is empty to mean the last \colpage{} have all deferred
% floats. This case is subtle because if we make the \colpage{} a \fcolumn{}
% it can be sparse and unnecessarily throw the \postenv{} to the next
@@ -12665,7 +13138,7 @@
\ifpcol@lastpage \ifx\@deferlist\@empty \ifdim\@colroom<\@fpmin
\@tempswafalse \global\@toproom\maxdimen
\fi\fi\fi
- \if@tempswa \global\setbox\@currbox\vbox{\pcol@makefcolpage} \fi
+ \if@tempswa \global\setbox\@currbox\vbox{\pcol@makefcolpage}\fi
\fi}
% \end{macrocode}
% \end{macro}
@@ -12702,6 +13175,9 @@
% performed in three macros.}
% \changes{v1.32-2}{2015/10/10}
% {Add \cs{pcol@Fb}/\cs{pcol@Fe} pair(s).}
+% \changes{v1.33-2}{2016/11/19}
+% {Add {\tt\%} to the end of the line to open \cs{vbox} to obey the
+% coding convention.}
% 
% The macro \!\pcol@makefcolpage! is invoked from \!\pcol@flushcolumn!,
% \!\pcol@makefcolumn! and \!\pcol@imakeflushedpage! to build a \fcolumn{}
@@ -12713,7 +13189,7 @@
% encapsulation in the case of \!\pcol@makefcolumn!.
% 
% \begin{macrocode}
-\def\pcol@makefcolpage{\vbox to\@colht{
+\def\pcol@makefcolpage{\vbox to\@colht{%
\vskip\@fptop \vskip-\@fpsep
\def\@elt##1{\vskip\@fpsep\box##1}\@toplist \vskip\@fpbot}%
\pcol@Fb
@@ -12737,7 +13213,7 @@
% \cctext{} in $\cc_c$ by \!\pcol@getcurrcol!, we calculate
% $\size_c(t)=\!\skip!{\cdot}\cc_c(\vb)$ by \!\pcol@addflhd! giving it
% $\cc_c(\tl)$ and $\cc_c(\tf)=\!\pcol@textfloatsep!$ as its arguments also
-% to have $\CSIndex{if@tempswa}=\fc(t)$. Note that $\cc_c(\tf)=\infty$ means
+% to have $\CSIndex{if@tempswa}={\fc(t)}$. Note that $\cc_c(\tf)=\infty$ means
% the \colpage{} does not have any \sync{}ation points yet and thus
% \!\textfloatsep! is used in the calculation as the skip between the top
% floats and main vertical list, while the value itself possibly for a
@@ -13059,6 +13535,9 @@
% 
% \changes{v1.32-2}{2015/10/10}
% {Add \cs{pcol@Fb}/\cs{pcol@Fe} pair(s).}
+% \changes{v1.33-2}{2016/11/19}
+% {Add {\tt\%} to the end of the line to open \cs{vbox} for
+% \cs{pcol@float} to obey the coding convention.}
% 
% \begin{macrocode}
\else
@@ -13070,7 +13549,7 @@
\textfloatsep\z@ \floatsep\z@ \let\topfigrule\relax
\fi
\pcol@Fb
- \@next\pcol@float\@freelist{\global\setbox\pcol@float\vbox to\z@{
+ \@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)}%
@@ -13149,17 +13628,22 @@
% because it should be $\cc_c(\tf)\leq5000\,|pt|$ to mean the \colpage{}
% does not have a \mvlfloat.
% 
+% \changes{v1.33-2}{2016/11/19}
+% {Add {\tt\%} to the end of the line to open \cs{vbox} for
+% \cs{@currbox} and two lines for \cs{vbox}es in it to obey the
+% coding convention.}
+% 
% \begin{macrocode}
\else
\global\pcol@prevdepth\@tempdimc
\ifdim\pcol@textfloatsep=\maxdimen
\global\pcol@textfloatsep\textfloatsep \fi
- \global\setbox\@currbox\vbox{
+ \global\setbox\@currbox\vbox{%
\ifdim\@tempdimb<\topskip
- \vbox to\topskip{\unvbox\@currbox \vskip\z@\@plus.0001fil}
+ \vbox to\topskip{\unvbox\@currbox \vskip\z@\@plus.0001fil}%
\vskip-\topskip \vskip\@tempdimb
\else
- \vbox to\@tempdimb{\unvbox\@currbox \vskip\z@\@plus.0001fil}
+ \vbox to\@tempdimb{\unvbox\@currbox \vskip\z@\@plus.0001fil}%
\fi}%
\fi
\fi
@@ -13266,7 +13750,7 @@
% \!\@dblfloatplacement! to set up placement parameters followed by
% $\!\f@depth!=0$ to nullify the setting $\!\f@depth!=|1sp|$ possiblly done
% by it as discussed in the item-(\ref{item:ovv-float-@dblfloatplacement})
-% of Section \ref{sec:imp-ovv-float}; \!\@makefcolumn! with
+% of \secref{sec:imp-ovv-float}; \!\@makefcolumn! with
% \!\@dbldeferlist! to have a \fpage{} in \!\@outputbox! if any; and a loop
% of \bgpaint{} of \!\@outputbox! and, if $\CL<\C$, of empty
% \!\pcol@rightpage!, and \!\@outputpage! followed by \!\@makefcolumn!
@@ -13339,7 +13823,9 @@
% invoke \!\pcol@output@switch! with setting $\CSIndex{ifpcol@clear}=\true$
% to flush all pages up to $\ptop-1$ and to let $\cc_c(\vb^b)$ have the
% ship-out image of the main vertical list of each \colpage{} $c$ in
-% $\ptop$. Then after obtaining $\ptop$'s \pctext{} to have
+% $\ptop$. This invocatoin also lets $\!\pcol@colht!=\VPP$ so that hereafter
+% we will refer $\VPP$ throuth $\arg{ht}$ if it is $\!\pcol@colht!$ for
+% \lpage. Then after obtaining $\ptop$'s \pctext{} to have
% $\page(\ptop)=\pp^p(\ptop)$, $\!\@colht!=\pp^h(\ptop)$ and
% \CSIndex{ifpcol@nospan} by \!\pcol@getcurrpinfo!, we build the ship-out
% image of $\ptop$ in \!\@outputbox!, and \!\pcol@rightpage! if
@@ -13380,7 +13866,7 @@
% 
% \!\pcol@rightpage! must have the couterpart in right \parapag{}e if the
% \spanning{} is \preenv, while it is made $\bot$ by \!\pcol@output@end! if
-% \pwise{} floats.}.
+% the \spanning{} are \pwise{} floats.}.
% 
% Since \pwise{} floats become ordinary floats in \postenv, we cannot paint
% its \bground{} and must remove \!\dbltextfloatsep! at the bottom of
@@ -13493,10 +13979,11 @@
% ship-out image of columns if required fundamentally by
% $\CSIndex{if@tempswa}=\true$. First,
% if the page $\ptop$ has \Scfnote{}s, we shrink
-% $\!\@colht!=\pp^h(\ptop)$ by \!\pcol@shrinkcolbyfn! to keep the room for
-% the footnotes, to have $H$ being the possibly shrunk $\pp^h(\ptop)$ whose
-% original value without shrinkage is saved in \!\@pageht! for the reference
-% in \!\pcol@imakeflushedpage!. Second, if
+% $\!\@colht!={\pp^h}(\ptop)$ by \!\pcol@shrinkcolbyfn! to keep the room for
+% the footnotes, to have $H=\!\@pageht!$ being the possibly shrunk
+% $\pp^h(\ptop)$ for the reference
+% in \!\pcol@imakeflushedpage! after the further possible modification of
+% \!\@colht! we will make shortly. Second, if
% $\CSIndex{ifpcol@lastpage}=\true$ but $\CSIndex{ifpcol@dfloats}=\true$
% too, we turn $\CSIndex{ifpcol@lastpage}=\false$ because we need a
% full-sized \lpage{}, temporarily letting $\!\@textbottom!=\!\vfil!$ if
@@ -13636,7 +14123,7 @@
% counterpart, by \!\pcol@bg@paintbox! \!\def!ining the parameter
% \!\pcol@bg@footnoteheight! with the height-plus-depth of $\pp^f(\ptop)$,
% as the very first element of the ship-out image as done in
-% \!\pcol@ioutputelt!, if $\ptop$ is not the \lpage{} for which the
+% \!\pcol@ioutputelt!, unless $\ptop$ is the truely \lpage{} for which the
% \bgpaint{} is done in \!\pcol@output@end!. Then we put \spanning{} in $b$
% itself if any.
%
@@ -13705,7 +14192,7 @@
% preceded by \!\pcol@@hfil! being \!\relax! for the first column, while
% it is $\!\pcol@hfil!\<c^g\>$, where $c^g=\!\pcol@colsepid!$ being $c$ or
% $c-1$ without or with \cswap{} respectively, to put a \csepgap{} possibly
-% with \cseprule{} segments in \!\pcol@tempbox! built by
+% with \cseprule{} segments in \!\pcol@tempboxa! built by
% \!\pcol@buildcolseprule!. Finally, we save \cctext{} especially those
% for float parameters into $\cc_c$ by \!\pcol@setcurrcolnf! because all
% \Mcfnote{}s have been shipped out.
@@ -13810,7 +14297,7 @@
% we temporarily add \!\c@page! by one for page parity examination for
% \mirror{}ed \bgpaint. Then, the macro \!\pcol@buildcolseprule! is invoked
% with $\!\@colht!=\!\textheight!$ and $\LBRP\Cfrom\Cto$ for \cseprule{}
-% drawing in \!\pcol@tempbox! and \bgpaint{} for columns and \csepgap{}s in
+% drawing in \!\pcol@tempboxa! and \bgpaint{} for columns and \csepgap{}s in
% \!\@tempboxa! put into $b$ immediately.
%
% Then we open a \!\hbox! of \!\textwidth! wide and initialize
@@ -13893,7 +14380,7 @@
% \!\pcol@getcurrpage! to have the \pctext{} of $p=0$, because it might be
% modified by a column $c'<c$ by producing \fcolumn{}s. After that and the
% invocation of \!\pcol@floatplacement! for setting float parametners, we
-% invoke \!\pcol@startcolumn! for $c$'s \colpage{} at $p=0$, and interate
+% invoke \!\pcol@startcolumn! for $c$'s \colpage{} at $p=0$, and iterate
% \!\pcol@opcol! and \!\pcol@startcolumn! while a \fcolumn{} is made by the
% latter\footnote{
% 
@@ -14010,7 +14497,7 @@
% The first case is for $\CSIndex{ifpcol@dfloats}=\true$ to mean the
% \lpage{} is followed by one or more pages having deferred \cwise{}
% floats and thus \!\pcol@makeflushedpage! builds the ship-out image of the
-% \lpage in {\em full size} in \!\@outputbox! unless the page has nothing
+% \lpage{} in {\em full size} in \!\@outputbox! unless the page has nothing
% perfectly. Therefore, we ship the image out by \!\@outputbox! unless it
% is $\bot$ for perfectly empty case. Then we invoke \!\pcol@flushfloats!
% to produce and ship out \fpage{}s, lettinng $\CSIndex{if@fcolmade}={\true}$
@@ -14126,7 +14613,7 @@
% However before putting the box back to the main vertical list, we have to
% take care of the \bgpaint{} as follows. First we let
% $\CSIndex{ifpcol@havelastpage}=\true$ to let \!\@outputpage! paint the
-% \bground{} of the \postenv{} if the page having the \lpage{} completes.
+% \bground{} of the \postenv{} when the page having the \lpage{} completes.
% Second, we let \!\pcol@bg@preposttop@left! have the height-plus-depth of
% the \!\@outputbox! having the short \lpage{} because the \bground{} of
% \postenv{}, or of \preenv{} if we have another \env{paracol} environment
@@ -14142,7 +14629,7 @@
% contiguous in the empty case.
%
% Third and finally, we have to paint the \bground{} of non-merged
-% \Scfnote{}s because the paining is left by \!\pcol@makeflushedpage! for
+% \Scfnote{}s because the painting is left by \!\pcol@makeflushedpage! for
% this macro. Therefore, if $\!\pcol@fnheight@lpage!>0$ to mean we have
% footnotes whose total height-plus-depth is in the macro, we paint their
% \bground{} by \!\pcol@bg@paintbox! \!\def!ining \!\pcol@bg@footnoteheight!
@@ -14206,20 +14693,19 @@
\ifvoid\pcol@topfnotes\else \insert\footins{\unvbox\pcol@topfnotes}\fi
% \end{macrocode}
%
-% The followings are for clean-up and set-up for the \postenv;
-% reestablish the \colorstack{} by \!\pcol@restorecolorstack! for
-% column-0\footnote{
+% The following operationss are for clean-up and set-up for the \postenv;
+% for all c, return $\cc_c(\vb)$ obtained by \!\pcol@getcurrcol! and
+% $\Celt^c\neq\bot$ letting it $\bot$ to \!\@freelist!; reestablish the
+% \colorstack{} by \!\pcol@restorecolorstack! for column-0\footnote{
% 
% It can be any other column.}
% 
-% nullifying $\Celt^0$ so that the \colorstack{} is just $\cst$ and is
-% rewinded at \Endparacol; return all $\cc_c(\vb)$ obtained by
-% \!\pcol@getcurrcol! to \!\@freelist!; reload $\cc_d$ for
-% $d=\!\pcol@lastcol!$ being the column in which \Endparacol{} occurs to
-% let $\!\everypar!=\cc_d(\ep)$ and to let \CSIndex{if@nobreak} and
-% \CSIndex{if@afterindent} have the value represented by $\cc_d(\sw)$, so
-% that the first paragraph of the \postenv{} is typeset following
-% them\footnote{
+% so that the \colorstack{} is just $\cst$ and is rewinded at \Endparacol,
+% and let $\cst=\bot$; reload $\cc_d$ for $d=\!\pcol@lastcol!$ being the
+% column in which \Endparacol{} occurs to let $\!\everypar!=\cc_d(\ep)$ and
+% to let \CSIndex{if@nobreak} and \CSIndex{if@afterindent} have the value
+% represented by $\cc_d(\sw)$, so that the first paragraph of the \postenv{}
+% is typeset following them\footnote{
% 
% For rare cases that the last item of the closing environment is a
% sectioning command, but a user has such very unusual usage.};
@@ -14251,15 +14737,25 @@
% \cs{everypar} of the column to post-environment stuff.}
% \changes{v1.32-2}{2015/10/10}
% {Add \cs{pcol@Fb}/\cs{pcol@Fe} pair(s).}
+% \changes{v1.34}{2018/05/07}
+% {Remove nullification of $\gamma_0^0$ because it is not meaningless
+% now, add release of $\gamma_0^c\NEQ\bot$ and then nullification of
+% it for all $c$, move color stack reestablishment down to the loop
+% with $c$ to ensure $\gamma_0^0\EQ\bot$, and add nullification of
+% $\mathit{\Gamma}$.}
% 
% \begin{macrocode}
- \expandafter\let\csname pcol@columncolor\number\z@\endcsname\relax
- \pcol@currcol\z@ \pcol@restorecolorstack
- \@whilenum\pcol@currcol<\pcol@ncol\do{%
+ \pcol@currcol\z@ \@whilenum\pcol@currcol<\pcol@ncol\do{%
\pcol@Fb
\pcol@getcurrcol \@cons\@freelist\@currbox
+ \ifvoid\pcol@ccuse{@box}\else
+ \@cons\@freelist{\pcol@ccuse{@box}}%
+ \pcol@ccxdef{\voidb@x}%
+ \fi
\pcol@Fe{output@end(col)}%
\advance\pcol@currcol\@ne}%
+ \pcol@currcol\z@ \pcol@restorecolorstack
+ \global\setbox\pcol@colorins\box\voidb@x
\pcol@currcol\pcol@lastcol\relax \pcol@getcurrcol
\global\pcol@prevdepth\@pagedp
\global\@colht\textheight
@@ -14569,7 +15065,7 @@
% not the last so far; and $\!\pcol@firstprevdepth!=\!\prevdepth!$ in
% decimal integer form for the extreme empty case.
%
-% We also make the macro \Midx{\!\@combinefloats!} \!\let!-equal to our own
+% We also make the macro \!\@combinefloats! \!\let!-equal to our own
% \!\pcol@combinefloats! throughout the environment, after saving its
% original definition into \Midx{\!\pcol@@combinefloats!} for processing
% \!\output! request sneaked from outsied of environment, so that our
@@ -14580,7 +15076,7 @@
% implementaion of our own. On the other hand, \!\end@dblfloat! is simply
% replaced with our own \!\pcol@end@dblfloat! being what \LaTeX{} had had until
% 2014 as discussed in item-(\ref{item:ovv-float-end@dblfloat}) of
-% Section~\ref{sec:imp-ovv-float}.
+% \secref{sec:imp-ovv-float}.
% 
% \changes{v1.1}{2012/05/11}
% {Replace the calculation of \cs{columnwidth} with the call of
@@ -14666,12 +15162,11 @@
% macros \!\pcol@bg@paintpage!, \!\pcol@bg@paintbox! and
% \!\pcol@bg@paintcolumns! activated by making them \!\let!-equal to thier
% |@@| counterparts namely \!\pcol@bg@@paintpage!, \!\pcol@bg@@paintbox! and
-% \!\pcol@bg@paintcolumns! which implement \bgpaint{}.
+% \!\pcol@bg@@paintcolumns! which implement \bgpaint{}.
%
-% Finally we empty \colorstack{}s $\cst=\!\pcol@colorstack!$ and
-% $\cstshadow={}$\!\pcol@colorstack@shadow! and the pushing list
-% $\cstb=\!\pcol@colorstack@buf!$ to give them initial states regardless of
-% the availability of coloring package.
+% Finally we empty the shadow \colorstack{}
+% $\cstshadow={}$\!\pcol@colorstack@shadow! to give it initial value
+% regardless of the availability of coloring package.
% 
% \changes{v1.2-1}{2013/05/11}
% {Add redefinitions of \cs{set@color} and \cs{reset@color}.}
@@ -14686,6 +15181,9 @@
% \changes{v1.3-3}{2013/09/17}
% {Add definition of painting macros dependent to the availability of
% a coloring package.}
+% \changes{v1.34}{2018/05/07}
+% {Remove the initializations of \cs{pcol@colorstack} and
+% \cs{pcol@colorstack@buf} because they no longer exist.}
% 
% \begin{macrocode}
\global\let\pcol@set@color\set@color
@@ -14704,8 +15202,7 @@
\let\pcol@bg@paintbox\pcol@bg@@paintbox
\let\pcol@bg@paintcolumns\pcol@bg@@paintcolumns
\fi
- \gdef\pcol@colorstack{}%
- \gdef\pcol@colorstack@buf{}\gdef\pcol@colorstack@shadow{}%
+ \gdef\pcol@colorstack@shadow{}%
% \end{macrocode}
% 
% \changes{v1.2-2}{2013/05/11}
@@ -14865,7 +15362,7 @@
% {Introduced for nullificaton of API macros of footnote typesetting
% definition.}
% 
-% The macro \!\pcol@localcommands!$\arg{macro}$ is to complain that the
+% The macro \!\pcol@ignore!$\arg{macro}$ is to complain that the
% $\arg{macro}$ being one of the followings appears in \env{paracol}
% environment.
% 
@@ -14883,7 +15380,7 @@
% \!\pcol@zparacol! to invoke this macro with the argument identifying
% themselves, which is shown in the warning message given by
% \!\PackageWarning!. As for \!\twosided!, the target of the
-% re\!|def!inition is \!\pcol@twosided! so that its optional argument is
+% re\!\def!inition is \!\pcol@twosided! so that its optional argument is
% captured before the complaint.
% 
% \begin{macrocode}
@@ -14961,7 +15458,7 @@
% \begin{macro}{\pcol@end@dblfloat}
% \changes{v1.32-3}{2015/10/10}
% {Added to go back to old mechanism.}
-% As discussed in Section~\ref{sec:imp-ovv-float}, 2015 version of \LaTeX{}
+% As discussed in \secref{sec:imp-ovv-float}, 2015 version of \LaTeX{}
% no longer uses \!\@dbldeferlist! but the macro itself is still kept in
% \LaTeX{}. However it will be removed in future to make the first
% \!\@cons! with it resulting in an error. Therefore, here we have its top
@@ -14970,7 +15467,7 @@
% with a new definition in the new \LaTeX{} of course, and thus we define
% \!\pcol@end@dblfloat! here to keep its old definition and to replace the
% new one in \env{paracol} environment as discussed in
-% item-(\ref{item:ovv-float-end@dblfloat}) of Section~\ref{sec:imp-ovv-float}.
+% item-(\ref{item:ovv-float-end@dblfloat}) of \secref{sec:imp-ovv-float}.
% 
% \begin{macrocode}
\gdef\@dbldeferlist{}
@@ -15023,7 +15520,7 @@
% \Arg{r^l_0,r^l_1,\cdots,r^l_{k^l-1}}|[|r^r_0,r^r_1,\cdots,r^r_{k^r-1}|]|$
% defines the column width fraction $r^l_c$ for column $c$ in left
% \parapag{}es and optionally $r^r_c$ for those in right \parapag{}es. This
-% macro and its callee \!\pcol@icolumnratio! just |\global|y |\def|ine
+% macro and its callee \!\pcol@icolumnratio! just \!\global!y \!\def!ine
% macros \!\pcol@columnratioleft! and \!\pcol@columnratioright! whose
% bodies have the first and second arguments respectively, or commonly have
% the first if the second optional one is not given, so that they are given
@@ -15076,7 +15573,7 @@
% and gap specifier $\w_c$ and $\gap_c$. After \!\let!ting
% $\!\pcol@columnratioleft!=\!\relax!$ to disable the setting by
% \!\columnratio! and to enable that done by this macro, the macro and its
-% callee \!\pcol@isetcolumnwidth! just |\global|y |\def|ine macros
+% callee \!\pcol@isetcolumnwidth! just \!\global!y \!\def!ine macros
% \!\pcol@colwidthspecleft! and \!\pcol@colwidthspecright! whose bodies have
% the first and second arguments respectively, or commonly have the first if
% the second optional one is not given, so that they are given to
@@ -15141,7 +15638,7 @@
% and $\langle\string\mathit{spec}\rangle$ for columns in right
% parallel-pages.}
% \changes{v1.3-3}{2013/09/17}
-% {Add setting of $g_c=\cs{pcol@columnsep}{\cdot}c=\cs{columnsep}.}
+% {Add setting of $g_c\EQ\cs{pcol@columnsep}{\cdot}c=\cs{columnsep}.}
% 
% \begin{Hfuzz}{0.3pt}%
% The macro $\!\pcol@setcolwidth@r!\<\Cfrom\>\<\Cto\>\arg{ratio}\arg{spec}$
@@ -15321,7 +15818,7 @@
% 
% In the \textit{body} above, we invoke
% $\!\pcol@setcw@getspec!\;s_i|//|\!\@nil!$ to parse $s_i$ to have $w^n_i$,
-% $w^f_i$ to be processed by \!\pcol@setcw@s! and $g^n_i$ and $g^f_i$ by
+% $w^f_i$ to be processed by \!\pcol@setcw@c! and $g^n_i$ and $g^f_i$ by
% \!\pcol@setcw@s!, for all $i\In0m$.
% 
% \begin{macrocode}
@@ -15393,7 +15890,7 @@
% 
% Because the first assignment is done in a group.}.
% 
-% Otherwise, we invoke $\!\pcol@setcw@fill!\;x'_d\!\@nil!$ to let
+% Otherwise, we invoke $\!\pcol@setcw@fill!\;x'_d$ to let
% \!\@tempskipa! have $0\,|pt|\ |plus|\ f\,|fil|$ where $f$ is replaced by 1
% if $f=\emptyset$.
%
@@ -15503,7 +16000,7 @@
% $\phi_f=\!\dimen@ii!$ as follows
% $$
% (\phi_s,\phi_f)=\cases{(\WT/\W,\;0)& $W\geq\WT\;\lor\;F\leq0$\cr
-% (1,\;(\WT-W)/F)&$W<WT\;\land\;F>0$}
+% (1,\;(\WT-W)/F)&$W<\WT\;\land\;F>0$}
% $$
% where $W=\!\dimen@!$, $F\times1\,|pt|=\!\dimen@ii!$ and $\WT=\!\textwidth!$,
% and $\phi_s=1$ is represented by empty body of \!\pcol@setcw@scale!.
@@ -15621,7 +16118,7 @@
% body respectively but with $\!\catcode!=12$ (other) which is used in
% \!\the!-representation of glues. For the definition, we invoke
% \!\pcol@defkw! giving it \!\the!-representation of \!\@tempskipa! letting
-% it have $1\,|pt|\ |plus|\ 1\,|fil|\ |minus|1\,|fil|$ having all keywards
+% it have $1\,|pt|\ |plus|\ 1\,|fil|\ |minus|\ 1\,|fil|$ having all keywards
% we need to have\footnote{
% 
% We can do what \!\pcol@defkw! does by temporarily giving $\!\catcode!=12$
@@ -15708,8 +16205,8 @@
% 
% \begin{quote}
% \let\@sverb\latex@sverb
-% \verb*|\def\pcol@extract@fil@iii#1fil#2@nil{%|\\
-% | \@tempdimb\pcol@setcw@filunit\relax \@tempdimb#2\@tempdimb}|
+% \verb*|\def\pcol@extract@fil@iii#1fil#2\@nil{%|\\
+% | \@tempdimb\pcol@setcw@filunit\relax \@tempdimb#1\@tempdimb}|
% \end{quote}
% 
% just once at the top level too.
@@ -16073,12 +16570,13 @@
% {Introduced for the implementation of the new API command
% \cs{synccounter}.}
% 
-% The macro $\!\pcol@com@synccounter!\<\theta\>$, the implementation of the
-% \elocal{} API macro \!\synccounter!, lets $\val_c(\theta)=\Val(\theta)$
-% for all $c\In0\C$. That is, the value of the counter $\theta$ is {\em
-% broadcasted} to all columns for the {\em\Uidx\csync} of $\theta$. This
-% broadcast is done by \!\pcol@synccounter! with an argument
-% $\!\@elt!|{|\theta|}|$ so that it works only on $\theta$.
+% The macro $\!\pcol@com@synccounter!\<\theta\>$, being the implementation
+% of the \elocal{} API macro \!\synccounter!, lets
+% $\val_c(\theta)=\Val(\theta)$ for all $c\In0\C$. That is, the value of
+% the counter $\theta$ is {\em broadcasted} to all columns for the
+% {\em\Uidx\csync} of $\theta$. This broadcast is done by
+% \!\pcol@synccounter! with an argument $\!\@elt!|{|\theta|}|$ so that it
+% works only on $\theta$.
% 
% \begin{macrocode}
\def\pcol@com@synccounter#1{\pcol@synccounter{\@elt{#1}}}
@@ -16132,10 +16630,10 @@
% {Introduced for the implementation of the new API command
% \cs{syncallcounters}.}
% 
-% The macro \!\pcol@com@syncallcounters!, the implementation of the
-% \elocal{} API macro \!\syncallcounters! makes all \lcounter{}s in all
+% The macro \!\pcol@com@syncallcounters!, being the implementation of the
+% \elocal{} API macro \!\syncallcounters!, makes all \lcounter{}s in all
% columns have the value in the current column. That is, for each
-% $c\In0\C$, we invoke \!\pcol@savecounters! to let $\val_c(\cl)=\Val(\cl)$
+% $c\In0\C$, we invoke \!\pcol@savecounters! to let $\val_c(\cl)={\Val}(\cl)$
% for all $\cl\in\CTL$.
% 
% \begin{macrocode}
@@ -16277,7 +16775,7 @@
% {Add a space before the number of columns in the error message.}
% 
% \begin{macro}{\pcol@iswitchcolumn}
-% The macro $\!\pcol@com@switchcolumn!|[|d|]|$, the implementation of the
+% The macro $\!\pcol@com@switchcolumn!|[|d|]|$, being the implementation of the
% \elocal{} API macro \!\switchcolumn!, switches to the column $d$ if provided
% through its optional argument, or to $d=(c+1)\bmod\C$ otherwise where $c$
% is the ordinal of the current column. After making it sure to be in
@@ -17666,7 +18164,7 @@
% or the margins are swapped otherwise.
%
% The macro \!\def!ines \!\pcol@mpthreshold@l! to let it have $t_l$ after a
-% assigning $t_l$ to \!\@tempcnta! to ensure $t_l$ gives sum number, and
+% assigning $t_l$ to \!\@tempcnta! to ensure $t_l$ gives some number, and
% then do the same for \!\pcol@mpthreshold@r! with $t_r$ by
% \!\pcol@marginparthreshold! if $t_r$ is provided, or let the marco have
% $t_l$ otherwise. Note that at the top level we do
@@ -17760,6 +18258,12 @@
% \end{macro}
% 
% \KeepSpace{1}
+% \changes{v1.22}{2013/06/30}
+% {\cs{pcol@getshadowcc} was introduced for setting $\hat\gamma_0^c$
+% into $\gamma_0^c$ locally, but removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@getshadowcc} is removed according to the change of text
+% coloring from \cs{output} to \cs{insert}.}
% \begin{macro}{\pcol@icolumncolor}
% \changes{v1.2-1}{2013/05/11}
% {Introduced to implement \cs{columncolor} and
@@ -17774,13 +18278,25 @@
% justified.}
% \changes{v1.24}{2013/07/27}
% {Add math mode to the cases of ineffective use.}
+% \changes{v1.34}{2018/05/07}
+% {Remove the invocations of \cs{pcol@iicolumncolor} for
+% $\cs{pcol@columncolor@shadow}\cdot c$ because it no longer exists,
+% completly change the opearations in the case the target column $c$
+% is the current one according to the new method with \cs{insert},
+% and add immediate setting of $\gamma_0^c$ in the case $c$ is not
+% current.}
% \begin{macro}{\pcol@iicolumncolor}
% \changes{v1.22}{2013/06/30}
% {Introduced for setting $\gamma_0^c$ and $\hat\gamma_0^c$, and
% pushing $\chi$.}
-% \begin{macro}{\pcol@getshadowcc}
-% \changes{v1.22}{2013/06/30}
-% {Introduced for setting $\hat\gamma_0^c$ into $\gamma_0^c$ locally.}
+% \changes{v1.34}{2018/05/07}
+% {Remove the third argument, change the second argument from a
+% control sequence name to the target column, add a grouping to
+% surround the entire body of the macro, and change the body of
+% $\gamma_0^c$ so that it only has the color information.}
+% \begin{macro}{\pcol@scancst@shadow}
+% \changes{v1.34}{2018/05/07}
+% {Introduced to rewind or establish the color stack $\hat\Gamma^c$.}
% 
% The macro \!\pcol@icolumncolor!\marg{cmd}\oarg{c}, invoked from
% \!\pcol@columncolor! and \!\normal~columncolor!, performs the operations to
@@ -17789,54 +18305,57 @@
% as follows. First we examine if \!\set@color! is not \!\relax! and we are
% in non-internal vertical or non-restricted horizontal mode and, if not, we
% complain the command whose name is in \!\pcol@colorcommand! is ineffective
-% by \!\PackageWarning! and do nothing. Otherwise and if we are not in a
-% \env{paracol} environment, i.e., \!\pcol@zparacol! is not \!\let!-equal to
-% \!\pcol@paracol!, or if we are in a column $c'\neq c$, we simply invoke
-% \!\pcol@iicolumncolor! to let both $\Celt^c$ and $\Celtshadow^c$ have the
-% color $\gamma$ specified by $\arg{cmd}$, because $\Celt^c$ will not be
-% referred to by \!\output! routine until a \env{paracol} environment starts
-% or \cswitch{} to $c$ is performed.
-%
-% Otherwise, i.e., if we are in a \env{paracol} environment and in the
-% column $c$, we temporarily let $\cst=\cstshadow$ and
-% $\Celt^c=\Celtshadow^c$, the latter is done by \!\pcol@getshadowcc! by a
-% lengthy sequence for
-% $\!\let!|\pcol@columncolor|{\cdot}c=|\pcol@columncolor@shadow|{\cdot}c$.
+% by \!\PackageWarning! and do nothing.
+%
+% Otherwise and if we are not in a \env{paracol} environment, i.e.,
+% \!\paracol! is not \!\let!-equal to \!\pcol@paracol!, we simply invoke
+% \!\pcol@iicolumncolor! to let $\Celtshadow^c=|\pcol@columncolor|\cdot c$
+% have the color $\chi$ specified by $\arg{cmd}$ so that the next
+% \beginparacol{} will let $\Celt^c$ have the coloring \!\special! for
+% $\chi$. If we are in a \env{paracol} environment but in a column $c'\neq
+% c$, on the other hand, we also let $\Celtshadow=\chi$ but in addition let
+% $\Celt^c=|\pcol@columncolor@box|\cdot c$ have the coloring \!\special! for
+% $\chi$ immediately so that it is effective in the next \cswitch{} to $c$.
+% This immediate setting of $\Celt^c$ is done by invoking $\arg{cmd}$ with
+% the original \!\set@color! saved in \!\pcol@set@color! and the
+% nullification of \!\aftergroup!, after acquiring an \!\insert! for it if
+% necessary,
% 
% \SpecialArrayIndex{c}{\pcol@columncolor}
-% \SpecialArrayIndex{c}{\pcol@columncolor@shadow}
-% 
-% Then we invoke \!\pcol@clearcolorstack! and \!\pcol@restorecolorstack!
-% before and after the operations to define the default color, so that
-% $\Celt^c$ is placed at the bottom of the \colorstack{} of |.dvi|.
-%
-% The default color definition is done by adding the color $\gamma$ to the
-% tail of $\cstb$ by \!\pcol@iicolumncolor!, and by letting
-% $\Celtshadow^c=\gamma$ also by \!\pcol@iicolumncolor!, before making the
-% \!\output! request \!\pcol@op@cset! for \!\pcol@output@cset! by
-% \!\pcol@color@invokeoutput! whose second argument is \!\relax! to mean
-% nothing is inserted after \!\vadjust! when we are in horizontal mode.
-% Note that the \!\output! request is made outside a group in which we
-% rewind and reestablish the \colorstack{} with $\Celtshadow^c$ and
-% $\cstshadow$ because the temporary setting $\Celt^c=\Celtshadow^c=\gamma$
-% is harmful if it is seen by \!\output! routine for page breaking which
-% can be invoked at the timing of the request of \!\pcol@op@cset! but just
-% prior to the acceptance of it.
-%
-% The macro $\!\pcol@iicolumncolor!\arg{cmd}\arg{dcs}\arg{scs}$ at first
+% \SpecialArrayIndex{c}{\pcol@columncolor@box}
+%
+% Otherwise, i.e., if we are in a \env{paracol} environment and in the
+% column $c$, at first we invoke \!\pcol@scancst@shadow! to rewind
+% $\CSTshadow^c$ applying $\!\@elt!=\!\reset@color!$ to
+% $\celtshadow_i\in\CSTshadow^c$. Then, after letting $\Celtshadow^c=\chi$,
+% we invoke \!\pcol@scancst@shadow! again to reestablish $\CSTshadow^c$ with
+% the new $\Celtshadow^c$ so that $\Celtshadow^c$ is at the bottom of the
+% \colorstack{} in |.tex|. In this scan $\!\@elt!\arg{\celtshadow_i}$
+% \!\def!ines \!\current@color! to let it have $\celtshadow_i$ and then
+% invokes \!\pcol@set@color! to put the coloring \!\special! for
+% $\celtshadow_i$ nullifying \!\aftergroup!. Then we \!\insert! a \!\vbox!,
+% whose height and depth are 1\,|pt| and width is 0, having the coloring
+% \!\special! for $\chi$ so that \!\output! will let $\Celt^c$ have the
+% \!\special! in a synchronous manner. After that we put a
+% $\!\penalty!=10000$ if $\CSIndex{if@nobreak}=\true$ to keep the
+% \!\insert!ion from being followed by a page break.
+%
+% The macro $\!\pcol@iicolumncolor!\arg{cmd}\arg{c}$ at first
% invokes $\arg{cmd}$ to let \!\current@color! have the printer-specific color
-% information $\gamma$ of $\arg{color}$ or what \!\normalcolor! specifies,
+% information $\chi$ of $\arg{color}$ or what \!\normalcolor! specifies,
% temporarily letting \!\set@color! be \!\relax! to let \!\color! or
-% \!\normalcolor! just do the \!\def!inition of \!\current@color! without
+% \!\normalcolor! just do the \!\def!inition of \!\current@color! without
% putting coloring \!\special!s nor preparing \colorstack{} popping. Then
-% we \!\xdef!ine $\arg{dcs}$ being $|\pcol@columncolor|{\cdot}c$,
-% $|\pcol@columncolor@shadwo|{\cdot}c$ or \!\pcol@colorstack@buf! to have
-% $\arg{scs}$ being empty or \!\pcol@colorstack@buf! followed by $\gamma$.
-% That is we let $\Celt^c=\gamma$ or $\Celtshadow^c=\gamma$, or add $\gamma$ at
-% the tail of $\cstb$.
+% we \!\xdef!ine $\Celtshadow^c=|\pcol@columncolor|{\cdot}c$ to have $\chi$.
% 
% \SpecialArrayIndex{c}{\pcol@columncolor}
-% \SpecialArrayIndex{c}{\pcol@columncolor@shadow}
+%
+% \begingroup\hfuzz3.1pt
+% The macro \!\pcol@scancst@shadow! applies \!\@elt! to $\Celtshadow^c$ to
+% put a coloring or uncoloring \!\special! for it if it is defined, and then
+% do the same for all
+% $\celtshadow_i\in\cstshadow=\!\pcol@colorstack@shadow!$.
+% \par\endgroup
% 
% \begin{macrocode}
\def\pcol@icolumncolor#1[#2]{%
@@ -17854,35 +18373,48 @@
\begingroup
\let\@elt\relax
\ifx\pcol@paracol\paracol
- \pcol@iicolumncolor{#1}{pcol@columncolor#2}{}%
- \pcol@iicolumncolor{#1}{pcol@columncolor@shadow#2}{}%
+ \pcol@iicolumncolor{#1}{#2}%
\else\ifnum#2=\pcol@currcol
- \begingroup
- \pcol@getshadowcc{#2}\let\pcol@colorstack\pcol@colorstack@shadow
- \pcol@clearcolorstack
- \pcol@iicolumncolor{#1}{pcol@colorstack@buf}{\pcol@colorstack@buf}%
- \pcol@iicolumncolor{#1}{pcol@columncolor@shadow#2}{}%
- \pcol@getshadowcc{#2}\pcol@restorecolorstack
- \endgroup
- \pcol@color@invokeoutput\pcol@op@cset\relax
+ \def\@elt##1{\reset@color}\pcol@scancst@shadow
+ \pcol@iicolumncolor{#1}{#2}%
+ \def\@elt##1{\def\current@color{##1}\let\aftergroup\@gobble
+ \pcol@set@color}%
+ \pcol@scancst@shadow
+ \setbox\@tempboxa\vbox{\let\set@color\pcol@set@color
+ \let\aftergroup\@gobble #1}%
+ \ht\@tempboxa1sp \dp\@tempboxa1sp \wd\@tempboxa\z@\relax
+ \insert\pcol@colorins{\box\@tempboxa}%
+ \ifvmode\if@nobreak \nobreak \fi\fi
\else
- \pcol@iicolumncolor{#1}{pcol@columncolor#2}{}%
- \pcol@iicolumncolor{#1}{pcol@columncolor@shadow#2}{}%
+ \pcol@iicolumncolor{#1}{#2}%
+ \pcol@currcol#2\relax
+ \ifvoid\pcol@ccuse{@box}%
+ \@next\@currbox\@freelist{}\pcol@ovf
+ \pcol@ccxdef{\@currbox}%
+ \fi
+ \global\setbox\pcol@ccuse{@box}\vbox{\let\set@color\pcol@set@color
+ \let\aftergroup\@gobble #1}%
\fi\fi
\endgroup
\fi\fi
\ignorespaces}
-\def\pcol@iicolumncolor#1#2#3{\let\set@color\relax #1%
- \expandafter\xdef\csname#2\endcsname{#3\@elt{\current@color}}}
-\def\pcol@getshadowcc#1{%
- \expandafter\let\expandafter\reserved@a
- \csname pcol@columncolor@shadow#1\endcsname
- \expandafter\let\csname pcol@columncolor#1\endcsname\reserved@a}
+\def\pcol@iicolumncolor#1#2{{\let\set@color\relax #1%
+ \expandafter\xdef\csname pcol@columncolor#2\endcsname{\current@color}}}
+\def\pcol@scancst@shadow{%
+ \pcol@ifccdefined{\@elt{\pcol@ccuse{}}}\relax
+ \pcol@colorstack@shadow}
% \end{macrocode}
% \end{macro}\end{macro}\end{macro}
%
% \KeepSpace{1}
+% \begin{macro}{\pcol@mcpushlimit}
+% \changes{v1.24}{2013/07/27}
+% {Introduced for coloring specified in math mode.}
+% \changes{v1.34}{2018/05/07}
+% {Move down to place it just before the \cs{def}inition of
+% \cs{pcol@set@color@push} being the sole referrer, and change its
+% body from 100 to 1000.}
% \begin{macro}{\set@color}
% \begin{macro}{\pcol@set@color}
% \begin{macro}{\pcol@set@color@push}
@@ -17899,6 +18431,9 @@
% {Change the second argument of \cs{pcol@color@invokeoutput} from
% \cs{hskip}\cs{z@} to \cs{pcol@fcwhyphenate} to make null skip
% insertion conditional.}
+% \changes{v1.34}{2018/05/07}
+% {Completely change its definition according to the new text coloring
+% with \cs{insert}.}
% 
% The macro \!\pcol@set@color@push! is invoked whenever \LaTeX's
% counterpart \!\set@color! appears in a \env{paracol} environment through
@@ -17906,39 +18441,48 @@
% \LaTeX's macro with it saving the original version in \!\pcol@set@color!,
% if the original \!\set@color! is not \!\relax! to mean some coloring
% package is in use. This original version is used through
-% \!\pcol@set@color! by \!\pcol@bg@paintregion@i! and \!\pcol@set@color@elt!
-% besides this macro \!\pcol@set@color@push!.
+% \!\pcol@set@color! by \!\pcol@bg@paintregion@i!, \!\pcol@output@start! and
+% \!\pcol@icolumncolor! besides this macro \!\pcol@set@color@push!,
+% while \!\output! lets $\!\set@color!=\!\pcol@set@color!$ for the references
+% outside of our control.
%
% The macro at first invokes its original version being \!\pcol@set@color!
-% to let it put appropriate coloring \!\special! to |.dvi|. Then, it
-% performs one of two different operations depending on TeX's mode, i.e.,
-% math mode or not. If we are in math mode and not in a \!\vbox!, at first
-% we examine if $\!\pcol@mcid!=i=0$ and, if so, we make
-% $\mplist=\!\pcol@colorstack@mpushed!$ empty because there are no pending
-% math-mode requests of pushes. Then if $i<\mplimit=\!\pcol@mcpushlimit!$,
-% we do the followings for \!\output! request of \colorstack{} pushing;
-% reserve the invocation of the macro $|\pcol@reset@color@mpop@|{\cdot}i$
+% to put an appropriate coloring \!\special! to |.dvi| and reserve the
+% invocation of \!\reset@color! by \!\aftergroup!. Then, it performs one of
+% two different operations depending on TeX's mode, i.e., math mode or not.
+% If we are in math mode and not in a \!\vbox!, at first we increment
+% $m=\!\pcol@mcid!$ and examine if $m>\!\pcol@mcpushlimit!=1000$, and if so
+% we stop the execution with \!\PackageError!\footnote{
% 
-% \SpecialArrayIndex{i}{\pcol@reset@color@mpop@}
+% And let $m=1$ to allow a user to continue the execution bravely.}
% 
-% for corresponding pop by \!\aftergroup! defining the macro as
-% $\!\pcol@reset@color@mpop!\Arg{i}\Arg{\gamma}$ where $\gamma$ is the color
-% information stored in \!\current@color!; make the \!\output! request with
-% $\!\penalty!=\mppush-i$ by \!\pcol@color@invokeoutput! letting its second
-% argument \!\relax! because nothing should be inserted after \!\vadjust!;
-% and increment \!\pcol@mcid! to make the identifier $i$ unique\footnote{
+% in order to avoid too many macros $|\pcol@reset@color@mpop@|\cdot m$ are
+% defined\footnote{
% 
-% We don't touch the shadow stack $\cstshadow$ because \!\columncolor! or
-% \!\normalcolumncolor! is not effective in math mode.}.
+% \SpecialArrayIndex{m}{\pcol@reset@color@mpop@}
% 
-% Otherwise, i.e., $i\geq\mplimit$, we have to stop the execution with
-% \!\PackageError!.
+% We could make the number of math-mode coloring operations virtually
+% unlimited by putting all digits of the decimal representation of $m$
+% followed by a terminator by multiple
+% \cs{aftergroup}s so that \cs{pcol@reset@color@mpop} is put by
+% \cs{aftergroup} prior to them to capture them as its argument, but
+% limiting with $2^{31}-1$ is still necessary and that with 1000 is
+% reasonable.}.
+% 
+% Otherwise, i.e., if $m\leq\!\pcol@mcpushlimit!$, we
+% reserve the invocation of the macro $|\pcol@reset@color@mpop@|{\cdot}i$
+% 
+% \SpecialArrayMainIndex{m}{\pcol@reset@color@mpop@}
+% 
+% for our own pop by \!\aftergroup! defining the macro as
+% $\!\pcol@reset@color@mpop!\Arg{m}$. If we are not in math mode, on the
+% other hand, and neither in a \!\vbox! nor in restricted horizontal mode,
+% we simply reserve the invocation of the macro $\pcol@reset@color@pop$.
%
-% If we are not in math mode, on the other hand, and neither in a \!\vbox!
-% nor in restricted horizontal mode, we push the contents of
+% Then, regardless that we are in math mode or not, we push the contents of
% \!\current@color!, which \!\set@color! should refer to as the color
% information to be set, into the shadow \colorstack{}
-% $\cstshadow=\!\pcol@colorstack@shadow!$ for the stack rewiding\slash
+% $\cstshadow=\!\pcol@colorstack@shadow!$ for the stack rewinding\slash
% reestablishing in \!\columncolor! and \!\normalcolumncolor!. Since this
% push is done non-\!\global!ly with \!\edef!, we save\slash restore the
% definition of \!\@elt! to\slash from \Midx{\!\pcol@elt@save!} before\slash
@@ -17946,139 +18490,133 @@
% 
% Just in case.}.
% 
-% The color information is also added to the list
-% $\cstb=\!\pcol@colorstack@buf!$ so that the push to $\cst$ is done in
-% \!\pcol@output@cpush! invoked by the \!\output! request \!\pcol@op@cpush!
-% made by \!\pcol@color@invokeoutput!, whose second argument
-% \!\pcol@fcwhyphenate! being \!\hskip!\!\z@! when \!\coloredwordhyphenated!
-% is effective is to split coloring \!\special! and \!\vadjust! from the
-% first colored word so that the word may be hyphenated if we are in
-% horizontal mode. We also reserve the invocation of
-% \!\pcol@reset@color@pop! by \!\aftergroup! for the corresponding pop.
+% Then we \!\insert! a \!\vbox! through \!\pcol@colorins! for the push of
+% $\celt_i$ or $\mcelt_{i,m}$ to $\cstraw$ synchronous with a page break or
+% \cswitch{}. The height of the \!\vbox! is 1\,|pt|, depth is 0 and
+% width is $m$\,|sp| if we are in math mode or 0 otherwise, and its
+% contents is the coloring \!\special! given by \!\pcol@set@color! so that
+% the \!\special! is what the macro put at the beginning of this macro but
+% without the reservation of \!\reset@color!. After the insertion, we put
+% \!\pcol@fcwhyphenate!, being \!\hskip!\!\z@! when
+% \!\coloredwordhyphenated! is effective, to split the coloring \!\special!
+% from the first colored word so that the word may be hyphenated if we are
+% in horizontal mode. If we are in vertical mode, on the other hand, we do
+% \!\nobreak! if $\CSIndex{if@nobreak}=\true$ to keep the \!\insert!ion from
+% being followed by a page break.
% 
% \begin{macrocode}
+\def\pcol@mcpushlimit{1000}
\def\pcol@set@color@push{\pcol@set@color
- \ifmmode\ifpcol@inner\else
- \ifnum\pcol@mcid=\z@ \gdef\pcol@colorstack@mpushed{}\fi
- \ifnum\pcol@mcid<\pcol@mcpushlimit\relax
+ \ifmmode\else\ifinner \pcol@innertrue \fi\fi
+ \ifpcol@inner\else
+ \ifmmode
+ \global\advance\pcol@mcid\@ne
+ \ifnum \pcol@mcid>\pcol@mcpushlimit\relax
+ \PackageError{paracol}{Too many coloring commands in math mode}\@ehb
+ \global\pcol@mdid\@ne
+ \fi
+ \@tempdima\pcol@mcid sp\relax
\expandafter\aftergroup
\csname pcol@reset@color@mpop@\number\pcol@mcid\endcsname
\expandafter\xdef
\csname pcol@reset@color@mpop@\number\pcol@mcid\endcsname
- {\noexpand\pcol@reset@color@mpop
- {\number\pcol@mcid}{\current@color}}%
- \@tempcnta-\pcol@op@mcpush\relax \advance\@tempcnta-\pcol@mcid
- \pcol@color@invokeoutput\@tempcnta\relax
- \global\advance\pcol@mcid\@ne
+ {\noexpand\pcol@reset@color@mpop{\number\pcol@mcid}}%
\else
- \PackageError{paracol}{Too many coloring commands in math mode}\@ehb
- \fi\fi
- \else
- \ifinner \pcol@innertrue \fi
- \ifpcol@inner\else
- \aftergroup\pcol@reset@color@pop
- \let\pcol@elt@save\@elt \let\@elt\relax
- \edef\pcol@colorstack@shadow{\pcol@colorstack@shadow
- \@elt{\current@color}}%
- \let\@elt\pcol@elt@save
- \@cons\pcol@colorstack@buf{{\current@color}}%
- \pcol@color@invokeoutput\pcol@op@cpush\pcol@fcwhyphenate
+ \aftergroup\pcol@reset@color@pop \@tempdima\z@
\fi
+ \let\pcol@elt@save\@elt \let\@elt\relax
+ \edef\pcol@colorstack@shadow{\pcol@colorstack@shadow\@elt{\current@color}}%
+ \let\@elt\pcol@elt@save
+ \setbox\@tempboxa\vbox{\let\aftergroup\@gobble \pcol@set@color}%
+ \ht\@tempboxa1sp \dp\@tempboxa\z@ \wd\@tempboxa\@tempdima
+ \insert\pcol@colorins{\box\@tempboxa}\ifhmode \pcol@fcwhyphenate \fi
+ \ifvmode\if@nobreak \nobreak \fi\fi
\fi}
% \end{macrocode}
-% \end{macro}\end{macro}\end{macro}
+% \end{macro}\end{macro}\end{macro}\end{macro}
%
% \begin{macro}{\pcol@reset@color@pop}
% \changes{v1.2-1}{2013/05/11}
% {Introduced to work as \cs{reset@color}.}
% \changes{v1.22}{2013/06/30}
-% {Modified to pop color stack by \cs{output} always.}
+% {Modified to pop color stack by \cs{output} and to examine if
+% $\cs{ifpcol@output}\EQ\mathit{true}$.}
% \changes{v1.23}{2013/07/08}
% {Add an argument of \cs{relax} to \cs{pcol@color@invokeoutput}
% so that the last word of a colored text is not followed by a line
% break candidate.}
+% \changes{v1.34}{2018/05/07}
+% {Completely change its definition according to the new text coloring
+% with \cs{insert}.}
% \begin{macro}{\pcol@reset@color@mpop}
% \changes{v1.24}{2013/07/27}
% {Introduced for coloring specified in math mode.}
+% \changes{v1.34}{2018/05/07}
+% {Completely change its definition according to the new text coloring
+% with \cs{insert}.}
% 
% The macro \!\pcol@reset@color@pop! and its math-mode relative
-% $\!\pcol@reset@color@mpop!\Arg{i}\~\Arg{\gamma}$ are invoked by
+% $\!\pcol@reset@color@mpop!\~\Arg{m}$ are invoked by
% \!\aftergroup! mechanism in \!\pcol@set@color@push!, directly for the
-% former and through the macro $|\pcol@reset@color@mpop@|{\cdot}i$
-% 
-% \SpecialArrayIndex{i}{\pcol@reset@color@mpop@}
-% 
-% for the latter. They make \!\output! requests, \!\pcol@op@cpop! in the
-% former and $\mppop-i$ in the latter, through \!\pcol@color@invokeoutput!
-% whose second argument is \!\relax! because nothing is inserted after
-% \!\special! and \!\vadjust! when we are in horizontal or math mode.
+% former and through the macro $|\pcol@reset@color@mpop@|{\cdot}m$
+% 
+% \SpecialArrayIndex{m}{\pcol@reset@color@mpop@}
+% 
+% for the latter. They \!\insert! a \!\vbox! for $\celtpop_i$ or
+% $\mceltpop_{i,m}$ to add it to $\cstraw$ synchronously with a page break
+% or \cswitch{}. Therefore, the height and depth of the \!\vbox! are 0 and
+% width is 0 for $\celtpop_i$ or $m$\,|sp| for $\mceltpop_{i,m}$. The
+% contents of the \!\vbox! is an uncoloring \!\special! given by
+% \!\reset@color! but this is done just for debugging to show what
+% \!\pcol@colorins! has by, for example, \!\pcol@ShowBox!. Then if we are
+% in vertical mode and $\CSIndex{if@nobreak}=\true$, we do \!\nobreak! to
+% keep the \!\insert!ion from being followed by a page break even in
+% \!\pcol@reset@color@mpop! because its corresponding
+% \!\pcol@set@color@push! may have been in a displayed math construct after
+% which we are in vertical mode.
%
% One caution is that \!\pcol@reset@color@pop! can be invoked outside the
% \env{paracol} environment in which the corresponding
% \!\pcol@set@color@push! appears. In this case with
% $\CSIndex{ifpcol@output}=\false$, we don't need to do the pop operation
-% and cannot make the \!\output! request for it because \!\output! is not
-% for \env{paracol}. Another remark is that \!\pcol@reset@color@mpop! is
-% temporarily redefined by \!\pcol@output@mcpush! to make it
-% \!\pcol@output@imcpush! to append $i$ to $\mplist$ and $\gamma$ to $\cst$.
+% and cannot make the \!\insert!ion for it because \!\output! is not for
+% \env{paracol}.
% 
% \begin{macrocode}
-\def\pcol@reset@color@pop{\ifpcol@output
- \pcol@color@invokeoutput\pcol@op@cpop\relax \fi}
-\def\pcol@reset@color@mpop#1#2{\@tempcnta-\pcol@op@mcpop\relax
- \advance\@tempcnta-#1\relax
- \pcol@color@invokeoutput\@tempcnta\relax}
+\def\pcol@reset@color@pop{%
+ \ifpcol@output
+ \setbox\@tempboxa\vbox{\reset@color}%
+ \ht\@tempboxa\z@ \dp\@tempboxa\z@ \wd\@tempboxa\z@
+ \insert\pcol@colorins{\box\@tempboxa}%
+ \ifvmode\if@nobreak \nobreak \fi\fi
+ \fi}
+\def\pcol@reset@color@mpop#1{%
+ \setbox\@tempboxa\vbox{\reset@color}%
+ \ht\@tempboxa\z@ \dp\@tempboxa\z@ \wd\@tempboxa#1sp\relax
+ \insert\pcol@colorins{\box\@tempboxa}%
+ \ifvmode\if@nobreak \nobreak \fi\fi
+}
% \end{macrocode}
% \end{macro}\end{macro}
%
-% \begingroup\let\small\footnotesize
-% \begin{macro}{\pcol@color@invokeoutput}
% \changes{v1.22}{2013/06/30}
-% {Introduced for \cs{output} request for coloring.}
+% {\cs{pcol@color@invokeoutput} was introduced for \cs{output}
+% request for coloring but removed in v1.34.}
% \changes{v1.23}{2013/07/08}
-% {Add second argument $s$ to insert a null skip
-% after \cs{vadjust} only when the macro is invoked from
-% \cs{pcol@set@color@push} in horizontal mode.}
-% \begin{macro}{\pcol@color@invokeoutput@v}
+% {\cs{pcol@color@invokeoutput} was modified to add second argument
+% $s$ to insert a null skip after \cs{vadjust} only when the macro is
+% invoked from \cs{pcol@set@color@push} in horizontal mode.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@color@invokeoutput} is removed according to the change of
+% text coloring from \cs{output} to \cs{insert}.}
% \changes{v1.22}{2013/06/30}
-% {Introduced for \cs{output} request for coloring.}
-% 
-% \begin{Sloppy}{2000}
-% The macro $\!\pcol@color@invokeoutput!\arg{pen}\arg{s}$ where
-% $\arg{pen}=|\pcol@op@|{\cdot}f$ and $s\in\break\{\!\hskip!\!\z@!,\!\relax!\}$,
-% 
-% \SpecialIndex{\pcol@op@cpush}
-% \SpecialIndex{\pcol@op@cpop}
-% \SpecialIndex{\pcol@op@cset}
-% 
-% invoked from \!\pcol@set@color@push! ($f=|cpush|$, $s=\!\hskip!\!\z@!$),
-% \!\pcol@reset@color@pop! ($f=|cpop|$, $s=\!\relax!$) and
-% \!\pcol@icolumncolor! ($f=|cset|$, $s=\!\relax!$), makes an \!\output!
-% request with $\!\penalty!\arg{pen}$. The following sequence to make the
-% request performed by $\!\pcol@color@invokeoutput@v!\arg{pen}$ is exactly
-% same as that in \LaTeX's \!\end@float!; insert a \!\penalty! of $-10004$
-% to save the main vertical list in \!\@holdpg!; save \!\prevdepth!; insert
-% a \!\vbox! to make it sure the following \!\penalty! of $\arg{pen}$ is
-% kept even when we are at the top of a page; and finally restore
-% \!\prevdepth!. The sequence is simply excueted when we are in vertical
-% mode, while it is enclosed in \!\vadjust! otherwise. In addition, when
-% we are in horizotal mode, the \!\vadjust! is followed by $s$ which makes
-% it possible that the word following a coloring command such as \!\color!
-% is hyphenated with $s=\!\pcol@fcwhyphenate!=\!\hskip!\!\z@!$.
-% \end{Sloppy}
-% \end{macro}\end{macro}\endgroup
-% 
-% \begin{macrocode}
-\def\pcol@color@invokeoutput#1#2{%
- \ifvmode \pcol@color@invokeoutput@v{#1}%
- \else \vadjust{\pcol@color@invokeoutput@v{#1}}\ifhmode #2\fi
- \fi}
-\def\pcol@color@invokeoutput@v#1{\penalty-\@Miv \@tempdima\prevdepth
- \vbox{}\prevdepth\@tempdima \penalty#1\relax}
-
-% \end{macrocode}
+% {\cs{pcol@color@invokeoutput@v} was introduced for \cs{output}
+% request for coloring but removed in v1.34.}
+% \changes{v1.34}{2018/05/07}
+% {\cs{pcol@color@invokeoutput@v} is removed according to the change of
+% text coloring from \cs{output} to \cs{insert}.}
%
% \KeepSpace{1}
% \begin{macro}{\coloredwordhyphenated}
@@ -18096,9 +18634,9 @@
% 
% The API macro \!\coloredwordhyphenated! \!\def!ines the macro
% \!\pcol@fcwhyphenate! being \!\hskip!\!\z@! so that the null space is
-% inserted after \!\vadjust! with $\!\outputpenalty!=\!\pcol@op@cpush!$ in
-% \!\pcol@color@invokeoutput! used in \!\pcol@set@color@push! in horizontal
-% mode, so that the word following it can be hyphenated. The other API macro
+% inserted after the coloring \!\special! and \!\insert! put by
+% \!\pcol@set@color@push! if we are in horizontal mode, so that the word
+% following them can be hyphenated. The other API macro
% \!\nocoloredwordhyphenated! makes $\!\pcol@fcwhyphenate!=\!\relax!$ to
% inhibit the insertion. Since the null skip is a line break candidate, the
% skip might cause an unexpected and undesirable line break. However, this
diff --git a/Master/texmf-dist/source/latex/paracol/paracol.dtx b/Master/texmf-dist/source/latex/paracol/paracol.dtx
index 40d22cb2806..83b24fff502 100644
--- a/Master/texmf-dist/source/latex/paracol/paracol.dtx
+++ b/Master/texmf-dist/source/latex/paracol/paracol.dtx
@@ -2,7 +2,7 @@
%<paracol>%% Style file `paracol'.
%<man>%% LaTeX file 'paracol-man'.
%<*paracol|man>
-%% Copyright (C) 2005-2015
+%% Copyright (C) 2005-2018
%% Hiroshi Nakashima <h.nakashima@DOMAIN; DOMAIN=media.kyoto-u.ac.jp>
%% (Kyoto University)
%% This program can be redistributed and/or modified under the terms
@@ -19,7 +19,7 @@
%<man>\ProvidesFile{paracol-man.tex}
% \fi
% \ProvidesFile{paracol.dtx}
-[2015/10/10 v1.32 ]
+[2018/05/07 v1.34 ]
% \iffalse
%<*man>
\documentclass{ltxdoc}\normalmarginpar
@@ -88,6 +88,7 @@
% \nosv
% \gdef\Set#1#2{\{#1\,|\,#2\}}
% \gdef\Abs#1{|#1|}
+% \gdef\Bar{|}
% \endgroup
%
% \def\eqnarray{\stepcounter{equation}\let\@currentlabel=\theequation
@@ -421,14 +422,21 @@
%
% \def\vb{\Index[$\kappa_c(\beta)$]{-k_c(-b)}\beta}
% \def\pd{\Index[$\kappa_c(\delta)$]{-k_c(-d)}\delta}
-% \def\Celt{\Index[$\gamma_0^c$]{-c_0^c}\gamma_0}
-% \def\Celtshadow{\Index[$\hat\gamma_0^c$]{-c_0^c'}\hat\gamma_0}
-% \def\celt{\Index[$\gamma_i$]{-c_i}\gamma}
-% \def\mcelt{\Index[$\gamma'_i$]{-c_i'}\gamma'}
-% \def\cst{\Index[$\string\mathit{\Gamma}$]{-C}\mathit{\Gamma}}
+% \def\Celt{\Index[$\gamma_0^c$]{-c^c_0}\gamma_0}
+% \def\Celtshadow{\Index[$\hat\gamma_0^c$]{-c^xc_0}\hat\gamma_0}
+% \def\celt{\Index[$\gamma_i$]{-c^a_i}\gamma}
+% \def\celtpop{\Index[$\gamma_i^-$]{-c^m_i}\gamma^-}
+% \def\celtshadow{\Index[$\hat\gamma_i$]{-c^x_i}\hat\gamma}
+% \def\mcelt{\Index[$\gamma_{i,m}$]{-c^a_i,m}\gamma}
+% \def\mceltpop{\Index[$\gamma_{i,m}^-$]{-c^m_i,m}\gamma^-}
+% \def\cst{\Index[$\string\mathit{\Gamma}$]{-C^a}\mathit{\Gamma}}
% \def\CST{\Index[$\string\mathit{\Gamma}^c$]{-C^c}\mathit{\Gamma}}
-% \def\csts{\Index[$\string\mathit{\Gamma_s}$]{-C_s}\mathit{\Gamma}_s}
-% \def\cstshadow{\Index[$\hat\string\mathit{\Gamma}$]{-C'}\hat\mathit{\Gamma}}
+% \def\CSTraw{\Index[$\string\mathit{\Gamma}^c_r$]{-C^c_r}\mathit{\Gamma}_r}
+% \def\cstraw{\Index[$\string\mathit{\Gamma}_r$]{-C^a_r}\mathit{\Gamma}_r}
+% \def\csts{\Index[$\string\mathit{\Gamma}_s$]{-C_s}\mathit{\Gamma}_s}
+% \def\CSTshadow{\Index[$\hat\string\mathit{\Gamma}^c$]{-C^xc}
+% \hat\mathit{\Gamma}}
+% \def\cstshadow{\Index[$\hat\string\mathit{\Gamma}$]{-C^x}\hat\mathit{\Gamma}}
% \def\ep{\Index[$\kappa_c(\varepsilon)$]{-k_c(-e)}\varepsilon}
% \def\clist{\Index[$\zeta(\theta)$]{-f(-j)}\zeta}
% \def\fh{\Index[$\kappa_c(\eta)$]{-k_c(-h)}\eta}
@@ -456,26 +464,24 @@
% \def\sw{\Index[$\kappa_c(\sigma)$]{-k_c(-s)}\sigma}
% \def\ft{\Index[$\kappa_c(\tau)$]{-k_c(-t)}\tau}
% \def\df{\Index[$\string\mathit{\Phi}$]{-U}\mathit{\Phi}}
-% \def\cstb{\Index[$\chi$]{-x}\chi}
-% \def\cstbm{\Index[$\chi_m$]{-x_m}\chi_m}
%
% \def\bf{\Index[$b_f$]{b_f}b_f}
% \def\bgc{\Index[$B_a$]{B_a}B}
% \def\bge{\Index[$e_a(d^\pm)$]{e_a(d^+)}e}
% \def\bgr{\Index[$R_a$]{R_a}R}
% \def\C{\Index[$C$]{C}C}
-% \def\Cfrom{\Index[$C^0$]{C^0}{C^0}}
-% \def\CBfrom{\Index[$C_b^0$]{C_b^0}{C_b^0}}
-% \def\CBto{\Index[$C_b^1$]{C_b^1}{C_b^1}}
-% \def\CL{\Index[$C_L$]{C_L}C_L}
-% \def\Cto{\Index[$C^1$]{C^1}{C^1}}
-% \def\cmax{\Index[$c_{\max}$]{c_max}c_{\max}}
+% \def\Cfrom{\Index[$C^0$]{C0^0}{C^0}}
+% \def\CBfrom{\Index[$C_b^0$]{C0_b^0}{C_b^0}}
+% \def\CBto{\Index[$C_b^1$]{C0_b^1}{C_b^1}}
+% \def\CL{\Index[$C_L$]{C0_L}C_L}
+% \def\Cto{\Index[$C^1$]{C0^1}{C^1}}
+% \def\cmax{\Index[$c_{\max}$]{c0_max}c_{\max}}
% \def\dc{\Index[$d_c$]{d_c}d_c}
% \def\DP{\Index[$D_P$]{D_P}D_P}
% \def\DT{\Index[$D_T$]{D_T}D_T}
% \def\false{\Index[$\string\mathit{false}$]{false}\mathit{false}}
-% \def\Fc{\Index[$F_c(X)$]{F_c}F_c}
-% \def\fc{\Index[$f_c(x)$]{f_c}f_c}
+% \def\Fc{\Index[$F_c(X)$]{F0_c}F_c}
+% \def\fc{\Index[$f_c(x)$]{f0_c}f_c}
% \def\gap{\Index[$g_c$]{g_c}g}
% \def\HB{\Index[$H_B$]{H_B}H_B}
% \def\HM{\Index[$H_M$]{H_M}H_M}
@@ -486,15 +492,13 @@
% \def\HT{\Index[$H_T$]{H_T}H_T}
% \def\mplist{\Index[$I$]{I}I}
% \def\nf{\Index[$n_f$]{n_f}n_f}
+% \def\npop{\Index[$n_{\rm pop}$]{n_pop}n_{\rm pop}}
% \def\mpar{\Index[$\mathit{mpar}(t_i,b_i)$]{mpar(t_i,b_i)}\mathit{mpar}}
-% \def\mpb{\Index[$M_{\{L,R\}}^{\{l,r\}}$]{M_{L,R}^{l,r}}M}
-% \def\mpbout{\Index[${\string\cal{M}}$]{M}{\cal M}}
-% \def\mpboutz{\Index[${\string\cal{M}}_0$]{M_0}{\cal M}_0}
-% \def\mplimit{\Index[$L$]{L}L}
-% \def\mppop{\Index[$P_{\string\rm{pop}}$]{P_pop}P_{\rm pop}}
-% \def\mppush{\Index[$P_{\string\rm{push}}$]{P_push}P_{\rm push}}
-% \def\pbase{\Index[$p_b$]{p_b}p_b}
-% \def\ptop{\Index[$p_t$]{p_t}p_t}
+% \def\mpb{\Index[$M_{\{L,R\}}^{\{l,r\}}$]{M0_{L,R}^{l,r}}M}
+% \def\mpbout{\Index[${\string\cal{M}}$]{M1}{\cal M}}
+% \def\mpboutz{\Index[${\string\cal{M}}_0$]{M1_0}{\cal M}_0}
+% \def\pbase{\Index[$p_b$]{p0_b}p_b}
+% \def\ptop{\Index[$p_t$]{p0_t}p_t}
% \def\page{\Index[$\string\mathit{page}(p)$]{page(p)}\mathit{page}}
% \def\S{\Index[$S_c$]{S_c}S}
% \def\SS{\Index[$S$]{S}S}
@@ -508,18 +512,18 @@
% \mathit{val}}
% \def\Val{\Index[$\string\mathit{val}(\theta)$]{val(j)}
% \mathit{val}}
-% \def\vc{\Index[$v_c(x)$]{v_c}v_c}
-% \def\VB{\Index[$V_B$]{V_B}V_B}
-% \def\VE{\Index[$V_E$]{V_E}V_E}
-% \def\VP{\Index[$V_P$]{V_P}V_P}
-% \def\VPP{\Index[$V'_P$]{V_Px}V'_P}
-% \def\VT{\Index[$V_T$]{V_T}V_T}
-% \def\w{\Index[$w_c$]{w_c}w}
-% \def\W{\Index[$W_c$]{W_c}W}
-% \def\WM{\Index[$W_M$]{W_M}W_M}
-% \def\WP{\Index[$W_P$]{W_P}W_P}
-% \def\WR{\Index[$W_R$]{W_R}W_R}
-% \def\WT{\Index[$W_T$]{W_T}W_T}
+% \def\vc{\Index[$v_c(x)$]{v1_c}v_c}
+% \def\VB{\Index[$V_B$]{V0_B}V_B}
+% \def\VE{\Index[$V_E$]{V0_E}V_E}
+% \def\VP{\Index[$V_P$]{V0_P}V_P}
+% \def\VPP{\Index[$V'_P$]{V0_Px}V'_P}
+% \def\VT{\Index[$V_T$]{V0_T}V_T}
+% \def\w{\Index[$w_c$]{w1_c}w}
+% \def\W{\Index[$W_c$]{W0_c}W}
+% \def\WM{\Index[$W_M$]{W0_M}W_M}
+% \def\WP{\Index[$W_P$]{W0_P}W_P}
+% \def\WR{\Index[$W_R$]{W0_R}W_R}
+% \def\WT{\Index[$W_T$]{W0_T}W_T}
%
%
%
@@ -627,7 +631,15 @@
% \changes{v1.32-2}{2015/10/10}
% {Fix a memory leak in \cs{pcol@startcolumn}. (2015/10/10)}
% \changes{v1.32-3}{2015/10/10}
-% {Fix the page-wise float problem. (2015/10/10)}
+% {Fix a page-wise float problem. (2015/10/10)}
+% \changes{v1.33-1}{2016/11/19}
+% {Fix a marginal note problem. (2016/11/19)}
+% \changes{v1.33-2}{2016/11/19}
+% {Non-logical modifications to obey the coding convention, for
+% clarification, etc.. (2016/11/19)}
+% \changes{v1.34}{2018/05/07}
+% {Fix a text coloring problem in non-breakable sequences of vertical
+% items. (2018/05/07)}
%
%
%
@@ -737,9 +749,12 @@
% 
% Tigran Aivazian who reported a memory leak problem fixed in version 1.32;
% 
-% and Marcus Zelezny and Touhami Mamouni who found an incompatibility with
+% Marcus Zelezny and Touhami Mamouni who found an incompatibility with
% \LaTeX{} itself (2015/01/10 or later) and enlighten the author on the cause
-% of the problem.
+% of the problem;
+% 
+% and Manuel Kuehner who reported a bug in text coloring which had hidden
+% for five years until the version 1.34 was released.
%
% For the implementation of the style file, the author referred to the base
% implementations of \texttt{\char`\\output}, \texttt{\char`\\newcounter}
@@ -753,6 +768,7 @@
% \PrintIndex}
%
% \newpage
+% \addtocounter{page}{2}
% \let\Midx\MidxSave
% \advance\oddsidemargin1in\evensidemargin\oddsidemargin
% \advance\textwidth-1in\columnwidth\textwidth
@@ -773,6 +789,6 @@
% \Finale
% \GlossaryPrologue{\newpage\section*{Revision History}
% \addcontentsline{toc}{part}{\protect\numberline{}{Revision History}}}
-% \def\EQ{=} \def\GT{>} \def\BAR{|} \def\NEQ{\neq}
+% \def\EQ{=} \def\GT{>} \def\BAR{|} \def\NEQ{\neq} \def\S{\Sec}
% \PrintChanges
\endinput
diff --git a/Master/texmf-dist/source/latex/paracol/ppts.dtx b/Master/texmf-dist/source/latex/paracol/ppts.dtx
index 311a1efda13..cc7847db7c5 100644
--- a/Master/texmf-dist/source/latex/paracol/ppts.dtx
+++ b/Master/texmf-dist/source/latex/paracol/ppts.dtx
@@ -1,3 +1,4 @@
+% \def\oddeven#1#2{\ifodd\value{page}#1\else#2\fi}
% \marginparpush5pt \@mparswitchtrue
% \section{Two-Sided Typesetting and Parallel-Paging}
% \label{sec:ppts}
@@ -10,25 +11,33 @@
%
% This and the next section are typeset with \Uidx{\!\twosided!} enabling
% features |p|, |c| and |m| and also |b| for a part of the next section.
-% The effect of |p| feature can be seen by the left side, or in other word
-% inside, margin of this odd-numbered page is narrower than that of the
-% previous pages because the author reduced the effective left side margin
-% being $\!\oddsidemargin!+1\,|in|$ by 75\,\%\footnote{
+% The effect of |p| feature can be seen by the \oddeven{left}{right}, or in
+% other word inside, margin of this \oddeven{odd}{even}-numbered page is
+% narrower than that of the previous pages because the author reduced the
+% effective \oddeven{left}{right} side margin being calculated from
+% \oddeven{\cs{oddsidemargin}}{\cs{evesidemargin}}
+% 
+% \SpecialIndex{\oddsidemargin}
+% \SpecialIndex{\evensidemargin}
+% 
+% by 75\,\%\footnote{
% 
% This document itself does not have |twoside| option in its
% \!\documentclass! but the inconsistency between the option and
% \!\twosided! is not visible because \!\pagestyle! is |plain|.}.
% 
-% This setting makes the right side or outside margin of this page enlarged
-% by 125\,\% as well as the left side and outside margin of the next
-% even-numbered page.
+% This setting makes the \oddeven{right}{left} side or outside margin of
+% this page enlarged by 125\,\%, as well as the \oddeven{left}{right} side
+% and outside margin of the next \oddeven{even}{odd}-numbered page specified
+% by \oddeven{\cs{evensidemargin}}{\cs{oddsidemargin}}.
%
% Next, we see the effects of |c| and |m| features by the \env{paracol}
% environment below for which \Uidx{\!\columnratio!}|{0.6}| and
% \Uidx{\!\marginparthreshold!}|{0}| are declared to make the \emph{inside}
-% columns (left ones in odd-numbered pages) are wider than the
-% \emph{outside} ones and all marginal notes go to outside (right in
-% odd-numbered pages) margins.
+% columns (\oddeven{left}{right} ones in \oddeven{odd}{even}-numbered pages)
+% are wider than the \emph{outside} ones and all marginal notes go to
+% outside (\oddeven{right}{left} in \oddeven{odd}{even}-numbered pages)
+% margins.
% 
% \columnratio{0.6}\marginparthreshold{0}
% 
@@ -52,15 +61,15 @@
% page.\\
% \Dotfill\\ \Dotfill\\ \Dotfill\\ \Dotfill\\ \Dotfill\\ \Dotfill\\
% \Dotfill\\ \Dotfill\\ \Dotfill\\ \Dotfill\\ \Dotfill\\ \Dotfill\\
-% \Dotfill\\ \Dotfill\\ \Dotfill\par
+% \Dotfill\\ \Dotfill\par
%
% This is the third paragraph of the inside column-0 having a page break in
-% it. Since shortly we will be in an even-numbered page
+% it. Since shortly we will be in an \oddeven{even}{odd}-numbered page
% \pageref{page:ppts2} (now), this wider column\Marginpar{Third marginal
-% note from column-0} is now right one keeping it
+% note from column-0} is now \oddeven{right}{left} one keeping it
% inside, while the marginal note given in the first line of this page goes
-% to left and outside. Now we will have a \!\switchcolumn! below this
-% paragraph to go to the column-1 and back to the previous page
+% to \oddeven{left}{right} and outside. Now we will have a \!\switchcolumn!
+% below this paragraph to go to the column-1 and back to the previous page
% \pageref{sec:ppts}.\label{page:ppts2}
% \switchcolumn
% \it
@@ -82,14 +91,14 @@
% pushing the note from this column down rather than that from the
% column-0. Now the author puts a few dummy lines to go to the second last
% line of this page.\\
-% \Dotfill\\ \Dotfill\\ \Dotfill\\ \Dotfill\\ \Dotfill\\ \Dotfill\\
+% \Dotfill\\ \Dotfill\\ \Dotfill\\ \Dotfill\\ \Dotfill\\
% \Dotfill\par
%
-% This is the third paragraph of the outside column-1, which becomes left
-% shortly by the page break.\Marginpar{\it Third marginal note from
-% column-1.} The third marginal note is given in the first line of this
-% page, but it is pushed down again due to the conflict with the note from
-% the column-0.
+% This is the third paragraph of the outside column-1, which becomes
+% \oddeven{left}{right} shortly by the page break.\Marginpar{\it Third
+% marginal note from column-1.} The third marginal note is given in the
+% first line of this page, but it is pushed down again due to the conflict
+% with the note from the column-0.
% \end{paracol}
% \Hrule
%
@@ -99,7 +108,22 @@
% in \postenv. For example, the marginal note given in the first line of
% this paragraph is pushed down.
%
+% \ifodd\value{page}
+% We will see a few examples of \parapag{}ing shortly, but before that we
+% will have an intentional black page to make the first page of the example
+% odd-numbered to avoid you have an impression that its layout is
+% incorrect\footnote{
+% 
+% At least the author himself had such impression without the blank page.}
+% 
+% because if it were in an even page you would see the {\em outside\/} third
+% and fourth supplementary {\em columns\/} at first.
+% 
+% \newpage\vspace*{\fill}\centerline{(intentionally blanked page)}\vfill
+% 
+% \else
% From the next page, we will see a few examples of \parapag{}ing.
+% \fi
%
%
%
diff --git a/Master/texmf-dist/source/latex/paracol/probs.dtx b/Master/texmf-dist/source/latex/paracol/probs.dtx
index f2d716d60ea..4d6ee18c7ca 100644
--- a/Master/texmf-dist/source/latex/paracol/probs.dtx
+++ b/Master/texmf-dist/source/latex/paracol/probs.dtx
@@ -35,7 +35,11 @@
% 
% Readers who are acquainted with \LaTeX{} implementation will understand
% that 18 is the cardinality of the set $\{\cs{bx@A},\ldots,\cs{bx@R}\}$ for
-% floats acquired by \cs{newinsert}.}.
+% floats acquired by \cs{newinsert}. Those who are more familiar with that
+% might know that most \LaTeX{}, based on e-\TeX{} or others having similar
+% extensions, now have 52 \cs{insert}s
+% $\{\cs{bx@A},\ldots,\cs{bx@Z},\cs{bx@AA},\ldots,\cs{bx@ZZ}\}$ for floats
+% and materials of \Paracol, since 2015}.
% 
% Therefore, \textsf{paracol} cannot continue its work if $(p-q)$ reaches
% 17. Furthermore, other stuff also consumes the boxes as follows.
@@ -179,7 +183,7 @@
% \changes{v1.32-3}{2015/10/10}
% {Add comments about the out-of-order appearance of page-wise floats
% even with \protect\LaTeX-2015/01/10 or later.}
-% In the release on 2015/01/10, \LaTeX{} changed its mechanism of the
+% In the release dated 2015/01/10, \LaTeX{} changed its mechanism of the
% placement of double-column floats (or in our terminology, \pwise{}
% floats) to avoid {\em out-of-order\/} appearance of them. That is, until
% the release on 2014/05/01 a double-column float (e.g., \env{figure*}) can
@@ -191,7 +195,7 @@
% the single list. Though this change should have made people happy when
% they typeset {\em ordinary\/} two-column (or multiple-column) documents,
% the new feature might not be welcomed by \Paracol{} users because your
-% parallel-columns have their own {\em stream\/} of floats to be put in the
+% parallel-columns have their own {\em streams\/} of floats to be put in the
% corresponding columns. Therefore, and for the sake of simplicity of
% \Paracol's implementation, the author decided to nullify this new feature
% in \env{paracol} environments. That is, even with new releases of
diff --git a/Master/texmf-dist/tex/latex/paracol/paracol.sty b/Master/texmf-dist/tex/latex/paracol/paracol.sty
index 17a55ec5a2e..16f777532c7 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-2015
+%% Copyright (C) 2005-2018
%% 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}
-[2015/10/10 v1.32 ]
+[2018/05/07 v1.34 ]
%% Register Declaration
@@ -58,13 +58,22 @@
\newbox\pcol@topfnotes
\newbox\pcol@prespan \setbox\pcol@prespan\box\voidb@x
\newbox\pcol@rightpage \global\setbox\pcol@rightpage\box\voidb@x
-\newbox\pcol@tempbox
+\newbox\pcol@colorstack@saved
+\newbox\pcol@tempboxa
+\newbox\pcol@tempboxb
+\newinsert\pcol@colorins
+\count\pcol@colorins\z@ \skip\pcol@colorins\z@ \dimen\pcol@colorins\maxdimen
\newtoks\pcol@everyvbox
%% Logging Tools
-\def\pcol@ShowBox#1{\message{(\the\ht#1+\the\dp#1)x(\the\wd#1)}%
- {\showboxdepth\@M \showboxbreadth\@M \setbox\z@\vbox to\z@{\copy#1}}}
+\def\pcol@ShowBox#1{%
+ \ifvoid#1\message{(VOID)}%
+ \else
+ \message{(\the\ht#1+\the\dp#1)x(\the\wd#1)}%
+ {\vfuzz\z@ \showboxdepth\@M \showboxbreadth\@M
+ \setbox\z@\vbox to\z@{\ifdim\ht#1=\z@ \vskip1\p@\fi \copy#1}}%
+ \fi}
\def\pcol@LogLevel#1#2#3{%
\pcol@iLogLevel{#1}{pcol@Log}%
\pcol@iLogLevel{#2}{pcol@Logstart}%
@@ -126,7 +135,7 @@
\@makecol
\@opcol
\@startcolumn
- \@whilesw\if@fcolmade\fi{\@opcol\@startcolumn}%
+ \@whilesw\if@fcolmade\fi{\@opcol \@startcolumn}%
\fi\fi
\global\maxdepth\@maxdepth
\ifnum\outputpenalty>-\@Miv
@@ -157,7 +166,6 @@
\def\pcol@makecol{\let\pcol@textbottom\@textbottom
\ifdim\pcol@textfloatsep=\maxdimen\else
\def\@textbottom{\vskip\z@\@plus.0001fil\@minus.0001fil}\fi
- \def\pcol@currfoot{\voidb@x}%
\ifpcol@sptext \ifnum\pcol@currcol=\z@
\pcol@getcurrpinfo\@tempcnta\@tempdima\@tempskipa
\setbox\@tempboxa\vbox{\unvcopy\@cclv}%
@@ -172,6 +180,7 @@
\setbox\@cclv\vbox{\unvbox\pcol@prespan \pcol@shiftspanning\@cclv
\unvbox\@cclv}%
\fi\fi
+ \def\pcol@currfoot{\voidb@x}%
\ifpcol@scfnote \ifvoid\footins\else
\pcol@shrinkcolbyfn\@colht\footins\relax
\setbox\@cclv\vbox{\pcol@unvbox@cclv\footins}%
@@ -212,7 +221,7 @@
\let\@elt\@comflelt
\setbox\@tempboxa\vbox{}%
\@toplist
- \setbox\@outputbox\vbox{
+ \setbox\@outputbox\vbox{%
\boxmaxdepth\@maxdepth
\box\@tempboxa
\vskip-\floatsep
@@ -231,7 +240,7 @@
\def\pcol@opcol{%
\pcol@Fb
- \@next\@currbox\@freelist{\global\setbox\@currbox\vbox to\@colht{
+ \@next\@currbox\@freelist{\global\setbox\@currbox\vbox to\@colht{%
\boxmaxdepth\@maxdepth
\pcol@clearcst@unvbox\@outputbox}}\pcol@ovf
\pcol@Fe{opcol}%
@@ -247,7 +256,7 @@
\def\pcol@setpageno{\begingroup
\@tempcnta\pcol@page \advance\@tempcnta-\pcol@basepage
- \edef\reserved@a{\pcol@pages\pcol@currpage}%
+ \let\@elt\relax \edef\reserved@a{\pcol@pages\pcol@currpage}%
\global\let\pcol@pages\@empty \global\let\pcol@currpage\@empty
\let\@elt\pcol@setpnoelt \reserved@a
\endgroup}
@@ -475,12 +484,12 @@
\def\pcol@buildcolseprule#1#2#3#4{%
\@tempdima#1\relax \dimen@#4\relax
\let\pcol@bg@from#2\relax \let\pcol@bg@to#3\relax
- \setbox\pcol@tempbox\vbox{}\setbox\@tempboxa\vbox{}%
+ \setbox\pcol@tempboxa\vbox{}\setbox\@tempboxa\vbox{}%
\let\@elt\pcol@buildcselt@S \pcol@sptextlist
\@tempdimb\z@ \let\@elt\pcol@buildcselt \pcol@sptextlist
\let\@elt\relax \advance\@tempdima-\@tempdimb
\ifdim\@tempdima>\z@
- \setbox\pcol@tempbox\vbox{\unvbox\pcol@tempbox
+ \setbox\pcol@tempboxa\vbox{\unvbox\pcol@tempboxa
\hrule\@height\@tempdima\@width\columnseprule}%
\setbox\@tempboxa\vbox{\unvbox\@tempboxa
\let\@elt\relax
@@ -500,7 +509,7 @@
\pcol@bg@paintbox{S}}}
\def\pcol@buildcselt#1#2{%
\@tempdimc#1sp \advance\@tempdimc-\@tempdimb
- \setbox\pcol@tempbox\vbox{\unvbox\pcol@tempbox
+ \setbox\pcol@tempboxa\vbox{\unvbox\pcol@tempboxa
\ifdim\@tempdimc>\z@ \hrule\@height\@tempdimc\@width\columnseprule \fi
\vskip#2sp}%
\setbox\@tempboxa\vbox{\unvbox\@tempboxa
@@ -523,7 +532,7 @@
\hskip-.5\columnseprule
\@ifundefined{pcol@colseprulecolor#1}%
{\pcol@colseprulecolor}{\@nameuse{pcol@colseprulecolor#1}}%
- \copy\pcol@tempbox \hskip-.5\columnseprule
+ \copy\pcol@tempboxa \hskip-.5\columnseprule
\hskip.5\@tempdima\@plus1fil\relax
\else \hskip\@tempdima\@plus1fil\relax
\fi}}
@@ -532,7 +541,7 @@
\def\@outputpage{\begingroup
\@tempdima\topmargin \advance\@tempdima\headheight \advance\@tempdima\headsep
\ifpcol@output
- \setbox\pcol@tempbox\vtop{\vskip\@tempdima \global\pcol@bg@paintedfalse
+ \setbox\pcol@tempboxa\vtop{\vskip\@tempdima \global\pcol@bg@paintedfalse
\let\pcol@bg@from\z@ \let\pcol@bg@to\pcol@ncolleft
\pcol@bg@paintpage}%
\ifpcol@bg@painted \@tempswatrue \else \@tempswafalse \fi
@@ -545,7 +554,7 @@
\ifpcol@havelastpage \ifx\set@color\relax\else
\pcol@bg@@paintpage \pcol@bg@@paintbox{Pp}%
\fi\fi}%
- \setbox\pcol@tempbox\vbox{%
+ \setbox\pcol@tempboxa\vbox{%
\let\pcol@bg@preposttop\pcol@bg@preposttop@left
\let\pcol@bg@from\z@ \let\pcol@bg@to\pcol@ncolleft \reserved@a}%
\ifpcol@bg@painted \@tempswatrue \else \@tempswafalse \fi
@@ -559,7 +568,7 @@
\pcol@Logend{\@outputpage{rightset}}%
\fi
\fi
- \ht\pcol@tempbox\z@ \dp\pcol@tempbox\z@
+ \ht\pcol@tempboxa\z@ \dp\pcol@tempboxa\z@
\ht\@tempboxa\z@ \dp\@tempboxa\z@
\ifodd\c@page \pcol@swapcolumnfalse \fi
\ifnum\pcol@ncolleft<\pcol@ncol\else \pcol@swapcolumnfalse \fi
@@ -579,7 +588,7 @@
\global\c@page#1\relax
\let\@themargin\oddsidemargin
\if@twoside\ifodd\c@page\else \let\@themargin\evensidemargin \fi\fi
- \if@tempswa \everyvbox{\pcol@outputpage@ev\pcol@tempbox}\fi
+ \if@tempswa \everyvbox{\pcol@outputpage@ev\pcol@tempboxa}\fi
\pcol@@outputpage
\pcol@Logend{\@outputpage{left}}}
\def\pcol@outputpage@r#1{%
@@ -825,18 +834,6 @@
\def\pcol@op@flush{-10012}
\def\pcol@op@clear{-10013}
\def\pcol@op@end{-10014}
-\def\pcol@op@cpush{-10015}
-\def\pcol@op@cpop{-10016}
-\def\pcol@op@cset{-10017}
-
-\def\pcol@mcpushlimit{100}
-\@tempcnta\@M
-\advance\@tempcnta\pcol@mcpushlimit
-\edef\pcol@op@mcpush{\number\@tempcnta}\advance\@tempcnta\m@ne
-\edef\pcol@op@mcpush@pone{\number-\@tempcnta}\advance\@tempcnta\@ne
-\advance\@tempcnta\pcol@mcpushlimit
-\edef\pcol@op@mcpop{\number\@tempcnta}\advance\@tempcnta\m@ne
-\edef\pcol@op@mcpop@pone{\number-\@tempcnta}\advance\@tempcnta\@ne
\def\pcol@specialoutput{%
\ifnum\outputpenalty=\pcol@op@start\relax
@@ -849,20 +846,8 @@
\let\reserved@a\pcol@output@clear
\else\ifnum\outputpenalty=\pcol@op@end\relax
\let\reserved@a\pcol@output@end
- \else\ifnum\outputpenalty=\pcol@op@cpush\relax
- \let\reserved@a\pcol@output@cpush
- \else\ifnum\outputpenalty=\pcol@op@cpop\relax
- \let\reserved@a\pcol@output@cpop
- \else\ifnum\outputpenalty=\pcol@op@cset\relax
- \let\reserved@a\pcol@output@cset
- \else\ifnum\outputpenalty<\pcol@op@mcpop@pone\relax
- \advance\outputpenalty\pcol@op@mcpop\relax \@tempcnta-\outputpenalty
- \let\reserved@a\pcol@output@mcpop
- \else\ifnum\outputpenalty<\pcol@op@mcpush@pone\relax
- \advance\outputpenalty\pcol@op@mcpush\relax \@tempcnta-\outputpenalty
- \let\reserved@a\pcol@output@mcpush
\else \let\reserved@a\@specialoutput
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi\fi\fi\fi\fi
\ifnum\outputpenalty=-\@Miv\relax
\ifvoid\footins\else \pcol@Log\dummy{dummy}\footins \fi
\fi
@@ -935,6 +920,12 @@
\global\count\@currbox\z@
\global\dimen\@currbox\@colroom
\expandafter\gdef\csname pcol@shipped\number\pcol@currcol\endcsname{}%
+ \pcol@ifccdefined
+ {\@next\@currbox\@freelist{\global\setbox\@currbox\vbox{%
+ \def\current@color{\pcol@ccuse{}}\let\aftergroup\@gobble
+ \pcol@set@color}}\pcol@ovf}%
+ {\def\@currbox{\voidb@x}}%
+ \pcol@ccxdef{\@currbox}%
\advance\pcol@currcol\@ne}%
\global\pcol@currcol\z@
\pcol@getcurrcol
@@ -972,10 +963,11 @@
\def\pcol@output@switch{%
\ifpcol@sptext\ifnum\pcol@currcol=\z@
- \ifvoid\pcol@prespan\else \global\advance\@colroom\ht\pcol@prespan \fi
+ \ifvoid\pcol@prespan \dimen@\z@ \else \dimen@\ht\pcol@prespan \fi
+ \global\advance\@colroom\dimen@
+ \pcol@addflhd\@toplist\pcol@textfloatsep
\pcol@getcurrpinfo\@tempcnta\@tempdima\@tempskipa
\@tempdimb\ht\@holdpg \advance\@tempdimb\dp\@holdpg
- \dimen@\ht\pcol@prespan \pcol@addflhd\@toplist\pcol@textfloatsep
\@cons\pcol@sptextlist{{\number\dimen@}{\number\@tempdimb}}%
\pcol@defcurrpage{\number\@tempcnta}\pcol@spanning\pcol@footins
{\pcol@sptextlist}{\pcol@mparbottom}%
@@ -1127,9 +1119,9 @@
\pcol@ifempty\@currbox
{\pcol@savecolorstack
\ifpcol@sptextstart \global\setbox\pcol@prespan\box\voidb@x \fi}%
- {\gdef\pcol@colorstack@saved{}%
+ {\global\setbox\pcol@colorstack@saved\box\voidb@x
\ifpcol@sptextstart
- \global\setbox\pcol@prespan\vbox{
+ \global\setbox\pcol@prespan\vbox{%
\unvbox\@currbox \pcol@restorecolorstack}%
\global\advance\@colroom-\ht\pcol@prespan
\global\topskip\z@ \hrule\@height\z@\@width\z@
@@ -1139,52 +1131,6 @@
%% Special Output Routines: Color Management
-\def\pcol@output@cpush{%
- \expandafter\pcol@output@icpush\pcol@colorstack@buf\@nil
- \pcol@return@from@color}
-\def\pcol@output@icpush\@elt#1#2\@nil{%
- \@cons\pcol@colorstack{{#1}}\gdef\pcol@colorstack@buf{#2}}
-\def\pcol@output@mcpush{\begingroup
- \let\pcol@reset@color@mpop\pcol@output@imcpush
- \@nameuse{pcol@reset@color@mpop@\number\@tempcnta}%
- \endgroup
- \pcol@return@from@color}
-\def\pcol@output@imcpush#1#2{%
- \@cons\pcol@colorstack{{#2}}%
- \@cons\pcol@colorstack@mpushed{{#1}}}
-
-\def\pcol@output@cpop{\begingroup
- \let\reserved@a\pcol@colorstack
- \gdef\pcol@colorstack{}\let\@elt\pcol@reset@color@elt
- \reserved@a\@elt\@nil
- \endgroup
- \pcol@return@from@color}
-\def\pcol@reset@color@elt#1\@elt#2{\def\reserved@b{#2}%
- \ifx\reserved@b\@nnil \let\reserved@b\relax
- \else \@cons\pcol@colorstack{{#1}}\def\reserved@b{\@elt{#2}}%
- \fi
- \reserved@b}
-\def\pcol@output@mcpop{\begingroup
- \let\@elt\pcol@output@mcpop@elt \@tempswafalse
- \pcol@colorstack@mpushed
- \if@tempswa \global\let\@gtempa\pcol@output@cpop
- \else \global\let\@gtempa\pcol@return@from@color
- \fi
- \endgroup
- \@gtempa}
-\def\pcol@output@mcpop@elt#1{\ifnum#1=\@tempcnta \@tempswatrue \fi}
-
-\def\pcol@output@cset{%
- \expandafter\pcol@output@icset\pcol@colorstack@buf\@nil
- \pcol@return@from@color}
-\def\pcol@output@icset\@elt#1#2\@nil{{\let\@elt\relax
- \expandafter\xdef\csname pcol@columncolor\number\pcol@currcol\endcsname{%
- \@elt{#1}}%
- \gdef\pcol@colorstack@buf{#2}}}
-
-\def\pcol@return@from@color{\unvbox\@holdpg \@reinserts
- \if@nobreak\nobreak \else\addpenalty\interlinepenalty \fi}
-
\def\pcol@magicpenalty{12345}
\def\pcol@ifempty#1#2#3{%
\setbox\@tempboxa\vbox{\penalty\pcol@magicpenalty
@@ -1196,23 +1142,89 @@
\def\pcol@clearcst@unvbox#1{%
\pcol@ifempty#1\relax
- {\pcol@restorecst\pcol@colorstack@saved
- \unvbox#1\pcol@clearcolorstack}}
-\def\pcol@clearcolorstack{{\def\@elt##1{\reset@color}%
- \pcol@colorstack@full}}
-
-\def\pcol@restorecolorstack{\pcol@restorecst\pcol@colorstack@full}
-\def\pcol@restorecst#1{{\let\@elt\pcol@set@color@elt#1}}
-\def\pcol@set@color@elt#1{\def\current@color{#1}\let\aftergroup\@gobble
- \pcol@set@color}
-
-\def\pcol@savecolorstack{{\let\@elt\relax
- \xdef\pcol@colorstack@saved{\pcol@colorstack@full}}}
-\def\pcol@colorstack@full{%
+ {\pcol@restorecst\pcol@colorstack@saved \unvbox#1\pcol@clearcolorstack}}
+\def\pcol@clearcolorstack{%
+ \def\reserved@a##1{\reset@color}\def\reserved@b##1{\reset@color}%
+ \pcol@scancst\pcol@colorins}
+
+\def\pcol@restorecolorstack{\pcol@restorecst\pcol@colorins}
+\def\pcol@restorecst{%
+ \def\reserved@a##1{\unvbox##1}\def\reserved@b##1{\unvcopy##1}%
+ \pcol@scancst}
+
+\def\pcol@scancst#1{%
+ \@tempcnta#1\relax
+ \ifnum\@tempcnta=\pcol@colorins
+ \ifvoid\pcol@ccuse{@box}\else
+ \reserved@b{\pcol@ccuse{@box}}\fi
+ \fi
+ \ifvoid\@tempcnta\else
+ \setbox\@tempboxa\vbox{}\setbox\pcol@tempboxa\vbox{}\@tempcntb\z@
+ \def\reserved@b{}\let\@elt\relax \@tempswatrue \pcol@iscancst
+ \global\setbox\@tempcnta\box\@tempboxa \unvbox\pcol@tempboxa
+ \fi}
+\def\pcol@iscancst{%
+ \setbox\@tempcnta\vbox{%
+ \unvbox\@tempcnta \global\setbox\pcol@tempboxb\lastbox}%
+ \ifvoid\pcol@tempboxb \let\reserved@c\relax
+ \else
+ \let\reserved@c\pcol@iscancst
+ \ifdim\ht\pcol@tempboxb=\z@
+ \ifdim\wd\pcol@tempboxb=\z@ \advance\@tempcntb\@ne
+ \else \edef\reserved@b{\@elt{\number\wd\pcol@tempboxb}\reserved@b}%
+ \fi
+ \else\ifdim\dp\pcol@tempboxb=\z@
+ \ifdim\wd\pcol@tempboxb=\z@
+ \ifnum\@tempcntb>\z@ \advance\@tempcntb\m@ne
+ \else
+ \setbox\@tempboxa\vbox{\copy\pcol@tempboxb \unvbox\@tempboxa}%
+ \setbox\pcol@tempboxa\vbox{%
+ \reserved@a\pcol@tempboxb \unvbox\pcol@tempboxa}%
+ \fi
+ \else
+ \count@\wd\pcol@tempboxb \chardef\reserved@d\z@
+ \def\@elt##1{\ifnum##1=\count@ \chardef\reserved@d\@ne \fi}%
+ \reserved@b \let\@elt\relax
+ \ifnum\reserved@d=\z@
+ \setbox\@tempboxa\vbox{\copy\pcol@tempboxb \unvbox\@tempboxa}%
+ \setbox\pcol@tempboxa\vbox{%
+ \reserved@a\pcol@tempboxb \unvbox\pcol@tempboxa}%
+ \fi
+ \fi
+ \else\if@tempswa
+ \ifvoid\pcol@ccuse{@box}%
+ \@next\@currbox\@freelist{\global\setbox\@currbox\vbox{}}\pcol@ovf
+ \pcol@ccxdef{\@currbox}\reset@color
+ \fi
+ \global\setbox\pcol@ccuse{@box}\vbox{\unvbox\pcol@tempboxb}%
+ \@tempswafalse
+ \fi\fi\fi
+ \fi
+ \reserved@c}
+
+\def\pcol@savecolorstack{%
+ \ifvoid\pcol@colorins \@tempswafalse \else \@tempswatrue \fi
+ \ifvoid\pcol@ccuse{@box}%
+ \setbox\@tempboxa\box\voidb@x
+ \else
+ \setbox\@tempboxa\vbox{\unvcopy\pcol@ccuse{@box}}%
+ \ht\@tempboxa1sp \dp\@tempboxa\z@ \wd\@tempboxa\z@
+ \@tempswatrue
+ \fi
+ \if@tempswa
+ \global\setbox\pcol@colorstack@saved\vbox{%
+ \ifvoid\@tempboxa\else \box\@tempboxa \fi
+ \ifvoid\pcol@colorins\else \unvcopy\pcol@colorins \fi}
+ \else \global\setbox\pcol@colorstack@saved\box\voidb@x
+ \fi}
+
+\def\pcol@ccuse#1{\@nameuse{pcol@columncolor#1\number\pcol@currcol}}
+\def\pcol@ifccdefined#1#2{%
\expandafter\ifx\csname pcol@columncolor\number\pcol@currcol\endcsname\relax
- \@empty
- \else \@nameuse{pcol@columncolor\number\pcol@currcol}\fi
- \pcol@colorstack}
+ #2\else#1\fi}
+\def\pcol@ccxdef#1{%
+ \expandafter\xdef
+ \csname pcol@columncolor@box\number\pcol@currcol\endcsname{#1}}
%% Special Output Routines: Footnote Handling
@@ -1339,6 +1351,7 @@
\def\pcol@getmpbelt#1#2{%
\ifdim#1sp<\@tempdima
\global\@mparbottom#2sp\relax \@cons\pcol@mpblist{{#1}{#2}}%
+ \ifdim\@tempdima<#2sp\relax \@tempdima#2sp\relax \fi
\else
\@tempdimc\@tempdima \advance\@tempdimc\@tempdimb
\ifdim#1sp<\@tempdimc
@@ -1539,7 +1552,7 @@
\ifpcol@lastpage \ifx\@deferlist\@empty \ifdim\@colroom<\@fpmin
\@tempswafalse \global\@toproom\maxdimen
\fi\fi\fi
- \if@tempswa \global\setbox\@currbox\vbox{\pcol@makefcolpage} \fi
+ \if@tempswa \global\setbox\@currbox\vbox{\pcol@makefcolpage}\fi
\fi}
\def\pcol@makefcolelt#1{%
\@tempdimb\ht#1{}\advance\@tempdimb\dp#1{}\advance\@tempdimb\@tempdimc
@@ -1548,7 +1561,7 @@
\else \@cons\@toplist#1\relax
\advance\@tempdima-\@tempdimb \global\advance\@colroom\@tempdimb
\fi}
-\def\pcol@makefcolpage{\vbox to\@colht{
+\def\pcol@makefcolpage{\vbox to\@colht{%
\vskip\@fptop \vskip-\@fpsep
\def\@elt##1{\vskip\@fpsep\box##1}\@toplist \vskip\@fpbot}%
\pcol@Fb
@@ -1624,7 +1637,7 @@
\textfloatsep\z@ \floatsep\z@ \let\topfigrule\relax
\fi
\pcol@Fb
- \@next\pcol@float\@freelist{\global\setbox\pcol@float\vbox to\z@{
+ \@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)}%
@@ -1638,12 +1651,12 @@
\global\pcol@prevdepth\@tempdimc
\ifdim\pcol@textfloatsep=\maxdimen
\global\pcol@textfloatsep\textfloatsep \fi
- \global\setbox\@currbox\vbox{
+ \global\setbox\@currbox\vbox{%
\ifdim\@tempdimb<\topskip
- \vbox to\topskip{\unvbox\@currbox \vskip\z@\@plus.0001fil}
+ \vbox to\topskip{\unvbox\@currbox \vskip\z@\@plus.0001fil}%
\vskip-\topskip \vskip\@tempdimb
\else
- \vbox to\@tempdimb{\unvbox\@currbox \vskip\z@\@plus.0001fil}
+ \vbox to\@tempdimb{\unvbox\@currbox \vskip\z@\@plus.0001fil}%
\fi}%
\fi
\fi
@@ -1922,13 +1935,17 @@
\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@currcol\z@ \@whilenum\pcol@currcol<\pcol@ncol\do{%
\pcol@Fb
\pcol@getcurrcol \@cons\@freelist\@currbox
+ \ifvoid\pcol@ccuse{@box}\else
+ \@cons\@freelist{\pcol@ccuse{@box}}%
+ \pcol@ccxdef{\voidb@x}%
+ \fi
\pcol@Fe{output@end(col)}%
\advance\pcol@currcol\@ne}%
+ \pcol@currcol\z@ \pcol@restorecolorstack
+ \global\setbox\pcol@colorins\box\voidb@x
\pcol@currcol\pcol@lastcol\relax \pcol@getcurrcol
\global\pcol@prevdepth\@pagedp
\global\@colht\textheight
@@ -2013,8 +2030,7 @@
\let\pcol@bg@paintbox\pcol@bg@@paintbox
\let\pcol@bg@paintcolumns\pcol@bg@@paintcolumns
\fi
- \gdef\pcol@colorstack{}%
- \gdef\pcol@colorstack@buf{}\gdef\pcol@colorstack@shadow{}%
+ \gdef\pcol@colorstack@shadow{}%
\pcol@footnotebase\c@footnote \global\pcol@nfootnotes\z@
\let\footnote\pcol@footnote
\let\footnotemark\pcol@footnotemark
@@ -2636,72 +2652,78 @@
\begingroup
\let\@elt\relax
\ifx\pcol@paracol\paracol
- \pcol@iicolumncolor{#1}{pcol@columncolor#2}{}%
- \pcol@iicolumncolor{#1}{pcol@columncolor@shadow#2}{}%
+ \pcol@iicolumncolor{#1}{#2}%
\else\ifnum#2=\pcol@currcol
- \begingroup
- \pcol@getshadowcc{#2}\let\pcol@colorstack\pcol@colorstack@shadow
- \pcol@clearcolorstack
- \pcol@iicolumncolor{#1}{pcol@colorstack@buf}{\pcol@colorstack@buf}%
- \pcol@iicolumncolor{#1}{pcol@columncolor@shadow#2}{}%
- \pcol@getshadowcc{#2}\pcol@restorecolorstack
- \endgroup
- \pcol@color@invokeoutput\pcol@op@cset\relax
+ \def\@elt##1{\reset@color}\pcol@scancst@shadow
+ \pcol@iicolumncolor{#1}{#2}%
+ \def\@elt##1{\def\current@color{##1}\let\aftergroup\@gobble
+ \pcol@set@color}%
+ \pcol@scancst@shadow
+ \setbox\@tempboxa\vbox{\let\set@color\pcol@set@color
+ \let\aftergroup\@gobble #1}%
+ \ht\@tempboxa1sp \dp\@tempboxa1sp \wd\@tempboxa\z@\relax
+ \insert\pcol@colorins{\box\@tempboxa}%
+ \ifvmode\if@nobreak \nobreak \fi\fi
\else
- \pcol@iicolumncolor{#1}{pcol@columncolor#2}{}%
- \pcol@iicolumncolor{#1}{pcol@columncolor@shadow#2}{}%
+ \pcol@iicolumncolor{#1}{#2}%
+ \pcol@currcol#2\relax
+ \ifvoid\pcol@ccuse{@box}%
+ \@next\@currbox\@freelist{}\pcol@ovf
+ \pcol@ccxdef{\@currbox}%
+ \fi
+ \global\setbox\pcol@ccuse{@box}\vbox{\let\set@color\pcol@set@color
+ \let\aftergroup\@gobble #1}%
\fi\fi
\endgroup
\fi\fi
\ignorespaces}
-\def\pcol@iicolumncolor#1#2#3{\let\set@color\relax #1%
- \expandafter\xdef\csname#2\endcsname{#3\@elt{\current@color}}}
-\def\pcol@getshadowcc#1{%
- \expandafter\let\expandafter\reserved@a
- \csname pcol@columncolor@shadow#1\endcsname
- \expandafter\let\csname pcol@columncolor#1\endcsname\reserved@a}
+\def\pcol@iicolumncolor#1#2{{\let\set@color\relax #1%
+ \expandafter\xdef\csname pcol@columncolor#2\endcsname{\current@color}}}
+\def\pcol@scancst@shadow{%
+ \pcol@ifccdefined{\@elt{\pcol@ccuse{}}}\relax
+ \pcol@colorstack@shadow}
+\def\pcol@mcpushlimit{1000}
\def\pcol@set@color@push{\pcol@set@color
- \ifmmode\ifpcol@inner\else
- \ifnum\pcol@mcid=\z@ \gdef\pcol@colorstack@mpushed{}\fi
- \ifnum\pcol@mcid<\pcol@mcpushlimit\relax
+ \ifmmode\else\ifinner \pcol@innertrue \fi\fi
+ \ifpcol@inner\else
+ \ifmmode
+ \global\advance\pcol@mcid\@ne
+ \ifnum \pcol@mcid>\pcol@mcpushlimit\relax
+ \PackageError{paracol}{Too many coloring commands in math mode}\@ehb
+ \global\pcol@mdid\@ne
+ \fi
+ \@tempdima\pcol@mcid sp\relax
\expandafter\aftergroup
\csname pcol@reset@color@mpop@\number\pcol@mcid\endcsname
\expandafter\xdef
\csname pcol@reset@color@mpop@\number\pcol@mcid\endcsname
- {\noexpand\pcol@reset@color@mpop
- {\number\pcol@mcid}{\current@color}}%
- \@tempcnta-\pcol@op@mcpush\relax \advance\@tempcnta-\pcol@mcid
- \pcol@color@invokeoutput\@tempcnta\relax
- \global\advance\pcol@mcid\@ne
+ {\noexpand\pcol@reset@color@mpop{\number\pcol@mcid}}%
\else
- \PackageError{paracol}{Too many coloring commands in math mode}\@ehb
- \fi\fi
- \else
- \ifinner \pcol@innertrue \fi
- \ifpcol@inner\else
- \aftergroup\pcol@reset@color@pop
- \let\pcol@elt@save\@elt \let\@elt\relax
- \edef\pcol@colorstack@shadow{\pcol@colorstack@shadow
- \@elt{\current@color}}%
- \let\@elt\pcol@elt@save
- \@cons\pcol@colorstack@buf{{\current@color}}%
- \pcol@color@invokeoutput\pcol@op@cpush\pcol@fcwhyphenate
+ \aftergroup\pcol@reset@color@pop \@tempdima\z@
\fi
+ \let\pcol@elt@save\@elt \let\@elt\relax
+ \edef\pcol@colorstack@shadow{\pcol@colorstack@shadow\@elt{\current@color}}%
+ \let\@elt\pcol@elt@save
+ \setbox\@tempboxa\vbox{\let\aftergroup\@gobble \pcol@set@color}%
+ \ht\@tempboxa1sp \dp\@tempboxa\z@ \wd\@tempboxa\@tempdima
+ \insert\pcol@colorins{\box\@tempboxa}\ifhmode \pcol@fcwhyphenate \fi
+ \ifvmode\if@nobreak \nobreak \fi\fi
\fi}
-\def\pcol@reset@color@pop{\ifpcol@output
- \pcol@color@invokeoutput\pcol@op@cpop\relax \fi}
-\def\pcol@reset@color@mpop#1#2{\@tempcnta-\pcol@op@mcpop\relax
- \advance\@tempcnta-#1\relax
- \pcol@color@invokeoutput\@tempcnta\relax}
-
-\def\pcol@color@invokeoutput#1#2{%
- \ifvmode \pcol@color@invokeoutput@v{#1}%
- \else \vadjust{\pcol@color@invokeoutput@v{#1}}\ifhmode #2\fi
+\def\pcol@reset@color@pop{%
+ \ifpcol@output
+ \setbox\@tempboxa\vbox{\reset@color}%
+ \ht\@tempboxa\z@ \dp\@tempboxa\z@ \wd\@tempboxa\z@
+ \insert\pcol@colorins{\box\@tempboxa}%
+ \ifvmode\if@nobreak \nobreak \fi\fi
\fi}
-\def\pcol@color@invokeoutput@v#1{\penalty-\@Miv \@tempdima\prevdepth
- \vbox{}\prevdepth\@tempdima \penalty#1\relax}
+\def\pcol@reset@color@mpop#1{%
+ \setbox\@tempboxa\vbox{\reset@color}%
+ \ht\@tempboxa\z@ \dp\@tempboxa\z@ \wd\@tempboxa#1sp\relax
+ \insert\pcol@colorins{\box\@tempboxa}%
+ \ifvmode\if@nobreak \nobreak \fi\fi
+}
\def\coloredwordhyphenated{\def\pcol@fcwhyphenate{\hskip\z@}}
\def\nocoloredwordhyphenated{\let\pcol@fcwhyphenate\relax}