blob: 11eda36304ce86dc7c10da273be0abe1ab3c2cb5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
%%
%% This is file `warpcol.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% warpcol.dtx (with options: `package')
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{warpcol}
[1998/09/12 v1.0b Numerical column definition]
\RequirePackage{array}
\newcount\WPC@digcnt
\newbox\WPC@patbox
\newbox\WPC@valbox
\def\WPC@digval#1{%
\ifx#100%
\else\ifx#111%
\else\ifx#122%
\else\ifx#133%
\else\ifx#144%
\else\ifx#155%
\else\ifx#166%
\else\ifx#177%
\else\ifx#188%
\else\ifx#199%
\else x\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
\def\WPC@digstr{%
\loop 0\advance\WPC@digcnt by-1 \ifnum\WPC@digcnt>0 \repeat}
\def\WPC@expandpat#1{%
\ifx#1\end
\ifnum\WPC@digcnt>0 \WPC@digstr\fi
\let\WPC@next=\relax
\else
\edef\WPC@dv{\WPC@digval#1}%
\if x\WPC@dv
\ifnum\WPC@digcnt>0 \WPC@digstr\fi
#1%
\else
\multiply\WPC@digcnt by10 \advance\WPC@digcnt by\WPC@dv
\fi
\let\WPC@next=\WPC@expandpat
\fi
\WPC@next}
\def\pcolbegin#1#2{%
\WPC@digcnt=0
\edef\WPC@just{#1}%
\setbox\WPC@patbox=\hbox{$\WPC@expandpat#2\end$}%
\setbox\WPC@valbox=\hbox to\wd\WPC@patbox\bgroup
\if#1r\hfil\else\if#1c\hfil\fi\fi$}
\newcommand{\pcolend}{$%
\if l\WPC@just\hfil\else\if c\WPC@just\hfil\fi\fi
\egroup\box\WPC@valbox}
\newcolumntype{P}[1]{>{\pcolbegin{r}{#1}}c<{\pcolend}}
\endinput
%%
%% End of file `warpcol.sty'.
|