| 1 |
%% |
| 2 |
%% This is file `lwarp-parcolumns.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% lwarp.dtx (with options: `parcolumns') |
| 8 |
%% This is a generated file. |
| 9 |
%% Copyright 2016-2026 Brian Dunn |
| 10 |
%% |
| 11 |
%% This work may be distributed and/or modified under the |
| 12 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 13 |
%% of this license or (at your option) any later version. |
| 14 |
%% The latest version of this license is in |
| 15 |
%% http://www.latex-project.org/lppl.txt |
| 16 |
%% and version 1.3 or later is part of all distributions of LaTeX |
| 17 |
%% version 2005/12/01 or later. |
| 18 |
\RequirePackage{keyval}% |
| 19 |
|
| 20 |
\LWR@ProvidesPackageDrop{parcolumns}[2004/11/25] |
| 21 |
\newcounter{LWR@parcolumns@numcols} |
| 22 |
\newcounter{LWR@parcolumns@thiscol} |
| 23 |
\newcounter{LWR@parcolumns@width} |
| 24 |
\newbool{LWR@parcolumns@started} |
| 25 |
\newbool{LWR@parcolumns@rule} |
| 26 |
|
| 27 |
\define@key{LWRparcols}{colwidths}{} |
| 28 |
\define@key{LWRparcols}{distance}{} |
| 29 |
\define@key{LWRparcols}{rulebetween}[true]{% |
| 30 |
\setbool{LWR@parcolumns@rule}{#1}% |
| 31 |
} |
| 32 |
\define@key{LWRparcols}{nofirstindent}{} |
| 33 |
\define@key{LWRparcols}{sloppy}{} |
| 34 |
\define@key{LWRparcols}{sloppyspaces}{} |
| 35 |
|
| 36 |
\newenvironment*{parcolumns}[2][] |
| 37 |
{% |
| 38 |
\begin{LWR@setvirtualpage}*[#2]% |
| 39 |
\setcounter{LWR@parcolumns@numcols}{#2}% |
| 40 |
\setcounter{LWR@parcolumns@thiscol}{1}% |
| 41 |
\boolfalse{LWR@parcolumns@started}% |
| 42 |
\boolfalse{LWR@parcolumns@rule}% |
| 43 |
\setcounter{LWR@parcolumns@width}{% |
| 44 |
85/#2 |
| 45 |
}% |
| 46 |
\setkeys{LWRparcols}{#1}% |
| 47 |
} |
| 48 |
{% |
| 49 |
\colplacechunks% |
| 50 |
\end{LWR@setvirtualpage}% |
| 51 |
} |
| 52 |
|
| 53 |
\newcommand{\LWR@parcolumns@onecol}[1]{% |
| 54 |
\ifbool{LWR@parcolumns@started}% |
| 55 |
{}% |
| 56 |
{% |
| 57 |
\LWR@htmldivclass{parcolumns}% |
| 58 |
\booltrue{LWR@parcolumns@started}% |
| 59 |
}% |
| 60 |
\ifboolexpr{% |
| 61 |
bool {LWR@parcolumns@rule} and |
| 62 |
test {% |
| 63 |
\ifnumgreater |
| 64 |
{\value{LWR@parcolumns@thiscol}} |
| 65 |
{1} |
| 66 |
}% |
| 67 |
}% |
| 68 |
{\renewcommand{\LWR@tempone}{ ; border-left: 2px solid black}}% |
| 69 |
{\renewcommand{\LWR@tempone}{}}% |
| 70 |
\begin{BlockClass}[% |
| 71 |
width:\arabic{LWR@parcolumns@width}\% ; % space |
| 72 |
padding: .5ex 1\% ; % space |
| 73 |
\LWR@tempone% |
| 74 |
]{minipage}% |
| 75 |
#1% |
| 76 |
\end{BlockClass}% |
| 77 |
\addtocounter{LWR@parcolumns@thiscol}{1}% |
| 78 |
} |
| 79 |
|
| 80 |
\newcommand{\colchunk}[2][\value{LWR@parcolumns@thiscol}]{% |
| 81 |
\whileboolexpr{% |
| 82 |
test {% |
| 83 |
\ifnumcomp% |
| 84 |
{\value{LWR@parcolumns@thiscol}} |
| 85 |
{<} |
| 86 |
{#1}% |
| 87 |
}% |
| 88 |
}{% |
| 89 |
\LWR@parcolumns@onecol{}% |
| 90 |
}% |
| 91 |
\LWR@parcolumns@onecol{#2}% |
| 92 |
} |
| 93 |
|
| 94 |
\newcommand*{\colplacechunks}{% |
| 95 |
\ifbool{LWR@parcolumns@started}% |
| 96 |
{% |
| 97 |
\LWR@htmldivclassend{div}% |
| 98 |
\boolfalse{LWR@parcolumns@started}% |
| 99 |
}% |
| 100 |
{}% |
| 101 |
\setcounter{LWR@parcolumns@thiscol}{1}% |
| 102 |
} |
| 103 |
|
| 104 |
\endinput |
| 105 |
%% |
| 106 |
%% End of file `lwarp-parcolumns.sty'. |