blob: d836d1fdeb599f926bdbef564fc6e4c11104c727 (
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
%%
%% This is file `listliketab.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% listliketab.dtx (with options: `package')
%%
%% This is a generated file.
%%
%% Copyright (C) 2005 by Scott Pakin <scott+llt@pakin.org>
%%
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.2 of this license
%% or (at your option) any later version. The latest version of this
%% license is in:
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.2 or later is part of all distributions of LaTeX version
%% 1999/12/01 or later.
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{listliketab}
[2005/01/09 v1.0a Create list-like tabulars]
\RequirePackage{calc}
\RequirePackage{array}
\newlength{\llt@labelwidth}
\newlength{\llt@labelsep}
\newlength{\llt@topsep}
\newlength{\llt@rightmargin}
\newlength{\llt@tab@indent}
\newlength{\llt@bot@sep}
\newlength{\llt@arraystretch}
\def\llt@arraystretch@clean{}
\newsavebox{\llt@list@box}
\DeclareRobustCommand{\storeliststyle}{
\setlength{\llt@tab@indent}{\leftmargin-\labelsep-\labelwidth}
\global\llt@tab@indent=\llt@tab@indent
\setlength{\llt@bot@sep}{\itemsep+\parsep}
\global\llt@bot@sep=\llt@bot@sep
\global\llt@labelwidth=\labelwidth
\global\llt@labelsep=\labelsep
\global\llt@rightmargin=\rightmargin
\global\llt@topsep=\topsep
\setlength{\llt@arraystretch}{%
1.0pt*\ratio{\ht\strutbox+\dp\strutbox+\itemsep+\parsep}
{\ht\strutbox+\dp\strutbox}}
\xdef\llt@arraystretch@clean{\strip@pt\llt@arraystretch}%
}
\DeclareRobustCommand{\storestyleof}[1]{%
\begin{lrbox}{\llt@list@box}
\noindent
\begin{minipage}{\linewidth}
\begin{#1}
\item[] \storeliststyle{}
\end{#1}
\end{minipage}
\end{lrbox}\ignorespacesafterend
}
\newenvironment{listliketab}{%
\newcolumntype{L}{%
@{\hspace*{\llt@tab@indent}}%
>{\hfill}p{\llt@labelwidth}%
@{\hspace*{\llt@labelsep}}}%
\newcolumntype{R}{%
@{\hspace*{\llt@rightmargin}}}%
\renewcommand{\arraystretch}{\llt@arraystretch@clean}%
\vspace{\llt@topsep}%
\noindent\ignorespaces
}{%
\vspace{\llt@bot@sep}%
}
\endinput
%%
%% End of file `listliketab.sty'.
|