summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/multenum/multienum.sty
blob: 4ff57bf1cd19c1ebc9f3ebb3218a68b18807e739 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
%%This is package multienum.sty
%%Dennis Kletzing
%%Stetson University
%%kletzing@totcon.com

\setlength{\hsize}{\textwidth}

\newlength{\usedx}
\newlength{\remainx}
\newlength{\usedxx}
\newlength{\remainxx}
\newlength{\usedxxx}
\newlength{\remainxxx}
\newlength{\usedxxxx}
\newlength{\remainxxxx}
\newlength{\remainxox}
\newlength{\remainxoxx}
\newlength{\remainxxxxx}
\newlength{\usedxxxxx}

\newcommand{\labelname}{\csname
labelenum\romannumeral\themultienumdepth\endcsname}

\newcommand{\itemx}[1]{\parbox[t]%
{\labelwidth}{\hfill{\labelname}}\hskip\labelsep%
\parbox[t]{\remainx}{\raggedright #1}\par}%\smallskip

\newcommand{\itemxx}[2]{\parbox[t]%
{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{.5\remainxx}{\raggedright #1}\hfill\parbox[t]%
{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{0.5\remainxx}{\raggedright #2}\smallskip}

\newcommand{\itemxxx}[3]{\parbox[t]%
{\labelwidth}{\hfill{\labelname}}\hskip\labelsep%
\parbox[t]{.3333\remainxxx}{\raggedright #1}\hfill\parbox[t]%
{\labelwidth}{\hfill {\labelname}}\hskip\labelsep%
\parbox[t]{0.3333\remainxxx}{\raggedright #2}\hfill\parbox[t]%
{\labelwidth}{\hfill{\labelname}}\hskip\labelsep%
\parbox[t]{0.3333\remainxxx}{\raggedright #3}\par}%\smallskip

\newcommand{\itemxxxx}[4]{\parbox[t]%
{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{.25\remainxxxx}{\raggedright #1}\hfill\parbox[t]%
{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{0.25\remainxxxx}{\raggedright #2}\hfill%
\parbox[t]{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{0.25\remainxxxx}{\raggedright #3}\hfill%
\parbox[t]{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{0.25\remainxxxx}{\raggedright #4}\smallskip}


\newcommand{\itemxxxxx}[5]{\parbox[t]%
{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{0.2\remainxxxxx}{\raggedright #1}\hfill%
\parbox[t]{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{0.2\remainxxxxx}{\raggedright #2}\hfill%
\parbox[t]{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{0.2\remainxxxxx}{\raggedright #3}\hfill%
\parbox[t]{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{0.2\remainxxxxx}{\raggedright #4}\hfill%
\parbox[t]{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{0.2\remainxxxxx}{\raggedright #5}\smallskip}


\newcommand{\itemxox}[2]{\parbox[t]%
{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{\remainxox}{\raggedright #1}\hfill%
\parbox[t]{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{0.3333\remainxxx}{\raggedright #2}\smallskip}

\newcommand{\itemxxo}[2]{\parbox[t]%
{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{0.3333\remainxxx}{\raggedright #1}\hfill%
\parbox[t]{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{\remainxox}{\raggedright #2}\smallskip}

\newcommand{\itemxoxx}[3]{\parbox[t]%
{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{\remainxoxx}{\raggedright #1}\hfill%
\parbox[t]{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{0.25\remainxxxx}{\raggedright #2}\hfill%
\parbox[t]{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{0.25\remainxxxx}{\raggedright #3}\smallskip}

\newcommand{\itemxxox}[3]{\parbox[t]%
{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{.25\remainxxxx}{\raggedright #1}\hfill%
\parbox[t]{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{\remainxoxx}{\raggedright #2}\hfill%
\parbox[t]{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{0.25\remainxxxx}{\raggedright #3}\smallskip}

\newcommand{\itemxxxo}[3]{\parbox[t]%
{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{.25\remainxxxx}{\raggedright #1}\hfill%
\parbox[t]{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{.25\remainxxxx}{\raggedright #2}\hfill%
\parbox[t]{\labelwidth}{\hfill{\labelname}}\hskip\labelsep
\parbox[t]{\remainxoxx}{\raggedright #3}\smallskip}


\newcommand{\oddlisti}{\setcounter{multienumi}{-1}\renewcommand{\labelenumi}
{\ifodd\value{multienumi}\addtocounter{multienumi}{2}\themultienumi.\else
\addtocounter{multienumi}{1}\themultienumi.\addtocounter{multienumi}{-2}\fi}}


\newcommand{\evenlisti}{\setcounter{multienumi}{0}
\renewcommand{\labelenumi}
{\ifodd\value{multienumi}\addtocounter{multienumi}{1}\themultienumi.\addtocounte
r{multienumi}{-2}\else
\addtocounter{multienumi}{2}\themultienumi.\fi}}


\newcommand{\regularlisti}{\setcounter{multienumi}{0}%
\renewcommand{\labelenumi}
{\addtocounter{multienumi}{1}\arabic{multienumi}.}}

\newcommand{\regularlistii}{\setcounter{multienumii}{0}%
\renewcommand{\labelenumii}
{\addtocounter{multienumii}{1}(\alph{multienumii})}}%\alph{multienumii}.

\newcommand{\regularlistiii}{\setcounter{multienumiii}{0}%
\renewcommand{\labelenumiii}
{\addtocounter{multienumiii}{1}\alph{multienumiii}.}}

\newcommand{\mitemx}[1]{\item[] \itemx{#1}}
\newcommand{\mitemxx}[2]{\item[] \itemxx{#1}{#2}}
\newcommand{\mitemxxx}[3]{\item[] \itemxxx{#1}{#2}{#3}}
\newcommand{\mitemxox}[2]{\item[] \itemxox{#1}{#2}}
\newcommand{\mitemxxo}[2]{\item[] \itemxxo{#1}{#2}}
\newcommand{\mitemxxxx}[4]{\item[] \itemxxxx{#1}{#2}{#3}{#4}}
\newcommand{\mitemxoxx}[3]{\item[] \itemxoxx{#1}{#2}{#3}}
\newcommand{\mitemxxox}[3]{\item[] \itemxxox{#1}{#2}{#3}}
\newcommand{\mitemxxxo}[3]{\item[] \itemxxxo{#1}{#2}{#3}}
\newcommand{\mitemxxoo}[2]{\item[] \itemxxoo{#1}{#2}}
\newcommand{\mitemxxxxx}[5]{\item[] \itemxxxxx{#1}{#2}{#3}{#4}{#5}}

\newcounter{multienumdepth}
\setcounter{multienumdepth}{0}

\newcounter{multienum}
\newcounter{multienumi}
\newcounter{multienumii}
\newcounter{multienumiii}
\newcounter{multienumiv}

\newcommand{\listtype}[1]{#1}

\newenvironment{multienumerate}[1][regularlist]{%
\ifnum \themultienumdepth >3 \@toodeep\else%
      \addtocounter{multienumdepth}{1}%
  \edef\@multienumctr{multienum\romannumeral\themultienumdepth}%
  {\csname label\@multienumctr\endcsname}{\usecounter%
        {\@multienumctr}}%
\listtype{\csname #1\romannumeral\themultienumdepth\endcsname}\fi%
\begin{list}{}{%
\ifnum\themultienumdepth=2 \setlength{\leftmargin}{25pt}\else %was 23pt
\setlength{\leftmargin}{0pt} \fi% was 0pt
\setlength{\labelwidth}{20pt}\setlength{\labelsep}{5pt}%was18pt
\setlength{\usedx}{\labelwidth}%
\addtolength{\usedx}{\labelsep}%
\addtolength{\usedx}{\leftmargin}%
\setlength{\remainx}{\hsize}%
\addtolength{\remainx}{-\usedx}%
\setlength{\usedxx}{2\labelwidth}%
\addtolength{\usedxx}{2\labelsep}%
\addtolength{\usedxx}{\leftmargin}%
\setlength{\remainxx}{\hsize}%
\addtolength{\remainxx}{-\usedxx}%
\setlength{\usedxxx}{3\labelwidth}%
\addtolength{\usedxxx}{3\labelsep}%
\addtolength{\usedxxx}{\leftmargin}%
\setlength{\remainxxx}{\hsize}%
\addtolength{\remainxxx}{-\usedxxx}%
\setlength{\usedxxxx}{4\labelwidth}%
\addtolength{\usedxxxx}{4\labelsep}%
\addtolength{\usedxxxx}{\leftmargin}%
\setlength{\remainxxxx}{\hsize}%
\addtolength{\remainxxxx}{-\usedxxxx}%
\setlength{\remainxox}{.666\remainxxx}%
\addtolength{\remainxox}{\labelwidth}%
\addtolength{\remainxox}{\labelsep}%
\setlength{\remainxoxx}{.5\remainxxxx}%
\addtolength{\remainxoxx}{\labelwidth}%
\addtolength{\remainxoxx}{\labelsep}%
\setlength{\usedxxxxx}{5\labelwidth}%
\addtolength{\usedxxxxx}{5\labelsep}%
\addtolength{\usedxxxxx}{\leftmargin}%
\setlength{\remainxxxxx}{\hsize}%
\addtolength{\remainxxxxx}{-\usedxxxxx}%
\setlength{\itemindent}{0pt}}}{\addtocounter{multienumdepth}{-1}\end{list}}