diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:58:10 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:58:10 +0000 |
commit | c0efaaed3d4dad289ab4fb2cc2d46d29c7f61b69 (patch) | |
tree | ee7dbac2f3dde1f6eff2049466d24b0a765e49e9 | |
parent | 6a8abbc4994582595d64361f7e1542800ded4a7b (diff) |
listliketab
git-svn-id: svn://tug.org/texlive/trunk@1046 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/tex/latex/listliketab/listliketab.sty | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/listliketab/listliketab.sty b/Master/texmf-dist/tex/latex/listliketab/listliketab.sty new file mode 100644 index 00000000000..d836d1fdeb5 --- /dev/null +++ b/Master/texmf-dist/tex/latex/listliketab/listliketab.sty @@ -0,0 +1,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'. |