doc: add another paper refering to the library
[barvinok.git] / doc / glosstex.sty
blobf33c4277d7377d2742b26304905846d2b2d954a2
1 %%
2 %% This is file `glosstex.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% glosstex.dtx (with options: `package')
8 %%
9 %% GlossTeX, a tool for the automatic preparation of glossaries.
10 %% Copyright (C) 1997 Volkan Yavuz
11 %%
12 %% This program is free software; you can redistribute it and/or
13 %% modify it under the terms of the GNU General Public License
14 %% as published by the Free Software Foundation; either version 2
15 %% of the License, or (at your option) any later version.
16 %%
17 %% This program is distributed in the hope that it will be useful,
18 %% but WITHOUT ANY WARRANTY; without even the implied warranty of
19 %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 %% GNU General Public License for more details.
21 %%
22 %% You should have received a copy of the GNU General Public License
23 %% along with this program; if not, write to the Free Software
24 %% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 %%
26 %% Volkan Yavuz, yavuzv@rumms.uni-mannheim.de
27 %%
28 %% Please note, that if you modify these files, do NOT distribute them
29 %% unless you have renamed the files and clearly stated, WHO has
30 %% modified the file and WHAT was modified.
31 %%
32 %% You are explicitly allowed to modify the file "`glosstex.std"' to
33 %% incorporate site-specific modifications. But do NOT distribute that
34 %% file unless you have renamed it and clearly stated, WHO has
35 %% modified the file and WHAT was modified.
36 %%
37 %% \CharacterTable
38 %% {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
39 %% 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
40 %% Digits \0\1\2\3\4\5\6\7\8\9
41 %% Exclamation \! Double quote \" Hash (number) \#
42 %% Dollar \$ Percent \% Ampersand \&
43 %% Acute accent \' Left paren \( Right paren \)
44 %% Asterisk \* Plus \+ Comma \,
45 %% Minus \- Point \. Solidus \/
46 %% Colon \: Semicolon \; Less than \<
47 %% Equals \= Greater than \> Question mark \?
48 %% Commercial at \@ Left bracket \[ Backslash \\
49 %% Right bracket \] Circumflex \^ Underscore \_
50 %% Grave accent \` Left brace \{ Vertical bar \|
51 %% Right brace \} Tilde \~}
53 \def\filename{glosstex}
54 \def\fileversion{0.4}
55 \def\filedate{1997/12/13}
56 \let\docdate=\filedate
57 \NeedsTeXFormat{LaTeX2e}[1996/12/01] \ProvidesPackage{glosstex}
58 [\filedate\space\fileversion\space GlossTeX package]
59 \RequirePackage{ifthen}
60 \newif\if@GLX@pagerefmode
61 \newif\if@GLX@itemfirst
62 \newif\if@GLX@footnote
63 \newif\if@GLX@roundparen
64 \newif\if@GLX@squareparen
65 \newcommand{\GlossTeX}{Gloss\TeX}
66 \AtBeginDocument{%
67 \glxheading{GLX@Null@List}{}%
68 \printglosstex(GLX@Null@List)}
69 \AtEndDocument{%
70 \ifx\GLX@undefined@term\@undefined\else %
71 \PackageWarningNoLine{glosstex}%
72 {There were undefined terms.\MessageBreak
73 You should (re)run GlossTeX}\fi}
74 \newcommand{\GlossTeXPage}[2]{\ignorespaces%
75 \ifthenelse{\boolean{@GLX@pagerefmode}}%
76 {% refpage true
77 \ifthenelse{%
78 \equal{\GLX@theglosstex@pagerefmode}{a}}{\glosstexpage{#2}}{%
79 \ifthenelse{\equal{\GLX@theglosstex@pagerefmode}{n}}{}{%
80 \ifthenelse{\equal{#1}{a}}{\glosstexpage{#2}}{}%
81 \ifthenelse{\equal{#1}{p}}{\glosstexpage{#2}}{}%
82 \ifthenelse{\equal{#1}{n}}{}{}}}}%
83 {% refpage false
84 \ifthenelse{%
85 \equal{\GLX@theglosstex@pagerefmode}{a}}{\glosstexpage{#2}}{%
86 \ifthenelse{\equal{\GLX@theglosstex@pagerefmode}{n}}{}{%
87 \ifthenelse{\equal{#1}{a}}{\glosstexpage{#2}}{}%
88 \ifthenelse{\equal{#1}{p}}{}{}%
89 \ifthenelse{\equal{#1}{n}}{}{}}}}%
91 \DeclareOption{refpage}{\@GLX@pagerefmodetrue}
92 \DeclareOption{norefpage}{\@GLX@pagerefmodefalse}
93 \DeclareOption{itemfirst}{\@GLX@itemfirsttrue}
94 \DeclareOption{longfirst}{\@GLX@itemfirstfalse}
95 \DeclareOption{text}{\@GLX@footnotefalse}
96 \DeclareOption{footnote}{\@GLX@footnotetrue}
97 \DeclareOption{roundparen}{\gdef\GLX@paren@l{(}\gdef\GLX@paren@r{)}}
98 \DeclareOption{squareparen}{\gdef\GLX@paren@l{[}\gdef\GLX@paren@r{]}}
99 \ExecuteOptions{norefpage,itemfirst,text,roundparen}
100 \ProcessOptions
101 \newcommand{\GlossTeXNull}[1]{}
102 \DeclareRobustCommand\glosstex{\GLX@glosstex}
103 \newcommand{\GLX@glosstex}{%
104 \@ifnextchar({\GLX@@glosstexr}{%
105 \@ifnextchar[{\GLX@@glosstexs(\GLX@gldef@list)}{%
106 \GLX@@@glosstex(\GLX@gldef@list)[\GLX@gldef@page]}}}
107 \newcommand{\GLX@@glosstexr}{}
108 \def\GLX@@glosstexr(#1){%
109 \@ifnextchar[{\GLX@@glosstexs(#1)}{\GLX@@@glosstex(#1)[\GLX@gldef@page]}}
110 \newcommand{\GLX@@glosstexs}{}
111 \def\GLX@@glosstexs(#1)[#2]{%
112 \GLX@@@glosstex(#1)[#2]}
113 \newcommand{\GLX@@@glosstex}{}
114 \def\GLX@@@glosstex(#1)[#2]#3{\GLX@do@glosstex{#3}{#2}{#1}{a}}
115 \DeclareRobustCommand\acronym{\GLX@acronym}
116 \newcommand{\GLX@acronym}{%
117 \@ifnextchar({\GLX@@acronymr}{%
118 \@ifnextchar[{\GLX@@acronyms(\GLX@acdef@list)}{%
119 \GLX@@@acronym(\GLX@acdef@list)[\GLX@acdef@page]}}}
120 \newcommand{\GLX@@acronymr}{}
121 \def\GLX@@acronymr(#1){%
122 \@ifnextchar[{\GLX@@acronyms(#1)}{\GLX@@@acronym(#1)[\GLX@acdef@page]}}
123 \newcommand{\GLX@@acronyms}{}
124 \def\GLX@@acronyms(#1)[#2]{%
125 \GLX@@@acronym(#1)[#2]}
126 \newcommand{\GLX@@@acronym}{}
127 \def\GLX@@@acronym(#1)[#2]#3{\GLX@do@glosstex{#3}{#2}{#1}{a}}
128 \DeclareRobustCommand\gls{%
129 \@ifstar{\GLX@glsS}{\GLX@gls}}
130 \newcommand{\GLX@gls}{%
131 \@ifnextchar({\GLX@@glsr}{%
132 \@ifnextchar[{\GLX@@glss(\GLX@gldef@list)}{%
133 \GLX@@@gls(\GLX@gldef@list)[\GLX@gldef@page]}}}
134 \newcommand{\GLX@@glsr}{}
135 \def\GLX@@glsr(#1){%
136 \@ifnextchar[{\GLX@@glss(#1)}{\GLX@@@gls(#1)[\GLX@gldef@page]}}
137 \newcommand{\GLX@@glss}{}
138 \def\GLX@@glss(#1)[#2]{%
139 \GLX@@@gls(#1)[#2]}
140 \newcommand{\GLX@@@gls}{}
141 \def\GLX@@@gls(#1)[#2]#3{\GLX@do@glosstex{#3}{#2}{#1}{a}\GLX@do@acs{#3}{#1}}
142 \newcommand{\GLX@glsS}{%
143 \@ifnextchar({\GLX@@glsSr}{%
144 \@ifnextchar[{\GLX@@glsSs(\GLX@gldef@list)}{%
145 \GLX@@@glsS(\GLX@gldef@list)[\GLX@gldef@page]}}}
146 \newcommand{\GLX@@glsSr}{}
147 \def\GLX@@glsSr(#1){%
148 \@ifnextchar[{\GLX@@glsSs(#1)}{\GLX@@@glsS(#1)[\GLX@gldef@page]}}
149 \newcommand{\GLX@@glsSs}{}
150 \def\GLX@@glsSs(#1)[#2]{%
151 \GLX@@@glsS(#1)[#2]}
152 \newcommand{\GLX@@@glsS}{}
153 \def\GLX@@@glsS(#1)[#2]#3{\GLX@do@glosstex{#3}{#2}{#1}{n}\GLX@do@acs{#3}{#1}}
154 \DeclareRobustCommand\ac{%
155 \@ifstar{\GLX@acS}{\GLX@ac}}
156 \newcommand{\GLX@ac}{%
157 \@ifnextchar,{\GLX@@acc}{%
158 \@ifnextchar<{\GLX@@aca,\relax,\relax,}{%
159 \@ifnextchar({\GLX@@acr,\relax,\relax,<>}{%
160 \@ifnextchar[{\GLX@@acs,\relax,\relax,<>(\GLX@acdef@list)}{%
161 \GLX@@@ac,\relax,\relax,<>(\GLX@acdef@list)[\GLX@acdef@page]}}}}}
162 \newcommand{\GLX@@acc}{}
163 \def\GLX@@acc,#1,#2,{%
164 \@ifnextchar<{\GLX@@aca,#1,#2,}{%
165 \@ifnextchar({\GLX@@acr,#1,#2,<>}{%
166 \@ifnextchar[{\GLX@@acs,#1,#2,<>(\GLX@acdef@list)}{%
167 \GLX@@@ac,#1,#2,<>(\GLX@acdef@list)[\GLX@acdef@page]}}}}
168 \newcommand{\GLX@@aca}{}
169 \def\GLX@@aca,#1,#2,<#3>{%
170 \@ifnextchar({\GLX@@acr,#1,#2,<#3>}{%
171 \@ifnextchar[{\GLX@@acs,#1,#2,<#3>(\GLX@acdef@list)}{%
172 \GLX@@@ac,#1,#2,<#3>(\GLX@acdef@list)[\GLX@acdef@page]}}}
173 \newcommand{\GLX@@acr}{}
174 \def\GLX@@acr,#1,#2,<#3>(#4){%
175 \@ifnextchar[{\GLX@@acs,#1,#2,<#3>(#4)}{%
176 \GLX@@@ac,#1,#2,<#3>(#4)[\GLX@acdef@page]}}
177 \newcommand{\GLX@@acs}{}
178 \def\GLX@@acs,#1,#2,<#3>(#4)[#5]{%
179 \GLX@@@ac,#1,#2,<#3>(#4)[#5]}
180 \newcommand{\GLX@@@ac}{}
181 \def\GLX@@@ac,#1,#2,<#3>(#4)[#5]#6{%
182 \GLX@do@glosstex{#6}{#5}{#4}{a}\GLX@do@ac{#6}{#4}{#3}{#1}{#2}}
183 \newcommand{\GLX@acS}{%
184 \@ifnextchar,{\GLX@@acSc}{%
185 \@ifnextchar<{\GLX@@acSa,\relax,\relax,}{%
186 \@ifnextchar({\GLX@@acSr,\relax,\relax,<>}{%
187 \@ifnextchar[{\GLX@@acSs,\relax,\relax,<>(\GLX@acdef@list)}{%
188 \GLX@@@acS,\relax,\relax,<>(\GLX@acdef@list)[\GLX@acdef@page]}}}}}
189 \newcommand{\GLX@@acSc}{}
190 \def\GLX@@acSc,#1,#2,{%
191 \@ifnextchar<{\GLX@@acSa,#1,#2,}{%
192 \@ifnextchar({\GLX@@acSr,#1,#2,<>}{%
193 \@ifnextchar[{\GLX@@acSs,#1,#2,<>(\GLX@acdef@list)}{%
194 \GLX@@@acS,#1,#2,<>(\GLX@acdef@list)[\GLX@acdef@page]}}}}
195 \newcommand{\GLX@@acSa}{}
196 \def\GLX@@acSa,#1,#2,<#3>{%
197 \@ifnextchar({\GLX@@acSr,#1,#2,<#3>}{%
198 \@ifnextchar[{\GLX@@acSs,#1,#2,<#3>(\GLX@acdef@list)}{%
199 \GLX@@@acS,#1,#2,<#3>(\GLX@acdef@list)[\GLX@acdef@page]}}}
200 \newcommand{\GLX@@acSr}{}
201 \def\GLX@@acSr,#1,#2,<#3>(#4){%
202 \@ifnextchar[{\GLX@@acSs,#1,#2,<#3>(#4)}{%
203 \GLX@@@acS,#1,#2,<#3>(#4)[\GLX@acdef@page]}}
204 \newcommand{\GLX@@acSs}{}
205 \def\GLX@@acSs,#1,#2,<#3>(#4)[#5]{%
206 \GLX@@@acS,#1,#2,<#3>(#4)[#5]}
207 \newcommand{\GLX@@@acS}{}
208 \def\GLX@@@acS,#1,#2,<#3>(#4)[#5]#6{%
209 \GLX@do@glosstex{#6}{#5}{#4}{n}\GLX@do@ac{#6}{#4}{#3}{#1}{#2}}
210 \DeclareRobustCommand\acs{%
211 \@ifstar{\GLX@acsS}{\GLX@acs}}
212 \newcommand{\GLX@acs}{%
213 \@ifnextchar({\GLX@@acsr}{%
214 \@ifnextchar[{\GLX@@acss(\GLX@acdef@list)}{%
215 \GLX@@@acs(\GLX@acdef@list)[\GLX@acdef@page]}}}
216 \newcommand{\GLX@@acsr}{}
217 \def\GLX@@acsr(#1){%
218 \@ifnextchar[{\GLX@@acss(#1)}{\GLX@@@acs(#1)[\GLX@acdef@page]}}
219 \newcommand{\GLX@@acss}{}
220 \def\GLX@@acss(#1)[#2]{%
221 \GLX@@@acs(#1)[#2]}
222 \newcommand{\GLX@@@acs}{}
223 \def\GLX@@@acs(#1)[#2]#3{\GLX@do@glosstex{#3}{#2}{#1}{a}\GLX@do@acs{#3}{#1}}
224 \newcommand{\GLX@acsS}{%
225 \@ifnextchar({\GLX@@acsSr}{%
226 \@ifnextchar[{\GLX@@acsSs(\GLX@acdef@list)}{%
227 \GLX@@@acsS(\GLX@acdef@list)[\GLX@acdef@page]}}}
228 \newcommand{\GLX@@acsSr}{}
229 \def\GLX@@acsSr(#1){%
230 \@ifnextchar[{\GLX@@acsSs(#1)}{\GLX@@@acsS(#1)[\GLX@acdef@page]}}
231 \newcommand{\GLX@@acsSs}{}
232 \def\GLX@@acsSs(#1)[#2]{%
233 \GLX@@acsS(#1)[#2]}
234 \newcommand{\GLX@@@acsS}{}
235 \def\GLX@@@acsS(#1)[#2]#3{\GLX@do@glosstex{#3}{#2}{#1}{n}\GLX@do@acs{#3}{#1}}
236 \DeclareRobustCommand\acl{%
237 \@ifstar{\GLX@aclS}{\GLX@acl}}
238 \newcommand{\GLX@acl}{%
239 \@ifnextchar({\GLX@@aclr}{%
240 \@ifnextchar[{\GLX@@acls(\GLX@acdef@list)}{%
241 \GLX@@@acl(\GLX@acdef@list)[\GLX@acdef@page]}}}
242 \newcommand{\GLX@@aclr}{}
243 \def\GLX@@aclr(#1){%
244 \@ifnextchar[{\GLX@@acls(#1)}{\GLX@@@acl(#1)[\GLX@acdef@page]}}
245 \newcommand{\GLX@@acls}{}
246 \def\GLX@@acls(#1)[#2]{%
247 \GLX@@@acl(#1)[#2]}
248 \newcommand{\GLX@@@acl}{}
249 \def\GLX@@@acl(#1)[#2]#3{\GLX@do@glosstex{#3}{#2}{#1}{a}\GLX@do@acl{#3}{#1}}
250 \newcommand{\GLX@aclS}{%
251 \@ifnextchar({\GLX@@aclSr}{%
252 \@ifnextchar[{\GLX@@aclSs(\GLX@acdef@list)}{%
253 \GLX@@@aclS(\GLX@acdef@list)[\GLX@acdef@page]}}}
254 \newcommand{\GLX@@aclSr}{}
255 \def\GLX@@aclSr(#1){%
256 \@ifnextchar[{\GLX@@aclSs(#1)}{\GLX@@@aclS(#1)[\GLX@acdef@page]}}
257 \newcommand{\GLX@@aclSs}{}
258 \def\GLX@@aclSs(#1)[#2]{%
259 \GLX@@@aclS(#1)[#2]}
260 \newcommand{\GLX@@@aclS}{}
261 \def\GLX@@@aclS(#1)[#2]#3{\GLX@do@glosstex{#3}{#2}{#1}{n}\GLX@do@acl{#3}{#1}}
262 \DeclareRobustCommand\acf{%
263 \@ifstar{\GLX@acfS}{\GLX@acf}}
264 \newcommand{\GLX@acf}{%
265 \@ifnextchar,{\GLX@@acfc}{%
266 \@ifnextchar<{\GLX@@acfa,\relax,\relax,}{%
267 \@ifnextchar({\GLX@@acfr,\relax,\relax,<>}{%
268 \@ifnextchar[{\GLX@@acfs,\relax,\relax,<>(\GLX@acdef@list)}{%
269 \GLX@@@acf,\relax,\relax,<>(\GLX@acdef@list)[\GLX@acdef@page]}}}}}
270 \newcommand{\GLX@@acfc}{}
271 \def\GLX@@acfc,#1,#2,{%
272 \@ifnextchar<{\GLX@@acfa,#1,#2,}{%
273 \@ifnextchar({\GLX@@acfr,#1,#2,<>}{%
274 \@ifnextchar[{\GLX@@acfs,#1,#2,<>(\GLX@acdef@list)}{%
275 \GLX@@@acf,#1,#2,<>(\GLX@acdef@list)[\GLX@acdef@page]}}}}
276 \newcommand{\GLX@@acfa}{}
277 \def\GLX@@acfa,#1,#2,<#3>{%
278 \@ifnextchar({\GLX@@acfr,#1,#2,<#3>}{%
279 \@ifnextchar[{\GLX@@acfs,#1,#2,<#3>(\GLX@acdef@list)}{%
280 \GLX@@@acf,#1,#2,<#3>(\GLX@acdef@list)[\GLX@acdef@page]}}}
281 \newcommand{\GLX@@acfr}{}
282 \def\GLX@@acfr,#1,#2,<#3>(#4){%
283 \@ifnextchar[{\GLX@@acfs,#1,#2,<#3>(#4)}{%
284 \GLX@@@acf,#1,#2,<#3>(#4)[\GLX@acdef@page]}}
285 \newcommand{\GLX@@acfs}{}
286 \def\GLX@@acfs,#1,#2,<#3>(#4)[#5]{%
287 \GLX@@@acf,#1,#2,<#3>(#4)[#5]}
288 \newcommand{\GLX@@@acf}{}
289 \def\GLX@@@acf,#1,#2,<#3>(#4)[#5]#6{%
290 \GLX@do@glosstex{#6}{#5}{#4}{a}\GLX@do@acf{#6}{#4}{#3}{#1}{#2}}
291 \newcommand{\GLX@acfS}{%
292 \@ifnextchar,{\GLX@@acfSc}{%
293 \@ifnextchar<{\GLX@@acfSa,\relax,\relax,}{%
294 \@ifnextchar({\GLX@@acfSr,\relax,\relax,<>}{%
295 \@ifnextchar[{\GLX@@acfSs,\relax,\relax,<>(\GLX@acdef@list)}{%
296 \GLX@@@acfS,\relax,\relax,<>(\GLX@acdef@list)[\GLX@acdef@page]}}}}}
297 \newcommand{\GLX@@acfSc}{}
298 \def\GLX@@acfSc,#1,#2,{%
299 \@ifnextchar<{\GLX@@acfSa,#1,#2,}{%
300 \@ifnextchar({\GLX@@acfSr,#1,#2,<>}{%
301 \@ifnextchar[{\GLX@@acfSs,#1,#2,<>(\GLX@acdef@list)}{%
302 \GLX@@@acfS,#1,#2,<>(\GLX@acdef@list)[\GLX@acdef@page]}}}}
303 \newcommand{\GLX@@acfSa}{}
304 \def\GLX@@acfSa,#1,#2,<#3>{%
305 \@ifnextchar({\GLX@@acfSr,#1,#2,<#3>}{%
306 \@ifnextchar[{\GLX@@acfSs,#1,#2,<#3>(\GLX@acdef@list)}{%
307 \GLX@@@acfS,#1,#2,<#3>(\GLX@acdef@list)[\GLX@acdef@page]}}}
308 \newcommand{\GLX@@acfSr}{}
309 \def\GLX@@acfSr,#1,#2,<#3>(#4){%
310 \@ifnextchar[{\GLX@@acfSs,#1,#2,<#3>(#4)}{%
311 \GLX@@@acfS,#1,#2,<#3>(#4)[\GLX@acdef@page]}}
312 \newcommand{\GLX@@acfSs}{}
313 \def\GLX@@acfSs,#1,#2,<#3>(#4)[#5]{%
314 \GLX@@@acfS,#1,#2,<#3>(#4)[#5]}
315 \newcommand{\GLX@@@acfS}{}
316 \def\GLX@@@acfS,#1,#2,<#3>(#4)[#5]#6{%
317 \GLX@do@glosstex{#6}{#5}{#4}{n}\GLX@do@acf{#6}{#4}{#3}{#1}{#2}}
318 \newcommand{\GLX@entry}[5]{\relax}
319 \newcommand{\GLX@do@glosstex}[4]{%
320 \protected@write\@auxout{}%
321 {\string\GLX@entry{#1}{#2}{#3}{#4}{\thepage}}}
322 \newcommand{\GLX@do@acs}[2]{%
323 \expandafter\ifx\csname GLX@term@#1\endcsname\relax%
324 \textbf{#1!}%
325 \PackageWarning{glosstex}{Term `#1' is not defined}%
326 \gdef\GLX@undefined@term{x}%
327 \expandafter\gdef\csname GLX@term@#1\endcsname{\textbf{#1!}}%
328 \else%
329 \GLX@output@short{#1}{#2}{\csname GLX@term@#1\endcsname}%
330 \fi}
331 \newcommand{\GLX@do@acl}[2]{%
332 \expandafter\ifx\csname GLX@term@@#1\endcsname\relax%
333 \textbf{#1!}%
334 \PackageWarning{glosstex}{Term `#1' has no long form}%
335 \expandafter\gdef\csname GLX@term@@#1\endcsname{\textbf{#1!}}%
336 \else%
337 \GLX@output@long{#1}{#2}{\csname GLX@term@@#1\endcsname}%
338 \fi}
339 \newcommand{\GLX@do@acf}[5]{%
340 \begingroup%
341 \ifthenelse{\equal{#3}{i}}{\def\GLX@il{i}\def\GLX@tf{-}}{%
342 \ifthenelse{\equal{#3}{l}}{\def\GLX@il{l}\def\GLX@tf{-}}{%
343 \ifthenelse{\equal{#3}{it}}{\def\GLX@il{i}\def\GLX@tf{t}}{%
344 \ifthenelse{\equal{#3}{if}}{\def\GLX@il{i}\def\GLX@tf{f}}{%
345 \ifthenelse{\equal{#3}{lt}}{\def\GLX@il{l}\def\GLX@tf{t}}{%
346 \ifthenelse{\equal{#3}{lf}}{\def\GLX@il{l}\def\GLX@tf{f}}{%
347 \ifthenelse{\equal{#3}{t}}{\def\GLX@il{-}\def\GLX@tf{t}}{%
348 \ifthenelse{\equal{#3}{f}}{\def\GLX@il{-}\def\GLX@tf{f}}{%
349 \def\GLX@il{-}\def\GLX@tf{-}}%
350 }}}}}}}%
351 \ifthenelse{\boolean{@GLX@itemfirst}}%
352 {% itemfirst true
353 \ifthenelse{%
354 \equal{\GLX@itemorder{#2}}{i}}{\def\GLX@itemorder@{i}}{%
355 \ifthenelse{\equal{\GLX@itemorder{#2}}{l}}{\def\GLX@itemorder@{l}}{%
356 \ifthenelse{\equal{\GLX@il}{i}}{\def\GLX@itemorder@{i}}{}%
357 \ifthenelse{\equal{\GLX@il}{-}}{\def\GLX@itemorder@{i}}{}%
358 \ifthenelse{\equal{\GLX@il}{l}}{\def\GLX@itemorder@{l}}{}}}}%
359 {% itemfirst false
360 \ifthenelse{%
361 \equal{\GLX@itemorder{#2}}{i}}{\def\GLX@itemorder@{i}}{%
362 \ifthenelse{\equal{\GLX@itemorder{#2}}{l}}{\def\GLX@itemorder@{l}}{%
363 \ifthenelse{\equal{\GLX@il}{i}}{\def\GLX@itemorder@{i}}{}%
364 \ifthenelse{\equal{\GLX@il}{-}}{\def\GLX@itemorder@{l}}{}%
365 \ifthenelse{\equal{\GLX@il}{l}}{\def\GLX@itemorder@{l}}{}}}}%
366 \ifthenelse{\boolean{@GLX@footnote}}%
367 {% footnote true
368 \ifthenelse{%
369 \equal{\GLX@itemplacement{#2}}{t}}{\def\GLX@itemplacement@{t}}{%
370 \ifthenelse{\equal{\GLX@itemplacement{#2}}{f}}{\def\GLX@itemplacement@{f}}{%
371 \ifthenelse{\equal{\GLX@tf}{t}}{\def\GLX@itemplacement@{t}}{}%
372 \ifthenelse{\equal{\GLX@tf}{-}}{\def\GLX@itemplacement@{f}}{}%
373 \ifthenelse{\equal{\GLX@tf}{f}}{\def\GLX@itemplacement@{f}}{}}}}%
374 {% footnote false
375 \ifthenelse{%
376 \equal{\GLX@itemplacement{#2}}{t}}{\def\GLX@itemplacement@{t}}{%
377 \ifthenelse{\equal{\GLX@itemplacement{#2}}{f}}{\def\GLX@itemplacement@{f}}{%
378 \ifthenelse{\equal{\GLX@tf}{t}}{\def\GLX@itemplacement@{t}}{}%
379 \ifthenelse{\equal{\GLX@tf}{-}}{\def\GLX@itemplacement@{t}}{}%
380 \ifthenelse{\equal{\GLX@tf}{f}}{\def\GLX@itemplacement@{f}}{}}}}%
382 \ifthenelse{\equal{\GLX@itemorder@}{i}}%
383 {% itemorder i
384 \ifthenelse{\equal{\GLX@itemplacement@}{f}}%
385 {\GLX@do@acf@if{#1}{#2}}%
386 {\GLX@do@acf@it{#1}{#2}{#4}{#5}}}%
387 {% itemorder l
388 \ifthenelse{\equal{\GLX@itemplacement@}{f}}%
389 {\GLX@do@acf@lf{#1}{#2}}%
390 {\GLX@do@acf@lt{#1}{#2}{#4}{#5}}}%
391 \endgroup}%
392 \newcommand{\GLX@do@ac}[5]{%
393 \begingroup%
394 \ifthenelse{\equal{#3}{i}}{\def\GLX@il{i}\def\GLX@tf{-}}{%
395 \ifthenelse{\equal{#3}{l}}{\def\GLX@il{l}\def\GLX@tf{-}}{%
396 \ifthenelse{\equal{#3}{it}}{\def\GLX@il{i}\def\GLX@tf{t}}{%
397 \ifthenelse{\equal{#3}{if}}{\def\GLX@il{i}\def\GLX@tf{f}}{%
398 \ifthenelse{\equal{#3}{lt}}{\def\GLX@il{l}\def\GLX@tf{t}}{%
399 \ifthenelse{\equal{#3}{lf}}{\def\GLX@il{l}\def\GLX@tf{f}}{%
400 \ifthenelse{\equal{#3}{t}}{\def\GLX@il{-}\def\GLX@tf{t}}{%
401 \ifthenelse{\equal{#3}{f}}{\def\GLX@il{-}\def\GLX@tf{f}}{%
402 \def\GLX@il{-}\def\GLX@tf{-}}%
403 }}}}}}}%
404 \ifthenelse{\boolean{@GLX@itemfirst}}%
405 {% itemfirst true
406 \ifthenelse{%
407 \equal{\GLX@itemorder{#2}}{i}}{\def\GLX@itemorder@{i}}{%
408 \ifthenelse{\equal{\GLX@itemorder{#2}}{l}}{\def\GLX@itemorder@{l}}{%
409 \ifthenelse{\equal{\GLX@il}{i}}{\def\GLX@itemorder@{i}}{}%
410 \ifthenelse{\equal{\GLX@il}{-}}{\def\GLX@itemorder@{i}}{}%
411 \ifthenelse{\equal{\GLX@il}{l}}{\def\GLX@itemorder@{l}}{}}}}%
412 {% itemfirst false
413 \ifthenelse{%
414 \equal{\GLX@itemorder{#2}}{i}}{\def\GLX@itemorder@{i}}{%
415 \ifthenelse{\equal{\GLX@itemorder{#2}}{l}}{\def\GLX@itemorder@{l}}{%
416 \ifthenelse{\equal{\GLX@il}{i}}{\def\GLX@itemorder@{i}}{}%
417 \ifthenelse{\equal{\GLX@il}{-}}{\def\GLX@itemorder@{l}}{}%
418 \ifthenelse{\equal{\GLX@il}{l}}{\def\GLX@itemorder@{l}}{}}}}%
419 \ifthenelse{\boolean{@GLX@footnote}}%
420 {% footnote true
421 \ifthenelse{%
422 \equal{\GLX@itemplacement{#2}}{t}}{\def\GLX@itemplacement@{t}}{%
423 \ifthenelse{\equal{\GLX@itemplacement{#2}}{f}}{\def\GLX@itemplacement@{f}}{%
424 \ifthenelse{\equal{\GLX@tf}{t}}{\def\GLX@itemplacement@{t}}{}%
425 \ifthenelse{\equal{\GLX@tf}{-}}{\def\GLX@itemplacement@{f}}{}%
426 \ifthenelse{\equal{\GLX@tf}{f}}{\def\GLX@itemplacement@{f}}{}}}}%
427 {% footnote false
428 \ifthenelse{%
429 \equal{\GLX@itemplacement{#2}}{t}}{\def\GLX@itemplacement@{t}}{%
430 \ifthenelse{\equal{\GLX@itemplacement{#2}}{f}}{\def\GLX@itemplacement@{f}}{%
431 \ifthenelse{\equal{\GLX@tf}{t}}{\def\GLX@itemplacement@{t}}{}%
432 \ifthenelse{\equal{\GLX@tf}{-}}{\def\GLX@itemplacement@{t}}{}%
433 \ifthenelse{\equal{\GLX@tf}{f}}{\def\GLX@itemplacement@{f}}{}}}}%
435 \ifthenelse{\equal{\GLX@itemorder@}{i}}%
436 {% itemorder i
437 \ifthenelse{\equal{\GLX@itemplacement@}{f}}%
438 {\expandafter\ifx\csname GLX@terml@#1\endcsname\relax%
439 \GLX@do@acf@if{#1}{#2}%
440 \expandafter\gdef\csname GLX@terml@#1\endcsname{x}%
441 \else%
442 \GLX@do@acs{#1}{#2}%
443 \fi}%
444 {\expandafter\ifx\csname GLX@terml@#1\endcsname\relax%
445 \GLX@do@acf@it{#1}{#2}{#4}{#5}%
446 \expandafter\gdef\csname GLX@terml@#1\endcsname{x}%
447 \else%
448 \GLX@do@acs{#1}{#2}%
449 \fi}}%
450 {% itemorder l
451 \ifthenelse{\equal{\GLX@itemplacement@}{f}}%
452 {\expandafter\ifx\csname GLX@terml@#1\endcsname\relax%
453 \GLX@do@acf@lf{#1}{#2}%
454 \expandafter\gdef\csname GLX@terml@#1\endcsname{x}%
455 \else%
456 \GLX@do@acs{#1}{#2}%
457 \fi}%
458 {\expandafter\ifx\csname GLX@terml@#1\endcsname\relax%
459 \GLX@do@acf@lt{#1}{#2}{#4}{#5}%
460 \expandafter\gdef\csname GLX@terml@#1\endcsname{x}%
461 \else%
462 \GLX@do@acs{#1}{#2}%
463 \fi}}%
464 \endgroup}
465 \newcommand{\GLX@do@acf@it}[4]{%
466 \GLX@do@acs{#1}{#2}%
467 \expandafter\ifx\csname GLX@term@@#1\endcsname\relax%
468 \else\nolinebreak[3]\space%
469 \ifthenelse{\equal{#3}{\relax}}{%
470 \expandafter\ifx\csname GLX@paren@l@#2\endcsname\relax%
471 \GLX@paren@l%
472 \else%
473 \expandafter\csname GLX@paren@l@#2\endcsname%
474 \fi}{#3}%
475 \GLX@do@acl{#1}{#2}%
476 \ifthenelse{\equal{#4}{\relax}}{%
477 \expandafter\ifx\csname GLX@paren@r@#2\endcsname\relax%
478 \GLX@paren@r%
479 \else%
480 \expandafter\csname GLX@paren@r@#2\endcsname%
481 \fi}{#4}%
482 \fi}%
483 \newcommand{\GLX@do@acf@if}[2]{%
484 \GLX@do@acs{#1}{#2}%
485 \expandafter\ifx\csname GLX@term@@#1\endcsname\relax%
486 \else\nolinebreak[3]\footnote{\GLX@do@acl{#1}{#2}}\fi}%
487 \newcommand{\GLX@do@acf@lt}[4]{%
488 \expandafter\ifx\csname GLX@term@@#1\endcsname\relax%
489 \else\GLX@do@acl{#1}{#2}\fi%
490 \nolinebreak[3]\space%
491 \ifthenelse{\equal{#3}{\relax}}{%
492 \expandafter\ifx\csname GLX@paren@l@#2\endcsname\relax%
493 \GLX@paren@l%
494 \else%
495 \expandafter\csname GLX@paren@l@#2\endcsname%
496 \fi}{#3}%
497 \GLX@do@acs{#1}{#2}%
498 \ifthenelse{\equal{#4}{\relax}}{%
499 \expandafter\ifx\csname GLX@paren@r@#2\endcsname\relax%
500 \GLX@paren@r%
501 \else%
502 \expandafter\csname GLX@paren@r@#2\endcsname%
503 \fi}{#4}}%
504 \newcommand{\GLX@do@acf@lf}[2]{%
505 \expandafter\ifx\csname GLX@term@@#1\endcsname\relax%
506 \else\GLX@do@acl{#1}{#2}\fi%
507 \footnote{\GLX@do@acs{#1}{#2}}}%
508 \newcommand{\GLX@newterm}[3]{%
509 \expandafter\gdef\csname GLX@term@#1\endcsname{#2}%
510 \ifx#3\empty%
511 \else\expandafter\gdef\csname GLX@term@@#1\endcsname{#3}\fi}%
512 \newenvironment{theglosstex}[2]{%
513 \gdef\GLX@theglosstex@list{#1}%
514 \gdef\GLX@theglosstex@pagerefmode{#2}%
515 \csname GLX@benv@#1\endcsname%
516 \DeclareRobustCommand{\glxref}{%
517 \@ifstar{\GLX@glxrefS}{\GLX@glxref}}%
518 \newcommand{\GLX@glxref}[1]{%
519 \GLX@do@glosstex{##1}{n}{\GLX@theglosstex@list}{a}%
520 \GLX@do@acs{##1}{\GLX@theglosstex@list}}%
521 \newcommand{\GLX@glxrefS}[1]{%
522 \GLX@do@glosstex{##1}{n}{\GLX@theglosstex@list}{a}}%
523 \newcommand{\GlossTeXEntry}[7]{%
524 \GLX@newterm{##1}{##2}{##3}%
525 \write\@auxout{\string\GLX@newterm{##1}{##2}{##3}}%
526 \ifthenelse{\equal{#1}{##5}}{%
527 \ifthenelse{\equal{a}{##6}}{%
528 \csname GLX@item@#1\endcsname%
529 {##1}{##2}{##3}{##4}{##5}{##6}{##7}}{}%
530 }{}}}{%
531 \csname GLX@eenv@\GLX@theglosstex@list\endcsname}%
532 \DeclareRobustCommand\printglosstex{\GLX@printglosstex}
533 \newcommand{\GLX@printglosstex}{%
534 \@ifnextchar({\GLX@@printglosstexr}{%
535 \@ifnextchar[{\GLX@@printglosstexs(glo)}{%
536 \GLX@@@printglosstex[p](glo)}}}
537 \newcommand{\GLX@@printglosstexr}{}
538 \def\GLX@@printglosstexr(#1){%
539 \@ifnextchar[{\GLX@@printglosstexs(#1)}{%
540 \GLX@@@printglosstex(#1)[p]}}
541 \newcommand{\GLX@@printglosstexs}{}
542 \def\GLX@@printglosstexs(#1)[#2]{%
543 \GLX@@@printglosstex(#1)[#2]}
544 \newcommand{\GLX@@@printglosstex}{}
545 \def\GLX@@@printglosstex(#1)[#2]{\GLX@do@printglosstex{#1}{#2}}
546 \newcommand{\GLX@do@printglosstex}[2]{%
547 \expandafter\ifx\csname GLX@heading@#1\endcsname\relax%
548 \textbf{#1!}%
549 \PackageWarning{glosstex}{Heading for list `#1' is not defined}%
550 \expandafter\gdef\csname GLX@heading@#1\endcsname{\textbf{#1!}}%
551 \else%
552 \csname GLX@heading@#1\endcsname%
553 \IfFileExists{\jobname.glx}{%
554 \begin{theglosstex}{#1}{#2}%
555 \input{\jobname.glx}%
556 \end{theglosstex}}%
557 {\typeout{No file \jobname.glx}}%
558 \fi}
559 \newcommand{\glxgldefault}[2]{%
560 \gdef\GLX@gldef@list{#1}%
561 \gdef\GLX@gldef@page{#2}}
562 \newcommand{\glxacdefault}[2]{%
563 \gdef\GLX@acdef@list{#1}%
564 \gdef\GLX@acdef@page{#2}}
565 \newcommand{\glxitemorderdefault}[2]{%
566 \expandafter\gdef\csname GLX@itemorder@#1\endcsname{#2}}
567 \newcommand{\glxitemplacementdefault}[2]{%
568 \expandafter\gdef\csname GLX@itemplacement@#1\endcsname{#2}}
569 \newcommand{\GLX@itemorder}[1]{%
570 \expandafter\ifx\csname GLX@itemorder@#1\endcsname\relax%
571 \PackageWarning{glosstex}{Item order for list `#1' not defined}%
572 \expandafter\gdef\csname GLX@itemorder@#1\endcsname{\textbf{#1!}}%
573 \else%
574 \csname GLX@itemorder@#1\endcsname%
575 \fi}
576 \newcommand{\GLX@itemplacement}[1]{%
577 \expandafter\ifx\csname GLX@itemplacement@#1\endcsname\relax%
578 \PackageWarning{glosstex}{Item placement for list `#1' not defined}%
579 \expandafter\gdef\csname GLX@itemplacement@#1\endcsname{\textbf{#1!}}%
580 \else%
581 \csname GLX@itemplacement@#1\endcsname%
582 \fi}
583 \newcommand{\glxparendefault}[2]{%
584 \gdef\GLX@paren@l{#1}%
585 \gdef\GLX@paren@r{#2}}
586 \newcommand{\glxparenlistdefault}[3]{%
587 \expandafter\gdef\csname GLX@paren@l@#1\endcsname{#2}%
588 \expandafter\gdef\csname GLX@paren@r@#1\endcsname{#3}}
589 \newcommand*{\glxheading}[2]{%
590 \expandafter\gdef\csname GLX@heading@#1\endcsname{#2}}
591 \InputIfFileExists{glosstex.std}{%
592 \typeout{Using the standard configuration file glosstex.std}}{%
593 \PackageWarning{glosstex}{%
594 File glosstex.std not found. I can't stand it no more}}
595 \InputIfFileExists{glosstex.cfg}{%
596 \typeout{Using the configuration file glosstex.cfg}}{}
597 \endinput
599 %% End of file `glosstex.sty'.