texlive[49560] Master/texmf-dist: paracol (31dec18)
commits+karl at tug.org
commits+karl at tug.org
Mon Dec 31 23:11:24 CET 2018
Revision: 49560
http://tug.org/svn/texlive?view=revision&revision=49560
Author: karl
Date: 2018-12-31 23:11:23 +0100 (Mon, 31 Dec 2018)
Log Message:
-----------
paracol (31dec18)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/paracol/README
trunk/Master/texmf-dist/doc/latex/paracol/paracol-man.pdf
trunk/Master/texmf-dist/doc/latex/paracol/paracol-man.tex
trunk/Master/texmf-dist/source/latex/paracol/impl.dtx
trunk/Master/texmf-dist/source/latex/paracol/paracol.dtx
trunk/Master/texmf-dist/source/latex/paracol/ref.dtx
trunk/Master/texmf-dist/tex/latex/paracol/paracol.sty
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/paracol/paracol.pdf
Modified: trunk/Master/texmf-dist/doc/latex/paracol/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/paracol/README 2018-12-31 22:11:07 UTC (rev 49559)
+++ trunk/Master/texmf-dist/doc/latex/paracol/README 2018-12-31 22:11:23 UTC (rev 49560)
@@ -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 at DOMAIN; DOMAIN=media.kyoto-u.ac.jp>
@@ -107,8 +107,17 @@
- 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!
Hiroshi Nakashima <h.nakashima at DOMAIN; DOMAIN=media.kyoto-u.ac.jp>
Modified: trunk/Master/texmf-dist/doc/latex/paracol/paracol-man.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/paracol/paracol-man.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/paracol/paracol-man.tex 2018-12-31 22:11:07 UTC (rev 49559)
+++ trunk/Master/texmf-dist/doc/latex/paracol/paracol-man.tex 2018-12-31 22:11:23 UTC (rev 49560)
@@ -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}
Added: trunk/Master/texmf-dist/doc/latex/paracol/paracol.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/paracol/paracol.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/paracol/paracol.pdf 2018-12-31 22:11:07 UTC (rev 49559)
+++ trunk/Master/texmf-dist/doc/latex/paracol/paracol.pdf 2018-12-31 22:11:23 UTC (rev 49560)
Property changes on: trunk/Master/texmf-dist/doc/latex/paracol/paracol.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/paracol/impl.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/paracol/impl.dtx 2018-12-31 22:11:07 UTC (rev 49559)
+++ trunk/Master/texmf-dist/source/latex/paracol/impl.dtx 2018-12-31 22:11:23 UTC (rev 49560)
@@ -1541,18 +1541,35 @@
%
% \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 at output@start!
-% to make \Preenv{} \Mgfnote{}s followed by this \!\penalty! on the
-% \!\insert!ion, in \!\pcol at restartcolumn! to insert the \!\penalty! in the
-% register to resume a \colpage{} unless it is suspended after a sectioning
-% command, i.e., $\CSIndex{if at nobreak}=\true$, in \!\pcol at deferredfootins!
-% to let the secnod half of split $\df$ have this \!\penalty! as the very
-% first element, in \!\pcol at 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 at 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 at nobreak}=\true$.
+%
+% \item
+% \!\pcol at restartcolumn! to insert this \!\penalty! to resume a \colpage{}
+% allowing page-break if $\CSIndex{if at nobreak}=\false$.
+%
+% \item
+% \!\pcol at deferredfootins! to let the secnod half of split $\df$ have this
+% \!\penalty! as the very first element.
+%
+% \item
+% \!\pcol at fntexttop!\marg{text} to make the footnote $\arg{text}$ followed
+% by this \!\penalty! on the \!\insert!ion.
+%
+% \item
% \!\pcol at fntextother!\marg{text} to make the footnote $\arg{text}$ preceded
-% by this \!\penalty! in $\df$, and in \!\pcol at fntextbody! to let it have
-% \!\interfootnotelinepenalty!.
+% by this \!\penalty! in $\df$.
%
+% \item
+% \!\pcol at 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
% \!\insertpenalties! if an \!\insert! is moved to the page next to the page
@@ -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 at 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 at end@dblfloat! to insert the penalty, and by
+% \!\pcol at 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 at calcfnctr!, it has the footnote ordinal calculated by the
% macro to be referred to by the invokers \!\pcol at iadjustfnctr! and
% \!\pcol at iifootnotetext!.
@@ -2317,9 +2340,9 @@
% \!\pcol at bg@paperwidth! to calculate $\WP-2\WR$.
%
% \item[\Uidx{\!\z@!}]
-% is a \!\dimen! register to have 0\,|pt| to initialize \!\pagerim! and
-% \!\skip!\!\pcol at 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 at colorins! at their declarations,
+% and is used in the following macros.
%
% \begin{quote}\raggedright
% \!\pcol at ShowBox!,
@@ -2342,6 +2365,7 @@
% \!\pcol at putbackmvl!,
% \!\pcol at iscancst!,
% \!\pcol at deferredfootins!,
+% \!\pcol at combinefootins!,
% \!\pcol at addmarginpar!,
% \!\pcol at getmparbottom!,
% \!\pcol at sync!,
@@ -2357,6 +2381,7 @@
% \!\pcol at extract@fil at ii!,
% \!\pcol at sptext!,
% \!\pcol at fntextbody!.
+% \!\pcol at marginpar!,
% \!\pcol at icolumncolor!,
% \!\pcol at set@color at push!,
% \!\pcol at reset@color at pop!,
@@ -2409,6 +2434,7 @@
% \!\pcol at sptext!,
% \!\pcol at switchcol!,
% \!\pcol at visitallcols!,
+% \!\pcol at 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 at dblfloat! kept in our own \!\pcol at end@dblfloat!.
+% including old \!\end at dblfloat! kept in our own \!\pcol at end@dblfloat!. It
+% is also examined by \!\pcol at zparacol! before being turned $\true$ to
+% ensure it is $\false$ or to complain about the inappropriateness otherwise.
%
% \item[\Uidx{\CSIndex{if at firstcolumn}}]
% is a switch to be $\true$ iff the first column is being typeset. Its
@@ -3398,15 +3426,15 @@
% \CSIndex{if at afterindent} by \!\pcol at setcurrcol!, and then restored from
% it by \!\pcol at iigetcurrcol!. The macro \!\pcol at output@switch! refers to
% it to broadcast its value set by a \mctext{} to $\cc_c(\sw)$ for all
-% $c\In0\C$, while \!\pcol at restartcolumn! inserts $\!\penalty!=10000$ by
-% \!\nobreak! if the switch is $\true$. This conditional \!\nobreak!
-% is also done by \!\pcol at icolumncolor!, \!\pcol at set@color at push!,
-% \!\pcol at reset@color at pop! and \!\pcol at reset@color at mpop! to avoid a break
-% after an \!\insert!. The macro \!\pcol at 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 at output@start! and \!\pcol at restartcolumn! insert
+% $\!\penalty!=10000$ by \!\nobreak! if the switch is $\true$. This
+% conditional \!\nobreak! is also done by \!\pcol at icolumncolor!,
+% \!\pcol at set@color at push!, \!\pcol at reset@color at pop! and
+% \!\pcol at reset@color at mpop! to avoid a break after an \!\insert!. The macro
+% \!\pcol at 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 at 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 at 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 at zparacol! together with \CSIndex{if at 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 at 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 at restartcolumn!, \!\pcol at icolumncolor!,
-% \!\pcol at set@color at push!, \!\pcol at reset@color at pop! and
-% \!\pcol at reset@color at mpop! to meet the page-break inhibition request made
-% by $\CSIndex{if at nobreak}=\true$.
+% breaks. It is used in \!\pcol at output@start!, \!\pcol at restartcolumn!,
+% \!\pcol at icolumncolor!, \!\pcol at set@color at push!, \!\pcol at reset@color at pop!
+% and \!\pcol at reset@color at mpop! to meet the page-break inhibition request
+% made by $\CSIndex{if at 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 at nobreak}={\false}$. The \!\penalty! is inserted removing the
% last vertical skip which is reinserted after the \!\penalty!. The macro
-% is used in \!\pcol at restartcolumn! to insert \!\interlinepenalty! if
-% $\CSIndex{if at nobreak}=\false$, while \!\pcol at 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 at output@start! and \!\pcol at restartcolumn! to insert
+% \!\interlinepenalty! if $\CSIndex{if at nobreak}=\false$, while
+% \!\pcol at 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 at 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 at zparacol! it is made \!\let!-equal to
+% \!\pcol at 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 at 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 at ovf! on \!\@freelist! shortage; \!\pcol at set@color at push! on too
-% many math-mode colorings; in \!\pcol at zparacol! on illegal nesting;
+% many math-mode colorings; in \!\pcol at zparacol! on two-column
+% typesetting outside \env{paracol} and illegal nesting of \env{paracol};
% $\!\pcol at setcw@calcf!\<x\>\<y\>\<z\>$ on too large $x/y$;
% \!\pcol at switchcolumn! on invalid target column; \!\pcol at 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 at ignore! to complain an API macro appears in \env{paracol}
% inappropriately, in \!\pcol at fntextbody! if the footnote is taller than
-% $\!\textheight!-\!\skip!\!\footins!$, and in \!\pcol at icolumncolor!,
+% $\!\textheight!-\!\skip!\!\footins!$, in \!\pcol at mn@warning! to show
+% \!\marginnote! is emulated, and in \!\pcol at icolumncolor!,
% \!\pcol at defcseprulecolor@i! and \!\pcol at backgroundcolor@ii! to complain
% \!\columncolor!\slash\!\normalcolumncolor!,
% \!\colseprulecolor!\slash\!\normalcolseprulecolor! or \!\background~color!
@@ -3974,6 +4019,11 @@
% \!\column*! for \!\pcol at com@column*!.
%
% \item
+% \!\pcol at zparacol! for $|\pcol at colpream|{\cdot}0$.
+%
+% \SpecialArrayIndex{c}{\pcol at colpream}
+%
+% \item
% $\!\pcol at storectrelt!\<\theta\>$ for $|\pcol at ctr@|{\cdot}\theta$.
%
% \SpecialArrayIndex{\theta}{\pcol at ctr@}
@@ -4008,6 +4058,11 @@
% \SpecialArrayIndex{\theta}{\cl@}
%
% \item
+% \!\pcol at switchcol! to the column $c$ for $|\pcol at colpream|{\cdot}c$.
+%
+% \SpecialArrayIndex{c}{\pcol at colpream}
+%
+% \item
% $\!\pcol at aconlyelt!\<t\>\<c\>$ for $|\pcol at ac@def@|{\cdot}t$.
%
% \SpecialIndex{\pcol at ac@def at lof}\SpecialIndex{\pcol at ac@def at lot}
@@ -4264,6 +4319,16 @@
% The macro is also used in \!\pcol at 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 at 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 at fntextbody! to \!\edef!ine \!\@currentlabel!.
%
+% \item[\Uidx{$\!\@latex at warning@no at 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 at 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 at zparacol!, \!\pcol at 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 at ovf! and \!\pcol at set@color at push!
-% as the argument of \!\PackageError!.
+% serious problem. It is used in \!\pcol at ovf!, \!\pcol at zparacol! and
+% \!\pcol at set@color at push! as the argument of \!\PackageError!.
%
-% \item[\Uidx{$\!\@latex at warning@no at 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 at 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 at 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 at depth!=|1sp|$.
%
+% \item[\Uidx{\!\@xympar!}]
+% is an interal macro to perform the last operations for \!\marginpar!. In
+% \!\pcol at zparacol! it is made \!\let!-equal to \!\pcol at xympar! for the
+% emulation of \!\marginnote!, while its original version is kept in
+% \!\pcol@@xympar!.
+%
% \item[\Uidx{\!\p at 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,9 +5153,14 @@
% \end{quote}
%
% \item[\Uidx{\!\@marbox!}]
-% is an internal macro which has an \!\insert! for right marginal notes. It
-% is used in \!\pcol at addmarginpar!.
+% is an internal macro which has an \!\insert! for left marginal notes. It
+% is used in \!\pcol at 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 at addmarginpar! to
+% get the right marginal note from its head.
+%
% \item[\Uidx{\!\@freelist!}]
% is an internal macro having available \!\insert!s for floats originially,
% but also \colpage{}s, \spanning{}, footnotes and default column-color in
@@ -5606,6 +5687,10 @@
% emptiness check of $\arg{box}$.
%
% \item
+% In \!\pcol at 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 at zparacol! and \!\pcol at cmpctrelt!, it has the list of counters
% to be synchronized.
%
@@ -6039,7 +6124,11 @@
% in \!\pcol at 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 at makecol!.
+% the text portion in the page by \!\pcol at makecol!. In addition, it is
+% examined by \!\pcol at switchcol! to invoke $|\pcol at colpream|{\cdot}c$,
+% where $c=-1$ if $\true$ or $c=\!\pcol at currcol!$ otherwise.
+%
+% \SpecialArrayIndex{c}{\pcol at colpream}
%
% The macro \!\pcol at sptext! then \!\global!ly turns another switch
% \CSIndex{ifpcol at 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 at output@start! to measure
+% the room in the first page, and in \!\pcol at combinefootins! to add the
+% space.
+% \end{macro}
+%
% \begin{macrocode}
\newdimen\pcol at prevdepth
\newdimen\pcol at colht
@@ -6630,6 +6731,7 @@
\newdimen\pcol at lrmargin
\newdimen\pagerim \pagerim\z@
\newskip\pcol at 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 at output@start! is invoked solely from
% \!\pcol at 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 at 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 at 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 at colorstack} to \cs{pcol at zparacol}.}
% \changes{v1.32-2}{2015/10/10}
% {Add \cs{pcol at Fb}/\cs{pcol at 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 at currcol!=0$ for the first column, and regain the
% parameters in $\cc_0$ by \!\pcol at 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 at 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 at currcol\z@
@@ -10444,7 +10558,8 @@
\ifvoid\footins\else
\pcol at Log\pcol at output@start{insert}\footins
\insert\footins{\box\footins\penalty\interlinepenalty}%
- \fi}
+ \fi
+ \if at nobreak \nobreak \else \addpenalty\interlinepenalty \fi}
% \end{macrocode}
% \end{macro}
@@ -11572,13 +11687,13 @@
%
% \begin{macrocode}
\def\pcol at scancst#1{%
- \@tempcnta#1\relax
+ \@tempcnta#1\relax
\ifnum\@tempcnta=\pcol at colorins
\ifvoid\pcol at ccuse{@box}\else
\reserved at b{\pcol at ccuse{@box}}\fi
\fi
\ifvoid\@tempcnta\else
- \setbox\@tempboxa\vbox{}\setbox\pcol at tempboxa\vbox{}\@tempcntb\z@
+ \setbox\@tempboxa\vbox{}\setbox\pcol at tempboxa\vbox{}\@tempcntb\z@
\def\reserved at b{}\let\@elt\relax \@tempswatrue \pcol at iscancst
\global\setbox\@tempcnta\box\@tempboxa \unvbox\pcol at tempboxa
\fi}
@@ -11884,6 +11999,8 @@
% \begin{macro}{\pcol at 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 at 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 at 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 at putfootins! is invoked from \!\pcol at ioutputelt! and
@@ -11933,10 +12058,11 @@
%
% \begin{macrocode}
\def\pcol at combinefootins#1#2{%
- \setbox\@outputbox\vbox{
+ \setbox\@outputbox\vbox{%
\boxmaxdepth\@maxdepth
\unvbox#1\relax
- \pcol at putfootins#2\unskip}}
+ \pcol at putfootins#2\unskip
+ \ifdim\belowfootnoteskip=\z@\else \vskip\belowfootnoteskip \fi}}
\def\pcol at putfootins#1{%
\vskip\skip#1\relax
\color at 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,22 +12182,34 @@
% 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 at marbox!} being a box having the note and thus
-% \!\@currbox! or \!\@marbox! according to $\CSIndex{if at firstcolumn}=\true$
-% or not. We also let $h=\!\@tempdimb!$ be the height-plus-depth of the box
-% \!\pcol at marbox! plus \!\marginparpush!, or in other words the vertical
-% space the marginal note requires. Then we give $t$ and $h$ to
-% \!\pcol at getmparbottom! to let \!\@mparbottom! have the bottom of the
-% exisiting marginal text below which we put the margial text in
-% \!\pcol at marbox!, and to let \!\pcol at mpblist! have the new list to
-% be replaced with $\mpb_{\{L,R\}}^{\{l,r\}}$ in $\pp^m(p)$.
+% Third, we let \Midx{\!\pcol at marbox!} be the first element of \!\@currlist!
+% obtained by \!\@xnext! for the right marginal note if
+% $\CSIndex{if at 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 at 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 at marbox!
+% plus \!\marginparpush!, or in other words the vertical space the marginal
+% note requires. Then we give $t$ and $h$ to \!\pcol at getmparbottom! to let
+% \!\@mparbottom! have the bottom of the exisiting marginal text below which
+% we put the margial text in \!\pcol at marbox!, and to let \!\pcol at 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 at mpblist! by a
% process similar to \!\pcol at setpageno! but with \!\pcol at setmpbelt! to scan
% the list of pages $\PPP$.
%
+% Fifth, we shift down \!\pcol at 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 at firstcolumn}, temporarily modified \!\marginparsep! and
@@ -12073,11 +12216,11 @@
% \!\marginparwidth!, and \!\@mparbottom!. Note that since
% \!\pcol at zparacol! lets $\CSIndex{if at twocolumn}\~=\true$,
% \!\pcol@@addmarginpar! determine the margin only by
-% \CSIndex{if at 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 at 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 at firstcolumn\let\pcol at marbox\@currbox \else\let\pcol at marbox\@marbox \fi
+ \expandafter\@xnext\@currlist\@@\pcol at marbox\@gtempa
+ \if at firstcolumn\let\pcol at marbox\@currbox \fi
\@tempdima\@pageht \advance\@tempdima-\ht\pcol at marbox
+ \advance\@tempdima\dimen\@currbox
\@tempdimb\ht\pcol at marbox \advance\@tempdimb\dp\pcol at marbox
\advance\@tempdimb\marginparpush
\pcol at getmparbottom\@tempdima\@tempdimb
@@ -12125,6 +12270,12 @@
\global\let\pcol at pages\@empty \global\let\pcol at currpage\@empty
\let\@elt\pcol at setmpbelt \reserved at a
\endgroup
+ \ifdim\dimen\@currbox=\z@\else
+ \ifdim\dimen\@currbox>\ht\pcol at marbox
+ \advance\@mparbottom-\dimen\pcol at marbox
+ \fi
+ \setbox\pcol at marbox\hbox{\lower\dimen\@currbox\box\pcol at marbox}%
+ \fi
\pcol@@addmarginpar}
% \end{macrocode}
@@ -14908,9 +15059,12 @@
% \end{macrocode}
%
% In \!\pcol at 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 at 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 at paired}=\true$ regardless the setting in
% \!\pcol at 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 at newlist}=\true$ to mean it is the first one in a
-% \env{list}-like environment. That is, we invoke \!\@nbitem! if
+% $\CSIndex{if at newlist}=\true$ and $\CSIndex{if at 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 at 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 at 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 at twocolumn}.}
+% \changes{v1.35-2}{2018/12/31}
+% {Add $\lnot$\cs{if at inlabel} to the condition to perform operations
+% for first \cs{item}.}
%
% \begin{macrocode}
\def\pcol at zparacol[#1]#2{\par
+ \ifinner \@parmoderr \fi
+ \if at twocolumn \PackageError{paracol}{%
+ Environment paracol cannot work with ordinary two-column
+ typesetting.}\@ehb\fi
\global\pcol at ncolleft#1\relax \global\pcol at ncol#2\relax
\ifnum\pcol at ncolleft>\pcol at ncol \global\pcol at ncolleft\pcol at ncol \fi
\ifnum\pcol at ncolleft<\pcol at ncol\else \global\pcol at pairedtrue \fi
\ifpcol at paired\else \pcol at swapcolumnfalse \fi
- \if at newlist
+ \if at newlist \if at inlabel\else
\if at 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 at 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 at 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 at 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 at marginpar!, \!\pcol at marginnote! and \!\pcol at 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 at 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 at 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 at 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 at marginpar
+ \let\@mn@@marginnote\pcol at marginnote
+ \let\pcol@@xympar\@xympar \let\@xympar\pcol at xympar
\def\pcol at twosided[#1]{\pcol at ignore\twosided}%
\def\swapcolumninevenpages{\pcol at ignore\swapcolumninevenpages}%
\def\noswapcolumninevenpages{\pcol at ignore\noswapcolumninevenpages}%
@@ -15321,11 +15499,19 @@
%
% Tenth and finally, we let $\!\pcol at nextcol!=0$ in case \beginparacol{} has
% the optional argument for \mctext{}, and invoke \!\pcol at sptext! if it has.
+% Otherwise, we invoke $|\pcol at colpream|{\cdot}0$ being the \colpream{} of
+% the first column 0, which will be invoked by \!\pcol at switchcol! if
+% \mctext{} is given.
%
+% \SpecialArrayIndex{c}{\pcol at colpream}
+%
+% \changes{v1.35-5}{2018/12/31}
+% {Add the invocation of $\cs{pcol at colpream}{\cdot}0$.}
+%
% \begin{macrocode}
\pcol at nextcol\z@
\@ifnextchar[%]
- \pcol at sptext\relax}
+ \pcol at sptext{\@nameuse{pcol at 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 at ensurevspace} for avoidance of post-synchronization
% inconsistent page break.}
+% \changes{v1.35-5}{2018/12/31}
+% {Add the invocation of $\cs{pcol at colpream}\cdot c$.}
%
% The macro \!\pcol at switchcol! is invoked from \!\pcol at switchcolumn!,
% \!\pcol at iswitchcolumn!, \!\pcol at sptext! and \!\endparacol! to switch the
@@ -16964,9 +17152,16 @@
% scan $\T=\!\pcol at aconly!$ applying \!\pcol at 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 at colpream|{\cdot}c$, where $c=-1$ if
+% $\CSIndex{ifpcol at sptextstart}=\true$ to mean the \cswitch{} is for a
+% \sptext{}, or $c=d$ otherwise.
%
+% \SpecialArrayIndex{c}{\pcol at colpream}
+%
% \begin{macrocode}
\def\pcol at switchcol{%
\pcol at savecounters
@@ -16985,7 +17180,8 @@
\fi
\let\@elt\pcol at setctrelt
\csname pcol at counters\number\pcol at currcol\endcsname
- \let\@elt\pcol at aconlyelt \pcol at aconly \let\@elt\relax}
+ \let\@elt\pcol at aconlyelt \pcol at aconly \let\@elt\relax
+ \@nameuse{pcol at colpream\ifpcol at sptextstart-1\else\number\pcol at 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 at colpream|{\cdot}c$ is |\def|ined to have $\arg{pream}$.
+%
+% \SpecialArrayMainIndex{c}{\pcol at colpream}
+%
+% \begin{macrocode}
+\def\definecolumnpreamble#1#2{\@tempcnta#1\relax
+ \expandafter\gdef\csname pcol at 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 at zparacol} for the emulation of
+% \cs{marginnote}.}
+% \begin{macro}{\pcol at 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 at zparacol} for the emulation of
+% \cs{marginnote}.}
+% \begin{macro}{\pcol at 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 at 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 at zparacol} for the emulation of
+% \cs{marginnote}.}
+% \begin{macro}{\pcol at 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 at 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 at addmarginpar! in
+% \!\output! routine. The basic mechanism is to pass the vertical offset
+% $\arg{voffset}$ to \!\pcol at 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 at marginpar!
+% in \!\pcol at zparacol! so that it \!\let! the macro \!\pcol at 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 at marginnote! in \!\pcol at zparacol! so that it |\def|ines
+% \!\pcol at 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 at zparacol! so that it assigns the offset in \!\pcol at 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 at mn@warning!, which is made \!\let!-equal to \!\relax! in the caller
+% \!\pcol at marginnote! after the invokation so that the warning message is
+% put just once.
+%
+% \begin{macrocode}
+%% Commands for Marginal Notes
+
+\def\pcol at marginpar{\let\pcol at mparoffset\z@ \pcol@@marginpar}
+\long\def\pcol at marginnote[#1]#2[#3]{\endgroup
+ \pcol at mn@warning \global\let\pcol at mn@warning\relax
+ \def\pcol at mparoffset{#3}%
+ \pcol@@marginpar[\marginfont\raggedleftmarginnote#1]%
+ {\marginfont\raggedrightmarginnote#2}}
+\def\pcol at mn@warning{%
+ \PackageWarning{paracol}{\string\margninnote\space is emulated by
+ \string\marginpar.}}
+\def\pcol at xympar{%
+ \ifnum\@floatpenalty<\z@ \global\dimen\@marbox\pcol at 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}
Modified: trunk/Master/texmf-dist/source/latex/paracol/paracol.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/paracol/paracol.dtx 2018-12-31 22:11:07 UTC (rev 49559)
+++ trunk/Master/texmf-dist/source/latex/paracol/paracol.dtx 2018-12-31 22:11:23 UTC (rev 49560)
@@ -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 at 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
Modified: trunk/Master/texmf-dist/source/latex/paracol/ref.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/paracol/ref.dtx 2018-12-31 22:11:07 UTC (rev 49559)
+++ trunk/Master/texmf-dist/source/latex/paracol/ref.dtx 2018-12-31 22:11:23 UTC (rev 49560)
@@ -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,10 +1101,18 @@
% \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}
% \label{sec:ref-tcolor}
Modified: trunk/Master/texmf-dist/tex/latex/paracol/paracol.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/paracol/paracol.sty 2018-12-31 22:11:07 UTC (rev 49559)
+++ trunk/Master/texmf-dist/tex/latex/paracol/paracol.sty 2018-12-31 22:11:23 UTC (rev 49560)
@@ -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 at lrmargin
\newdimen\pagerim \pagerim\z@
\newskip\pcol at topskip
+\newskip\belowfootnoteskip \belowfootnoteskip\z@
\newbox\pcol at topfnotes
\newbox\pcol at prespan \setbox\pcol at prespan\box\voidb at x
\newbox\pcol at rightpage \global\setbox\pcol at rightpage\box\voidb at 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 at Log\pcol at output@start{insert}\footins
\insert\footins{\box\footins\penalty\interlinepenalty}%
- \fi}
+ \fi
+ \if at nobreak \nobreak \else \addpenalty\interlinepenalty \fi}
\def\pcol at makenormalcol{%
\ifpcol at mgfnote \setbox\@tempboxa\box\footins \fi
@@ -1264,10 +1267,11 @@
\fi\fi}
\def\pcol at combinefootins#1#2{%
- \setbox\@outputbox\vbox{
+ \setbox\@outputbox\vbox{%
\boxmaxdepth\@maxdepth
\unvbox#1\relax
- \pcol at putfootins#2\unskip}}
+ \pcol at putfootins#2\unskip
+ \ifdim\belowfootnoteskip=\z@\else \vskip\belowfootnoteskip \fi}}
\def\pcol at putfootins#1{%
\vskip\skip#1\relax
\color at begingroup
@@ -1310,8 +1314,10 @@
\advance\marginparsep\textwidth \advance\marginparsep-\@tempdima
\advance\marginparsep-\columnwidth
\fi
- \if at firstcolumn\let\pcol at marbox\@currbox \else\let\pcol at marbox\@marbox \fi
+ \expandafter\@xnext\@currlist\@@\pcol at marbox\@gtempa
+ \if at firstcolumn\let\pcol at marbox\@currbox \fi
\@tempdima\@pageht \advance\@tempdima-\ht\pcol at marbox
+ \advance\@tempdima\dimen\@currbox
\@tempdimb\ht\pcol at marbox \advance\@tempdimb\dp\pcol at marbox
\advance\@tempdimb\marginparpush
\pcol at getmparbottom\@tempdima\@tempdimb
@@ -1321,6 +1327,12 @@
\global\let\pcol at pages\@empty \global\let\pcol at currpage\@empty
\let\@elt\pcol at setmpbelt \reserved at a
\endgroup
+ \ifdim\dimen\@currbox=\z@\else
+ \ifdim\dimen\@currbox>\ht\pcol at marbox
+ \advance\@mparbottom-\dimen\pcol at marbox
+ \fi
+ \setbox\pcol at marbox\hbox{\lower\dimen\@currbox\box\pcol at marbox}%
+ \fi
\pcol@@addmarginpar}
\def\pcol at getmparbottom#1#2{%
@@ -1979,11 +1991,15 @@
\@ifstar{\global\pcol at pairedfalse \pcol at zparacol[#1]}%
{\pcol at zparacol[#1]}}
\def\pcol at zparacol[#1]#2{\par
+ \ifinner \@parmoderr \fi
+ \if at twocolumn \PackageError{paracol}{%
+ Environment paracol cannot work with ordinary two-column
+ typesetting.}\@ehb\fi
\global\pcol at ncolleft#1\relax \global\pcol at ncol#2\relax
\ifnum\pcol at ncolleft>\pcol at ncol \global\pcol at ncolleft\pcol at ncol \fi
\ifnum\pcol at ncolleft<\pcol at ncol\else \global\pcol at pairedtrue \fi
\ifpcol at paired\else \pcol at swapcolumnfalse \fi
- \if at newlist
+ \if at newlist \if at inlabel\else
\if at nobreak \@nbitem
\else
\addpenalty\@beginparpenalty
@@ -1991,7 +2007,7 @@
\addvspace{-\parskip}\addvspace{-\itemsep}%
\fi
\global\@newlistfalse
- \fi
+ \fi\fi
\global\let\pcol at counters\cl@@ckpt
\let\@elt\pcol at remctrelt \pcol at gcounters
\let\@elt\pcol at thectrelt \pcol at counters
@@ -2039,6 +2055,9 @@
\def\footnoterule{{\columnwidth\textwidth \pcol at footnoterule}}%
\fi
\let\@footnotetext\pcol at fntext
+ \let\pcol@@marginpar\marginpar \let\marginpar\pcol at marginpar
+ \let\@mn@@marginnote\pcol at marginnote
+ \let\pcol@@xympar\@xympar \let\@xympar\pcol at xympar
\def\pcol at twosided[#1]{\pcol at ignore\twosided}%
\def\swapcolumninevenpages{\pcol at ignore\swapcolumninevenpages}%
\def\noswapcolumninevenpages{\pcol at ignore\noswapcolumninevenpages}%
@@ -2060,7 +2079,7 @@
\pcol at invokeoutput\pcol at op@start
\pcol at nextcol\z@
\@ifnextchar[%]
- \pcol at sptext\relax}
+ \pcol at sptext{\@nameuse{pcol at colpream0}}}
\let\pcol at paracol\paracol
\def\thecolumn{\number\pcol at currcol}
@@ -2404,7 +2423,8 @@
\fi
\let\@elt\pcol at setctrelt
\csname pcol at counters\number\pcol at currcol\endcsname
- \let\@elt\pcol at aconlyelt \pcol at aconly \let\@elt\relax}
+ \let\@elt\pcol at aconlyelt \pcol at aconly \let\@elt\relax
+ \@nameuse{pcol at colpream\ifpcol at sptextstart-1\else\number\pcol at currcol\fi}}
\def\pcol at visitallcols#1{\begingroup
\@tempcnta\z@ \@tempcntb\pcol at currcol
@@ -2442,6 +2462,9 @@
\let\pcol at com@endrightcolumn\pcol at com@endcolumn
\expandafter\let\csname pcol at com@endrightcolumn*\endcsname\pcol at com@endcolumn
+\def\definecolumnpreamble#1#2{\@tempcnta#1\relax
+ \expandafter\gdef\csname pcol at colpream\number\@tempcnta\endcsname{#2}}
+
\def\ensurevspace#1{{\@tempdima#1\relax \gdef\pcol at ensurevspace{#1}}}
\ensurevspace{\baselineskip}
@@ -2585,6 +2608,21 @@
\def\pcol at iifootnotetext[#1]{\pcol at calcfnctr#1\@nil
\expandafter\pcol@@footnotetext\expandafter[\number\@tempcnta]}
+%% Commands for Marginal Notes
+
+\def\pcol at marginpar{\let\pcol at mparoffset\z@ \pcol@@marginpar}
+\long\def\pcol at marginnote[#1]#2[#3]{\endgroup
+ \pcol at mn@warning \global\let\pcol at mn@warning\relax
+ \def\pcol at mparoffset{#3}%
+ \pcol@@marginpar[\marginfont\raggedleftmarginnote#1]%
+ {\marginfont\raggedrightmarginnote#2}}
+\def\pcol at mn@warning{%
+ \PackageWarning{paracol}{\string\margninnote\space is emulated by
+ \string\marginpar.}}
+\def\pcol at xympar{%
+ \ifnum\@floatpenalty<\z@ \global\dimen\@marbox\pcol at mparoffset\relax \fi
+ \pcol@@xympar}
+
%% Column Swapping
\def\twosided{\@ifnextchar[%]
More information about the tex-live-commits
mailing list