summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tablists
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-01-17 07:34:54 +0000
committerNorbert Preining <preining@logic.at>2008-01-17 07:34:54 +0000
commit3e56d20c2a2cb5cea6130d931676205f6abee822 (patch)
tree7b2dde6d17fa573922e691ead56f0ee7430fc474 /Master/texmf-dist/tex/latex/tablists
parent86d0ec5ee6adca8e4c0f78ee072aabaafee5d6d4 (diff)
new package tablists
git-svn-id: svn://tug.org/texlive/trunk@6280 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tablists')
-rw-r--r--Master/texmf-dist/tex/latex/tablists/tablists.sty180
1 files changed, 180 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/tablists/tablists.sty b/Master/texmf-dist/tex/latex/tablists/tablists.sty
new file mode 100644
index 00000000000..b7c26d026ea
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/tablists/tablists.sty
@@ -0,0 +1,180 @@
+%%
+%% This is file `tablists.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% tablists.dtx (with options: `package')
+%%
+%% IMPORTANT NOTICE:
+%%
+%% For the copyright see the source file.
+%%
+%% Any modified versions of this file must be renamed
+%% with new filenames distinct from tablists.sty.
+%%
+%% For distribution of the original source see the terms
+%% for copying and modification in the file tablists.dtx.
+%%
+%% This generated file may be distributed as long as the
+%% original source files, as listed above, are part of the
+%% same distribution. (The sources need not necessarily be
+%% in the same archive or directory.)
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{tablists}
+ [2008/01/14 v0.0d (beta) Tabulated list of short items]
+\RequirePackage{makecell}
+\@ifpackagelater{makecell}{2007/05/24 V0.1d}{}{\PackageError
+ {tablists}{For a successful cooperation we need at least\MessageBreak
+ version `2007/05/24 V0.1d' of package makecell,\MessageBreak
+ but only version\MessageBreak
+ `\csname ver@makecell.\@pkgextension\endcsname'\MessageBreak
+ is available}\@eha\endinput}
+\newcommand\tabenumsep{\hskip1em}
+\newcommand\negtabenumsep{%
+ \settowidth\@tempdima{\tabenumsep}\hspace*{-\@tempdima}}
+\newcommand\tabenumitem{&\@ifnextchar[%]
+ {\TeXr@@tabenumitem{&}}%
+ {\TeXr@tabenumitem{&}{\@enumctr}}\setcounter{\@subenumctr}\z@}
+\newcommand\subtabenumitem{\ifnum\value{\@subenumctr}=\z@\negtabenumsep
+ \let\negtabenumsep\relax\fi&
+ \@ifnextchar[%]
+ {\TeXr@@tabenumitem{&}}%
+ {\TeXr@tabenumitem{&}{\@subenumctr}}}
+\newcommand\TeXr@tabenumitem[2]{%
+ \stepcounter{#2}\@nameuse{label#2}#1
+ \protected@edef
+ \@currentlabel{\csname p@#2\endcsname\csname the#2\endcsname}}
+\@ifdefinable\TeXr@@tabenumitem{}
+\def\TeXr@@tabenumitem#1[#2]{{#2}#1}
+\newcommand\notabenumitem{\@ifstar
+ {\TeXr@notabenumitem{\@enumctr}}%
+ {\tabenumsep\TeXr@notabenumitem{\@enumctr}}}
+\newcommand\nosubtabenumitem{\@ifstar
+ {\TeXr@notabenumitem{\@subenumctr}}%
+ {\tabenumsep\TeXr@notabenumitem{\@subenumctr}}}
+\newcommand\TeXr@notabenumitem[1]{\@ifnextchar[%]
+ {\TeXr@@tabenumitem{\hskip\labelsep}}%
+ {\TeXr@tabenumitem{\hskip\labelsep}{#1}}}
+\newcommand\skipitem[1][1]{\count@=#1\multiply\count@2\advance\count@\@ne
+ \eline{\count@}}
+\newcommand\subtabrow{\skipitem\negtabenumsep}
+\newcommand\tabenumindent{}
+\newenvironment{rtabenum}{\let\Alph\Asbuk\let\alph\asbuk
+ \tabenum}{\endtabenum}
+\newcommand\tabenum{\@ifnextchar[{\TeXr@tabenum@}{\TeXr@tabenum@[]}}
+\@ifdefinable\TeXr@tabenum@{}
+\def\TeXr@tabenum@[#1]{\@ifnextchar[%]
+ {\TeXr@tabenum@@[#1]}{\TeXr@tabenum@@[#1][]}}
+\@ifdefinable\TeXr@tabenum@@{}
+\long\def\TeXr@tabenum@@[#1][#2]{\par
+ \addpenalty\@beginparpenalty
+ \@topsepadd\topsep\advance\@topsepadd\partopsep
+ \advance\@topsepadd-\jot
+ \ifdim\@topsepadd<\z@\@topsepadd=\z@\fi
+ \if@nobreak\else\addvspace\@topsepadd\fi
+ \openup\jot%
+ \ifnum\@enumdepth>\thr@@
+ \@toodeep
+ \else
+ \advance\@enumdepth\@ne
+ \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
+ \setcounter{\@enumctr}\z@
+ \let\item\tabenumitem\let\noitem\notabenumitem
+ \ifnum\@enumdepth>\thr@@
+ \PackageWarning{tablists}{tablist has one level}{}%
+ \let\subitem\tabenumitem\let\nosubitem\notabenumitem
+ \else
+ \let\subitem\subtabenumitem\let\nosubitem\nosubtabenumitem
+ \advance\@enumdepth\@ne
+ \edef\@subenumctr{enum\romannumeral\the\@enumdepth}%
+ \setcounter{\@subenumctr}\z@
+ \fi
+ \fi
+ \def\tempa{#1}\ifx\tempa\empty\else
+ \TeXr@enumlabel@{#1}{\@enumctr}\fi
+ \def\tempa{#2}\ifx\tempa\empty\else
+ \TeXr@enumlabel@{#2}{\@subenumctr}\fi
+ \@TeXr@tabenum
+ }
+\newcommand\TeXr@enumlabel@[2]{%
+ \@tempcnta0
+ \TeXr@lab{}\def\TeXr@label{\TeXr@label@{#2}}%
+ \expandafter\TeXr@loop\@gobble{}#1\@@@
+ \ifnum\@tempcnta=1\else
+ \PackageWarning{tablists}{Incorrect label; no or multiple
+ counters.\MessageBreak The label is: \@gobble#1}%
+ \fi
+ \expandafter\edef\csname label#2\endcsname{\the\TeXr@lab}%
+ \expandafter\let\csname the#2\endcsname\TeXr@the%
+}
+\newcommand{\@TeXr@tabenum}{\begingroup
+ \let\\\TeXr@arraycr\TeXr@tlist@arrayjot\let\par=\cr
+ \settowidth\@tempdima{\tabenumindent}%
+ \settowidth\@tempdimb{\tabenumsep}%
+ \let\qedhere\tabqedhere
+ \halign\bgroup
+ \strut##\hskip\@tempdima
+ \hskip-\@tempdimb&&\tabenumsep\hfil##\hskip\labelsep&##\hfil\cr}
+\def\endtabenum{\crcr\egroup\endgroup\gdef\tabenumindent{}\par
+ \addpenalty\@endparpenalty
+ \advance\@topsepadd\jot
+ \addvspace\@topsepadd}
+\newcommand\subtabenum[1][]{\TeXr@tlist@arrayjot
+ \setcounter{\@subenumctr}\z@
+ \def\tempa{#1}\ifx\tempa\empty\else
+ \TeXr@enumlabel@{#1}{\@subenumctr}\fi
+ \let\item\subtabenumitem\let\noitem\nosubtabenumitem
+ \let\tabenumitem\subtabenumitem\let\notabenumitem\nosubtabenumitem
+ \let\subitem\subtabenumitem\let\nosubitem\nosubtabenumitem
+ \@TeXr@subtabenum
+ }
+\newcommand{\@TeXr@subtabenum}{\let\negtabenumsep\relax
+ \hbox{\ifnum0=`}\fi
+ \begin{tabular}[t]{@{\tabenumindent}l@{}
+ *{12}{r@{\hskip\labelsep}l@{\tabenumsep}}@{}}%
+ }
+\def\endsubtabenum{\end{tabular}%
+ \ifnum0=`{\fi}\gdef\tabenumindent{}}
+\newenvironment{rsubtabenum}{\let\Alph\Asbuk\let\alph\asbuk%
+ \subtabenum}{\endsubtabenum}
+\@ifdefinable\TeXr@rixarraycr{}
+\let\TeXr@rixarraycr\TeXr@xarraycr
+\newcommand\TeXr@Xarraycr{\@ifnextchar[%]
+ \TeXr@Xargarraycr {\@argarraycr[\jot]}}
+\@ifdefinable\TeXr@Xargarraycr{}
+\def\TeXr@Xargarraycr[#1]{\@tempdima\jot\advance\@tempdima#1%
+ \@argarraycr[\@tempdima]}
+\@ifdefinable\TeXr@arrayjot{}
+\def\TeXr@arrayjot [#1]{\let\@xarraycr\TeXr@Xarraycr\jot#1}
+\def\noarrayjot{\let\@xarraycr\TeXr@rixarraycr}
+\newcommand\TeXr@tlist@arrayjot {\@ifnextchar[%]
+ \TeXr@arrayjot{\TeXr@arrayjot[\jot]}}
+\AtBeginDocument{\let\arrayjot\TeXr@tlist@arrayjot}
+\def\TeXr@arraycr{%
+ \relax\iffalse{\fi\ifnum 0=`}\fi
+ \@ifstar{\vadjust{\penalty\@M}\@xarraycr}\@xarraycr}
+\newcommand\startnumber[1]{\count@#1\advance\count@-1%
+ \global\expandafter\csname c@\@enumctr\endcsname\count@}
+\newcommand\startsubnumber[1]{\count@#1\advance\count@-1%
+ \global\expandafter\csname c@\@subenumctr\endcsname\count@}
+\newcommand\liststrut[1][]{\def\tempa{#1}\ifx\tempa\empty
+ \strut
+ \@tempdima-1.3\baselineskip
+ \vspace*{\@tempdima}\par%
+ \else\settoheight\@tempdima{{$#1$}}\strut
+ \advance\@tempdima\lineskip
+ \noindent\vrule\@height\@tempdima\@width\z@\@depth\z@
+ \strut\advance\@tempdima.3\baselineskip
+ \vspace*{-\@tempdima}\par%
+ \fi
+ \@nobreaktrue}
+\newcommand\tabqedhere{\cr
+ \noalign{\@par\@tempdima\prevdepth
+ \kern-\@tempdima\kern-\baselineskip\kern\lineskip
+ {\strut\popQED}\@par\kern\@tempdima}}
+\let\TeXr@orilistitem\item
+\newcommand\restorelistitem{\let\item\TeXr@orilistitem}
+\endinput
+%%
+%% End of file `tablists.sty'.