diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-13 00:01:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-13 00:01:43 +0000 |
commit | b94911fb2a53d34b93d7b608112a726f243ecff5 (patch) | |
tree | 49fb8c30fabb2024fcc79461fbb0be87193de716 /Master/texmf-dist | |
parent | b48389b4bf081ced4c8469326c3b9980c6db990a (diff) |
paralist
git-svn-id: svn://tug.org/texlive/trunk@1169 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/tex/latex/paralist/paralist.sty | 472 |
1 files changed, 472 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/paralist/paralist.sty b/Master/texmf-dist/tex/latex/paralist/paralist.sty new file mode 100644 index 00000000000..efaf694688f --- /dev/null +++ b/Master/texmf-dist/tex/latex/paralist/paralist.sty @@ -0,0 +1,472 @@ +%% +%% This is file `paralist.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% paralist.dtx (with options: `package') +%% +%% Copyright 1998-2002 Bernd Schandl +%% email schandl@gmx.net +%% www http://schandl.gmxhome.de/paralist +%% +%% This file can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License distributed from CTAN +%% archives in the directory macros/latex/base/lppl.txt; either +%% version 1 of the license, or (at your option) any later version. +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\ProvidesPackage{paralist}% + [2002/03/18 v2.3b Extended list environments (BS)] +\NeedsTeXFormat{LaTeX2e} +\newif\if@plnewitem\@plnewitemtrue +\newif\if@plnewenum\@plnewenumtrue +\newif\if@plalwaysadjust\@plalwaysadjustfalse +\newif\if@plneveradjust\@plneveradjustfalse +\newif\if@plneverdecrease\@plneverdecreasefalse +\newif\if@pldefblank\@pldefblankfalse +\newif\if@plpointedenum\@plpointedenumfalse +\newif\if@plpointlessenum\@plpointlessenumfalse +\newif\if@plflushright\@plflushrighttrue +\newif\if@plloadcfg\@plloadcfgtrue +\DeclareOption{newitem}{\@plnewitemtrue} +\DeclareOption{olditem}{\@plnewitemfalse} +\DeclareOption{newenum}{\@plnewenumtrue} +\DeclareOption{oldenum}{\@plnewenumfalse} +\DeclareOption{alwaysadjust}{\@plalwaysadjusttrue} +\DeclareOption{neveradjust}{\@plneveradjusttrue} +\DeclareOption{neverdecrease}{\@plneverdecreasetrue} +\DeclareOption{increaseonly}{\@plneverdecreasetrue + \PackageWarningNoLine{Paralist}{Option increaseonly deprecated. + \MessageBreak Use option neverdecrease instead}} +\DeclareOption{defblank}{\@pldefblanktrue} +\DeclareOption{pointedenum}{\@plpointedenumtrue} +\DeclareOption{pointlessenum}{\@plpointlessenumtrue} +\DeclareOption{cfg}{\@plloadcfgtrue} +\DeclareOption{nocfg}{\@plloadcfgfalse} +\DeclareOption{flushright}{\@plflushrighttrue} +\DeclareOption{flushleft}{\@plflushrightfalse} +\ExecuteOptions{newitem,newenum,cfg,flushright} +\ProcessOptions\relax +\if@plalwaysadjust\@plneveradjustfalse\fi +\newlength{\pltopsep} +\newlength{\plpartopsep} +\newlength{\plitemsep} +\newlength{\plparsep} +\setlength{\pltopsep}{0pt} +\setlength{\plpartopsep}{0pt} +\setlength{\plitemsep}{0pt} +\setlength{\plparsep}{0pt} +\def\if@empty#1#2#3{% + \def\@tempa{#1}% + \ifx\@tempa\@empty#2\else#3\fi} +\def\pl@item[#1]{% + \if@noitemarg + \@noitemargfalse + \if@nmbrlist + \refstepcounter{\@listctr}% + \fi + \fi + \settowidth{\@tempdima}{#1}% + \ifdim\@tempdima>\z@\makelabel{{#1}}\nobreakspace\fi + \ignorespaces + } +\def\paradescriptionlabel#1{{\normalfont\bfseries #1}} +\if@plflushright + \def\enumlabel#1{\hss#1} +\else + \def\enumlabel#1{#1\hfil} +\fi +\if@plflushright + \def\itemlabel#1{\hss#1} +\else + \def\itemlabel#1{#1\hfil} +\fi +\newif\if@plmylabel\@plmylabelfalse +\newif\if@pldoadjust\@pldoadjustfalse +\def\@adjust@enum@labelwidth{% + \if@plneveradjust\else + \if@plalwaysadjust\@pldoadjusttrue\else + \if@plmylabel\@pldoadjusttrue\fi + \fi + \fi + \if@pldoadjust + \csname c@\@enumctr\endcsname7 + \settowidth{\@tempdima}{% + \csname label\@enumctr\endcsname\hspace{\labelsep}}% + \advance\@listdepth by 1\relax + \if@plneverdecrease + \ifdim\@tempdima > + \csname leftmargin\romannumeral\@listdepth\endcsname + \csname leftmargin\romannumeral\@listdepth\endcsname + \@tempdima + \fi + \else + \csname leftmargin\romannumeral\@listdepth\endcsname + \@tempdima + \fi + \advance\@listdepth by -1\relax + \fi + \@pldoadjustfalse + \@plmylabelfalse} +\def\@adjust@item@labelwidth{% + \if@plneveradjust\else + \if@plalwaysadjust\@pldoadjusttrue\else + \if@plmylabel\@pldoadjusttrue\fi + \fi + \fi + \if@pldoadjust + \settowidth{\@tempdima}{% + \csname\@itemitem\endcsname\hspace{\labelsep}}% + \advance\@listdepth by 1\relax + \if@plneverdecrease + \ifdim\@tempdima > + \csname leftmargin\romannumeral\@listdepth\endcsname + \csname leftmargin\romannumeral\@listdepth\endcsname + \@tempdima + \fi + \else + \csname leftmargin\romannumeral\@listdepth\endcsname + \@tempdima + \fi + \advance\@listdepth by -1\relax + \fi + \@pldoadjustfalse + \@plmylabelfalse} +\newtoks\pl@lab +\def\pl@qmark{?} +\def\pl@label#1#2{% + \edef\pl@the{\noexpand#1{\@enumctr}}% + \pl@lab\expandafter{\the\pl@lab\csname the\@enumctr\endcsname}% + \advance\@tempcnta1 + \pl@loop} +\def\pl@space{\afterassignment\pl@sp@ce\let\@tempa= } +\def\pl@sp@ce{\pl@lab\expandafter{\the\pl@lab\space}\pl@loop} +\def\pl@group#1{\pl@lab\expandafter{\the\pl@lab{#1}}\pl@loop} +\def\pl@other#1{\pl@lab\expandafter{\the\pl@lab#1}\pl@loop} +\def\pl@loop{\futurelet\pl@temp\pl@loop@} +\def\pl@loop@{% + \ifx A\pl@temp \def\@tempa{\pl@label\Alph }\else + \ifx a\pl@temp \def\@tempa{\pl@label\alph }\else + \ifx i\pl@temp \def\@tempa{\pl@label\roman }\else + \ifx I\pl@temp \def\@tempa{\pl@label\Roman }\else + \ifx 1\pl@temp \def\@tempa{\pl@label\arabic}\else + \ifx \@sptoken\pl@temp \let\@tempa\pl@space \else + \ifx \bgroup\pl@temp \let\@tempa\pl@group \else + \ifx \@@@\pl@temp \let\@tempa\@gobble \else + \let\@tempa\pl@other + \pl@hook + \fi\fi\fi\fi\fi\fi\fi\fi + \@tempa} +\providecommand\pl@hook{} +\def\@enumlabel@#1[#2]{% + \@plmylabeltrue + \@tempcnta0 + \pl@lab{}% + \let\pl@the\pl@qmark + \expandafter\pl@loop\@gobble#2\@@@ + \ifnum\@tempcnta=1\else + \PackageWarning{paralist}{Incorrect label; no or multiple + counters.\MessageBreak The label is: \@gobble#2}% + \fi + \expandafter\edef\csname label\@enumctr\endcsname{\the\pl@lab}% + \expandafter\let\csname the\@enumctr\endcsname\pl@the + #1} +\def\@itemlabel@#1[#2]{% + \@plmylabeltrue + \def\pl@itemitem{#2}% + \def\@itemitem{pl@itemitem}% + #1} +\def\asparaenum{% + \ifnum\@enumdepth>\thr@@ + \@toodeep + \else + \advance\@enumdepth\@ne + \edef\@enumctr{enum\romannumeral\the\@enumdepth}% + \fi + \@ifnextchar[{\@enumlabel@{\@asparaenum@}[}{\@asparaenum@}} +\def\@asparaenum@{% + \expandafter\list\csname label\@enumctr\endcsname{% + \usecounter{\@enumctr}% + \labelwidth\z@ + \labelsep.5em + \leftmargin\z@ + \parsep\parskip + \itemsep\z@ + \topsep\z@ + \partopsep\parskip + \itemindent\parindent + \advance\itemindent\labelsep + \def\makelabel##1{##1}}} +\let\endasparaenum\endlist +\def\inparaenum{% + \ifnum\@enumdepth>\thr@@ + \@toodeep + \else + \advance\@enumdepth\@ne + \edef\@enumctr{enum\romannumeral\the\@enumdepth}% + \fi + \@ifnextchar[{\@enumlabel@{\@inparaenum@}[}{\@inparaenum@}} +\def\@inparaenum@{% + \usecounter{\@enumctr}% + \def\@itemlabel{\csname label\@enumctr\endcsname}% + \let\@item\pl@item + \def\makelabel##1{##1}% + \ignorespaces} +\let\endinparaenum\ignorespacesafterend +\def\compactenum{% + \ifnum\@enumdepth>\thr@@ + \@toodeep + \else + \advance\@enumdepth\@ne + \edef\@enumctr{enum\romannumeral\the\@enumdepth}% + \fi + \@ifnextchar[{\@enumlabel@{\@compactenum@}[}{\@compactenum@}} +\def\@compactenum@{% + \@adjust@enum@labelwidth + \expandafter\list\csname label\@enumctr\endcsname{% + \usecounter{\@enumctr}% + \parsep\plparsep + \itemsep\plitemsep + \topsep\pltopsep + \partopsep\plpartopsep + \labelwidth + \csname leftmargin\romannumeral\@listdepth\endcsname + \advance\labelwidth-\labelsep + \let\makelabel\enumlabel}} +\let\endcompactenum\endlist +\if@plnewenum + \def\enumerate{% + \ifnum \@enumdepth >\thr@@ + \@toodeep + \else + \advance\@enumdepth \@ne + \edef\@enumctr{enum\romannumeral\the\@enumdepth}% + \fi + \@ifnextchar[{\@enumlabel@{\@enumerate@}[}{\@enumerate@}} + \def\@enumerate@{% + \@adjust@enum@labelwidth + \expandafter\list\csname label\@enumctr\endcsname{% + \usecounter{\@enumctr}% + \labelwidth + \csname leftmargin\romannumeral\@listdepth\endcsname + \advance\labelwidth-\labelsep + \let\makelabel\enumlabel}} +\fi +\def\asparaitem{% + \ifnum\@itemdepth>\thr@@ + \@toodeep + \else + \advance\@itemdepth\@ne + \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% + \fi + \@ifnextchar[{\@itemlabel@{\@asparaitem@}}{\@asparaitem@}} +\def\@asparaitem@{% + \expandafter\list\csname\@itemitem\endcsname{% + \labelwidth\z@ + \labelsep.5em + \leftmargin\z@ + \parsep\parskip + \itemsep\z@ + \topsep\z@ + \partopsep\parskip + \itemindent\parindent + \advance\itemindent\labelsep + \def\makelabel##1{##1}}} +\let\endasparaitem\endlist +\def\inparaitem{% + \ifnum\@itemdepth>\thr@@ + \@toodeep + \else + \advance\@itemdepth\@ne + \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% + \fi + \@ifnextchar[{\@itemlabel@{\@inparaitem@}}{\@inparaitem@}} +\def\@inparaitem@{% + \def\@itemlabel{\csname\@itemitem\endcsname}% + \let\@item\pl@item + \def\makelabel##1{##1}% + \ignorespaces} +\let\endinparaitem\ignorespacesafterend +\def\compactitem{% + \ifnum\@itemdepth>\thr@@ + \@toodeep + \else + \advance\@itemdepth\@ne + \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% + \fi + \@ifnextchar[{\@itemlabel@{\@compactitem@}}{\@compactitem@}} +\def\@compactitem@{% + \@adjust@item@labelwidth + \expandafter\list\csname\@itemitem\endcsname{% + \parsep\plparsep + \itemsep\plitemsep + \topsep\pltopsep + \partopsep\plpartopsep + \labelwidth + \csname leftmargin\romannumeral\@listdepth\endcsname + \advance\labelwidth-\labelsep + \let\makelabel\itemlabel}} +\let\endcompactitem\endlist +\if@plnewitem + \def\itemize{% + \ifnum \@itemdepth >\thr@@ + \@toodeep + \else + \advance\@itemdepth\@ne + \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% + \fi + \@ifnextchar[{\@itemlabel@{\@itemize@}}{\@itemize@}} + \def\@itemize@{% + \@adjust@item@labelwidth + \expandafter\list\csname\@itemitem\endcsname{% + \labelwidth + \csname leftmargin\romannumeral\@listdepth\endcsname + \advance\labelwidth-\labelsep + \let\makelabel\itemlabel}} +\fi +\def\asparadesc{% + \list{}{% + \labelwidth\z@ + \labelsep.5em + \leftmargin\z@ + \parsep\parskip + \itemsep\z@ + \topsep\z@ + \partopsep\parskip + \itemindent\parindent + \advance\itemindent\labelsep + \let\makelabel\paradescriptionlabel}} +\let\endasparadesc\endlist +\def\inparadesc{% + \let\@itemlabel\@empty + \let\@item\pl@item + \let\makelabel\paradescriptionlabel + \ignorespaces} +\let\endinparadesc\ignorespacesafterend +\def\compactdesc{% + \list{}{% + \parsep\plparsep + \itemsep\plitemsep + \topsep\pltopsep + \partopsep\plpartopsep + \labelwidth\z@ + \itemindent-\leftmargin + \let\makelabel\descriptionlabel}} +\let\endcompactdesc\endlist +\if@pldefblank + \def\asparablank{% + \list{}{% + \labelwidth\z@ + \labelsep\z@ + \leftmargin\z@ + \parsep\parskip + \itemsep\z@ + \topsep\z@ + \partopsep\parskip + \itemindent\parindent + \advance\itemindent\labelsep + \def\makelabel##1{##1}}} + \let\endasparablank\endlist + \def\inparablank{% + \let\@itemlabel\@empty + \let\@item\pl@item + \ignorespaces} + \let\endinparablank\ignorespacesafterend +\fi +\def\setdefaultitem#1#2#3#4{% + \if@empty{#1}{}{\def\labelitemi{#1}}% + \if@empty{#2}{}{\def\labelitemii{#2}}% + \if@empty{#3}{}{\def\labelitemiii{#3}}% + \if@empty{#4}{}{\def\labelitemiv{#4}}} +\def\defaultitem{% + \PackageWarning{Paralist}{Macro \protect\defaultitem\space + deprecated. \MessageBreak Use macro \protect\setdefaultitem + \space instead!! \MessageBreak Used} + \setdefaultitem} +\newif\if@pltemp +\def\setdefaultenum#1#2#3#4{% + \if@plneveradjust\@pltemptrue\else\@pltempfalse\fi + \@plneveradjusttrue + \if@empty{#1}{}{% + \def\@enumctr{enumi}% + \@enumlabel@{\relax}[[#1]}% + \if@empty{#2}{}{% + \def\@enumctr{enumii}% + \@enumlabel@{\relax}[[#2]}% + \if@empty{#3}{}{% + \def\@enumctr{enumiii}% + \@enumlabel@{\relax}[[#3]}% + \if@empty{#4}{}{% + \def\@enumctr{enumiv}% + \@enumlabel@{\relax}[[#4]}% + \if@pltemp\@plneveradjusttrue\else\@plneveradjustfalse\fi + \@plmylabelfalse + \relax} +\def\defaultenum{% + \PackageWarning{Paralist}{Macro \protect\defaultenum\space + deprecated. \MessageBreak Use macro \protect\setdefaultenum + \space instead!! \MessageBreak Used} + \setdefaultitem} +\def\setdefaultleftmargin#1#2#3#4#5#6{% + \if@empty{#1}{}{\leftmargini#1}% + \if@empty{#2}{}{\leftmarginii#2}% + \if@empty{#3}{}{\leftmarginiii#3}% + \if@empty{#4}{}{\leftmarginiv#4}% + \if@empty{#5}{}{\leftmarginv#5}% + \if@empty{#6}{}{\leftmarginvi#6}% + \relax} +\def\defaultleftmargin#1#2#3#4{% + \setdefaultleftmargin{#1}{#2}{#3}{#4}{}{}% + \PackageWarning{Paralist}{Macro \protect\defaultleftmargin + \space deprecated. \MessageBreak Use macro + \protect\setdefaultleftmargin\space instead!! + \MessageBreak But note that it has six arguments! + \MessageBreak Used}} +\def\pl@pointxxxenum{% + \def\theenumi{\arabic{enumi}}% + \def\theenumii{\theenumi.\arabic{enumii}}% + \def\theenumiii{\theenumii.\arabic{enumiii}}% + \def\theenumiv{\theenumiii.\arabic{enumiv}}% + \def\p@enumi{}% + \def\p@enumii{}% + \def\p@enumiii{}% + \def\p@enumiv{}} +\def\pl@pointedenum{% + \def\labelenumi{\theenumi.}% + \def\labelenumii{\theenumii.}% + \def\labelenumiii{\theenumiii.}% + \def\labelenumiv{\theenumiv.}} +\def\pl@pointlessenum{% + \def\labelenumi{\theenumi}% + \def\labelenumii{\theenumii}% + \def\labelenumiii{\theenumiii}% + \def\labelenumiv{\theenumiv}} +\def\pointedenum{\pl@pointxxxenum\pl@pointedenum} +\def\pointlessenum{\pl@pointxxxenum\pl@pointlessenum} +\if@plpointedenum\pointedenum\fi +\if@plpointlessenum\pointlessenum\fi +\if@plloadcfg + \InputIfFileExists{paralist.cfg}{% + \PackageInfo{Paralist}{% + Using the configuration file paralist.cfg}}{} +\fi + +\endinput +%% +%% End of file `paralist.sty'. |