summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-12-31 22:11:23 +0000
committerKarl Berry <karl@freefriends.org>2018-12-31 22:11:23 +0000
commit9eae0ca750e90444fd2bd73f570a005120851d46 (patch)
treeec339829b2785e0ac3d401dfcd0e207103d74601 /Master/texmf-dist
parentd6727e0f48e4842c43c673f92d9859e291cec5ed (diff)
paracol (31dec18)
git-svn-id: svn://tug.org/texlive/trunk@49560 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/paracol/README13
-rw-r--r--Master/texmf-dist/doc/latex/paracol/paracol-man.pdfbin616478 -> 618897 bytes
-rw-r--r--Master/texmf-dist/doc/latex/paracol/paracol-man.tex2
-rw-r--r--Master/texmf-dist/doc/latex/paracol/paracol.pdfbin0 -> 1590604 bytes
-rw-r--r--Master/texmf-dist/source/latex/paracol/impl.dtx525
-rw-r--r--Master/texmf-dist/source/latex/paracol/paracol.dtx43
-rw-r--r--Master/texmf-dist/source/latex/paracol/ref.dtx87
-rw-r--r--Master/texmf-dist/tex/latex/paracol/paracol.sty56
8 files changed, 601 insertions, 125 deletions
diff --git a/Master/texmf-dist/doc/latex/paracol/README b/Master/texmf-dist/doc/latex/paracol/README
index 489ac70ad11..07bc7f36f0c 100644
--- a/Master/texmf-dist/doc/latex/paracol/README
+++ b/Master/texmf-dist/doc/latex/paracol/README
@@ -1,4 +1,4 @@
-paracol (v1.34): a multi-column package to typeset columns in "parallel".
+paracol (v1.35): a multi-column package to typeset columns in "parallel".
===
Copyright (C) 2005-2018
Hiroshi Nakashima <h.nakashima@DOMAIN; DOMAIN=media.kyoto-u.ac.jp>
@@ -107,7 +107,16 @@ 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.32 has been fixed.
+- \belowfootnoteskip to add space below non-merged pre-environment footnotes
+ (*NEW* for v 1.35).
+
+- \definecolumnpreamble{<col>}{<pream>} to define the column preamble
+ <pream> for the column <col> (*NEW* for v 1.35).
+
+- Emulation of \marginnote[<left>]{<right>}[<voffset>] given by marginnote
+ package (*NEW* for v 1.35).
+
+- Bugs found in v1.3 and successors up to v1.34 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 34e1404d735..514fdec6dd6 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 bbaa1403e03..565cc290f96 100644
--- a/Master/texmf-dist/doc/latex/paracol/paracol-man.tex
+++ b/Master/texmf-dist/doc/latex/paracol/paracol-man.tex
@@ -8,7 +8,7 @@
%% version 1 of the License, or any later version.
\ProvidesFile{paracol-man.tex}
-[2018/05/07 v1.34 ]
+[2018/12/31 v1.35 ]
\documentclass{ltxdoc}\normalmarginpar
\usepackage{color}
\usepackage{paracol}
diff --git a/Master/texmf-dist/doc/latex/paracol/paracol.pdf b/Master/texmf-dist/doc/latex/paracol/paracol.pdf
new file mode 100644
index 00000000000..d7610852ea2
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/paracol/paracol.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/paracol/impl.dtx b/Master/texmf-dist/source/latex/paracol/impl.dtx
index 6cd74e34619..4d7893f0196 100644
--- a/Master/texmf-dist/source/latex/paracol/impl.dtx
+++ b/Master/texmf-dist/source/latex/paracol/impl.dtx
@@ -1541,17 +1541,34 @@
%
% \item[\Uidx{\!\interlinepenalty!}]
% 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! 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
+% between two lines. The register is referred to in the following macros.
+% 
+% \begin{itemize}
+% \item
+% \!\pcol@output@start! to make \Preenv{} \Mgfnote{}s followed by this
+% \!\penalty! on the \!\insert!ion, and to insert it to start the first
+% \colpage{} allowing page-break before the start unless it is inhibited
+% by $\CSIndex{if@nobreak}=\true$.
+%
+% \item
+% \!\pcol@restartcolumn! to insert this \!\penalty! to resume a \colpage{}
+% allowing page-break if $\CSIndex{if@nobreak}=\false$.
+%
+% \item
+% \!\pcol@deferredfootins! to let the secnod half of split $\df$ have this
+% \!\penalty! as the very first element.
+%
+% \item
+% \!\pcol@fntexttop!\marg{text} to make the footnote $\arg{text}$ followed
+% by this \!\penalty! on the \!\insert!ion.
+%
+% \item
% \!\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!.
+% by this \!\penalty! in $\df$.
+%
+% \item
+% \!\pcol@fntextbody! to let the register have \!\interfootnotelinepenalty!.
+% \end{itemize}
%
% \item[\Uidx{\!\floatingpenalty!}]
% is \TeX's primitive register to have the page-break penalty added to
@@ -1751,8 +1768,10 @@
% \item[\Uidx{\!\@floatpenalty!}]
% is a \!\count! register to have the penalty code -10002 or -10003 given by
% \!\@xfloat! at the beginning of a float environment according to the
-% environment is in horizontal or verticalmode respectively. It is
-% referred to by \!\pcol@end@dblfloat!.
+% environment is in horizontal or vertical mode respectively, or by
+% \!\marginpar! for a marginal note in the same meaning. It is
+% referred to by \!\pcol@end@dblfloat! to insert the penalty, and by
+% \!\pcol@xympar! to confirm \!\marginpar! is error free.
%
% \item[\Uidx{\!\@topnum!}]
% is a \!\count! register to have the maximum number of top floats which the
@@ -1983,6 +2002,10 @@
% visited for \cscan{}ning.
%
% \item
+% In \!\definecolumnpreamble!\marg{c}\marg{pream}, $c$ is assigned to the
+% register to ensure $c$ is a number.
+%
+% \item
% In \!\pcol@calcfnctr!, it has the footnote ordinal calculated by the
% macro to be referred to by the invokers \!\pcol@iadjustfnctr! and
% \!\pcol@iifootnotetext!.
@@ -2317,9 +2340,9 @@
% \!\pcol@bg@paperwidth! to calculate $\WP-2\WR$.
%
% \item[\Uidx{\!\z@!}]
-% 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.
+% is a \!\dimen! register to have 0\,|pt| to initialize \!\pagerim!,
+% \!\belowfootnoteskip! and \!\skip!\!\pcol@colorins! at their declarations,
+% and is used in the following macros.
% 
% \begin{quote}\raggedright
% \!\pcol@ShowBox!,
@@ -2342,6 +2365,7 @@
% \!\pcol@putbackmvl!,
% \!\pcol@iscancst!,
% \!\pcol@deferredfootins!,
+% \!\pcol@combinefootins!,
% \!\pcol@addmarginpar!,
% \!\pcol@getmparbottom!,
% \!\pcol@sync!,
@@ -2357,6 +2381,7 @@
% \!\pcol@extract@fil@ii!,
% \!\pcol@sptext!,
% \!\pcol@fntextbody!.
+% \!\pcol@marginpar!,
% \!\pcol@icolumncolor!,
% \!\pcol@set@color@push!,
% \!\pcol@reset@color@pop!,
@@ -2409,6 +2434,7 @@
% \!\pcol@sptext!,
% \!\pcol@switchcol!,
% \!\pcol@visitallcols!,
+% \!\pcol@xympar!,
% \!\endparacol!.
% \end{quote}
%
@@ -3349,7 +3375,9 @@
% is sneaked into our own \!\output! routine, in order to avoid that
% \LaTeX's original \!\output! routine misunderstands it is working on a
% two-columned document. The switch is examined by \LaTeX's own macros
-% including old \!\end@dblfloat! kept in our own \!\pcol@end@dblfloat!.
+% including old \!\end@dblfloat! kept in our own \!\pcol@end@dblfloat!. It
+% is also examined by \!\pcol@zparacol! before being turned $\true$ to
+% ensure it is $\false$ or to complain about the inappropriateness otherwise.
%
% \item[\Uidx{\CSIndex{if@firstcolumn}}]
% is a switch to be $\true$ iff the first column is being typeset. Its
@@ -3398,15 +3426,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! 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.
+% $c\In0\C$, while \!\pcol@output@start! and \!\pcol@restartcolumn! insert
+% $\!\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
@@ -3416,6 +3444,14 @@
% so, is turned $\false$ by the macro after it inserts vertical skips
% pretending the first \!\item! is given.
%
+% \item[\Uidx{\CSIndex{if@inlabel}}]
+% is a switch to be $\true$ in the duration after an \!\item! appears and
+% until its first paragraph is given. The switch is examined by
+% \!\pcol@zparacol! together with \CSIndex{if@newlist} to know if the
+% \env{paracol} environment to start is at the very beginning of a
+% \env{list}-like environment ($\false$) and not \env{trivlist}-like one
+% ($\true$).
+%
% \item[\Uidx{\CSIndex{if@afterindent}}]
% is a switch to be $\true$ iff a sectioning commmand tells that the fisrt
% paragraph following it is to be indented. The switch is saved into
@@ -3658,10 +3694,10 @@
%
% \item[\Uidx{\!\nobreak!}]
% is an API macro to insert $\!\penalty!=10000$ to inhibit line or page
-% 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$.
+% breaks. It is used in \!\pcol@output@start!, \!\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}}]
% is an API macro to insert a vertical $\arg{skip}$ if
@@ -3675,10 +3711,11 @@
% 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! 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@output@start! and \!\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
@@ -3698,6 +3735,12 @@
% temporarily disabling its function by making it \!\let!-equal to
% \!\pcol@gobblethree!.
%
+% \item[\Uidx{\!\marginpar!}\oarg{left}\marg{right}]
+% is an API macro to put merginal note $\arg{left}$ or $\arg{right}$ to the
+% left or right margin. In \!\pcol@zparacol! it is made \!\let!-equal to
+% \!\pcol@marginpar! for the emulation of \!\marginnote!, while its original
+% version is kept in \!\pcol@@marginpar!.
+%
% \item[\Uidx{\!\footnote!}\oarg{num}\marg{text}]
% is an API macro to give a footnote $\arg{text}$ optionally with its number
% $\arg{num}$. In \!\pcol@zparacol! it is made \!\let!-equal to
@@ -3779,7 +3822,8 @@
% 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 two-column
+% typesetting outside \env{paracol} and illegal nesting of \env{paracol};
% $\!\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;
@@ -3794,7 +3838,8 @@
% the package identification $\arg{pkg}$. The macro is used in
% \!\pcol@ignore! to complain an API macro appears in \env{paracol}
% inappropriately, in \!\pcol@fntextbody! if the footnote is taller than
-% $\!\textheight!-\!\skip!\!\footins!$, and in \!\pcol@icolumncolor!,
+% $\!\textheight!-\!\skip!\!\footins!$, in \!\pcol@mn@warning! to show
+% \!\marginnote! is emulated, and in \!\pcol@icolumncolor!,
% \!\pcol@defcseprulecolor@i! and \!\pcol@backgroundcolor@ii! to complain
% \!\columncolor!\slash\!\normalcolumncolor!,
% \!\colseprulecolor!\slash\!\normalcolseprulecolor! or \!\background~color!
@@ -3974,6 +4019,11 @@
% \!\column*! for \!\pcol@com@column*!.
%
% \item
+% \!\pcol@zparacol! for $|\pcol@colpream|{\cdot}0$.
+% 
+% \SpecialArrayIndex{c}{\pcol@colpream}
+%
+% \item
% $\!\pcol@storectrelt!\<\theta\>$ for $|\pcol@ctr@|{\cdot}\theta$.
% 
% \SpecialArrayIndex{\theta}{\pcol@ctr@}
@@ -4008,6 +4058,11 @@
% \SpecialArrayIndex{\theta}{\cl@}
%
% \item
+% \!\pcol@switchcol! to the column $c$ for $|\pcol@colpream|{\cdot}c$.
+% 
+% \SpecialArrayIndex{c}{\pcol@colpream}
+%
+% \item
% $\!\pcol@aconlyelt!\<t\>\<c\>$ for $|\pcol@ac@def@|{\cdot}t$.
% 
% \SpecialIndex{\pcol@ac@def@lof}\SpecialIndex{\pcol@ac@def@lot}
@@ -4264,6 +4319,16 @@
% The macro is also used in \!\pcol@ioutputelt! to obtain completed
% \colpage{}s from $\S_c$.
%
+% \item[\Uidx{%
+% $\!\@xnext!\cs{@elt}\arg{car}\arg{cdr}\cs{@@}\arg{first}\arg{rest}$}]
+% is an internal macro to remove the first element $|\@elt|\arg{car}$ from a
+% list in the form of $|\@elt|\,e_1\,\cdots\,|\@elt|\,e_n$ where
+% $\arg{cdr}=|\@elt|\,e_2\,\cdots\~\,|\@elt|\,e_n$ and |\def|ine
+% $\arg{first}$ as $\arg{car}$ and globally |\def|ine $\arg{rest}$ as
+% $\arg{cdr}$. It is used in \!\pcol@addmarginpar! to get the first element
+% of \!\@currlist! being a \!\insert! for a right marginal note without
+% modifying \!\@currlist!.
+%
% \item[\Uidx{$\!\@cons!\arg{lst}\arg{elm}$}]
% is an internal macro to add $\!\@elt!\arg{elm}$ to the tail of $\arg{lst}$.
% 
@@ -4371,6 +4436,11 @@
% \!\protect!ion so that \!\protect!$\arg{cs}$ is kept in the expansion. It
% is used in \!\pcol@fntextbody! to \!\edef!ine \!\@currentlabel!.
%
+% \item[\Uidx{$\!\@latex@warning@no@line!\arg{msg}$}]
+% is an internal macro to report a warning message $\arg{msg}$ without the
+% line number in which the cause lies. It is used in \!\pcol@output! if
+% a page with floats and very short main vertical list is built.
+%
% \item[\Uidx{\!\@eha!}]
% is an internal macro having a help message saying the command causing an
% error is ignored. It is used in \!\pcol@zparacol!, \!\pcol@setcw@calcf!,
@@ -4379,13 +4449,13 @@
%
% \item[\Uidx{\!\@ehb!}]
% is an internal macro having a help message saying the error causes a
-% serious problem. It is used in \!\pcol@ovf! and \!\pcol@set@color@push!
-% as the argument of \!\PackageError!.
+% serious problem. It is used in \!\pcol@ovf!, \!\pcol@zparacol! 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
-% line number in which the cause lies. It is used in \!\pcol@output! if
-% a page with floats and very short main vertical list is built.
+% \item[\Uidx{\!\@parmoderr!}]
+% is an internal macro to complain about misplacement of a macro or
+% environment which is expected to appear in ``outer par mode''.
+% It is used in \!\pcol@zparacol! if it finds $\CSIndex{ifinner}=\true$.
%
% \item[\Uidx{\!\@Esphack!}]
% is an internal macro to put back the horizontal skip and space factor
@@ -4557,6 +4627,12 @@
% \secref{sec:imp-ovv-float}, this macro in 2015 or later version of
% \LaTeX{} lets $\!\f@depth!=|1sp|$.
%
+% \item[\Uidx{\!\@xympar!}]
+% is an interal macro to perform the last operations for \!\marginpar!. In
+% \!\pcol@zparacol! it is made \!\let!-equal to \!\pcol@xympar! for the
+% emulation of \!\marginnote!, while its original version is kept in
+% \!\pcol@@xympar!.
+%
% \item[\Uidx{\!\p@footnote!}]
% is an internal macro to have the prefix to \!\thefootnote! in the printed
% reference of the counter \counter{footnote}. It is used in
@@ -5077,8 +5153,13 @@
% \end{quote}
%
% \item[\Uidx{\!\@marbox!}]
-% is an internal macro which has an \!\insert! for right marginal notes. It
-% is used in \!\pcol@addmarginpar!.
+% is an internal macro which has an \!\insert! for left marginal notes. It
+% is used in \!\pcol@xympar!.
+%
+% \item[\Uidx{\!\@currlist!}]
+% is an internal macro which has an list of \!\insert!s for floats and
+% marginal notes given to \!output!. It is used in \!\pcol@addmarginpar! to
+% get the right marginal note from its head.
%
% \item[\Uidx{\!\@freelist!}]
% is an internal macro having available \!\insert!s for floats originially,
@@ -5606,6 +5687,10 @@
% emptiness check of $\arg{box}$.
%
% \item
+% In \!\pcol@addmarginpar!, it is given to \!\@xnext! as the target to have
+% the second and successive elements of \!\@currlist! which we cannot modify.
+%
+% \item
% In \!\pcol@zparacol! and \!\pcol@cmpctrelt!, it has the list of counters
% to be synchronized.
%
@@ -6039,7 +6124,11 @@
% in \!\pcol@output! to inhibit the warning and forced page break even when
% $\cc_0(\vb^r)=\!\@colroom!<1.5\!\baselineskip!$, because we may let it have
% a small value when the \mctext{} starts near the page bottom to capture
-% the text portion in the page by \!\pcol@makecol!.
+% the text portion in the page by \!\pcol@makecol!. In addition, it is
+% examined by \!\pcol@switchcol! to invoke $|\pcol@colpream|{\cdot}c$,
+% where $c=-1$ if $\true$ or $c=\!\pcol@currcol!$ otherwise.
+% 
+% \SpecialArrayIndex{c}{\pcol@colpream}
%
% The macro \!\pcol@sptext! then \!\global!ly turns another switch
% \CSIndex{ifpcol@sptext} $\true$ before putting the \mctext{} into the main
@@ -6623,6 +6712,18 @@
% pages following the \lpage.
% \end{macro}
% 
+% \begin{macro}{\belowfootnoteskip}
+% \changes{v1.35-4}{2018/12/31}
+% {Introduced to specify the additional space below the non-merged
+% pre-environment footnotes.}
+% 
+% The API \!\skip! register \!\belowfootnoteskip! has the amount of the space
+% added below non-merged \Preenv{} footnotes. The register is initialized
+% with the default 0\,pt, and then used in \!\pcol@output@start! to measure
+% the room in the first page, and in \!\pcol@combinefootins! to add the
+% space.
+% \end{macro}
+% 
% \begin{macrocode}
\newdimen\pcol@prevdepth
\newdimen\pcol@colht
@@ -6630,6 +6731,7 @@
\newdimen\pcol@lrmargin
\newdimen\pagerim \pagerim\z@
\newskip\pcol@topskip
+\newskip\belowfootnoteskip \belowfootnoteskip\z@
% \end{macrocode}
%
%
@@ -10126,6 +10228,9 @@
% \changes{v1.32-3}{2015/10/10}
% {Add depth clearing of imported deferred floats in case that some of
% them has \texttt{1sp}.}
+% \changes{v1.35-4}{2018/12/31}
+% {Add \cs{belowfootnoteskip} to $H_f$ being the space for the
+% non-merged pre-environment footnotes.}
% 
% The macro \!\pcol@output@start! is invoked solely from
% \!\pcol@specialoutput! to process the special \!\output! request made in
@@ -10147,15 +10252,16 @@
% 
% We then and let $\df=\bot$ because we don't have any deferred footnotes.
%
-% Next we caculate $H=H_r-(H_m+H_f+H_b)$ where $H_r=\!\@colroom!$, $H_m$ is
-% the height-plus-depth of the main vertical list in \!\@holdpg!, $H_f$ is
-% the sum of \!\skip!\!\footins! and the height-plus-depth of \!\footins! if
-% any or 0 otherwise, and $H_b=\!\textfloatsep!$ if the \preenv{} has bottom
-% floats or 0 otherwise. That is, $H$ is the room for each of \colpage{} in
-% the \spage. Then we examine if $H<1.5\times\!\baselineskip!$ to mean
-% \!\pcol@output! would force a page break with warning. If so, we assume
-% we have a page break before \beginparacol{} to ship out \preenv{} to avoid
-% the warning. Therefore, we invoke \LaTeX's \!\@makecol!\footnote{
+% Next we caculate $H=H_r-(H_m+H_f+H_b)$ where $H_r=\!\@colroom!$; $H_m$ is
+% the height-plus-depth of the main vertical list in \!\@holdpg!; $H_f$ is
+% the sum of \!\skip!\!\footins!, the height-plus-depth of \!\footins! and
+% \!\belowfootnoteskip!, if \!\footins! is not $\bot$ or 0 otherwise; and
+% $H_b=\!\textfloatsep!$ if the \preenv{} has bottom floats or 0 otherwise.
+% That is, $H$ is the room for each of \colpage{} in the \spage. Then we
+% examine if $H<1.5\times\!\baselineskip!$ to mean \!\pcol@output! would
+% force a page break with warning. If so, we assume we have a page break
+% before \beginparacol{} to ship out \preenv{} to avoid the warning.
+% Therefore, we invoke \LaTeX's \!\@makecol!\footnote{
% 
% \Sloppy{2500}%
% We can be unaware of our customization for \sync{}ation in
@@ -10197,6 +10303,7 @@
\ifvoid\footins\else
\advance\@tempdima-\skip\footins
\advance\@tempdima-\ht\footins \advance\@tempdima-\dp\footins
+ \advance\@tempdima-\belowfootnoteskip
\fi
\ifx\@botlist\@empty\else \advance\@tempdima-\textfloatsep \fi
\ifdim\@tempdima<1.5\baselineskip
@@ -10418,6 +10525,10 @@
% {Move emptying \cs{pcol@colorstack} to \cs{pcol@zparacol}.}
% \changes{v1.32-2}{2015/10/10}
% {Add \cs{pcol@Fb}/\cs{pcol@Fe} pair(s).}
+% \changes{v1.35-1}{2018/12/31}
+% {Add \cs{interlinepenalty} insertion for the first column to avoid
+% vertical overfull due to the first item taller than the column
+% room.}
% 
% Finally, we let $c=\!\pcol@currcol!=0$ for the first column, and regain the
% parameters in $\cc_0$ by \!\pcol@getcurrcol!. Then before putting
@@ -10432,7 +10543,10 @@
% \!\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}.
+% \secref{sec:imp-fnote}. We also add a penalty 10000 or
+% \!\interlinepenalty! according to $\CSIndex{if@nobreak}=\true$ or not to
+% allow the first column to start from a new page when its first item is
+% taller than the room in the \spage{}.
% 
% \begin{macrocode}
\global\pcol@currcol\z@
@@ -10444,7 +10558,8 @@
\ifvoid\footins\else
\pcol@Log\pcol@output@start{insert}\footins
\insert\footins{\box\footins\penalty\interlinepenalty}%
- \fi}
+ \fi
+ \if@nobreak \nobreak \else \addpenalty\interlinepenalty \fi}
% \end{macrocode}
% \end{macro}
@@ -11572,13 +11687,13 @@
% 
% \begin{macrocode}
\def\pcol@scancst#1{%
- \@tempcnta#1\relax
+ \@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@
+ \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}
@@ -11884,6 +11999,8 @@
% \begin{macro}{\pcol@combinefootins}
% \changes{v1.2-2}{2013/05/11}
% {Introduced to put footnotes into pre-environment stuff.}
+% \changes{v1.35-4}{2018/12/31}
+% {Add the insertion of vertical skip \cs{belowfootnoteskip}.}
% \begin{macro}{\pcol@putfootins}
% \changes{v1.2-2}{2013/05/11}
% {Introduced to put page-wise footnotes to a page.}
@@ -11906,7 +12023,15 @@
% footnotes is almost equivalent to the second half of the \cs{else} part
% except that \!\insert! is not always \!\footins! but $f$ and is done by
% \!\pcol@putfootins! in which a null vertical skip is added after $f$ but
-% this skip is removed by \!\unskip! after the invocation.
+% this skip is removed by \!\unskip! after the invocation. The other
+% difference is that the vertical space of \!\belowfootnoteskip! is added if
+% it is not 0\footnote{
+% 
+% We avoid null space insertion to minimize the difference from older
+% versions in traced output.}
+% 
+% to have some space between non-merged \Preenv{} footnotes and the first
+% lines in a \env{paracol} environment.
%
% The null vertical skip is put for \Scfnote{}s, for which the macro
% \!\pcol@putfootins! is invoked from \!\pcol@ioutputelt! and
@@ -11933,10 +12058,11 @@
% 
% \begin{macrocode}
\def\pcol@combinefootins#1#2{%
- \setbox\@outputbox\vbox{
+ \setbox\@outputbox\vbox{%
\boxmaxdepth\@maxdepth
\unvbox#1\relax
- \pcol@putfootins#2\unskip}}
+ \pcol@putfootins#2\unskip
+ \ifdim\belowfootnoteskip=\z@\else \vskip\belowfootnoteskip \fi}}
\def\pcol@putfootins#1{%
\vskip\skip#1\relax
\color@begingroup
@@ -11964,6 +12090,11 @@
% \changes{v1.3-4}{2013/09/17}
% {Introduced to make a margin sharable by marginal notes from
% different columns.}
+% \changes{v1.35-3}{2018/12/31}
+% {Fix the bug referring to \cs{@marbox} inappropriately.}
+% \changes{v1.35-3}{2018/12/31}
+% {Add vertical shifting of marginal note to emulate of
+% \cs{marginnote}.}
% \begin{macro}{\pcol@@addmarginpar}
% \changes{v1.3-4}{2013/09/17}
% {Introduced to keep the original definition of \cs{@addmarginpar}.}
@@ -12051,33 +12182,45 @@
% by $\WT-(D+w_c)+m_s$ rather than $m_s$, or in other words $m_s$ apart from
% the right edge of the rightmost column.
%
-% Third, we let $t=\!\@tempdima!$ be the distance from the top edge of the
-% column to that of the marginal note, namely \!\@pageht! minus the height
-% of \Midx{\!\pcol@marbox!} being a box having the note and thus
-% \!\@currbox! or \!\@marbox! according to $\CSIndex{if@firstcolumn}=\true$
-% or not. We also let $h=\!\@tempdimb!$ be the height-plus-depth of the box
-% \!\pcol@marbox! plus \!\marginparpush!, or in other words the vertical
-% space the marginal note requires. Then we give $t$ and $h$ to
-% \!\pcol@getmparbottom! to let \!\@mparbottom! have the bottom of the
-% exisiting marginal text below which we put the margial text in
-% \!\pcol@marbox!, and to let \!\pcol@mpblist! have the new list to
-% be replaced with $\mpb_{\{L,R\}}^{\{l,r\}}$ in $\pp^m(p)$.
+% Third, we let \Midx{\!\pcol@marbox!} be the first element of \!\@currlist!
+% obtained by \!\@xnext! for the right marginal note if
+% $\CSIndex{if@firstcolumn}=\false$, or \!\@currbox! for the left marginal
+% note otherwise. Then we let $t=\!\@tempdima!$ be the distance from the
+% top edge of the column to that of the marginal note, namely \!\@pageht!
+% minus the height of \!\pcol@marbox! plus |\dimen|\!\@currbox! being
+% downward shift amount optionally given by \!\marginnote!. We also let
+% $h=\!\@tempdimb!$ be the height-plus-depth of the box \!\pcol@marbox!
+% plus \!\marginparpush!, or in other words the vertical space the marginal
+% note requires. Then we give $t$ and $h$ to \!\pcol@getmparbottom! to let
+% \!\@mparbottom! have the bottom of the exisiting marginal text below which
+% we put the margial text in \!\pcol@marbox!, and to let \!\pcol@mpblist!
+% have the new list to be replaced with $\mpb_{\{L,R\}}^{\{l,r\}}$ in
+% $\pp^m(p)$.
%
% Forth, we update $\pp^m(p)$ with the new list in \!\pcol@mpblist! by a
% process similar to \!\pcol@setpageno! but with \!\pcol@setmpbelt! to scan
% the list of pages $\PPP$.
%
+% Fifth, we shift down \!\pcol@marbox! by |\dimen|\!\@currbox! and, if the
+% shift amount is greater than the height of the box and thus the height of
+% shifting result is zero, decrement \!\@mparbottom! by the amount to
+% deceive \LaTeX's \!\@addmarginpar! into believing \!\@mparbottom! is above
+% the real one by the amount. In other words, by the decrement we let
+% \!\@addmarginpar! see the top edge of the shifted marginal note in the
+% box, rather than that of the box itself, for the placement with
+% \!\@mparbottom!.
+%
% Finally, we invoke \LaTeX's original \!\@addmarginpar! being
% \!\pcol@@addmarginpar! to put the marginal note according to
% \CSIndex{if@firstcolumn}, temporarily modified \!\marginparsep! and
% \!\marginparwidth!, and \!\@mparbottom!. Note that since
% \!\pcol@zparacol! lets $\CSIndex{if@twocolumn}\~=\true$,
% \!\pcol@@addmarginpar! determine the margin only by
-% \CSIndex{if@firstcolumn}. Also note that it can be $\!\@mparbottom!>t$ to
-% mean the marginal note should be placed below the baseline at which
-% \!\marginpar! appears, i.e., at \!\@pageht! below from the column top, and
-% if so \!\pcol@@addmarginpar! will give us a warning as the correct
-% consequence of the placement.
+% \CSIndex{if@firstcolumn}. Also note that it can be $\!\@mparbottom!>t$
+% (before decrement with the positive shift amount) to mean the marginal
+% note should be shifted down from its natural position, and if so
+% \!\pcol@@addmarginpar! will give us a warning as the correct consequence
+% of the placement.
% 
% \begin{macrocode}
%% Special Output Routines: Marginal Notes
@@ -12114,8 +12257,10 @@
\advance\marginparsep\textwidth \advance\marginparsep-\@tempdima
\advance\marginparsep-\columnwidth
\fi
- \if@firstcolumn\let\pcol@marbox\@currbox \else\let\pcol@marbox\@marbox \fi
+ \expandafter\@xnext\@currlist\@@\pcol@marbox\@gtempa
+ \if@firstcolumn\let\pcol@marbox\@currbox \fi
\@tempdima\@pageht \advance\@tempdima-\ht\pcol@marbox
+ \advance\@tempdima\dimen\@currbox
\@tempdimb\ht\pcol@marbox \advance\@tempdimb\dp\pcol@marbox
\advance\@tempdimb\marginparpush
\pcol@getmparbottom\@tempdima\@tempdimb
@@ -12125,6 +12270,12 @@
\global\let\pcol@pages\@empty \global\let\pcol@currpage\@empty
\let\@elt\pcol@setmpbelt \reserved@a
\endgroup
+ \ifdim\dimen\@currbox=\z@\else
+ \ifdim\dimen\@currbox>\ht\pcol@marbox
+ \advance\@mparbottom-\dimen\pcol@marbox
+ \fi
+ \setbox\pcol@marbox\hbox{\lower\dimen\@currbox\box\pcol@marbox}%
+ \fi
\pcol@@addmarginpar}
% \end{macrocode}
@@ -14908,9 +15059,12 @@
% \end{macrocode}
%
% In \!\pcol@zparacol!, after making it sure to be in vertical mode by
-% \CSIndex{par}, at first we let $\CL$ and $\C$ have the value given through
-% the corresponding arguments, unless $\CL>\C$ to let us make $\CL=\C$
-% silently. Then we examine $\CL<\C$, and if not we let
+% \CSIndex{par}, at first we examine if we are neither in a box by
+% \CSIndex{ifinner} nor with ordinary two-column typesetting by
+% \CSIndex{if@twocolumn}, and complain about inappropriateness unless our
+% expectation is satisfied. Then we let $\CL$ and $\C$ have the value given
+% through the corresponding arguments, unless $\CL>\C$ to let us make
+% $\CL=\C$ silently. Next we examine $\CL<\C$, and if not we let
% $\CSIndex{ifpcol@paired}=\true$ regardless the setting in
% \!\pcol@yparacol! because \npaired{} typesetting is meaningless without
% \parapag{}ing. On the other hand, if \npaired{} typesetting is specified,
@@ -14919,8 +15073,9 @@
% starting.
%
% Second, we perform the operations done by \!\item! if
-% $\CSIndex{if@newlist}=\true$ to mean it is the first one in a
-% \env{list}-like environment. That is, we invoke \!\@nbitem! if
+% $\CSIndex{if@newlist}=\true$ and $\CSIndex{if@inlabel}\~=\false$ to mean
+% the first one in a \env{list}-like environment will appear at the very
+% first line of the leftmost column. That is, we invoke \!\@nbitem! if
% $\CSIndex{if@nobreak}=\true$, or add a penalty \!\@beginparpenalty! and a
% vertical skip $\!\@topsep!-\!\parskip!-\!\itemsep!$ so that the first
% \!\item! is \!\@topsep! apart from the last line above the environment,
@@ -14928,24 +15083,37 @@
% operations here is that, if the \env{paracol} environment is enclosed in a
% \env{list}-like environment without anything between two \!\begin! for
% environments, we have to align all first \!\item!s in all columns. That
-% is, if we did not do that, the {\em literally first} \!\item! would do that
-% resulting in the column having the \!\item! led by the vertical skip of
-% \!\@topsep! while others should have ordinary inter-\!\item! skips.
+% is, if we did not do that, the {\em literally first} \!\item! would do
+% that resulting in the column having the \!\item! led by the vertical skip
+% of \!\@topsep! while others should have ordinary inter-\!\item! skips.
% Therefore, we perform the operations on behalf of all first \!\item!s in
% all columns to have the skip of \!\@topsep! {\em above} the \env{paracol}
-% environment we are opening.
+% environment we are opening. Note that if \beginparacol{} immediately
+% follows a \!\begin! for a \env{trivlist}-like environment,
+% $\CSIndex{if@inlabel}=\true$ because the first \!\item! was given in the
+% opening macro and thus the operations shown above has already been
+% performed.
% 
% \changes{v1.3-6}{2013/09/17}
% {Add operations for the vertical skips at the beginning of a
% \texttt{list}-like environment.}
+% \changes{v1.35-6}{2018/12/31}
+% {Add error check with \cs{ifinner} and \cs{if@twocolumn}.}
+% \changes{v1.35-2}{2018/12/31}
+% {Add $\lnot$\cs{if@inlabel} to the condition to perform operations
+% for first \cs{item}.}
% 
% \begin{macrocode}
\def\pcol@zparacol[#1]#2{\par
+ \ifinner \@parmoderr \fi
+ \if@twocolumn \PackageError{paracol}{%
+ Environment paracol cannot work with ordinary two-column
+ typesetting.}\@ehb\fi
\global\pcol@ncolleft#1\relax \global\pcol@ncol#2\relax
\ifnum\pcol@ncolleft>\pcol@ncol \global\pcol@ncolleft\pcol@ncol \fi
\ifnum\pcol@ncolleft<\pcol@ncol\else \global\pcol@pairedtrue \fi
\ifpcol@paired\else \pcol@swapcolumnfalse \fi
- \if@newlist
+ \if@newlist \if@inlabel\else
\if@nobreak \@nbitem
\else
\addpenalty\@beginparpenalty
@@ -14953,7 +15121,7 @@
\addvspace{-\parskip}\addvspace{-\itemsep}%
\fi
\global\@newlistfalse
- \fi
+ \fi\fi
% \end{macrocode}
%
% The third operation group is to set up lists for counters as follows.
@@ -15236,15 +15404,19 @@
\let\@footnotetext\pcol@fntext
% \end{macrocode}
%
-% Seventh, we inactivate API macros \!\twosided! and \!\footnotelayout!
-% together with their backward-compatible macros \!\swapcolumninevenpages!,
-% \!\noswapcolumninevenpages!, \!\multi~columnfootnotes!,
-% \!\singlecolumnfootnotes! and \!\mergedfootnotes!, so that they commonly
-% invoke \!\pcol@ignore! because their inherent operations turning
-% corresponding switches are harmful in \env{paracol} environment. Note
-% that the inactivation of \!\twosided! is done by redefinition of
-% \!\pcol@twosided! because we need optional argument processing by
-% \!\twosided! even when it is inactivated.
+% Seventh, we let \!\marginpar!, \!\@mn@@marginnote! and \!\@xympar! be our
+% own versions \!\pcol@marginpar!, \!\pcol@marginnote! and \!\pcol@xympar!
+% respectively for the emulation of \!\marginnote!, saving the original
+% version of the first and third into \!\pcol@@marginpar! and
+% \!\pcol@@xympar!. Then we inactivate API macros \!\twosided! and
+% \!\footnotelayout! together with their backward-compatible macros
+% \!\swapcolumninevenpages!, \!\noswapcolumnineven~pages!,
+% \!\multi~columnfootnotes!, \!\singlecolumnfootnotes! and
+% \!\mergedfootnotes!, so that they commonly invoke \!\pcol@ignore! because
+% their inherent operations turning corresponding switches are harmful in
+% \env{paracol} environment. Note that the inactivation of \!\twosided! is
+% done by redefinition of \!\pcol@twosided! because we need optional
+% argument processing by \!\twosided! even when it is inactivated.
% 
% \changes{v1.2-4}{2013/05/11}
% {Add nullificaion of \cs{[no]swapcolumninevenpages}.}
@@ -15256,8 +15428,14 @@
% {Add new API inactivation for \cs{pcol@twosided}.}
% \changes{v1.3-5}{2013/09/17}
% {Add new API inactivation for \cs{footnotelayout}.}
+% \changes{v1.35-3}{2018/12/31}
+% {Add local modifications of \cs{marginpar}, \cs{@mn@@marginnote} and
+% \cs{@xympar} for the emulation of \cs{marginnote}.}
% 
% \begin{macrocode}
+ \let\pcol@@marginpar\marginpar \let\marginpar\pcol@marginpar
+ \let\@mn@@marginnote\pcol@marginnote
+ \let\pcol@@xympar\@xympar \let\@xympar\pcol@xympar
\def\pcol@twosided[#1]{\pcol@ignore\twosided}%
\def\swapcolumninevenpages{\pcol@ignore\swapcolumninevenpages}%
\def\noswapcolumninevenpages{\pcol@ignore\noswapcolumninevenpages}%
@@ -15321,11 +15499,19 @@
%
% Tenth and finally, we let $\!\pcol@nextcol!=0$ in case \beginparacol{} has
% the optional argument for \mctext{}, and invoke \!\pcol@sptext! if it has.
+% Otherwise, we invoke $|\pcol@colpream|{\cdot}0$ being the \colpream{} of
+% the first column 0, which will be invoked by \!\pcol@switchcol! if
+% \mctext{} is given.
+% 
+% \SpecialArrayIndex{c}{\pcol@colpream}
+% 
+% \changes{v1.35-5}{2018/12/31}
+% {Add the invocation of $\cs{pcol@colpream}{\cdot}0$.}
% 
% \begin{macrocode}
\pcol@nextcol\z@
\@ifnextchar[%]
- \pcol@sptext\relax}
+ \pcol@sptext{\@nameuse{pcol@colpream0}}}
% \end{macrocode}
% \end{macro}\end{macro}\end{macro}\end{macro}
%
@@ -16926,6 +17112,8 @@
% {Add setting $V_E\EQ\cs{pcol@@ensurevspace}$ and reinitialization of
% \cs{pcol@ensurevspace} for avoidance of post-synchronization
% inconsistent page break.}
+% \changes{v1.35-5}{2018/12/31}
+% {Add the invocation of $\cs{pcol@colpream}\cdot c$.}
% 
% The macro \!\pcol@switchcol! is invoked from \!\pcol@switchcolumn!,
% \!\pcol@iswitchcolumn!, \!\pcol@sptext! and \!\endparacol! to switch the
@@ -16964,8 +17152,15 @@
% scan $\T=\!\pcol@aconly!$ applying \!\pcol@aconlyelt! to each
% $\<t_c,c\>\in T$ to inhibit \!\addcontentsline! to the contents file of
% type $t_d$ as specified so by $\!\addcontentsonly!\arg{t_d}\~\arg{d}$.
-% Finally, we let $\!\@elt!=\!\relax!$ to make it sure that any lists can be
-% manipulated without unexpected application of a macro to their elements.
+% After that, we let $\!\@elt!=\!\relax!$ to make it sure that any lists can
+% be manipulated without unexpected application of a macro to their
+% elements.
+%
+% Finally, we invoke $|\pcol@colpream|{\cdot}c$, where $c=-1$ if
+% $\CSIndex{ifpcol@sptextstart}=\true$ to mean the \cswitch{} is for a
+% \sptext{}, or $c=d$ otherwise.
+% 
+% \SpecialArrayIndex{c}{\pcol@colpream}
% 
% \begin{macrocode}
\def\pcol@switchcol{%
@@ -16985,7 +17180,8 @@
\fi
\let\@elt\pcol@setctrelt
\csname pcol@counters\number\pcol@currcol\endcsname
- \let\@elt\pcol@aconlyelt \pcol@aconly \let\@elt\relax}
+ \let\@elt\pcol@aconlyelt \pcol@aconly \let\@elt\relax
+ \@nameuse{pcol@colpream\ifpcol@sptextstart-1\else\number\pcol@currcol\fi}}
% \end{macrocode}
% \end{macro}
@@ -17251,6 +17447,25 @@
% \end{macro}\end{macro}\end{macro}\end{macro}
% \end{macro}\end{macro}\end{macro}\end{macro}
%
+% \begin{macro}{\definecolumnpreamble}
+% \changes{v1.35-5}{2018/12/31}
+% {Introduced to define a column preamble.}
+% 
+% The API macro \!\definecolumnpreamble!\marg{c}\marg{pream} is to define
+% the \colpream{} $\arg{pream}$ for the column $c$ or that for \sptext{}s if
+% $c=-1$. After assiging $c$ to \!\@tempcnta! to ensure $c$ is a number,
+% the macro $|\pcol@colpream|{\cdot}c$ is |\def|ined to have $\arg{pream}$.
+% 
+% \SpecialArrayMainIndex{c}{\pcol@colpream}
+% 
+% \begin{macrocode}
+\def\definecolumnpreamble#1#2{\@tempcnta#1\relax
+ \expandafter\gdef\csname pcol@colpream\number\@tempcnta\endcsname{#2}}
+
+% \end{macrocode}
+% \end{macro}
+%
+%
% \begin{macro}{\ensurevspace}
% \changes{v1.3-5}{2013/09/17}
% {Introduced to declare the minimum space $V_E$ below a
@@ -17979,6 +18194,114 @@
%
%
%
+% \KeepSpace{13}
+% \section{Commands for Marginal Notes}
+% \label{sec:imp-mpar}
+% \changes{v1.35-3}{2018/12/31}
+% {Add the section ``Commands for Marginal Notes'' to describe newly
+% introduced macros for the emulation of \cs{marginnote}.}
+%
+% \begin{macro}{\marginpar}
+% \changes{v1.35-3}{2018/12/31}
+% {Locally modified in \cs{pcol@zparacol} for the emulation of
+% \cs{marginnote}.}
+% \begin{macro}{\pcol@marginpar}
+% \changes{v1.35-3}{2018/12/31}
+% {Introduced as the in-\texttt{paracol} version of \cs{marginpar} for
+% the emulation of \cs{marginnote}.}
+% \begin{macro}{\pcol@@marginpar}
+% \changes{v1.35-3}{2018/12/31}
+% {Introduced to keep the orginal version of \cs{marginpar} for
+% the emulation of \cs{marginnote}.}
+% \begin{macro}{\@mn@@marginnote}
+% \changes{v1.35-3}{2018/12/31}
+% {Locally modified in \cs{pcol@zparacol} for the emulation of
+% \cs{marginnote}.}
+% \begin{macro}{\pcol@marginnote}
+% \changes{v1.35-3}{2018/12/31}
+% {Introduced as the in-\texttt{paracol} version of
+% \cs{@mn@@marginnote} for the emulation of \cs{marginnote}.}
+% \begin{macro}{\pcol@mn@warning}
+% \changes{v1.35-3}{2018/12/31}
+% {Introduced to put a warning message to show \cs{marginnote} is
+% emulated.}
+% \begin{macro}{\@xympar}
+% \changes{v1.35-3}{2018/12/31}
+% {Locally modified in \cs{pcol@zparacol} for the emulation of
+% \cs{marginnote}.}
+% \begin{macro}{\pcol@xympar}
+% \changes{v1.35-3}{2018/12/31}
+% {Introduced as the in-\texttt{paracol} version of
+% \cs{@xympar} for the emulation of \cs{marginnote}.}
+% \begin{macro}{\pcol@@xympar}
+% \changes{v1.35-3}{2018/12/31}
+% {Introduced to keep the orginal version of \cs{@xympar} for the
+% emulation of \cs{marginnote}.}
+% \begin{macro}{\pcol@mparoffset}
+% \changes{v1.35-3}{2018/12/31}
+% {Introduced to have the vertical offset for the emulation of
+% \cs{marginnote}.}
+% The API macro \!\marginnote!\oarg{left}\marg{right}\oarg{voffset} given by
+% the package \textsf{marginnote} is emulated using
+% \!\marginpar!\oarg{left}\marg{right} and \!\pcol@addmarginpar! in
+% \!\output! routine. The basic mechanism is to pass the vertical offset
+% $\arg{voffset}$ to \!\pcol@addmarginpar! through $|\dimen|\arg{b}$ where
+% $b$ is the \!\insert! to carry $\arg{left}$. The offset passing is
+% implemented as follows.
+% 
+% \begin{itemize}
+% \item
+% \!\marginpar! is made \!\let!-equal to our own version \!\pcol@marginpar!
+% in \!\pcol@zparacol! so that it \!\let! the macro \!\pcol@mparoffset! be
+% \!\z@! and then invoke \LaTeX's origincal version kept in
+% \!\pcol@@marginpar!, because the marginal note given by \!\marginpar! will
+% not be shifted.
+%
+% \item
+% The internal macro
+% \!\@mn@@marginnote!\oarg{left}\marg{right}\oarg{voffset} defined in
+% \textsf{marginnote} is made \!\let!-equal to our own version
+% \!\pcol@marginnote! in \!\pcol@zparacol! so that it |\def|ines
+% \!\pcol@mparoffset! to have $\arg{voffset}$ and then invoke
+% \!\pcol@@marginpar!\oarg{left}\~\marg{right} for the emulation. In the
+% invokation, \textsf{marginnote}'s typesetting macros \!\margin~font!,
+% \!\raggedleftmarginnote! and \!\raggedrightmarginnote! are attached to
+% $\arg{left}$ and $\arg{right}$.
+%
+% \item
+% \LaTeX's internal macro \!\@xympar! for the last operations of
+% \!\marginpar! is made \!\let!-equal to our own version in
+% \!\pcol@zparacol! so that it assigns the offset in \!\pcol@mparoffset! to
+% |\dimen|\!\@marbox! for $\arg{left}$, if $\!\@floatpenalty!<0$ to mean
+% other macros for \!\marginpar! have not detected any errors.
+% \end{itemize}
+% 
+% In addition, we raise a warning that \!\marginnote! is emulated by
+% \!\pcol@mn@warning!, which is made \!\let!-equal to \!\relax! in the caller
+% \!\pcol@marginnote! after the invokation so that the warning message is
+% put just once.
+% 
+% \begin{macrocode}
+%% Commands for Marginal Notes
+
+\def\pcol@marginpar{\let\pcol@mparoffset\z@ \pcol@@marginpar}
+\long\def\pcol@marginnote[#1]#2[#3]{\endgroup
+ \pcol@mn@warning \global\let\pcol@mn@warning\relax
+ \def\pcol@mparoffset{#3}%
+ \pcol@@marginpar[\marginfont\raggedleftmarginnote#1]%
+ {\marginfont\raggedrightmarginnote#2}}
+\def\pcol@mn@warning{%
+ \PackageWarning{paracol}{\string\margninnote\space is emulated by
+ \string\marginpar.}}
+\def\pcol@xympar{%
+ \ifnum\@floatpenalty<\z@ \global\dimen\@marbox\pcol@mparoffset\relax \fi
+ \pcol@@xympar}
+
+% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
+% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
+%
+%
% \KeepSpace{9}
% \section{Two-Sided Typesetting}
% \label{sec:imp-swap}
diff --git a/Master/texmf-dist/source/latex/paracol/paracol.dtx b/Master/texmf-dist/source/latex/paracol/paracol.dtx
index 83b24fff502..98de0929165 100644
--- a/Master/texmf-dist/source/latex/paracol/paracol.dtx
+++ b/Master/texmf-dist/source/latex/paracol/paracol.dtx
@@ -19,7 +19,7 @@
%<man>\ProvidesFile{paracol-man.tex}
% \fi
% \ProvidesFile{paracol.dtx}
-[2018/05/07 v1.34 ]
+[2018/12/31 v1.35 ]
% \iffalse
%<*man>
\documentclass{ltxdoc}\normalmarginpar
@@ -340,6 +340,7 @@
% \def\arg#1{\<\mathit{#1}\>}
% \def\Arg#1{\texttt{\char`\{}#1\texttt{\char`\}}}
% \def\ARg#1{\texttt{\char`\{}\textit{#1}\texttt{\char`\}}}
+% \def\Oarg#1{\texttt{[\textit{#1}]}}
% \def\Sub#1{{\hbox to0pt{\hss$\scriptstyle #1$\hss}}}
% \def\PT{\,{\rm pt}}
%
@@ -369,6 +370,8 @@
% \def\colorstack{color stack\Index{color stack}}
% \def\cctext{column-context\Index{column-context}}
% \def\colpage{column-page\Index{column-page}}
+% \def\colpream{column preamble\Index{column preamble}}
+% \def\Colpream{preamble\Index{column preamble}}
% \def\cscan{column-scan\Index{column-scan}}
% \def\csepgap{column-separating gap\Index{column-separating rule}}
% \def\cseprule{column-separating rule\Index{column-separating rule}}
@@ -416,6 +419,7 @@
% \def\Scfnote{page-wise footnote\Index{page-wise footnote}}
% \def\scfnote{page-wise\Index{page-wise footnote}}
% \def\spanning{spanning stuff\Index{spanning stuff}}
+% \def\sptext{spanning text\Index{spanning text}}
% \def\spage{starting page\Index{starting page}}
% \def\sync{synchroniz\Index{synchronize}}
% \def\tpage{top page\Index{top page}}
@@ -640,6 +644,23 @@
% \changes{v1.34}{2018/05/07}
% {Fix a text coloring problem in non-breakable sequences of vertical
% items. (2018/05/07)}
+% \changes{v1.35-1}{2018/12/31}
+% {Fix a page break problem with a tall item in the very first line of
+% the first column. (2018/12/31)}
+% \changes{v1.35-2}{2018/12/31}
+% {Fix a vertical space problem with \texttt{trivlist} immediately
+% surrounding \texttt{paracol}. (2018/12/31)}
+% \changes{v1.35-3}{2018/12/31}
+% {Fix a bug in \cs{pcol@addmarginpar} and add emulation of
+% \cs{marginnnote}. (2018/12/31)}
+% \changes{v1.35-4}{2018/12/31}
+% {Add \cs{belowfootnoteskip} for the additional space below the
+% non-merged pre-environment footnotes. (2018/12/31)}
+% \changes{v1.35-5}{2018/12/31}
+% {Add \cs{definecolumnpreamble}. (2018/12/31)}
+% \changes{v1.35-6}{2018/12/31}
+% {Add error check if \texttt{paracol} environment is not in outer par
+% mode and is with ordinary two-column typesetting. (2018/12/31)}
%
%
%
@@ -753,13 +774,23 @@
% \LaTeX{} itself (2015/01/10 or later) and enlighten the author on the cause
% 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.
+% Manuel Kuehner who reported a bug in text coloring which had hidden
+% for five years until the version 1.34 was released;
+% 
+% ZongXian Wang who found that the paracol misbehaves when an environment
+% starts with an unusually tall item;
+% 
+% and Frank Mittelbach who pointed out bugs in \cs{marginpar} implementation
+% and vertical spacing with \cs{trivlist}-like environments, and suggested
+% new functionality with \cs{marginnote}, \cs{belowfootnoteskip} and
+% \cs{definecolumnpreamble}.
%
% For the implementation of the style file, the author referred to the base
-% implementations of \texttt{\char`\\output}, \texttt{\char`\\newcounter}
-% and related macros of \LaTeXe{} written by Leslie Lamport, Johannes Braams
-% and other authors.
+% implementations of \cs{output} and othe many macros of \LaTeXe{} written
+% by Leslie Lamport, Johannes Braams and other authors. The author also
+% referred to \textsf{color} written by David Carlisle and
+% \textsf{marginnote} written by Markus Kohm to make the package working
+% well with them.
%
% \ifx\ONLYDESCRIPTION\undefined\else
% \newpage\label{page:toc} \tableofcontents
diff --git a/Master/texmf-dist/source/latex/paracol/ref.dtx b/Master/texmf-dist/source/latex/paracol/ref.dtx
index c28ad26d3dd..4025a65d084 100644
--- a/Master/texmf-dist/source/latex/paracol/ref.dtx
+++ b/Master/texmf-dist/source/latex/paracol/ref.dtx
@@ -16,6 +16,8 @@
% \changes{v1.2-2}{2013/05/11}
% {Add a footnote mentioning page-wise footnotes merged with
% pre-environment staff.}
+% \changes{v1.35-4}{2018/12/31}
+% {Add description of \cs{belowfootnoteskip}.}
% 
% The environment may start from \emph{any} vertical position in a page,
% i.e., not necessary at the top of a page. The single-column
@@ -34,10 +36,11 @@
% \UsageIndex{spanning text}
% 
% if provided, with a vertical skip of \!\textfloatsep! separating them if
-% bottom floats exist. The \emph{deferred} floats which have not yet
-% appeared in the starting page and thus will appear in the next or
-% succeeding pages are considered as \pwise{} floats given in the
-% environment.
+% bottom floats exist, or of \!\belowfootnoteskip! described in
+% Section~\ref{sec:ref-scfnote} if only footnotes exist. The
+% \emph{deferred} floats which have not yet appeared in the starting page
+% and thus will appear in the next or succeeding pages are considered as
+% \pwise{} floats given in the environment.
%
% \item
% \changes{v1.2-5}{2013/05/11}
@@ -384,6 +387,43 @@
%
%
%
+% \item[\Midx{\!\definecolumnpreamble!}\marg{col}\marg{pream}]\mbox{}\par
+% \changes{v1.35-5}{2018/12/31}
+% {Add description of \cs{definecolumnpreamble}.}
+% The command is to define the {\Uidx\colpream} \meta{pream} for the column
+% \meta{col}, which is inserted at every \cswitch{} to the column. More
+% specifically, the command let \!\switchcolumn! to \meta{col} act as if you
+% sepcify;
+% 
+% \begin{itemize}\item[]
+% \!\switchcolumn! $\arg{pream\ for\ col}$
+% \end{itemize}
+% 
+% and \csenv{}s such as \env{nthcolumn} act as if you specify;
+% 
+% \begin{itemize}\item[]
+% |\begin{nthcolumn}{|\meta{col}|}| $\arg{pream\ for\ col}$
+% 
+% \end{itemize}
+% 
+% \begin{itemize}
+% \item
+% \begingroup\hfuzz1.5pt
+% The optional \sptext{} of \!\switchcolumn!, \csenv{}s and \beginparacol{}
+% is considered to be in a virtual column $-1$, and thus if you need a
+% \Colpream{} for \sptext{}s do \!\definecolumnpreamble!|{-1}|\marg{pream}.
+% \par\endgroup
+%
+% \item
+% The command may appear in a \env{paracol} environment and, if so,
+% \meta{pream} is effective from the succeeding \cswitch{} to \meta{col}.
+%
+% \item
+% The definition of \meta{pream} is made globally.
+% \end{itemize}
+%
+%
+%
% \item[\Midx{\!\ensurevspace!}\marg{len}]\mbox{}\par
% \changes{v1.3-5}{2013/09/17}
% {Add description of \cs{ensurevspace}.}
@@ -824,11 +864,38 @@
% Section~\ref{sec:ppts} shows examples of marginal note placement together
% with related issues on \parapag{}ing and two-sided typesetting.
% \end{itemize}
+%
+%
+%
+% \item[\Midx{\!\marginnote!}\oarg{left}\marg{right}\oarg{voffset}]\mbox{}\par
+% \changes{v1.35-3}{2018/12/31}
+% {Add description of \cs{marginnote}.}
+% You may use the package \textsf{marginnote} and its command \!\marginnote!
+% in \env{paracol} environments as a replacement of \!\marginpar!. However,
+% the command is \emph{emulated} with \!\marginpar! and \textsf{paracol}'s
+% own mechanism of marginal note placement. Therefore, some of
+% \textsf{marginnote}'s functionality are not effective in \env{paracol}
+% environment except for the following features.
+% 
+% \begin{itemize}
+% \item
+% Shifting up/down a marginal note by the optional \meta{voffset}.
+%
+% \item
+% Defining fonts (and others) for marginal notes by \!\marginfont!.
+%
+% \item
+% Controlling the holizontal paragraph alignment by \!\raggedleftmarginnote!
+% and |\raggedright|\~|marginnote|\SpecialIndex{\raggedrightmarginnote}.
+% \end{itemize}
+% 
+% Note that you will see a warning message ``|\margninnote| is emulated by
+% |\marginpar|'' at the first in-\env{paracol} occurrence of the command to
+% let you know the imperfection.
% \end{description}
%
%
%
-% \newpage
% \subsection{Commands for Counters}
% \label{sec:ref-counter}
%
@@ -1034,9 +1101,17 @@
% \item
% The effect of \!\fncounteradjustment! is shown in Section~\ref{sec:fnnp}.
% \end{itemize}
-% \end{description}
%
%
+% \item[\Midx{\!\belowfootnoteskip!}]\mbox{}\par
+% \changes{v1.35-4}{2018/12/31}
+% {Add description of \cs{belowfootnoteskip}.}
+% The typesetting parameter specifies the amount of the space inserted below
+% footnotes of single-column \preenv{} if it does not have bottom floats. The
+% default amount is 0\,pt, i.e., no space is added.
+%
+% \end{description}
+%
%
% \KeepSpace{6}
% \subsection{Commands for Coloring Texts and Column-Separating Rules}
diff --git a/Master/texmf-dist/tex/latex/paracol/paracol.sty b/Master/texmf-dist/tex/latex/paracol/paracol.sty
index 16f777532c7..fb4c1a7ae23 100644
--- a/Master/texmf-dist/tex/latex/paracol/paracol.sty
+++ b/Master/texmf-dist/tex/latex/paracol/paracol.sty
@@ -9,7 +9,7 @@
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{paracol}
-[2018/05/07 v1.34 ]
+[2018/12/31 v1.35 ]
%% Register Declaration
@@ -55,6 +55,7 @@
\newdimen\pcol@lrmargin
\newdimen\pagerim \pagerim\z@
\newskip\pcol@topskip
+\newskip\belowfootnoteskip \belowfootnoteskip\z@
\newbox\pcol@topfnotes
\newbox\pcol@prespan \setbox\pcol@prespan\box\voidb@x
\newbox\pcol@rightpage \global\setbox\pcol@rightpage\box\voidb@x
@@ -872,6 +873,7 @@
\ifvoid\footins\else
\advance\@tempdima-\skip\footins
\advance\@tempdima-\ht\footins \advance\@tempdima-\dp\footins
+ \advance\@tempdima-\belowfootnoteskip
\fi
\ifx\@botlist\@empty\else \advance\@tempdima-\textfloatsep \fi
\ifdim\@tempdima<1.5\baselineskip
@@ -936,7 +938,8 @@
\ifvoid\footins\else
\pcol@Log\pcol@output@start{insert}\footins
\insert\footins{\box\footins\penalty\interlinepenalty}%
- \fi}
+ \fi
+ \if@nobreak \nobreak \else \addpenalty\interlinepenalty \fi}
\def\pcol@makenormalcol{%
\ifpcol@mgfnote \setbox\@tempboxa\box\footins \fi
@@ -1264,10 +1267,11 @@
\fi\fi}
\def\pcol@combinefootins#1#2{%
- \setbox\@outputbox\vbox{
+ \setbox\@outputbox\vbox{%
\boxmaxdepth\@maxdepth
\unvbox#1\relax
- \pcol@putfootins#2\unskip}}
+ \pcol@putfootins#2\unskip
+ \ifdim\belowfootnoteskip=\z@\else \vskip\belowfootnoteskip \fi}}
\def\pcol@putfootins#1{%
\vskip\skip#1\relax
\color@begingroup
@@ -1310,8 +1314,10 @@
\advance\marginparsep\textwidth \advance\marginparsep-\@tempdima
\advance\marginparsep-\columnwidth
\fi
- \if@firstcolumn\let\pcol@marbox\@currbox \else\let\pcol@marbox\@marbox \fi
+ \expandafter\@xnext\@currlist\@@\pcol@marbox\@gtempa
+ \if@firstcolumn\let\pcol@marbox\@currbox \fi
\@tempdima\@pageht \advance\@tempdima-\ht\pcol@marbox
+ \advance\@tempdima\dimen\@currbox
\@tempdimb\ht\pcol@marbox \advance\@tempdimb\dp\pcol@marbox
\advance\@tempdimb\marginparpush
\pcol@getmparbottom\@tempdima\@tempdimb
@@ -1321,6 +1327,12 @@
\global\let\pcol@pages\@empty \global\let\pcol@currpage\@empty
\let\@elt\pcol@setmpbelt \reserved@a
\endgroup
+ \ifdim\dimen\@currbox=\z@\else
+ \ifdim\dimen\@currbox>\ht\pcol@marbox
+ \advance\@mparbottom-\dimen\pcol@marbox
+ \fi
+ \setbox\pcol@marbox\hbox{\lower\dimen\@currbox\box\pcol@marbox}%
+ \fi
\pcol@@addmarginpar}
\def\pcol@getmparbottom#1#2{%
@@ -1979,11 +1991,15 @@
\@ifstar{\global\pcol@pairedfalse \pcol@zparacol[#1]}%
{\pcol@zparacol[#1]}}
\def\pcol@zparacol[#1]#2{\par
+ \ifinner \@parmoderr \fi
+ \if@twocolumn \PackageError{paracol}{%
+ Environment paracol cannot work with ordinary two-column
+ typesetting.}\@ehb\fi
\global\pcol@ncolleft#1\relax \global\pcol@ncol#2\relax
\ifnum\pcol@ncolleft>\pcol@ncol \global\pcol@ncolleft\pcol@ncol \fi
\ifnum\pcol@ncolleft<\pcol@ncol\else \global\pcol@pairedtrue \fi
\ifpcol@paired\else \pcol@swapcolumnfalse \fi
- \if@newlist
+ \if@newlist \if@inlabel\else
\if@nobreak \@nbitem
\else
\addpenalty\@beginparpenalty
@@ -1991,7 +2007,7 @@
\addvspace{-\parskip}\addvspace{-\itemsep}%
\fi
\global\@newlistfalse
- \fi
+ \fi\fi
\global\let\pcol@counters\cl@@ckpt
\let\@elt\pcol@remctrelt \pcol@gcounters
\let\@elt\pcol@thectrelt \pcol@counters
@@ -2039,6 +2055,9 @@
\def\footnoterule{{\columnwidth\textwidth \pcol@footnoterule}}%
\fi
\let\@footnotetext\pcol@fntext
+ \let\pcol@@marginpar\marginpar \let\marginpar\pcol@marginpar
+ \let\@mn@@marginnote\pcol@marginnote
+ \let\pcol@@xympar\@xympar \let\@xympar\pcol@xympar
\def\pcol@twosided[#1]{\pcol@ignore\twosided}%
\def\swapcolumninevenpages{\pcol@ignore\swapcolumninevenpages}%
\def\noswapcolumninevenpages{\pcol@ignore\noswapcolumninevenpages}%
@@ -2060,7 +2079,7 @@
\pcol@invokeoutput\pcol@op@start
\pcol@nextcol\z@
\@ifnextchar[%]
- \pcol@sptext\relax}
+ \pcol@sptext{\@nameuse{pcol@colpream0}}}
\let\pcol@paracol\paracol
\def\thecolumn{\number\pcol@currcol}
@@ -2404,7 +2423,8 @@
\fi
\let\@elt\pcol@setctrelt
\csname pcol@counters\number\pcol@currcol\endcsname
- \let\@elt\pcol@aconlyelt \pcol@aconly \let\@elt\relax}
+ \let\@elt\pcol@aconlyelt \pcol@aconly \let\@elt\relax
+ \@nameuse{pcol@colpream\ifpcol@sptextstart-1\else\number\pcol@currcol\fi}}
\def\pcol@visitallcols#1{\begingroup
\@tempcnta\z@ \@tempcntb\pcol@currcol
@@ -2442,6 +2462,9 @@
\let\pcol@com@endrightcolumn\pcol@com@endcolumn
\expandafter\let\csname pcol@com@endrightcolumn*\endcsname\pcol@com@endcolumn
+\def\definecolumnpreamble#1#2{\@tempcnta#1\relax
+ \expandafter\gdef\csname pcol@colpream\number\@tempcnta\endcsname{#2}}
+
\def\ensurevspace#1{{\@tempdima#1\relax \gdef\pcol@ensurevspace{#1}}}
\ensurevspace{\baselineskip}
@@ -2585,6 +2608,21 @@
\def\pcol@iifootnotetext[#1]{\pcol@calcfnctr#1\@nil
\expandafter\pcol@@footnotetext\expandafter[\number\@tempcnta]}
+%% Commands for Marginal Notes
+
+\def\pcol@marginpar{\let\pcol@mparoffset\z@ \pcol@@marginpar}
+\long\def\pcol@marginnote[#1]#2[#3]{\endgroup
+ \pcol@mn@warning \global\let\pcol@mn@warning\relax
+ \def\pcol@mparoffset{#3}%
+ \pcol@@marginpar[\marginfont\raggedleftmarginnote#1]%
+ {\marginfont\raggedrightmarginnote#2}}
+\def\pcol@mn@warning{%
+ \PackageWarning{paracol}{\string\margninnote\space is emulated by
+ \string\marginpar.}}
+\def\pcol@xympar{%
+ \ifnum\@floatpenalty<\z@ \global\dimen\@marbox\pcol@mparoffset\relax \fi
+ \pcol@@xympar}
+
%% Column Swapping
\def\twosided{\@ifnextchar[%]