From f5ac4cb6c7336696103781c1acf35a2fc90043fe Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 12 Jan 2006 23:54:58 +0000 Subject: eqlist git-svn-id: svn://tug.org/texlive/trunk@870 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/eqlist/eqlist.sty | 66 +++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/eqlist/eqlist.sty (limited to 'Master/texmf-dist/tex/latex/eqlist') diff --git a/Master/texmf-dist/tex/latex/eqlist/eqlist.sty b/Master/texmf-dist/tex/latex/eqlist/eqlist.sty new file mode 100644 index 00000000000..ed964ac83d5 --- /dev/null +++ b/Master/texmf-dist/tex/latex/eqlist/eqlist.sty @@ -0,0 +1,66 @@ + +\typeout{eqlist.sty by M. Vaeth: Revision 2.1} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{eqlist}[2002/08/15 v2.1] + +\RequirePackage{eqparbox} + +\newenvironment{eqlist}[1][\eqlistinit]{\eql@start{#1}}{\eql@end} +\newenvironment{eqlist*}[1][\eqliststarinit]{\eql@start{#1}}{\eql@end} +\newenvironment{Eqlist}[2][\eqlistinit]{\eql@startp{#1}{#2}}{\eql@end} +\newenvironment{Eqlist*}[2][\eqliststarinit]{\eql@startp{#1}{#2}}{\eql@end} + +\ifx\eqlistinitpar\undefined + \def\eqlistinitpar{\relax\listparindent\parindent\relax\parsep\parskip\relax} +\fi +\ifx\eqlistinit\undefined + \def\eqlistinit{\eqlistinitpar} +\fi +\ifx\eqliststarinit\undefined + \def\eqliststarinit{\topsep0pt\relax\itemsep0pt\relax%\partopsep0pt\relax + \eqlistinitpar} +\fi +\ifx\eqlistlabel\undefined + \def\eqlistlabel#1{#1} +\fi + +\newcount\eql@cnt\relax\eql@cnt=0 + +\long\def\eql@start#1{\global\advance\eql@cnt by1\begin{list}{}{\expandafter + \eql@mainprepn\expandafter{\romannumeral\eql@cnt}{#1}}} +\long\def\eql@startp#1#2{\begin{list}{}{\eql@mainprep{#2}{#1}}} +\def\eql@end{\end{list}} + +\long\def\eql@mainprep#1#2{\let\longitem\eql@longitem + \let\eqlistauto\eql@auto + \let\eqlistnoauto\eql@noauto + \def\eql@makelabel##1{\eqparbox[b]{#1}{\eql@long{##1}}\hfil}% + \let\eql@normal\eql@makelabel + \let\eql@current\eql@makelabel + \setlength{\labelwidth}{\eqboxwidth{#1}}% + \setlength{\leftmargin}{\labelwidth}% + \let\makelabel\eqlistlabel + #2\addtolength{\leftmargin}{\labelsep}% + \let\eql@long\makelabel\def\makelabel{\eql@makelabel}} +\def\eql@mainprepn#1{\eql@mainprep{eqlistbox#1}} + +\newcommand{\longitem}{\eql@illlegal\longitem\item} +\def\eql@longitem[#1]{\let\eql@makelabel\eql@long + \item[#1]\let\eql@makelabel\eql@current} + +\newcommand{\eqlistauto}[1]{\eql@illegal\eqlistauto} +\def\eql@auto#1{\def\eql@makelabel##1{\setbox0\hbox{\eql@long{##1}}% + \ifdim#1>\wd0\relax + \expandafter\eql@normal + \else + \expandafter\eql@long + \fi{##1}}% + \let\eql@current\eql@makelabel} +\newcommand{\eqlistnoauto}{\eql@illegal\eqlistnoauto} +\def\eql@noauto{\let\eql@makelabel\eql@normal\let\eql@current\eql@makelabel} +\def\eql@illegal#1{\errmessage{\string#1 + can only be used in eqlist or Eqlist environment}} + +\endinput +%% +%% End of file `eqlist.sty'. -- cgit v1.2.3