summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-02-11 00:09:15 +0000
committerKarl Berry <karl@freefriends.org>2015-02-11 00:09:15 +0000
commit06035cd2a957fc5063b466c181f360a743fc9d0a (patch)
tree8dc21ad8875a8d8e197192a9c4c4849cc6bc61f0
parent594384c2eaf02fe0d0e5aae153c6d5db8e30666f (diff)
vwcol (9feb15)
git-svn-id: svn://tug.org/texlive/trunk@36254 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/vwcol/README11
-rw-r--r--Master/texmf-dist/doc/latex/vwcol/vwcol.pdfbin167029 -> 273316 bytes
-rw-r--r--Master/texmf-dist/source/latex/vwcol/vwcol.dtx154
-rw-r--r--Master/texmf-dist/source/latex/vwcol/vwcol.ins47
-rw-r--r--Master/texmf-dist/tex/latex/vwcol/vwcol.sty60
5 files changed, 135 insertions, 137 deletions
diff --git a/Master/texmf-dist/doc/latex/vwcol/README b/Master/texmf-dist/doc/latex/vwcol/README
index f63c3f101e1..eedcfd71693 100644
--- a/Master/texmf-dist/doc/latex/vwcol/README
+++ b/Master/texmf-dist/doc/latex/vwcol/README
@@ -1,6 +1,6 @@
_________________
The VWCOL package
-v0.1
+v0.2
This package provides a crude environment
called 'vwcol' for typesetting multicolumn
@@ -10,7 +10,7 @@ a single page.
For example,
\documentclass{article}
-\usepackage{lipsum}
+\usepackage{vwcol,lipsum}
\begin{document}
\begin{vwcol}[widths={0.3,0.2,0.5}]
\lipsum[1]
@@ -20,9 +20,12 @@ For example,
Note again that only paragraph text is
supported at present.
+See the PDF documentation for full details.
+Report bugs at <https://github.com/wspr/vwcol>
+
______________
Will Robertson
-wspr 81 [at] gmail [dot] com
+will.robertson@latex-project.org
-Copyright 2008
+Copyright 2008, 2015
Distributed under the LaTeX Project Public License
diff --git a/Master/texmf-dist/doc/latex/vwcol/vwcol.pdf b/Master/texmf-dist/doc/latex/vwcol/vwcol.pdf
index a18f18e90b5..018dacc68dc 100644
--- a/Master/texmf-dist/doc/latex/vwcol/vwcol.pdf
+++ b/Master/texmf-dist/doc/latex/vwcol/vwcol.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/vwcol/vwcol.dtx b/Master/texmf-dist/source/latex/vwcol/vwcol.dtx
index a49034b823e..085891ec6ab 100644
--- a/Master/texmf-dist/source/latex/vwcol/vwcol.dtx
+++ b/Master/texmf-dist/source/latex/vwcol/vwcol.dtx
@@ -1,56 +1,15 @@
-% \iffalse
+% \iffalse
%<*internal>
-\iffalse
-%</internal>
-%<*readme>
-_________________
-The VWCOL package
-v0.1
-
-This package provides a crude environment
-called 'vwcol' for typesetting multicolumn
-paragraph text of various column widths on
-a single page.
-
-For example,
-
-\documentclass{article}
-\usepackage{lipsum}
-\begin{document}
-\begin{vwcol}[widths={0.3,0.2,0.5}]
- \lipsum[1]
-\end{vwcol}
-\end{document}
-
-Note again that only paragraph text is
-supported at present.
-
-______________
-Will Robertson
-wspr 81 [at] gmail [dot] com
-
-Copyright 2008
-Distributed under the LaTeX Project Public License
-%</readme>
-%<*internal>
-\fi
\begingroup
%</internal>
%<*batchfile>
\input docstrip.tex
\keepsilent
\preamble
+___________________________________________________________
- __________________________________
- Copyright (C) 2008 Will Robertson
-
- License information appended.
-
-
-\endpreamble
-\postamble
-
-Copyright (C) 2008 by Will Robertson <wspr81@gmail.com>
+Copyright (C) 2008, 2015 Will Robertson
+ <will.robertson@latex-project.org>
Distributable under the LaTeX Project Public License,
version 1.3c or higher (your choice). The latest version of
@@ -63,16 +22,17 @@ This work consists of the file vwcol.dtx
and the derived files vwcol.sty,
vwcol.ins, and
vwcol.pdf.
-
+___________________________________________________________
+\endpreamble
+\postamble
\endpostamble
\askforoverwritefalse
\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}}
%</batchfile>
%<batchfile>\endbatchfile
%<*internal>
-\generate{\file{\jobname.ins}{\from{\jobname.dtx}{batchfile}}}
\nopreamble\nopostamble
-\generate{\file{README.txt}{\from{\jobname.dtx}{readme}}}
+\generate{\file{\jobname.ins}{\from{\jobname.dtx}{batchfile}}}
\generate{\file{dtx-style.sty}{\from{\jobname.dtx}{dtx-style}}}
\endgroup
\immediate\write18{mv README.txt README}
@@ -119,17 +79,25 @@ This work consists of the file vwcol.dtx
%
% \section{Options}
%
-% As shown above, at heart this package is quite simple. This section discusses the options that can be passed to the |vwcol| environment. The basic options are:
-% \begin{description}[noitemsep,font=\ttfamily,leftmargin=5.5em,style=nextline]
-% \item [widths] The number and size of the columns
-% \item [sep] The width of the space between the columns
-% \item [rule] The width of the rule
-% \item [sidesep] Whether to add space on the outside of the columns
-% \item [siderule] Whether to draw a rule on the outside of the columns
+% As shown above, at heart this package is quite simple. This section discusses the options that can be passed to the |vwcol| environment. The options are:
+% \begin{description}[noitemsep,font=\ttfamily,leftmargin=6em,style=nextline]
+% \item [widths] The number and size of the columns.
+% \item [sep] The width of the space between the columns.
+% \item [sidesep] Whether to add space on the outside of the columns (equiv.\ to the following two options together).
+% \item [presep] Whether to add space before the columns.
+% \item [postsep] Whether to add space after the columns.
+% \item [rule] The width of the rule.
+% \item [siderule] Whether to draw a rule on the outside of the columns (equiv.\ to the following two options together).
+% \item [prerule] Whether to draw a rule before the columns.
+% \item [postrule] Whether to draw a rule after the columns.
+% \item [rulecolor] The colour of the rule.\footnote{Added in v0.2.}
+% \item [justify] Paragraph justification within the columns.
+% \item [indent] Indentation size within the columns (if relevant).
% \end{description}
-% Paragraph options |justify| and |indent| are covered in \secref[vref]{para}, and
-% advanced options are discussed in \secref[vref]{advanced}.
-%
+% Paragraph options |justify| and |indent| are covered in \secref[vref]{para}, and some advanced options are discussed in \secref[vref]{advanced}.
+%
+% \bigskip
+%
% \noindent\DescribeMacro{\vwcolsetup}
% This macro may be used to set the default values for the options (described subsequently) of the |vwcol| environment.
% \begin{example}{firstline=2}
@@ -141,7 +109,7 @@ This work consists of the file vwcol.dtx
% \end{example}
%
% \noindent\DescribeMacro{widths}
-% This option must always be present (either as a default value previously set in \cmd\vwcolsetup\ or specified in the environment directly) and consists of any number of comma separated lengths or ratios. Lengths set the column width to an explicit size, whereas a ratio (as above) sets the column width to a fraction of the available linewidth (leaving some space for some separation between the columns).
+% This option must always be present (either as a default value previously set in \cmd\vwcolsetup\ or specified in the environment directly) and consists of any number of comma-separated lengths or ratios. Lengths set the column width to an explicit size, whereas a ratio (as above) sets the column width to a fraction of the available linewidth (leaving some space for some separation between the columns).
%
% As shown in the example in \secref{intro}, when the width ratios sum to 100\% then the multi-columns will span the entire line width regardless of the chosen separation between the columns. A set of widths may be any combination of ratios and lengths, but the total width should not exceed the linewidth available (a warning will be given if so).
%
@@ -213,7 +181,23 @@ This work consists of the file vwcol.dtx
% \end{vwcol}
% \end{example}
%
-% \newpage
+% \bigskip\noindent\DescribeMacro{rulecolor}
+% The colour of each rule.
+% Either used a pre-defined name or define your own using \pkg{color} or \pkg{xcolor}.
+% The \pkg{color} package is loaded by this package.
+% \begin{example}{firstline=2}
+% \tiny
+% \vwcolsetup{widths={0.35,0.25,0.4},siderule,rule=2pt}
+% \begin{vwcol}[rulecolor=red]
+% \lipsum[6]
+% \end{vwcol}
+% \definecolor{myrulecol}{rgb}{0.1,0.6,0.3}
+% \begin{vwcol}[rulecolor=myrulecol]
+% \lipsum[6]
+% \end{vwcol}
+% \end{example}
+%
+%
% \section{Paragraph settings}\seclabel{para}
%
% \bigskip\noindent\DescribeMacro{justify}
@@ -276,7 +260,6 @@ This work consists of the file vwcol.dtx
%
% The default is |5|, but I'd be surprised if you ever need to adjust this parameter.
%
-% \newpage
% \section{Usage notes}
%
% If you want the |widths| ratios to use a different width to denote 100\% (instead of \cmd\linewidth), put the whole thing in a |minipage| or \cmd\parbox:
@@ -312,6 +295,7 @@ This work consists of the file vwcol.dtx
%
% \StopEventually{}
%
+% \clearpage
% \part{\pkg{\jobname} implementation}
%\iffalse
%<*package>
@@ -323,7 +307,7 @@ This work consists of the file vwcol.dtx
%
% \begin{macrocode}
\ProvidesPackage{vwcol}
- [2008/06/24 v0.1 Variable-width multicolumn text]
+ [2015/02/10 v0.2 Variable-width multicolumn text]
% \end{macrocode}
%
% \section{Preamble}
@@ -332,6 +316,7 @@ This work consists of the file vwcol.dtx
%
% \begin{macrocode}
\RequirePackage{calc}
+\RequirePackage{color}
\RequirePackage{environ}[2008/06/18]
\RequirePackage{keyval}
\RequirePackage{ragged2e}
@@ -694,6 +679,13 @@ This work consists of the file vwcol.dtx
\vwcolsetup{indent=1.5em}
% \end{macrocode}
%
+% \paragraph{rulecolor} The colour of each rule.
+% \begin{macrocode}
+\define@key{vwcol}{rulecolor}{\def\vwcol@rulecol{#1}}
+\vwcolsetup{rulecolor=black}
+% \end{macrocode}
+% No defaults.
+%
% \section{\texttt{vwcol} environment definition}
%
% \begin{environment}{vwcol}
@@ -763,14 +755,16 @@ This work consists of the file vwcol.dtx
\parbox{\vwcol@averagewidth}{\vwcol@justify\BODY}}%
\hbadness=\@tempcnta
% \end{macrocode}
-% Now the estimate of the number of lines, $L$, can be calculated. Start by assuming that the `area' of the material in the single block will be able the same when split into columns of un-equal width ($w_i$). If $T$ is the total number of lines of the single block typeset above (which is calculated by dividing the height of the block by the baselineskip), this gives
+% Now the estimate of the number of lines per column, $L$, can be calculated.
+% Start by assuming that the `area' of the material in the single block will be about the same when split into columns of un-equal width, $w_i$.
+% (By `area' we \emph{actually} mean the number of lines in a block multiplied by the number of lines $N$.)
+% If $T$ is the total number of lines of the single block typeset above (which is calculated by dividing the height of the block by the baselineskip), this gives
% \[ T\times w_a \approx L\times w_1+L\times w_2+\cdots = L\times\sum_{i=1}^N w_i .\]
-% The width of the single block is the average of column widths:
+% The width of the single block is defined above to be the average of the column widths:
% \[ w_a = \mathrm{ave}(w_i) = \sum_{i=1}^N w_i/N\]
-% (Where by `area' we \emph{actually} mean the number of lines in a block multiplied by the number of lines.)
% These two expressions are easily combined to give
% \[ L = \frac{T\times \mathrm{ave}(w_i)}{\sum_{i=1}^N w_i} = \frac{T}{N} . \]
-% In other words, the expression for the number of lines per columns simplifies to simply dividing the single block into equal sections.
+% In words, the number of lines per column is simply to simply the number of lines in the single block divided by the number of columns.
% \begin{macrocode}
\vwcol@Nlines=\numexpr
(\ht\vwcol@plainbox+\dp\vwcol@plainbox)/
@@ -992,7 +986,10 @@ This work consists of the file vwcol.dtx
% \begin{macrocode}
\if@vwcol@presep
\if@vwcol@prerule
- \vrule width \vwcol@rule
+ \begingroup
+ \color{\vwcol@rulecol}
+ \vrule width \vwcol@rule
+ \endgroup
\fi
\hskip\dimexpr (\vwcol@sep-\vwcol@rule)/2 \relax
\fi
@@ -1010,13 +1007,23 @@ This work consists of the file vwcol.dtx
% Sep and rule between the columns if |[sep=fill]|:
% \begin{macrocode}
\ifdim\vwcol@sep=1sp
- \hfill\vrule width \vwcol@rule\hfill
+ \hfill
+ \begingroup
+ \color{\vwcol@rulecol}
+ \vrule width \vwcol@rule
+ \endgroup
+ \hfill
\else
% \end{macrocode}
% Sep and rule between the columns if |sep| is a length:
% \begin{macrocode}
\@tempdima=\dimexpr (\vwcol@sep-\vwcol@rule)/2 \relax
- \hskip\@tempdima\vrule width \vwcol@rule\hskip\@tempdima
+ \hskip\@tempdima
+ \begingroup
+ \color{\vwcol@rulecol}
+ \vrule width \vwcol@rule
+ \endgroup
+ \hskip\@tempdima
\fi
\fi
% \end{macrocode}
@@ -1031,7 +1038,10 @@ This work consists of the file vwcol.dtx
\if@vwcol@postsep
\hskip\dimexpr (\vwcol@sep-\vwcol@rule)/2 \relax
\if@vwcol@postrule
- \vrule width \vwcol@rule
+ \begingroup
+ \color{\vwcol@rulecol}
+ \vrule width \vwcol@rule
+ \endgroup
\fi
\fi
% \end{macrocode}
@@ -1065,6 +1075,8 @@ This work consists of the file vwcol.dtx
% \end{example}
% This is why this package uses \pkg{ragged2e}'s \cmd\RaggedRight\ instead of \LaTeX's \cmd\raggedright.
%
+% In actual fact, when isolated into plain \TeX\ code this reveals a legitimate bug in \TeX's line-breaking algorithm. Unfortunately discovered too late in \TeX's life to be awarded a cheque.
+%
%\iffalse
%</package>
%\fi
@@ -1102,6 +1114,8 @@ This work consists of the file vwcol.dtx
\usepackage[center,it]{titlesec}
\usepackage[quiet]{vwcol}
+\usepackage[T1]{fontenc}
+\usepackage{textcomp}
\usepackage[sc,osf]{mathpazo}
\linespread{1.1} % A bit more space between lines
diff --git a/Master/texmf-dist/source/latex/vwcol/vwcol.ins b/Master/texmf-dist/source/latex/vwcol/vwcol.ins
index 669104c9975..89be5990b17 100644
--- a/Master/texmf-dist/source/latex/vwcol/vwcol.ins
+++ b/Master/texmf-dist/source/latex/vwcol/vwcol.ins
@@ -1,30 +1,10 @@
-%%
-%% This is file `vwcol.ins',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% vwcol.dtx (with options: `batchfile')
-%%
-%% __________________________________
-%% Copyright (C) 2008 Will Robertson
-%%
-%% License information appended.
-%%
-%%
\input docstrip.tex
\keepsilent
\preamble
+___________________________________________________________
- __________________________________
- Copyright (C) 2008 Will Robertson
-
- License information appended.
-
-\endpreamble
-\postamble
-
-Copyright (C) 2008 by Will Robertson <wspr81@gmail.com>
+Copyright (C) 2008, 2015 Will Robertson
+ <will.robertson@latex-project.org>
Distributable under the LaTeX Project Public License,
version 1.3c or higher (your choice). The latest version of
@@ -37,25 +17,10 @@ This work consists of the file vwcol.dtx
and the derived files vwcol.sty,
vwcol.ins, and
vwcol.pdf.
-
+___________________________________________________________
+\endpreamble
+\postamble
\endpostamble
\askforoverwritefalse
\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}}
\endbatchfile
-%%
-%% Copyright (C) 2008 by Will Robertson <wspr81@gmail.com>
-%%
-%% Distributable under the LaTeX Project Public License,
-%% version 1.3c or higher (your choice). The latest version of
-%% this license is at: http://www.latex-project.org/lppl.txt
-%%
-%% This work is "maintained" (as per LPPL maintenance status)
-%% by Will Robertson.
-%%
-%% This work consists of the file vwcol.dtx
-%% and the derived files vwcol.sty,
-%% vwcol.ins, and
-%% vwcol.pdf.
-%%
-%%
-%% End of file `vwcol.ins'.
diff --git a/Master/texmf-dist/tex/latex/vwcol/vwcol.sty b/Master/texmf-dist/tex/latex/vwcol/vwcol.sty
index 3e958054408..c9e2e9f2fde 100644
--- a/Master/texmf-dist/tex/latex/vwcol/vwcol.sty
+++ b/Master/texmf-dist/tex/latex/vwcol/vwcol.sty
@@ -5,15 +5,27 @@
%% The original source files were:
%%
%% vwcol.dtx (with options: `package')
+%% ___________________________________________________________
%%
-%% __________________________________
-%% Copyright (C) 2008 Will Robertson
+%% Copyright (C) 2008, 2015 Will Robertson
+%% <will.robertson@latex-project.org>
%%
-%% License information appended.
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Will Robertson.
%%
+%% This work consists of the file vwcol.dtx
+%% and the derived files vwcol.sty,
+%% vwcol.ins, and
+%% vwcol.pdf.
+%% ___________________________________________________________
\ProvidesPackage{vwcol}
- [2008/06/24 v0.1 Variable-width multicolumn text]
+ [2015/02/10 v0.2 Variable-width multicolumn text]
\RequirePackage{calc}
+\RequirePackage{color}
\RequirePackage{environ}[2008/06/18]
\RequirePackage{keyval}
\RequirePackage{ragged2e}
@@ -220,6 +232,8 @@
\vwcolsetup{justify=ragged}
\define@key{vwcol}{indent}{\setlength\vwcol@parindent{#1}}
\vwcolsetup{indent=1.5em}
+\define@key{vwcol}{rulecolor}{\def\vwcol@rulecol{#1}}
+\vwcolsetup{rulecolor=black}
\NewEnviron{vwcol}[1][]{%
\par\noindent
\@vwcol@boxreadyfalse
@@ -368,7 +382,10 @@
\noindent\strut#1}%
\if@vwcol@presep
\if@vwcol@prerule
- \vrule width \vwcol@rule
+ \begingroup
+ \color{\vwcol@rulecol}
+ \vrule width \vwcol@rule
+ \endgroup
\fi
\hskip\dimexpr (\vwcol@sep-\vwcol@rule)/2 \relax
\fi
@@ -377,10 +394,20 @@
\advance\@tempcnta 1
\unless\ifnum\@tempcnta=1
\ifdim\vwcol@sep=1sp
- \hfill\vrule width \vwcol@rule\hfill
+ \hfill
+ \begingroup
+ \color{\vwcol@rulecol}
+ \vrule width \vwcol@rule
+ \endgroup
+ \hfill
\else
\@tempdima=\dimexpr (\vwcol@sep-\vwcol@rule)/2 \relax
- \hskip\@tempdima\vrule width \vwcol@rule\hskip\@tempdima
+ \hskip\@tempdima
+ \begingroup
+ \color{\vwcol@rulecol}
+ \vrule width \vwcol@rule
+ \endgroup
+ \hskip\@tempdima
\fi
\fi
\vsplit\vwcol@box to \numexpr
@@ -389,26 +416,15 @@
\if@vwcol@postsep
\hskip\dimexpr (\vwcol@sep-\vwcol@rule)/2 \relax
\if@vwcol@postrule
- \vrule width \vwcol@rule
+ \begingroup
+ \color{\vwcol@rulecol}
+ \vrule width \vwcol@rule
+ \endgroup
\fi
\fi
\ifvoid\vwcol@box
\global\@vwcol@boxreadytrue
\fi}
%%
-%% Copyright (C) 2008 by Will Robertson <wspr81@gmail.com>
-%%
-%% Distributable under the LaTeX Project Public License,
-%% version 1.3c or higher (your choice). The latest version of
-%% this license is at: http://www.latex-project.org/lppl.txt
-%%
-%% This work is "maintained" (as per LPPL maintenance status)
-%% by Will Robertson.
-%%
-%% This work consists of the file vwcol.dtx
-%% and the derived files vwcol.sty,
-%% vwcol.ins, and
-%% vwcol.pdf.
-%%
%%
%% End of file `vwcol.sty'.