summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/paracol/paracol.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/paracol/paracol.sty')
-rw-r--r--Master/texmf-dist/tex/latex/paracol/paracol.sty43
1 files changed, 35 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/paracol/paracol.sty b/Master/texmf-dist/tex/latex/paracol/paracol.sty
index 76970d3e738..d0a08c46511 100644
--- a/Master/texmf-dist/tex/latex/paracol/paracol.sty
+++ b/Master/texmf-dist/tex/latex/paracol/paracol.sty
@@ -1,5 +1,5 @@
%% Style file `paracol'.
-%% Copyright (C) 2005-2011
+%% Copyright (C) 2005-2012
%% Hiroshi Nakashima <h.nakashima@DOMAIN; DOMAIN=media.kyoto-u.ac.jp>
%% (Kyoto University)
%% This program can be redistributed and/or modified under the terms
@@ -9,7 +9,7 @@
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{paracol}
-[2011/10/10 v1.0 ]
+[2012/05/11 v1.1 ]
%% Register Declaration
@@ -260,7 +260,9 @@
\csname pcol@shipped\number\@tempcnta\endcsname
\relax{\let\@currbox\voidb@x}%
\ifvoid\@currbox\else \@cons\@freelist\@currbox \fi
- \pcol@hfil \hb@xt@\columnwidth{\box\@currbox\hss}%
+ \expandafter\@tempdima
+ \csname pcol@columnwidth\number\@tempcnta \endcsname
+ \pcol@hfil \hb@xt@\@tempdima{\box\@currbox\hss}%
\let\pcol@hfil\hfil
\advance\@tempcnta\@ne}}}%
\else
@@ -428,7 +430,10 @@
\def\pcol@getcurrcol{%
\expandafter\expandafter\expandafter\pcol@igetcurrcol
- \csname pcol@col\number\pcol@currcol\endcsname}
+ \csname pcol@col\number\pcol@currcol\endcsname
+ \expandafter\global\expandafter\columnwidth
+ \csname pcol@columnwidth\number\pcol@currcol\endcsname
+ \global\hsize\columnwidth \global\linewidth\columnwidth}
\def\pcol@igetcurrcol#1#2#3#4#5#6#7#8#9{%
\def\@currbox{#1}\def\pcol@currfoot{#2}\global\pcol@prevdepth#3sp\relax
\gdef\@toplist{#4}\gdef\@midlist{#5}\gdef\@botlist{#6}\gdef\@deferlist{#7}%
@@ -790,10 +795,9 @@
\let\@elt\pcol@cmpctrelt \global\let\@gtempa\@empty \pcol@counters
\pcol@synccounter\@gtempa
\endgroup
- \global\columnwidth\textwidth
- \@tempdima\columnsep \multiply\@tempdima\pcol@ncol
- \advance\@tempdima-\columnsep
- \global\advance\columnwidth-\@tempdima \global\divide\columnwidth\pcol@ncol
+ \pcol@setcolumnwidth
+ \expandafter\global\expandafter\columnwidth
+ \csname pcol@columnwidth0\endcsname
\global\hsize\columnwidth \global\linewidth\columnwidth
\global\@twocolumntrue \global\@firstcolumntrue \col@number\@ne
\global\pcol@topskip\topskip
@@ -816,6 +820,29 @@
\@ifnextchar[%]
\pcol@mctext\relax}
+\def\columnratio{\gdef\pcol@columnratio}
+\columnratio{}
+\def\pcol@setcolumnwidth{
+ \@tempcntb\pcol@ncol \advance\@tempcntb\m@ne
+ \@tempdima-\columnsep \multiply\@tempdima\@tempcntb
+ \advance\@tempdima\textwidth \@tempdimb\@tempdima
+ \@tempcnta\z@
+ \@for\reserved@a:=\pcol@columnratio\do{%
+ \ifnum\@tempcnta<\@tempcntb
+ \@tempdimc\reserved@a\@tempdima
+ \expandafter\edef\csname pcol@columnwidth\number\@tempcnta\endcsname{%
+ \number\@tempdimc sp}%
+ \advance\@tempdimb-\@tempdimc
+ \advance\@tempcnta\@ne
+ \fi}%
+ \@tempcntb\pcol@ncol \advance\@tempcntb-\@tempcnta
+ \divide\@tempdimb\@tempcntb
+ \@whilenum\@tempcnta<\pcol@ncol\do{%
+ \expandafter\edef\csname pcol@columnwidth\number\@tempcnta\endcsname{%
+ \number\@tempdimb sp}%
+ \advance\@tempcnta\@ne}%
+}
+
\def\pcol@localcommands{%
\@elt{switchcolumn}%
\@elt{endcolumn}\@elt{endcolumn*}%