From c0efaaed3d4dad289ab4fb2cc2d46d29c7f61b69 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 12 Jan 2006 23:58:10 +0000 Subject: listliketab git-svn-id: svn://tug.org/texlive/trunk@1046 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/listliketab/listliketab.sty | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/listliketab/listliketab.sty (limited to 'Master/texmf-dist/tex/latex/listliketab') 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 +%% +%% 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'. -- cgit v1.2.3