Debian Codegraph @

texmf-dist/tex/latex/mdwtools/mdwlist.sty

raw
1 %%
2 %% This is file `mdwlist.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% mdwlist.dtx (with options: `package')
8 %%
9 %% IMPORTANT NOTICE
10 %%
11 %% mdwlist package -- various list-related things
12 %% Copyright (c) 1996 Mark Wooding
13 %%
14 %% This program is free software; you can redistribute it and/or modify
15 %% it under the terms of the GNU General Public License as published by
16 %% the Free Software Foundation; either version 2 of the License, or
17 %% (at your option) any later version.
18 %%
19 %% This program is distributed in the hope that it will be useful,
20 %% but WITHOUT ANY WARRANTY; without even the implied warranty of
21 %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 %% GNU General Public License for more details.
23 %%
24 %% You should have received a copy of the GNU General Public License
25 %% along with this program; if not, write to the Free Software
26 %% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 %%
28 \NeedsTeXFormat{LaTeX2e}
29 \ProvidesPackage{mdwlist}
30 [1996/05/02 1.1 Various list-related things]
31 %% \CharacterTable
32 %% {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
33 %% 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
34 %% Digits \0\1\2\3\4\5\6\7\8\9
35 %% Exclamation \! Double quote \" Hash (number) \#
36 %% Dollar \$ Percent \% Ampersand \&
37 %% Acute accent \' Left paren \( Right paren \)
38 %% Asterisk \* Plus \+ Comma \,
39 %% Minus \- Point \. Solidus \/
40 %% Colon \: Semicolon \; Less than \<
41 %% Equals \= Greater than \> Question mark \?
42 %% Commercial at \@ Left bracket \[ Backslash \\
43 %% Right bracket \] Circumflex \^ Underscore \_
44 %% Grave accent \` Left brace \{ Vertical bar \|
45 %% Right brace \} Tilde \~}
46 %%
47 \def\nextlinelabel#1{%
48 \sbox\z@{#1}%
49 \ifdim\wd\z@>\labelwidth%
50 \setbox\z@\vbox{\box\z@\hbox{}}%
51 \wd\z@\z@%
52 \box\z@%
53 \else%
54 \unhbox\z@%
55 \fi%
56 \hfil%
57 }
58 \def\multilinelabel#1{%
59 \setbox\z@\hbox{%
60 \parbox[t]\labelwidth{\raggedright\hskip\z@skip#1}%
61 }%
62 \dp\z@\z@%
63 \box\z@%
64 \hfil%
65 }
66 \def\pushlabel#1{{#1}\hfil}
67 \def\desclabelstyle#1{\def\desc@labelstyle{#1}}
68 \def\desclabelwidth#1{%
69 \setlength\labelwidth{#1}%
70 \leftmargin\labelwidth%
71 \advance\leftmargin\labelsep%
72 }
73 \def\basedescript#1{%
74 \list{}{%
75 \defaultdesc%
76 #1%
77 \itemindent\labelwidth%
78 \advance\itemindent\labelsep%
79 \advance\itemindent-\leftmargin%
80 \let\desc@makelabel\makelabel%
81 \def\makelabel##1{\desc@labelstyle{\desc@makelabel{##1}}}%
82 }%
83 }
84 \let\endbasedescript\endlist
85 \providecommand\defaultdesc{%
86 \desclabelstyle\pushlabel%
87 \def\makelabel##1{\bfseries##1}%
88 \labelwidth\z@%
89 }
90 \def\note{\@ifnextchar[\note@i{\note@i[Note:]}}
91 \def\note@i[#1]{%
92 \basedescript{%
93 \sbox\z@{\makelabel{#1}}%
94 \desclabelwidth{\wd\z@}%
95 }%
96 \item[\box\z@]%
97 }
98 \let\endnote\endbasedescript
99 \def\makecompactlist#1#2{%
100 \expandafter\@ifdefinable\csname#1\endcsname%
101 {\makecompactlist@i{#1}{#2}}%
102 }
103 \def\makecompactlist@i#1#2{%
104 \@ifundefined{#2}{\me@err{Environment `#2' not defined}\@ehc}{}%
105 \@namedef{#1}{\@compact@list{#2}}%
106 \expandafter\let\csname end#1\expandafter\endcsname%
107 \csname end#2\endcsname%
108 }
109 \def\@compact@list#1{\@testopt{\@compact@list@i{#1}}{}}
110 \def\@compact@list@i#1[#2]{%
111 \@nameuse{#1}#2%
112 \parskip\z@%
113 \itemsep\z@%
114 }%
115 \makecompactlist{itemize*}{itemize}
116 \makecompactlist{enumerate*}{enumerate}
117 \makecompactlist{description*}{description}
118 \def\suspend{\@dblarg\suspend@i}
119 \def\suspend@i[#1]#2{%
120 \edef\@tempa{%
121 \noexpand\end{#2}%
122 \def\expandafter\noexpand\csname resume.#1\endcsname{%
123 \csname c@\@listctr\endcsname\the\csname c@\@listctr\endcsname%
124 }%
125 }%
126 \@tempa%
127 }
128 \def\resume{\@dblarg\resume@i}
129 \def\resume@i[#1]#2{\@testopt{\resume@ii{#1}{#2}}{}}
130 \def\resume@ii#1#2[#3]{%
131 \begin{#2}#3%
132 \@ifundefined{resume.#1}{\ml@err@resume}{\@nameuse{resume.#1}}%
133 }
134 \endinput
135 %%
136 %% End of file `mdwlist.sty'.