Debian Codegraph @

texmf-dist/source/latex/acronym/acronym.dtx

raw
1 % \iffalse (meta-comment)
2 %
3 % Doc-Source file to use with LaTeX2e
4 %
5 % Copyright 1994-2025 by Tobias Oetiker ([email protected]) and many Contributors.
6 % All rights reserved.
7 %
8 % This work may be distributed and/or modified under the conditions of
9 % the LaTeX Project Public License, either version 1.3 of this license
10 % or (at your option) any later version. The latest version of the
11 % license is in
12 %
13 % http://www.latex-project.org/lppl.txt
14 %
15 % and version 1.3 or later is part of all distributions of LaTeX
16 % version 2003/12/01 or later.
17 %
18 % This work has the LPPL maintenance status "maintained".
19 % The Current Maintainer of this work is Tobias Oetiker ([email protected]).
20 %
21 %<*driver>
22 \documentclass{ltxdoc}
23 \usepackage{acronym} % to get file info
24 \EnableCrossrefs
25 %\DisableCrossrefs % say \DisableCrossrefs if index is ready
26 \CodelineIndex
27 \RecordChanges % gather update information
28 %\OnlyDescription % comment out for implementation details
29 %\OldMakeindex % use if your MakeIndex is pre-v2.9
30 \setlength\hfuzz{15pt} % dont make so many
31 \hbadness=7000 % over and under full box warnings
32 \begin{document}
33 \DocInput{acronym.dtx}
34 \end{document}
35 %</driver>
36 % \fi
37 %
38 % \CheckSum{1664}
39 %
40 %% \CharacterTable
41 %% {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
42 %% 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
43 %% Digits \0\1\2\3\4\5\6\7\8\9
44 %% Exclamation \! Double quote \" Hash (number) \#
45 %% Dollar \$ Percent \% Ampersand \&
46 %% Acute accent \' Left paren \( Right paren \)
47 %% Asterisk \* Plus \+ Comma \,
48 %% Minus \- Point \. Solidus \/
49 %% Colon \: Semicolon \; Less than \<
50 %% Equals \= Greater than \> Question mark \?
51 %% Commercial at \@ Left bracket \[ Backslash \\
52 %% Right bracket \] Circumflex \^ Underscore \_
53 %% Grave accent \` Left brace \{ Vertical bar \|
54 %% Right brace \} Tilde \~}
55 %%
56 %
57 %
58 % \DoNotIndex{\@auxout, \@bsphack, \@car, \@esphack, \@firstoftwo,
59 % \@gobble, \@ifnextchar,
60 % \@ifpackageloaded, \@nil, \@secondoftwo, \\}
61 % \DoNotIndex{\addtolength, \AtBeginDocument}
62 % \DoNotIndex{\begin, \begingroup, \bflabel}
63 % \DoNotIndex{\csname}
64 % \DoNotIndex{\DeclareOption, \def, \documentclass}
65 % \DoNotIndex{\edef, \else, \end, \endcsname, \endgroup, \endinput,
66 % \ensuremath, \expandafter}
67 % \DoNotIndex{\fi, \footnote}
68 % \DoNotIndex{\gdef, \global}
69 % \DoNotIndex{\hfill, \hyperlink, \hyperref, \hypertarget}
70 % \DoNotIndex{\if@filesw, \ifx, \item}
71 % \DoNotIndex{\label, \labelsep, \labelwidth, \leftmargin, \let,
72 % \long}
73 % \DoNotIndex{\makelabel, \mathrm}
74 % \DoNotIndex{\NeedsTeXFormat, \newcommand, \newenvironment,
75 % \newif, \newtoks, \noexpand, \nolinebreak, \null}
76 % \DoNotIndex{\PackageWarning, \PackageError, \ProcessOptions, \protect,
77 % \protected@write, \providecommand, \ProvidesPackage}
78 % \DoNotIndex{\raggedright, \ref, \relax, \renewcommand,
79 % \RequirePackage}
80 % \DoNotIndex{\S, \section, \setlength, \settowidth, \string,
81 % \subsection}
82 % \DoNotIndex{\textbf, \textsf, \textsmaller, \textsuperscript, \the}
83 % \DoNotIndex{\usepackage}
84 %
85 % \changes{v1.50}{2025/01/16}{Theo von Arx adds the option 'error' to throw errors upon undefined acronyms, Tobi integrates patches for issue/60 ltx and amsmath}
86 % \changes{v1.49}{2024/03/30}{Chris Landis adds noforwardlinks option and fixes targets for forward links to acs/acl/etc.-only use}
87 % \changes{v1.48}{2021/10/09}{Bruno Le Floch corrected capitalization of acronyms with a custom plural form.}
88 % \changes{v1.47}{2020/04/10}{Tobi Oetiker and Marcus Meeßen \cmd{hskip} Fixed several bugs in macros that use capitalisation, a bug were the output depends on the position of the list of acronyms, and a bug were nested hyperlinks could cause errors.}
89 % \changes{v1.46}{2020/03/13}{Tobi Oetiker \cmd{hskip} Fixed miss merge}
90 % \changes{v1.45}{2020/03/13}{Marcus Meeßen \cmd{hskip} Fixed hyperref and "missing aux" regressions.}
91 % \changes{v1.44}{2020/02/07}{Marcus Meeßen \cmd{hskip} Added the |printonlyreused| option, which allows to automatically exclude acronyms from the list of acronyms if they are used only once}
92 % \changes{v1.43}{2020/02/05}{Marcus Meeßen \cmd{hskip} Fixed unconventional dots spacing in list of acronyms, enhanced list of acronyms with hyperrefs, and fixed collisions between acronyms and package commands, which can be turned of with the |noacroprefix| option}
93 % \changes{v1.42}{2019/11/11}{Philippe Chauvat \cmd{hskip} Fix the carriage return with long lines, Tobi Oetiker and Horst Schirmeier fixed usedflag and page number entries for acfi and Acfi}
94 % \changes{v1.41}{2015/03/21}{Tobi Oetiker and Jason Mills \cmd{hskip} fix nameing conflicts with pageslts package}
95 % \changes{v1.40}{2014/09/29}{Hartmut Henkel - remove \cmd{hskip} instances, since they cause bad formating since space at the end of a line can not be collapsed anymore}
96 % \changes{v1.39}{2014/08/14}{Yann Leprince - make the appearance of labels consistent whether or not the acronym environment has its optional argument provided}
97 % \changes{v1.38}{2012/10/09}{Ash Hughes - add support for dynamic indefinite articles depending on the acronym form used}
98 % \changes{v1.37}{2012/09/04}{Martin Falk - ac* should NOT set the used flag ... now it does not. Martin Ruessler found fix for non hyphenation in the first word of the long form of the acronym}
99 % \changes{v1.36}{2010/09/08}{Uwe Bieling disable hyperlinks in nolist mode, prevent hyphenation of short form of acronyms}
100 % \changes{v1.35}{2009/10/20}{Sergio Callegari added support for nonstandard plural forms and fixed management of default short form.}
101 % \changes{v1.34}{2009/01/25}{make sure that the s of acp get smaller as well when the smaller option is active}
102 % \changes{v1.33}{2008/12/19}{enrico.gregorio provided a patch for makeing non-description acronym lists work}
103 % \changes{v1.32}{2008/05/28}{Ulrich Diez again altered code to redefine labels in order to cope with unreproducable bug-reports. Warnings turnrd into infos for the sake of decreasing frightening-level}
104 % \changes{v1.31}{2008/05/21}{Philipp Lehman noted a nameconflict with jurabib. Renamed clearlist to AC@clearlist since it is internal anyway}
105 % \changes{v1.30}{2008/04/22}{Ulrich Diez corrected code to redefine labels and adjusted behavior with \cmd{\AC@used}}
106 % \changes{v1.29}{2008/04/22}{added code to redefine labels as acronyms are used multiple times, makeing the right page numbers show up for the withpage option (code by Ulrich Diez on comp.text.tex, integration by Domagoj Babic, babic AT cs.ubc.ca)}
107 % \changes{v1.28}{2008/04/19}{add linebreak to items list by tobi}
108 % \changes{v1.27}{2008/04/18}{Added withpage option to print page numbers into acronym list by tobi and Domagoj Babic, babic AT cs.ubc.ca}
109 % \changes{v1.26}{2006/06/26}{Don't put out an empty item if nolist is in effect by [email protected]}
110 % \changes{v1.25}{2005/11/11}{Properly handle acronym commands in PDF Bookmarks by Heiko Oberdiek [email protected]}
111 % \changes{v1.24}{2005/10/25}{Now the acronyms commands and fixed a bug in the option nolist, by Jose Emilio Vila Forcen, [email protected]}
112 % \changes{v1.23}{2005/10/24}{Fix fpr nolist option by Tobi}
113 % \changes{v1.22}{2005/10/04}{added starred versions of ac(p), acf(p), acs(p), acl(p), acfi, acsu \& aclu by Stefan Pinnow ([email protected])}
114 % \changes{v1.21}{2005/09/20}{fixed acused again by Tobi. added option nolist, by Jose Emilio Vila Forcen, [email protected]}
115 % \changes{v1.20}{2005/08/16}{make acused actually work. by Richard.Walker with cs.anu.edu.au}
116 % \changes{v1.19}{2005/04/26}{three new commands acused (set-used), acsu (adds to used), aclu (adds to used) by Lee Netherton [email protected]}
117 % \changes{v1.18}{2005/04/01}{added additionaly format option for Full Name (acfi) command by Manuel G"ortz [email protected]}
118 % \changes{v1.17}{2004/11/10}{added don't use acronyms (dua) option by Oliver Creighton}
119 % \changes{v1.16}{2004/11/03}{fixed version number -- tobi}
120 % \changes{v1.15}{2004/11/02}{make acresetall work even when ac is called in environments by ctt}
121 % \changes{v1.14}{2004/10/08}{fix acsp and acfp for footnote mode by Markus Ortner [email protected]}
122 % \changes{v1.13}{2004/07/29}{deflist renamed to AC@deflist to
123 % avoid unnecessary nameing conflict. Found by [email protected].
124 % fixed prinonlyused option, it was ON all the time by Tobi. Foonotes were
125 % not adding to the clear list by Tobi.}
126 % \changes{v1.12}{2004/06/08}{Make acronyms robust and compatible
127 % with pdf bookmarks by Danie Els ([email protected]).}
128 % \changes{v1.11}{2004/06/04}{make hyperlinks work inside optional
129 % item text by replaceing hypertarget with raisedhypertarget by
130 % Martin Salois ([email protected]). Added note on fragility by Tobi}
131 % \changes{v1.10a}{2004/05/26}{Fix for the bug of a \cs{}\cs{} following
132 % an acronym. Add footnote optional out for \cmd{\acs} by Danie Els
133 % ([email protected]).}
134 % \changes{v1.10}{2004/05/25}{Fix for list of acronyms in front
135 % matter and addition of \cmd{\acroextra} command by Danie Els
136 % ([email protected]).}
137 % \changes{v1.09}{2003/10/26}{Fixed hyperref support by Danie Els
138 % ([email protected]), make sure not only \cmd{\ac} sets acronyms
139 % as used but direct calls to \cmd{\acs} and \cmd{\acf} and
140 % \cmd{\acl} as well by Tobi.}
141 % \changes{v1.08}{2003/10/20}{Added hyperref support and the
142 % option \texttt{nohyperref} provided by Martin Salois
143 % ([email protected])}
144 % \changes{v1.07}{2003/02/11}{Added \cs{acresetall} to reset the
145 % 'uses' - flag of \cmd{\ac}, new option \texttt{printonlyused},
146 % new possible format for the list. provided by Sebastian Max
147 % ([email protected])}
148 % \changes{v1.06}{2000/05/21}{Added the smaller option and
149 % macros to control the appearance of \cmd{\acf} and \cmd{\acs}
150 % provided by Ingo Lepper ([email protected])}
151 % \changes{v1.05}{2000/05/11}{Added new commands for handling
152 % English plural forms of acronyms and the \texttt{footnote}
153 % option provided by [email protected]}
154 % \changes{v1.04}{2000/02/09}{Optional argument for \cmd{\acro} and
155 % \cmd{\acrodef}, allowing formatting of the acronym itself
156 % provided by Heiko Oberdiek ([email protected])}
157 % \changes{v1.03}{1996/09/19}{Fixed dtx file ... could not be printed}
158 % \changes{v1.02}{1996/08/14}{Added \cmd{\acl} command patch provided by
159 % Ted Stern ([email protected])}
160 %
161 %
162 % \GetFileInfo{acronym.sty}
163 %
164 % \title{An Acronym Environment for \LaTeXe\thanks{^^A
165 % This file has version number \fileversion,
166 % last revised \filedate.}}
167 % \author{Tobias Oetiker}
168 % \date{\filedate}
169 % \maketitle
170 %
171 %
172 % \section{Introduction}
173 % When writing a paper on cellular mobile radio I started to use a
174 % lot of acronyms. This can be very disturbing for the reader,
175 % as he might not know all the used acronyms. To help the reader
176 % I kept a list of all the acronyms at the end of my paper.
177 %
178 % This package makes sure, that all acronyms used in the text are
179 % spelled out in full at least once.
180 %
181 % \section{The user interface}
182 % The package provides several commands and one environment
183 % for dealing with acronyms. Their appearance can be controlled by
184 % two package options and three macros.
185 %
186 % \subsection{Acronyms in the Text}
187 %
188 % \DescribeMacro{\ac}
189 % To enter an acronym inside the text, use the
190 % \begin{quote}
191 % |\ac[|\meta{linebreak penalty}|]{|\meta{acronym}|}|
192 % \end{quote}
193 % command. The first time you use an acronym, the full name of the
194 % acronym along with the acronym in brackets will be printed. If you
195 % specify the |footnote| option while loading the package, the full
196 % name of the acronym is printed as a footnote.
197 % The next time you access the acronym only the acronym will
198 % be printed.
199 %
200 % When an acronym is being used, for the first time (with the |footnote|
201 % option not specified), next to the end of the line, a line break between
202 % the full name of the acronym and the acronym in brackets can be
203 % encountered. The optional variable represents the penalty level of
204 % breaking the line at that place, taking integer values between 0 and 4.
205 % A higher number corresponds to a higher penalty.
206 %
207 % \DescribeMacro{\Ac}
208 % Works in the same way as \cmd{\ac}, but starts the long form with an
209 % upper case letter. Use case: when the acronym is used for the first
210 % time, at the beginning of a sentence.
211 %
212 % \DescribeMacro{\acresetall}
213 % The 'memory' of the macro \cmd{\ac} can be flushed by calling the macro
214 % \cmd{\acresetall}. Afterwards, \cmd{\ac} will print the full name of any
215 % acronym and the acronym in brackets the next time it is used.
216 %
217 % \DescribeMacro{\acf}
218 % If later in the text again the Full Name of the acronym should be
219 % printed, use the command
220 % \begin{quote}
221 % |\acf[|\meta{linebreak penalty}|]{|\meta{acronym}|}|
222 % \end{quote}
223 % to access the acronym. It stands for ``full acronym'' and it
224 % always prints the full name and the acronym in brackets.
225 %
226 % When an full acronym is being used next to the end of the line, a line
227 % break between the full name of the acronym and the acronym in brackets
228 % can be encountered. The optional variable represents the penalty level
229 % of breaking the line at that place, taking integer values between 0
230 % and 4. A higher number corresponds to a higher penalty.
231 %
232 % \DescribeMacro{\Acf}
233 % Works in the same way as \cmd{\acf}, but starts the long form with an
234 % upper case letter.
235 %
236 % \DescribeMacro{\acs}
237 % To get the short version of the acronym, use the command
238 % \begin{quote}
239 % |\acs{|\meta{acronym}|}|
240 % \end{quote}
241 %
242 % \DescribeMacro{\acl}
243 % Gives you the expanded acronym without even mentioning the
244 % acronym.
245 % \begin{quote}
246 % |\acl{|\meta{acronym}|}|
247 % \end{quote}
248 %
249 % \DescribeMacro{\Acl}
250 % Works in the same way as \cmd{\acl}, but starts with an upper case
251 % letter.
252 %
253 % \DescribeMacro{\acp}
254 % Works in the same way as \cmd{\ac}, but makes the short and/or
255 % long forms into plurals.
256 %
257 % \DescribeMacro{\Acp}
258 % Works in the same way as \cmd{\acp}, but starts the long form with an
259 % upper case letter.
260 %
261 % \DescribeMacro{\acfp}
262 % Works in the same way as \cmd{\acf}, but makes the short and
263 % long forms into plurals.
264 %
265 % \DescribeMacro{\Acfp}
266 % Works in the same way as \cmd{\acfp}, but starts the long form with an
267 % upper case letter.
268 %
269 % \DescribeMacro{\acsp}
270 % Works in the same way as \cmd{\acs}, but makes the short
271 % form into a plural.
272 %
273 % \DescribeMacro{\aclp}
274 % Works in the same way as \cmd{\acl}, but makes the long form
275 % into a plural.
276 %
277 % \DescribeMacro{\Aclp}
278 % Works in the same way as \cmd{\aclp}, but starts with an upper case
279 % letter.
280 %
281 % \DescribeMacro{\acfi}
282 % Works in the same way as \cmd{\acf}, but prints the Full Name acronym
283 % (\cmd{\acl}) in italics and the abbreviated form (\cmd{\acs}) in
284 % upshaped form.
285 %
286 % \DescribeMacro{\Acfi}
287 % Works in the same way as \cmd{\acfi}, but starts the long form with an
288 % upper case letter.
289 %
290 % \DescribeMacro{\acfip}
291 % Works in the same way as \cmd{\acfi}, but makes the short and long
292 % forms into plurals.
293 %
294 % \DescribeMacro{\Acfip}
295 % Works in the same way as \cmd{\acfip}, but starts the long form with
296 % an upper case letter.
297 %
298 % \DescribeMacro{\acused}
299 % Marks an acronym as used, as if it had been called with \cmd{\ac},
300 % but without printing anything. This means that in the future only the
301 % short form of the acronym will be printed.
302 %
303 % \DescribeMacro{\acsu}
304 % Prints the short form of the acronym and marks it as used.
305 %
306 % \DescribeMacro{\aclu}
307 % Prints the long form of the acronym and marks it as used.
308 %
309 % \DescribeMacro{\Aclu}
310 % Works in the same way as \cmd{\aclu}, but starts with an upper case
311 % letter.
312 %
313 % Example: |\acl{lox}/\acl{lh2} (\acsu{lox}/\acsu{lh2})|
314 %
315 % \DescribeMacro{\iac}
316 % Works in the same way as the \cmd{\ac} command but prefixes it with
317 % an appropriate indefinite article.
318 %
319 % \DescribeMacro{\Iac}
320 % Works in the same way as the \cmd{\ac} command but prefixes it with
321 % an appropriate upper case indefinite article.
322 %
323 % \DescribeMacro{\...*}
324 % The following commands do the same as their unstarred forms, except
325 % that the acronym will not be marked as used. If you work with the 'onlyused'
326 % option then macros which have only been used with starred commands will
327 % not show up.\\
328 % \cmd{\ac*}, \cmd{\Ac*}, \cmd{\acs*}, \cmd{\acl*}, \cmd{\Acl*}, \cmd{\acf*},
329 % \cmd{\Acf*}, \cmd{\acp*}, \cmd{\Acp*}, \cmd{\acsp*}, \cmd{\aclp*}, \cmd{\Aclp*},
330 % \cmd{\acfp*}, \cmd{\Acfp*}, \cmd{\acfi*}, \cmd{\Acfi*}, \cmd{\acfip*},
331 % \cmd{\Acfip*}, \cmd{\acsu*}, \cmd{\aclu*}, \cmd{\Aclu*}, \cmd{\iac*},
332 % and \cmd{\Iac*}.
333 %
334 % \subsection{Customization}
335 %
336 % The appearance of \cmd{\acs} and \cmd{\acf} can be configured
337 % in various ways. Of main importance are the package options:
338 % \begin{description}
339 % \item[\normalfont|footnote|]
340 % makes the full name of the acronym appear as a footnote.
341 % \item[\normalfont|smaller|]
342 % lets the acronyms appear a bit smaller than the surrounding
343 % text. This is in accord with typographic convention.
344 % The |relsize| package is required.
345 % \end{description}
346 %
347 % There are three lower-level macros controlling the output.
348 % Any acronym printed by \cmd{\acs} is formatted
349 % by \DescribeMacro{\acsfont}\cmd{\acsfont}. Similarly, unless the
350 % option |footnote| is specified, \DescribeMacro{\acffont}\cmd{\acffont}
351 % handles the output of \cmd{\acf}, where the included acronym
352 % goes through \DescribeMacro{\acfsfont}\cmd{\acfsfont} (and
353 % \cmd{\acsfont}).
354 % The plural and upper case forms are treated accordingly. Usually the
355 % three macros do nothing. To give an example, the option |smaller|
356 % makes \cmd{\acsfont} use the command \cmd{\textsmaller} from the
357 % |relsize| package:
358 % \begin{quote}
359 % |\renewcommand*{\acsfont}[1]{\textsmaller{#1}}|
360 % \end{quote}
361 %
362 % \subsection{Defining Acronyms}
363 % Acronyms can either defined from an environment specifically
364 % introduced for that purpose or by direct definitions.
365 %
366 % \DescribeEnv{acronym}
367 % The |acronym| environment allows one to define all the acronyms
368 % needed by a document at a single place and is self-documenting,
369 % since a table of acronyms is automatically produced.
370 %
371 % In the |acronym| environment, acronyms are defined with the
372 % \DescribeMacro{\acro} command:
373 % \begin{quote}
374 % |\acro{|\meta{acronym}|}[|\meta{short name}|]{|\meta{full name}|}|
375 % \end{quote}
376 % The first argument \meta{acronym} is the acronym string itself
377 % and is used in the commands of the previous section such as
378 % \cmd{\ac} or \cmd{\acl}, that print the different forms of the
379 % acronym.
380 %
381 % Because internal commands take \meta{acronym} for storing
382 % the different forms of the acronym, the \TeX\ code for the
383 % acronym is limited by \cmd{\csname}.
384 % If the acronym requires problematic or complicate \TeX\ stuff
385 % (font commands, \dots), then this code
386 % can be given in the optional argument \meta{short name}.
387 % The first argument \meta{acronym} is then a simpler string
388 % to identify the acronym.
389 % For example, an acronym for water can look like this:
390 % \begin{quote}
391 % |\acro{H2O}[$\mathrm{H_2O}$]{water}|
392 % \end{quote}
393 % Then |\acs{H2O}| gets ``$\mathrm{H_2O}$'' and
394 % |\acl{H2O}| prints ``water''.
395 %%
396 % Inside the |acronym| environment \DescribeMacro{\acroextra}
397 % additional information can be added to the list of acronyms
398 % with the \cmd{\acroextra} command that will not be included
399 % in the normal inline acronyms.
400 %
401 % \begin{quote}
402 % |\acroextra{|\meta{additional info}|}|
403 % \end{quote}
404 %
405 % \noindent
406 % for example:
407 %
408 % \begin{quote}
409 % |\acro{H2O}[$\mathrm{H_2O}$]|\\
410 % | {Dihydrogen Monoxide\acroextra{ (water)}}|\\[1ex]
411 % |\acro{NA}[\ensuremath{N_{\mathrm A}}]|\\
412 % | {Number of Avogadro\acroextra{ (See \S\protect\ref{A1})}}|
413 % \end{quote}
414 %
415 % \noindent
416 % Note that \cmd{\acroextra} must be inserted inside the
417 % \cmd{\acro} definition and that fragile commands must be
418 % protected. Be careful of unnecessary spaces.
419 %
420 % The standard format of the acronym list is a \cmd{\description}
421 % environment. If you pass an optional parameter to the |acronym|
422 % environment, the width of the acronym-column will be fitted to the
423 % width of the given parameter (which should be the longest acronym).
424 % For example, if \textit{HBCI} is the longest acronym used, the
425 % list should start with
426 % \begin{quote}
427 % |\begin{acronym}[HBCI]|
428 % \end{quote}
429 %
430 % \DescribeMacro{\aclabelfont}
431 % The short form of each acronym in the list is formatted using
432 % \cmd{\aclabelfont}, which typesets its arguments in bold font by
433 % default. It can be redefined to produce bold sans-serif labels, for
434 % example, with
435 % \begin{quote}
436 % |\renewcommand*{\aclabelfont}[1]{\textbf{\textsf{\acsfont{#1}}}}|
437 % \end{quote}
438 %
439 % In standard mode, the acronym-list will consist of all defined
440 % acronyms, regardless if the the acronym was used in the text
441 % before or not. This behavior can be changed by loading the
442 % package with the parameter \texttt{printonlyused} (used at least once) or
443 % \texttt{printonlyreused} (use more than once):
444 % \begin{quote}
445 % |\usepackage[printonlyused]{acronym}|
446 % \end{quote}
447 % In \texttt{printonly(re)used}-mode you can add to each acronym the
448 % the page number where it was first used by additionally specifying
449 % the option \texttt{withpage}.
450 % \begin{quote}
451 % |\usepackage[printonlyused,withpage]{acronym}|
452 % \end{quote}
453 %
454 % If one does not want an acronym list to be produced at all,
455 % acronyms can be defined directly thanks to the two commands
456 % \DescribeMacro{\newacro}%
457 % \DescribeMacro{\acrodef}%
458 % \begin{quote}
459 % |\newacro{|\meta{acronym}|}[|\meta{short name}|]{|\meta{full name}|}|\\
460 % |\acrodef{|\meta{acronym}|}[|\meta{short name}|]{|\meta{full name}|}|
461 % \end{quote}
462 % \noindent the difference between the two consisting in the fact
463 % that the latter makes the acronym definition stored in the |.aux|
464 % file. Therefore, the acronym becomes available from start-up in
465 % the next run.
466 %
467 % Note that all the acronym definitions made by \cmd{\acro} in the
468 % |acronym| environment are also similarly added to the |.aux|
469 % file.
470 %
471 % \subsubsection{Non standard indefinite articles}
472 %
473 % Sometimes the indefinite article of an acronym differs between its
474 % short form and its long form, for example ``a Federal Bureau of
475 % Investigation (FBI) agent'' and ``an FBI agent''. To deal with this,
476 % the package provides the following three commands
477 % \DescribeMacro{\newacroindefinite}
478 % \DescribeMacro{\acrodefindefinite}
479 % \DescribeMacro{\acroindefinite}
480 % \begin{quote}
481 % |\acroindefinite{|\meta{acronym}|}{|\meta{short indefinite article}|}{|%
482 % \meta{long indefinite article}|}|\\
483 % |\newacroindefinite{|\meta{acronym}|}{|\meta{short indefinite article}|}{|%
484 % \meta{long indefinite article}|}|\\
485 % |\acrodefindefinite{|\meta{acronym}|}{|\meta{short indefinite article}|}{|%
486 % \meta{long indefinite article}|}|\\
487 % \end{quote}
488 % \noindent that allow one to define indefinite articles. The \cmd{\acroindefinite}
489 % command is meant to be used in the |acronym| environment. The
490 % difference among the latter two is that \cmd{\acrodefindefinite} puts
491 % the acronym definition in the |.aux| file, so that the acronym
492 % exception is available at the next run from start-up.
493 %
494 % When using \cmd{\iac} and \cmd{\Iac} without first defining an
495 % article, the default article is ``a''.
496 %
497 % \subsubsection{Non standard and foreign plural forms}
498 %
499 % When the plural form of an acronym is required, the package
500 % typically obtains it as an English plural, by adding an `s'. This
501 % happens both for long and short forms. For instance, for an
502 % acronym defined as
503 % \begin{quote}
504 % |\newacro{IC}{Integrated Circuit}|
505 % \end{quote}
506 % \noindent the |\acsp{IC}| command produces ``ICs'', and the
507 % |\aclp{IC}| command produces ``Integrated Circuits''.
508 %
509 % Unfortunately, this is generally not suitable for typesetting in
510 % languages different from English, and at times it is not correct
511 % even for English. For instance consider the ``MP'' acronym,
512 % commonly used to refer to a ``Member of the Parlament''. Of
513 % course, its long form plural is not ``Member of the Parlaments'',
514 % but ``Members of the Parlament''. For the short form plural,
515 % ``MPs'' is anyway commonly accepted. The same happens with ``SOC
516 % (System on a Chip)'' or ``BUT (Block Under Test)''.
517 %
518 % In foreign languages, things can be even more complicated. For
519 % instance, in Italian, there are different rules for English
520 % acronyms used in Italian text and Italian acronyms used in
521 % Italian text. The former do not get a plural at all, neither for
522 % the long, nor for the short form as in ``Un paio di
523 % \emph{Integrated Circuit (IC)}''. The latter get a plural long
524 % form following the natural Italian rules for plurals, and a
525 % plural short form that can either be the same as the singular
526 % short form, or --- at times --- a form obtained by doubling those
527 % letter of the short form that correspond to words that get a
528 % plural in the long form. For instance: ``Nucleo Investigativo
529 % (NI)'' could take a plural as in ``Nuclei Investigativi (NNII)'',
530 % although in modern texts one is more likely to find ``Nuclei
531 % Investigativi (NI)''.
532 %
533 % To deal with all these different situations, the package (since
534 % version 1.35) has been enriched with the following three commands
535 % \DescribeMacro{\acroplural}
536 % \DescribeMacro{\newacroplural}
537 % \DescribeMacro{\acrodefplural}
538 % \begin{quote}
539 % |\acroplural{|\meta{acronym}|}[|\meta{short plural}|]{|%
540 % \meta{long plural}|}|\\
541 % |\newacroplural{|\meta{acronym}|}[|\meta{short plural}|]{|%
542 % \meta{long plural}|}|\\
543 % |\acrodefplural{|\meta{acronym}|}[|\meta{short plural}|]{|%
544 % \meta{long plural}|}|\\
545 % \end{quote}
546 % \noindent that allow one to define plural exceptions. The \cmd{\acroplural}
547 % command is meant to be used in the |acronym| environment. The
548 % difference among the latter two is that \cmd{\acrodefplural} puts
549 % the acronym definition in the |.aux| file, so that the acronym
550 % exception is available at the next run from start-up. When the
551 % optional short form is not provided, the acronym name plus an `s'
552 % is used.
553 %
554 % Plural exceptions are never reported in tables of acronyms.
555 %
556 %
557 % \subsection{Miscellaneous}
558 % \subsubsection{Sectioning and pdf marks}
559 % Acronyms are robust (since version 1.12) and can be used in
560 % sectional headers such as \cmd{\chapter}, \cmd{\section}, etc.,
561 % but please note the following:
562 % \begin{itemize}
563 % \item Do not use the general form (\cmd{\ac} or \cmd{\acp}) in
564 % sectional headers, because it will uses the full name the first time,
565 % that is in the table of contents, and the short form further on.
566 %
567 % \item The text of \meta{acronym} is used verbatim in bookmarks and
568 % not \meta{short name} for pdf\TeX\ with \texttt{hyperref}.
569 %
570 % \item When the long form of the acronym is used in sectional headers
571 % (for pdf\TeX\ with \texttt{hyperref}), it will end up in the pdf
572 % bookmarks. In that case it is good to hide unusual text such as
573 % math inside the \cmd{\texorpdfstring} defined by \texttt{hyperref},
574 % for example:
575 % \begin{quote}
576 % |\acro{Nx}[\ensuremath{N_{\chi}}]|\\
577 % | {\texorpdfstring{$\chi$}{X}-factor}|
578 % \end{quote}
579 % which will then give
580 % \begin{quote}\begin{tabbing}
581 % pdf bookmark:\quad\=|\acf{Nx}| $\rightarrow$ \textsf{X-factor (Nx)}\\
582 % text: \>|\acf{Nx}| $\rightarrow$ $\chi$-factor~($N_{\chi}$)
583 % \end{tabbing}\end{quote}
584 %
585 % \item For acronyms in sectional headers, the file must be \textsc{pdf}\LaTeX'ed
586 % 3 times before the bookmarks are correct.
587 %
588 %
589 % \item Acronyms in sectional headers together with the |footnote| option
590 % will not give reliable results, because it will end up in the running
591 % heads and table of contents. If you really need it, use the optional
592 % argument of the sectioning commands. For example:
593 % \begin{quote}
594 % |\chapter[The water \texorpdfstring{$\mathrm{H_2O}$}{H2O}) ...]|\\
595 % | {The \acf{H2O} ...}|
596 % \end{quote}
597 % \end{itemize}
598 %
599 % \clearpage
600 % \section{An example file}
601 %
602 % \begin{macrocode}
603 %<*acrotest>
604 \documentclass{article}
605 \usepackage[colorlinks]{hyperref}
606 \usepackage{amsmath}
607 \usepackage[printonlyused,withpage]{acronym}
608 \begin{document}
609
610 \section{Intro}
611 In the early nineties, \acs{GSM} was deployed in many European
612 countries. \ac{GSM} offered for the first time international
613 roaming for mobile subscribers. The \acs{GSM}'s use of \ac{TDMA} as
614 its communication standard was debated at length. And every now
615 and then there are big discussion whether \ac{CDMA} should have
616 been chosen over \ac{TDMA}.
617
618 \section{Furthermore}
619 \acresetall
620 The reader could have forgotten all the nice acronyms, so we repeat the
621 meaning again.
622
623 If you want to know more about \acf{GSM}, \acf{TDMA}, \acf{CDMA}
624 and other acronyms, just read a book about mobile communication. Just
625 to mention it: There is another \ac{UA}, just for testing purposes!
626
627 \begin{figure}[h]
628 Figure
629 \caption{A float also admits references like \ac{GSM} or \acf{CDMA}.}
630 \end{figure}
631
632 \subsection{Some chemistry and physics}
633 \label{Chem}
634 \ac{NAD+} is a major electron acceptor in the oxidation
635 of fuel molecules. The reactive part of \ac{NAD+} is its nictinamide
636 ring, a pyridine derivate.
637
638 One mol consists of \acs{NA} atoms or molecules. There is a relation
639 between the constant of Boltzmann and the \acl{NA}:
640 \begin{equation}
641 k = R/\acs{NA}\label{my:eq}
642 \end{equation}
643
644 \acl{lox}/\acl{lh2} (\acsu{lox}/\acsu{lh2})
645
646 \Acp{LFVP} are processes in which the lepton number of the initial
647 and final states are different. An example for \iac{LFVP} is
648 neutrinoless double beta decay.
649
650 \subsection{Some testing \acp{IC} fundamentals}
651 When testing \acp{IC}, one typically wants to identify functional
652 blocks to be tested separately. The latter are commonly indicated as
653 \acp{BUT}. To test a \ac{BUT} requires defining a testing strategy\dots{}
654 \Iac{IC} popped up unexpectedly.
655
656 \section{Acronyms}
657 \begin{acronym}[TDMA]
658 \acro{CDMA}{Code Division Multiple Access}
659 \acro{GSM}{Global System for Mobile communication}
660 \acro{NA}[\ensuremath{N_{\mathrm A}}]
661 {Number of Avogadro\acroextra{ (see \S\ref{Chem})}}
662 \acro{NAD+}[NAD\textsuperscript{+}]{Nicotinamide Adenine Dinucleotide}
663 \acro{LFVP}{lepton flavor violating process}
664 \acroindefinite{LFVP}{an}{a}
665 \acro{NUA}{Not Used Acronym}
666 \acro{TDMA}{Time Division Multiple Access}
667 \acro{UA}{Used Acronym}
668 \acro{lox}[\ensuremath{LOX}]{Liquid Oxygen}%
669 \acro{lh2}[\ensuremath{LH_2}]{Liquid Hydrogen}%
670 \acro{IC}{Integrated Circuit}%
671 \acro{BUT}{Block Under Test}%
672 \acrodefplural{BUT}{Blocks Under Test}%
673 \acroindefinite{IC}{an}{an}
674 \end{acronym}
675
676 \end{document}
677 %</acrotest>
678 % \end{macrocode}
679 %
680 % \StopEventually{}
681 % \clearpage
682 %
683 % \newcommand{\fnacro}{\cmd{\fn@}\texttt{\textsl{<acronym>}}}
684 %
685 %
686 %
687 % \section{The implementation}
688 % \begin{macrocode}
689 %<*acronym>
690 % \end{macrocode}
691 %
692 %
693 % \subsection{Identification}
694 %
695 % First we test that we got the right format and name the package.
696 % \begin{macrocode}
697 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
698 \ProvidesPackage{acronym}[2025/01/17
699 v1.50
700 Support for acronyms (Tobias Oetiker)]
701 \RequirePackage{suffix,xstring}
702 % \end{macrocode}
703 %
704 %
705 %
706 % \subsection{Options}
707 %
708 % \begin{macro}{\ifAC@error}
709 % The option |error| lets this package throw compile errors instead of warnings in case of undefined acronyms.
710 % \begin{macrocode}
711 \newif\ifAC@error
712 \AC@errorfalse
713 % \end{macrocode}
714 % \begin{macrocode}
715 \DeclareOption{error}{\AC@errortrue}
716 % \end{macrocode}
717 % \end{macro}
718 %
719 % \begin{macro}{\ifAC@footnote}
720 % The option |footnote| leads to a redefinition of \cmd{\acf},
721 % \cmd{\Acf}, \cmd{\acfp}, and \cmd{\Acfp}, making the full name appear
722 % as a footnote.
723 % \begin{macrocode}
724 \newif\ifAC@footnote
725 \AC@footnotefalse
726 % \end{macrocode}
727 % \begin{macrocode}
728 \DeclareOption{footnote}{\AC@footnotetrue}
729 % \end{macrocode}
730 % \end{macro}
731 %
732 % \begin{macro}{\ifAC@nohyperlinks}
733 % If hyperref is loaded, all acronyms will link to their glossary entry and the glossary entries to the first in-text use.
734 % With the option |nohyperlinks| these links can be suppressed.
735 % \begin{macrocode}
736 \newif\ifAC@nohyperlinks
737 \AC@nohyperlinksfalse
738 % \end{macrocode}
739 % \begin{macrocode}
740 \DeclareOption{nohyperlinks}{\AC@nohyperlinkstrue}
741 % \end{macrocode}
742 % \end{macro}
743 %
744 % \begin{macro}{\ifAC@noforwardlinks}
745 % If hyperref is loaded and the |nohyperlinks| option is not selected,
746 % the option |noforwardlinks| suppresses the links from the glossary entries to the in-text use.
747 % \begin{macrocode}
748 \newif\ifAC@noforwardlinks
749 \AC@noforwardlinksfalse
750 % \end{macrocode}
751 % \begin{macrocode}
752 \DeclareOption{noforwardlinks}{\AC@noforwardlinkstrue}
753 % \end{macrocode}
754 % \end{macro}
755 %
756 % \begin{macro}{\ifAC@noacroprefix}
757 % With the |noacroprefix| option the acronym commands are not prefixed. This
758 % reproduces the old behavior of version <1.43, but can cause collisions
759 % between user-defined acronyms and commands of this package.
760 % \begin{macrocode}
761 \newif\ifAC@noacroprefix
762 \AC@noacroprefixfalse
763 % \end{macrocode}
764 % \begin{macrocode}
765 \DeclareOption{noacroprefix}{\AC@noacroprefixtrue}
766 % \end{macrocode}
767 % \end{macro}
768 %
769 % \begin{macro}{\ifAC@printonlyused}
770 % We need a marker
771 % which is set if the option |printonlyused| was used.
772 % \begin{macrocode}
773 \newif\ifAC@printonlyused
774 \AC@printonlyusedfalse
775 % \end{macrocode}
776 % \begin{macrocode}
777 \DeclareOption{printonlyused}{\AC@printonlyusedtrue}
778 % \end{macrocode}
779 % \end{macro}
780 %
781 % \begin{macro}{\ifAC@printonlyreused}
782 % With the |printonlyreused| option, only those acronyms are included in the
783 % list of acronyms that have been used more than once, i.e. at least twice.
784 % \begin{macrocode}
785 \newif\ifAC@printonlyreused
786 \AC@printonlyreusedfalse
787 % \end{macrocode}
788 % \begin{macrocode}
789 \DeclareOption{printonlyreused}{\AC@printonlyreusedtrue}
790 % \end{macrocode}
791 % \end{macro}
792 %
793 % \begin{macro}{\ifAC@withpage}
794 % A marker which tells us to print page numbers.
795 % \begin{macrocode}
796 \newif\ifAC@withpage
797 \AC@withpagefalse
798 % \end{macrocode}
799 % \begin{macrocode}
800 \DeclareOption{withpage}{\AC@withpagetrue}
801 % \end{macrocode}
802 % \end{macro}
803 %
804 % \begin{macro}{\ifAC@smaller}
805 % The option |smaller| leads to a redefinition of \cmd{\acsfont}.
806 % We want to make the acronym appear smaller. Since this should
807 % be done in a context-sensitive way, we rely on the macro
808 % \cmd{\textsmaller} provided by the |relsize| package.
809 % As \cmd{\RequirePackage} cannot be used inside
810 % \cmd{\DeclareOption}, we need a boolean variable.
811 % \begin{macrocode}
812 \newif\ifAC@smaller
813 \AC@smallerfalse
814 \DeclareOption{smaller}{\AC@smallertrue}
815 % \end{macrocode}
816 % \end{macro}
817 %
818 % \begin{macro}{\ifAC@dua}
819 % The option |dua| stands for ``don't use acronyms''.
820 % It leads to a redefinition of \cmd{\ac}, \cmd{\Ac}, \cmd{\acp},
821 % and \cmd{\Acp}, making the full name appear all the time
822 % and suppressing all acronyms but the explicity requested by
823 % \cmd{\acf}, \cmd{\Acf}, \cmd{\acfp} or \cmd{\Acfp}.
824 % \begin{macrocode}
825 \newif\ifAC@dua
826 \AC@duafalse
827 \DeclareOption{dua}{\AC@duatrue}
828 % \end{macrocode}
829 % \end{macro}
830 %
831 % \begin{macro}{\ifAC@nolist}
832 % The option |nolist| stands for ``don't write the list of acronyms''.
833 % \begin{macrocode}
834 \newif\ifAC@nolist
835 \AC@nolistfalse
836 \DeclareOption{nolist}{\AC@nolisttrue\AC@nohyperlinkstrue}
837 % \end{macrocode}
838 % \end{macro}
839 %
840 % \begin{macro}{\ifAC@nolinebreak}
841 % The option |nolinebreak| dictates whether to forbid, by defalt, a line break
842 % between the full name and the short name, when they are presented together.
843 % \begin{macrocode}
844 \newif\ifAC@nolinebreak
845 \AC@nolinebreakfalse
846 \DeclareOption{nolinebreak}{\AC@nolinebreaktrue}
847 % \end{macrocode}
848 % \end{macro}
849 %
850 % Now we process the options.
851 % \begin{macrocode}
852 \ProcessOptions\relax
853 % \end{macrocode}
854 %
855 %
856 %
857 %
858 % \subsection{Setup macros}
859 %
860 % \begin{macro}{\acsfont}
861 % \begin{macro}{\acffont}
862 % \begin{macro}{\acfsfont}
863 % The appearance of the output of the commands \cmd{\acs} and
864 % \cmd{\acf} is partially controlled by \cmd{\acsfont},
865 % \cmd{\acffont}, and \cmd{\acfsfont}. By default, they do nothing
866 % except when the |smaller| option is loaded.
867 %
868 % The option |smaller| leads to a redefinition of \cmd{\acsfont}.
869 % We want to make the acronym appear smaller. Since this should
870 % be done in a context-sensitive way, we rely on the macro
871 % \cmd{\textsmaller} provided by the |relsize| package.
872 % \begin{macrocode}
873 \ifAC@smaller
874 \RequirePackage{relsize}
875 \newcommand*{\acsfont}[1]{\textsmaller{#1}}
876 \else
877 \newcommand*{\acsfont}[1]{#1}
878 \fi
879 \newcommand*{\acffont}[1]{#1}
880 \newcommand*{\acfsfont}[1]{#1}
881 % \end{macrocode}
882 % \end{macro}
883 % \end{macro}
884 % \end{macro}
885 %
886 % \begin{macro}{\AC@linebreakpenalty}
887 % When the option |nolinebreak| is specified, the default penalty for a line break
888 % is being set to the maximum. Otherwise, the default penalty is one level below
889 % the maximum, meaning that most of the times, by default, the line will not get
890 % broken.
891 %
892 % \begin{macrocode}
893 \ifAC@nolinebreak
894 \def\AC@linebreakpenalty{4}
895 \else
896 \def\AC@linebreakpenalty{3}
897 \fi
898 % \end{macrocode}
899 % \end{macro}
900 %
901 % \subsection{Hyperlinks and PDF support}
902 %
903 % \begin{macro}{\AC@hyperlink}
904 % \begin{macro}{\AC@hyperref}
905 % \begin{macro}{\AC@hypertarget}
906 % \begin{macro}{\AC@phantomsection}
907 % Define dummy hyperlink commands
908 % \begin{macrocode}
909 \def\AC@hyperlink#1#2{#2}
910 \def\AC@hyperref[#1]#2{#2}
911 \def\AC@hypertarget#1#2{#2}
912 \def\AC@phantomsection{}
913 % \end{macrocode}
914 % \end{macro}
915 % \end{macro}
916 % \end{macro}
917 % \end{macro}
918 %
919 % \begin{macro}{\AC@raisedhypertarget}
920 % Make sure that hyperlink processing gets enabled before we process
921 % the document if hyperref has been loaded in the mean time.
922 % \begin{macrocode}
923 \ifAC@nohyperlinks
924 \else
925 \AtBeginDocument{%
926 \@ifpackageloaded{hyperref}
927 {\let\AC@hyperlink=\hyperlink
928 \ifAC@noforwardlinks\else\let\AC@hyperref=\hyperref\fi
929 \newcommand*\AC@raisedhypertarget[2]{%
930 \Hy@raisedlink{\hypertarget{#1}{}}#2}%
931 \let\AC@hypertarget=\AC@raisedhypertarget
932 \def\AC@phantomsection{%
933 \Hy@GlobalStepCount\Hy@linkcounter
934 \edef\@currentHref{section*.\the \Hy@linkcounter}%
935 \Hy@raisedlink{%
936 \hyper@anchorstart{\@currentHref}\hyper@anchorend
937 }%
938 }%
939 }{}}%
940 \fi
941 % \end{macrocode}
942 % \end{macro}
943 %
944 % \begin{macro}{\AC@pageref}
945 % Use |\pageref*| instead of |\pageref| when the |hyperref| package is used.
946 % \begin{macrocode}
947 \AtBeginDocument{%
948 \@ifpackageloaded{hyperref}{%
949 \let\AC@pageref=\@pagerefstar%
950 }{%
951 \let\AC@pageref=\pageref%
952 }%
953 }
954 % \end{macrocode}
955 % \end{macro}
956 %
957 % \noindent
958 % The \texttt{hyperref} package defines \cmd{\pdfstringdefDisableCommands}
959 % and \cmd{\texorpdfstring} for text in bookmarks. If undefined, then provide them
960 % it at the beginning of the document.
961 %
962 % \begin{macrocode}
963 \AtBeginDocument{%
964 \providecommand\texorpdfstring[2]{#1}%
965 \providecommand\pdfstringdefDisableCommands[1]{}%
966 \pdfstringdefDisableCommands{%
967 \csname AC@starredfalse\endcsname
968 \csname AC@footnotefalse\endcsname
969 \let\AC@hyperlink\@secondoftwo
970 \let\acsfont\relax
971 \let\acffont\relax
972 \let\acfsfont\relax
973 \let\acused\relax
974 \let\null\relax
975 \def\AChy@call#1#2{%
976 \ifx*#1\@empty
977 \expandafter #2%
978 \else
979 #2{#1}%
980 \fi
981 }%
982 \def\acs#1{\AChy@call{#1}\AC@acs}%
983 \def\acl#1{\AChy@call{#1}\@acl}%
984 \def\Acl#1{\AChy@call{#1}\@Acl}%
985 \def\acf#1{\AChy@call{#1}\AChy@acf}%
986 \def\Acf#1{\AChy@call{#1}\AChy@Acf}%
987 \def\ac#1{\AChy@call{#1}\@ac}%
988 \def\Ac#1{\AChy@call{#1}\@Ac}%
989 \def\acsp#1{\AChy@call{#1}\@acsp}%
990 \def\aclp#1{\AChy@call{#1}\@aclp}%
991 \def\Aclp#1{\AChy@call{#1}\@Aclp}%
992 \def\acfp#1{\AChy@call{#1}\AChy@acfp}%
993 \def\Acfp#1{\AChy@call{#1}\AChy@Acfp}%
994 \def\acp#1{\AChy@call{#1}\@acp}%
995 \def\Acp#1{\AChy@call{#1}\@Acp}%
996 \def\acfi#1{\AChy@call{#1}\AChy@acf}%
997 \def\Acfi#1{\AChy@call{#1}\AChy@Acf}%
998 \def\acfip#1{\AChy@call{#1}\AChy@acfp}%
999 \def\Acfip#1{\AChy@call{#1}\AChy@Acfp}%
1000 \let\acsu\acs
1001 \let\aclu\acl
1002 \let\Aclu\Acl
1003 \def\AChy@acf#1{\AC@acl{#1} (\AC@acs{#1})}%
1004 \def\AChy@Acf#1{\AC@Acl{#1} (\AC@acs{#1})}%
1005 \def\AChy@acfp#1{\AC@aclp{#1} (\AC@acsp{#1})}%
1006 \def\AChy@Acfp#1{\AC@Aclp{#1} (\AC@acsp{#1})}%
1007 }%
1008 }
1009 % \end{macrocode}
1010 %
1011 %
1012 %
1013 % \subsection{Additional Helper macros}
1014 %
1015 %
1016 % We need a list of the used acronyms after the last \cmd{\acresetall}
1017 % (or since beginning), a token list is very useful for this purpose
1018 %
1019 % \begin{macro}{AC@clearlist}
1020 % \begin{macrocode}
1021 \newtoks\AC@clearlist
1022 % \end{macrocode}
1023 % \end{macro}
1024 %
1025 % \begin{macro}{\AC@addtoAC@clearlist}
1026 % Adds acronyms to the clear list
1027 % \begin{macrocode}
1028 \newcommand*\AC@addtoAC@clearlist[1]{%
1029 \global\AC@clearlist\expandafter{\the\AC@clearlist\AC@reset{#1}}%
1030 }
1031 % \end{macrocode}
1032 % \end{macro}
1033 %
1034 %
1035 % \begin{macro}{\acresetall}
1036 % \begin{macro}{\AC@reset}
1037 % This macro resets the |AC@FN| - tag of each acronym, therefore |\ac|
1038 % will use Full Name (FN) next time it is called
1039 % \begin{macrocode}
1040 \newcommand*\acresetall{\the\AC@clearlist\AC@clearlist={}}
1041 % \end{macrocode}
1042 % \begin{macrocode}
1043 \def\AC@reset#1{%
1044 \global\expandafter\let\csname AC@\AC@prefix#1\endcsname\relax
1045 }
1046 % \end{macrocode}
1047 % \end{macro}
1048 % \end{macro}
1049 %
1050 % \begin{macro}{\AC@used}
1051 % We also need a markers for 'used'.
1052 % \begin{macrocode}
1053 \newcommand*\AC@used{@<>@<>@}
1054 % \end{macrocode}
1055 % \end{macro}
1056 %
1057 % \begin{macro}{\AC@populated}
1058 % An on/off flag to note if any acronyms were logged. This
1059 % is needed for the first run with |printonly(re)used| option,
1060 % because the acronym list are then empty, resulting in a
1061 % |"missing item"| error.
1062 %
1063 % \begin{macrocode}
1064 \newcommand{\AC@populated}{}
1065 % \end{macrocode}
1066 % \end{macro}
1067 %
1068 %
1069 % \begin{macro}{\AC@logged}
1070 % \begin{macro}{\acronymused}
1071 % Log the usage by writing the \cmd{\acronymused}
1072 % to the |aux| file and
1073 % by reading it back again at the beginning of the
1074 % document (performed automatically by LaTeX).
1075 % This results in processing the document twice,
1076 % but it is needed anyway for the rest of the
1077 % package.
1078 %
1079 % This methodology is needed when the list of
1080 % acronyms is in the front matter of the document.
1081 % \begin{macrocode}
1082 \newcommand*{\AC@logged}[1]{%
1083 \@bsphack
1084 \protected@write\@auxout{}{\string\acronymused{#1}}%
1085 \@esphack}
1086 % \end{macrocode}
1087 % Keep it out of bookmarks.
1088 % \begin{macrocode}
1089 \AtBeginDocument{%
1090 \pdfstringdefDisableCommands{%
1091 \let\AC@logged\@gobble
1092 }%
1093 }
1094 % \end{macrocode}
1095 % Flag the acronym at the beginning of the document as used
1096 % (called by the \texttt{aux} file).
1097 % \begin{macrocode}
1098 \newcommand*{\acronymused}[1]{%
1099 \expandafter\ifx\csname acused@#1@once\endcsname\AC@used%
1100 \expandafter\ifx\csname acused@#1@twice\endcsname\AC@used%
1101 \relax%
1102 \else%
1103 \global\expandafter\let\csname acused@#1@twice\endcsname\AC@used%
1104 \global\let\AC@populated\AC@used%
1105 \fi%
1106 \else%
1107 \global\expandafter\let\csname acused@#1@once\endcsname\AC@used%
1108 \ifAC@printonlyreused%
1109 \relax%
1110 \else%
1111 \global\let\AC@populated\AC@used%
1112 \fi%
1113 \fi%
1114 }
1115 % \end{macrocode}
1116 % \end{macro}
1117 % \end{macro}
1118 %
1119 % \begin{macro}{\@firstupper,\@firstupper@maybe}
1120 % Internal commands for making a first letter upper case.
1121 % \begin{macrocode}
1122 \newcommand{\@firstupper}[1]{%
1123 \StrSplit{#1}{1}{\head}{\tail}%
1124 \MakeUppercase\head\tail%
1125 }
1126 \newcommand{\@firstupper@maybe}{%
1127 \ifAC@upper
1128 \expandafter\@firstupper
1129 \else
1130 \expandafter\@firstofone
1131 \fi
1132 }
1133 % \end{macrocode}
1134 % \end{macro}
1135 %
1136 % \begin{macro}{AC@prefix}
1137 % Returns the prefix used to build the defined acronym commands as long as
1138 % the |noacroprefix| option is disabled. Otherwise the output is empty, so
1139 % the old behaviour from version <1.43 is reproduced.
1140 % \begin{macrocode}
1141 \ifAC@noacroprefix
1142 \newcommand*\AC@prefix{}
1143 \else
1144 \newcommand*\AC@prefix{acronyms@}
1145 \fi
1146 % \end{macrocode}
1147 % \end{macro}
1148 %
1149 % \subsection{Defining acronyms}
1150 %
1151 % There are three commands that define acronyms:
1152 % \cmd{\newacro}, \cmd{\acrodef}, and \cmd{\acro}.
1153 % They are called with the following arguments:
1154 % \begin{quote}
1155 % |\acro{|\meta{acronym}|}[|\meta{short name}^^A
1156 % |]{|\meta{full name}|}|
1157 % \end{quote}
1158 % The mechanism used in this package is to make the
1159 % optional \meta{short name} identical to the \meta{acronym} when it
1160 % is empty (no optional argument), thereby only the second (optional) argument
1161 % is stored together with the \meta{full name}.
1162 %
1163 % \begin{macro}{\newacro}
1164 % \begin{macro}{\AC@newacro}
1165 % The internal macro \cmd{\newacro} stores the
1166 % \meta{short name} and the \meta{full name} in the
1167 % command \fnacro.
1168 % \begin{macrocode}
1169 \newcommand*\newacro[1]{%
1170 \@ifnextchar[{\AC@newacro{#1}}{\AC@newacro{#1}[#1]}}
1171 % \end{macrocode}
1172 % \begin{macrocode}
1173 \newcommand\AC@newacro{}
1174 \def\AC@newacro#1[#2]#3{%
1175 \expandafter\gdef\csname fn@#1\endcsname{{#2}{#3}}%
1176 }
1177 % \end{macrocode}
1178 % \end{macro}
1179 % \end{macro}
1180 %
1181 % \begin{macro}{\acrodef}
1182 % \begin{macro}{\AC@acrodef}
1183 % The user command \cmd{\acrodef} calls \cmd{\newacro} and
1184 % writes it into the |.aux| file.
1185 % \begin{macrocode}
1186 \newcommand*\acrodef[1]{%
1187 \@ifnextchar[{\AC@acrodef{#1}}{\AC@acrodef{#1}[#1]}}
1188 % \end{macrocode}
1189 % \begin{macrocode}
1190 \newcommand\AC@acrodef{}
1191 \def\AC@acrodef#1[#2]#3{%
1192 \@bsphack
1193 \protected@write\@auxout{}{\string\newacro{#1}[#2]{#3}}%
1194 \@esphack}
1195 % \end{macrocode}
1196 % \end{macro}
1197 % \end{macro}
1198 %
1199 %
1200 % \begin{environment}{AC@deflist}
1201 % In standard mode, the acronym list is formatted with a description
1202 % environment. If an optional argument is passed to the acronym
1203 % environment, the list is formatted as a AC@deflist, which needs the
1204 % longest appearing acronym as parameter. If the option 'nolist' is selected
1205 % the enviroment is empty.
1206 % \begin{macrocode}
1207 \newcommand*{\aclabelfont}[1]{\textbf{\acsfont{#1}}}
1208 \def\AC@makelabel#1{#1\hfil}
1209 \newenvironment{AC@deflist}[1]%
1210 {\ifAC@nolist%
1211 \else%
1212 \raggedright\begin{list}{}%
1213 {\settowidth{\labelwidth}{\AC@makelabel{\aclabelfont{#1}}}%
1214 \setlength{\leftmargin}{\labelwidth}%
1215 \addtolength{\leftmargin}{\labelsep}%
1216 \renewcommand{\makelabel}{\AC@makelabel}}%
1217 \fi}%
1218 {\ifAC@nolist%
1219 \else%
1220 \end{list}%
1221 \fi}%
1222 % \end{macrocode}
1223 % \end{environment}
1224 %
1225 % \begin{environment}{acronym}
1226 % In the 'acronym' - environment, all acronyms are defined, and printed
1227 % if they have been used before, which is indicated by the acused-tag.
1228 %
1229 % \begin{quote}
1230 % |\begin{acronym}|\\
1231 % |\acro{CDMA}{Code Division Multiple Access\acroextra{\ ...}}|\\
1232 % |\end{acronym}|
1233 % \end{quote}
1234 %
1235 % \begin{macro}{\acroextra}
1236 % Additional information can be added after to \cmd{\acro}
1237 % definition for display in the list of acronyms. This command
1238 % is only active inside the |acronym| environment. Outside it
1239 % gobbles up its argument.
1240 % \begin{macrocode}
1241 \newcommand{\acroextra}[1]{}
1242 % \end{macrocode}
1243 %
1244 % \begin{macro}{\acro}
1245 % Acronyms can be defined with the user command \cmd{\acro}
1246 % inside the |acronym| environment.
1247 %
1248 % \begin{macrocode}
1249 \newenvironment{acronym}[1][1]{%
1250 \providecommand*{\acro}{\AC@acro}%
1251 \providecommand*{\acroplural}{\AC@acroplural}%
1252 \providecommand*{\acroindefinite}{\AC@acroindefinite}%
1253 \long\def\acroextra##1{##1}%
1254 \def\@tempa{1}\def\@tempb{#1}%
1255 \ifx\@tempa\@tempb%
1256 \global\expandafter\let\csname AC@des@mark\endcsname\AC@used%
1257 \ifAC@nolist%
1258 \else%
1259 \begin{description}%
1260 \fi%
1261 \else%
1262 \begin{AC@deflist}{#1}%
1263 \fi%
1264 }%
1265 {%
1266 \ifx\AC@populated\AC@used\else%
1267 \ifAC@nolist%
1268 \else%
1269 \item[]\relax%
1270 \fi%
1271 \fi%
1272 \expandafter\ifx\csname AC@des@mark\endcsname\AC@used%
1273 \ifAC@nolist%
1274 \else%
1275 \end{description}%
1276 \fi%
1277 \else%
1278 \end{AC@deflist}%
1279 \fi}%
1280 % \end{macrocode}
1281 % \end{macro}
1282 % \end{macro}
1283 % \end{environment}
1284 %
1285 % \begin{macro}{\AC@acro}
1286 % \begin{macro}{\AC@@acro}
1287 % \begin{macrocode}
1288 \newcommand*\AC@acro[1]{%
1289 \@ifnextchar[{%
1290 \csname AC@\AC@prefix{}@acro\endcsname{#1}%
1291 }{%
1292 \csname AC@\AC@prefix{}@acro\endcsname{#1}[#1]%
1293 }%
1294 }
1295 % \end{macrocode}
1296 % \begin{macrocode}
1297 \expandafter\newcommand\csname AC@\AC@prefix{}@acro\endcsname{}
1298 \expandafter\def\csname AC@\AC@prefix{}@acro\endcsname#1[#2]#3{%
1299 \ifAC@nolist%
1300 \else%
1301 \ifnum%
1302 \ifAC@printonlyused 1%
1303 \else\ifAC@printonlyreused 1%
1304 \else 0\fi\fi%
1305 =1\relax%
1306 \ifnum%
1307 \ifAC@printonlyused%
1308 \expandafter\ifx\csname acused@#1@once\endcsname\AC@used 1 \else 0 \fi%
1309 \else\ifAC@printonlyreused%
1310 \expandafter\ifx\csname acused@#1@twice\endcsname\AC@used 1 \else 0 \fi%
1311 \else 0 \fi\fi%
1312 =1\relax%
1313 \item[\protect\AC@hypertarget{#1}{%
1314 \AC@hyperref[acro:#1]{\aclabelfont{#2}\hfill}%
1315 }]\AC@hyperref[acro:#1]{#3}%
1316 \ifAC@withpage%
1317 \expandafter\ifx\csname r@acro:#1\endcsname\relax%
1318 \PackageInfo{acronym}{%
1319 Acronym #1 used in text but not spelled out in
1320 full in text}%
1321 \else%
1322 \nobreak\leaders\hbox{$\m@th\mkern\@dotsep mu\hbox{.}\mkern\@dotsep mu$}\hfill%
1323 \nobreak\hb@xt@\@pnumwidth{%
1324 \hfil\normalfont\normalcolor\AC@pageref{acro:#1}%
1325 }%
1326 \fi%
1327 \fi\\%
1328 \fi%
1329 \else%
1330 \item[\protect\AC@hypertarget{#1}{\AC@hyperref[acro:#1]{\aclabelfont{#2}\hfill}}]\AC@hyperref[acro:#1]{#3}%
1331 \fi%
1332 \fi%
1333 \begingroup
1334 \def\acroextra##1{}%
1335 \@bsphack
1336 \ifAC@printonlyreused%
1337 \protected@write\@auxout{}{%
1338 \string\newacro{#1}[%
1339 \expandafter\ifx\csname acused@#1@twice\endcsname\AC@used%
1340 \string\AC@hyperlink{#1}{#2}%
1341 \else%
1342 {#2}%
1343 \fi%
1344 ]{#3}%
1345 }%
1346 \else%
1347 \protected@write\@auxout{}{%
1348 \string\newacro{#1}[\string\AC@hyperlink{#1}{#2}]{#3}%
1349 }%
1350 \fi%
1351 \@esphack
1352 \endgroup
1353 \ignorespaces}
1354 % \end{macrocode}
1355 % \end{macro}
1356 % \end{macro}
1357 %
1358 %
1359 % \subsubsection{Nonstandard indefinite articles}
1360 %
1361 % \begin{macro}{\newacroindefinite}
1362 % Sets up a non standard indefinite article for a given acronym.
1363 % \begin{macrocode}
1364 \newcommand*\newacroindefinite[3]{%
1365 \expandafter\gdef\csname fn@#1@IS\endcsname{#2}%
1366 \expandafter\gdef\csname fn@#1@IL\endcsname{#3}%
1367 }
1368 % \end{macrocode}
1369 % \end{macro}
1370 %
1371 % \begin{macro}{\acrodefindefinite}
1372 % Same as above, storing content in aux file.
1373 % \begin{macrocode}
1374 \newcommand*\acrodefindefinite[3]{%
1375 \@bsphack
1376 \protected@write\@auxout{}{\string\newacroindefinite{#1}{#2}{#3}}%
1377 \@esphack
1378 }
1379 % \end{macrocode}
1380 % \end{macro}
1381 %
1382 % \begin{macro}{\AC@acroindefinite}
1383 % Internal command to set up an indefinite article in the
1384 % acronym environment.
1385 % \begin{macrocode}
1386 \newcommand\AC@acroindefinite[3]{
1387 \@bsphack
1388 \protected@write\@auxout{}%
1389 {\string\newacroindefinite{#1}{#2}{#3}}%
1390 \@esphack
1391 }
1392 % \end{macrocode}
1393 % \end{macro}
1394 %
1395 % \subsubsection{Non standard or foreign plural forms}
1396 %
1397 % \begin{macro}{\newacroplural}
1398 % \begin{macro}{\AC@newacroplurali}
1399 % \begin{macro}{\AC@newacropluralii}
1400 % Sets up a non standard plural form for a given acronym.
1401 % \begin{macrocode}
1402 \newcommand*\newacroplural[1]{%
1403 \@ifnextchar[%]
1404 {\AC@newacroplurali{#1}}{\AC@newacropluralii{#1}}%
1405 }
1406 \newcommand\AC@newacroplurali{}
1407 \def\AC@newacroplurali#1[#2]#3{%
1408 \expandafter\gdef\csname fn@#1@PS\endcsname{#2}%
1409 \expandafter\gdef\csname fn@#1@PL\endcsname{#3}%
1410 }
1411 \newcommand\AC@newacropluralii[2]{%
1412 \expandafter\gdef\csname fn@#1@PL\endcsname{#2}%
1413 }
1414 % \end{macrocode}
1415 % \end{macro}
1416 % \end{macro}
1417 % \end{macro}
1418 %
1419 % \begin{macro}{\acrodefplural}
1420 % \begin{macro}{\AC@acrodefplurali}
1421 % \begin{macro}{\AC@acrodefpluralii}
1422 % Same as above, storing content in aux file.
1423 % \begin{macrocode}
1424 \newcommand*\acrodefplural[1]{%
1425 \@ifnextchar[%]
1426 {\AC@acrodefplurali{#1}}{\AC@acrodefpluralii{#1}}%
1427 }
1428 \newcommand\AC@acrodefplurali{}
1429 \def\AC@acrodefplurali#1[#2]#3{%
1430 \@bsphack
1431 \protected@write\@auxout{}{\string\newacroplural{#1}[#2]{#3}}%
1432 \@esphack
1433 }
1434 \newcommand\AC@acrodefpluralii[2]{%
1435 \@bsphack
1436 \protected@write\@auxout{}{\string\newacroplural{#1}{#2}}%
1437 \@esphack
1438 }
1439 % \end{macrocode}
1440 % \end{macro}
1441 % \end{macro}
1442 % \end{macro}
1443 %
1444 % \begin{macro}{\AC@acroplural}
1445 % \begin{macro}{\AC@acroplurali}
1446 % \begin{macro}{\AC@acropluralii}
1447 % Internal commands to set up a plural version of an acronym in the
1448 % acronym environment.
1449 % \begin{macrocode}
1450 \newcommand*\AC@acroplural[1]{%
1451 \@ifnextchar[%]
1452 {\AC@acroplurali{#1}}{\AC@acropluralii{#1}}%
1453 }
1454 \newcommand\AC@acroplurali{}
1455 \def\AC@acroplurali#1[#2]#3{%
1456 \@bsphack
1457 \protected@write\@auxout{}%
1458 {\string\newacroplural{#1}[\string\AC@hyperlink{#1}{#2}]{#3}}%
1459 \@esphack
1460 }
1461 \newcommand\AC@acropluralii[2]{
1462 \@bsphack
1463 \protected@write\@auxout{}%
1464 {\string\newacroplural{#1}[\string\AC@hyperlink{#1}{\AC@acs{#1}}]{#2}}%
1465 \@esphack
1466 }
1467 % \end{macrocode}
1468 % \end{macro}
1469 % \end{macro}
1470 % \end{macro}
1471 %
1472 %
1473 % \begin{macro}{\AC@aclp}
1474 % \begin{macro}{\AC@Aclp}
1475 % \begin{macro}{\AC@acsp}
1476 % Deliver either standard or nonstandard plural form (long and short
1477 % respectively).
1478 % \begin{macrocode}
1479 \newcommand*\AC@aclp[1]{%
1480 \ifcsname fn@#1@PL\endcsname
1481 \@firstupper@maybe{\csname fn@#1@PL\endcsname}%
1482 \else
1483 \AC@acl{#1}s%
1484 \fi
1485 }
1486 \newcommand*\AC@Aclp[1]{%
1487 \AC@uppertrue%
1488 \AC@aclp{#1}%
1489 \AC@upperfalse%
1490 }
1491 \newcommand*\AC@acsp[1]{%
1492 \ifcsname fn@#1@PS\endcsname
1493 \csname fn@#1@PS\endcsname
1494 \else
1495 \AC@acs{#1}s%
1496 \fi
1497 }
1498 % \end{macrocode}
1499 % \end{macro}
1500 % \end{macro}
1501 % \end{macro}
1502 %
1503 % \subsection{Using acronyms}
1504 %
1505 %
1506 % \begin{macro}{\ifAC@starred}
1507 % Before the macros are defined, we need a boolean variable which will
1508 % be set to true or false, when the following commands are used in the
1509 % starred or unstarred form. If it is true, the acronym will be not be
1510 % logged, otherwhise it will be logged.
1511 % \begin{macrocode}
1512 \newif\ifAC@starred
1513 % \end{macrocode}
1514 % \end{macro}
1515 %
1516 % \begin{macro}{\ifAC@upper}
1517 % If an acronym needs to be capitalized, this flag is used to indicate
1518 % this at an appropriate point in the code. In that case, the firstupper
1519 % command will be called at a time when the acronym is expandable, otherwise
1520 % the xstring command will not work properly.
1521 % \begin{macrocode}
1522 \newif\ifAC@upper
1523 % \end{macrocode}
1524 % \end{macro}
1525 %
1526 % \begin{macro}{\AC@logundefined}
1527 % The internal macro \cmd{\AC@logundefined} either throws a warning or an error
1528 % (if option |error| is set) and prints the name of the acronym in bold with an exclamation
1529 % mark at the end.
1530 % \begin{macrocode}
1531 \newcommand\AC@logundefined[1]{%
1532 \ifAC@error%
1533 \ifx\AC@populated\AC@used%
1534 \PackageError{acronym}{#1}{You should define the acronym with
1535 \protect\acrodef, \protect\newacro, or \protect\acro.}
1536 \else%
1537 \PackageWarning{acronym}{#1}%
1538 \fi%
1539 \else%
1540 \PackageWarning{acronym}{#1}%
1541 \fi%
1542 }
1543 % \end{macrocode}
1544 % \end{macro}
1545 %
1546 % \begin{macro}{\AC@get}
1547 % If the acronym is undefined, call the internal macro \cmd{\AC@undefined}
1548 % for error handling.
1549 % If defined, \cmd{\AC@get} uses the same mechanism used by the LaTeX
1550 % kernel commands \cmd{\ref} and \cmd{\pageref} to return the short
1551 % \cmd{\AC@acs} and long forms \cmd{\AC@acl} of the acronym
1552 % saved in \fnacro.
1553 % \begin{macrocode}
1554 \newcommand*\AC@get[3]{%
1555 \ifx#1\relax
1556 \AC@logundefined{Acronym #3 is not defined}%
1557 \textbf{#3!}%
1558 \else
1559 \@firstupper@maybe{\expandafter#2#1}%
1560 \fi
1561 }
1562 % \end{macrocode}
1563 % \end{macro}
1564 %
1565 % \begin{macro}{\AC@acs}
1566 % \begin{macro}{\AC@acl}
1567 % \begin{macro}{\AC@Acl}
1568 % The internal commands \cmd{\AC@acs} and \cmd{\AC@acl} returns
1569 % the (unformatted) short and the long forms of an acronym as
1570 % saved in \fnacro. Mbox to prevent hyphenation of short form.
1571 % \begin{macrocode}
1572 \newcommand*\AC@acs[1]{%
1573 \mbox{\expandafter\AC@get\csname fn@#1\endcsname\@firstoftwo{#1}}}
1574 % \end{macrocode}
1575 % \begin{macrocode}
1576 \newcommand*\AC@acl[1]{%
1577 \expandafter\AC@get\csname fn@#1\endcsname\@secondoftwo{#1}}
1578 % \end{macrocode}
1579 % \begin{macrocode}
1580 \newcommand*\AC@Acl[1]{%
1581 \AC@uppertrue%
1582 \AC@acl{#1}%
1583 \AC@upperfalse%
1584 }
1585 % \end{macrocode}
1586 % \end{macro}
1587 % \end{macro}
1588 % \end{macro}
1589 %
1590 % \begin{macro}{\acs}
1591 % \begin{macro}{\acsa}
1592 % \begin{macro}{\@acs}
1593 % The user macro \cmd{\acs} prints the short form of the acronym
1594 % using the font specified by \cmd{\acsfont}.
1595 % \begin{macrocode}
1596 \newcommand*{\acs}{\AC@starredfalse\protect\acsa}%
1597 \WithSuffix\newcommand\acs*{\AC@starredtrue\protect\acsa}%
1598 % \end{macrocode}
1599 % \begin{macrocode}
1600 \newcommand*{\acsa}[1]{%
1601 \texorpdfstring{\protect\@acs{#1}}{#1}}
1602 % \end{macrocode}
1603 % \begin{macrocode}
1604 \newcommand*{\@acs}[1]{%
1605 \acsfont{\AC@placelabel@part{#1}\AC@acs{#1}}%
1606 %% having a footnote on acs sort of defeats the purpose
1607 %% \ifAC@footnote
1608 %% \footnote{\AC@acl{#1}{}}%
1609 %% \fi
1610 \ifAC@starred\else\AC@logged{#1}\fi}
1611 % \end{macrocode}
1612 % \end{macro}
1613 % \end{macro}
1614 % \end{macro}
1615 %
1616 % \begin{macro}{\acl}
1617 % \begin{macro}{\@acl}
1618 % \begin{macro}{\Acl}
1619 % \begin{macro}{\@Acl}
1620 % The user macro \cmd{\acl} prints the full name of the
1621 % acronym.
1622 % \begin{macrocode}
1623 \newcommand*{\acl}{\AC@starredfalse\protect\@acl}%
1624 \WithSuffix\newcommand\acl*{\AC@starredtrue\protect\@acl}%
1625 % \end{macrocode}
1626 % \begin{macrocode}
1627 \newcommand*{\Acl}{\AC@starredfalse\protect\@Acl}%
1628 \WithSuffix\newcommand\Acl*{\AC@starredtrue\protect\@Acl}%
1629 % \end{macrocode}
1630 % \begin{macrocode}
1631 \newcommand*{\@acl}[1]{%
1632 \AC@placelabel@part{#1}\AC@acl{#1}%
1633 \ifAC@starred\else\AC@logged{#1}\fi}
1634 % \end{macrocode}
1635 % \begin{macrocode}
1636 \newcommand*{\@Acl}[1]{%
1637 \AC@placelabel@part{#1}\AC@Acl{#1}%
1638 \ifAC@starred\else\AC@logged{#1}\fi}
1639 % \end{macrocode}
1640 % \end{macro}
1641 % \end{macro}
1642 % \end{macro}
1643 % \end{macro}
1644 %
1645 % \subsection{Helper functions to unset labels}
1646 %
1647 % \begin{macro}{\AC@verridelabel} The internal \cmd{\AC@verridelabel}
1648 % command lets us 'redefine' an acronym label such that the page
1649 % reference in the acronym list points where it should be pointing and
1650 % not just to the very first occurrence of the acronym, where it may not
1651 % even be expanded. (code by Ulrich Diez).
1652 %
1653 % \begin{macrocode}
1654 \newcommand*\AC@verridelabel[1]{%
1655 \@bsphack
1656 \protected@write\@auxout{}{\string\AC@undonewlabel{#1}}%
1657 \ifdefined\ltx@label%
1658 \ltx@label{#1}%
1659 \else%
1660 \label{#1}%
1661 \fi%
1662 \AC@overriddenmessage rs{#1}%
1663 \@esphack
1664 }%
1665 \newcommand*\AC@undonewlabel{\AC@und@newl@bel rs}%
1666 \newcommand*\AC@und@newl@bel[3]{%
1667 \@ifundefined{#1@#3}%
1668 {%
1669 \global\expandafter\let\csname#2@#3\endcsname\@nnil
1670 }%
1671 {%
1672 \global\expandafter\let\csname#1@#3\endcsname\relax
1673 }%
1674 }%
1675 \newcommand*\AC@overriddenmessage[3]{%
1676 \expandafter\ifx\csname#2@#3\endcsname\@nnil
1677 \expandafter\@firstoftwo
1678 \else
1679 \@ifundefined{#1@#3}%
1680 {%
1681 \@ifundefined{#2@#3}%
1682 {\expandafter\@firstoftwo}%
1683 {\expandafter\@secondoftwo}%
1684 }%
1685 {\expandafter\@secondoftwo}%
1686 \fi
1687 {%
1688 \PackageInfo{acronym}{Label `#3' newly defined as it
1689 shall be overridden^^Jalthough it is yet undefined}%
1690 \global\expandafter\let\csname#2@#3\endcsname\empty
1691 }%
1692 {%
1693 \PackageInfo{acronym}{Label `#3' overridden}%
1694 \@ifundefined{#2@#3}{%
1695 \global\expandafter\let\csname#2@#3\endcsname\empty}{}%
1696 \expandafter\g@addto@macro\csname#2@#3\endcsname{i}%
1697 }%
1698 }%
1699 \newcommand*\AC@testdef[3]{%
1700 \@ifundefined{s@#2}\@secondoftwo\@firstofone
1701 {%
1702 \expandafter\ifx\csname s@#2\endcsname\empty
1703 \expandafter\@firstofone
1704 \else
1705 \expandafter\xdef\csname s@#2\endcsname{%
1706 \expandafter\expandafter
1707 \expandafter\@gobble
1708 \csname s@#2\endcsname
1709 }%
1710 \expandafter\@gobble
1711 \fi
1712 }%
1713 {%
1714 \@testdef{#1}{#2}{#3}%
1715 }%
1716 }%
1717 \AtBeginDocument{\immediate\write\@auxout{\string\AC@reset@newl@bel}}
1718 \newcommand*\AC@reset@newl@bel{%
1719 \ifx\@newl@bel\@testdef
1720 \let\@newl@bel\AC@testdef
1721 \let\AC@undonewlabel\@gobble
1722 \fi
1723 }%
1724 \newcommand*\AC@placelabel@part[1]{%
1725 \expandafter\ifx\csname AC@\AC@prefix#1\endcsname\AC@used
1726 \else
1727 \texorpdfstring{\AC@phantomsection\AC@verridelabel{acro:#1}}{}%
1728 \fi
1729 }%
1730 \newcommand*\AC@placelabel[1]{%
1731 \expandafter\ifx\csname AC@\AC@prefix#1\endcsname\AC@used
1732 \else
1733 {\AC@phantomsection\AC@verridelabel{acro:#1}}%
1734 \ifAC@starred\else%
1735 \global\expandafter\let\csname AC@\AC@prefix#1\endcsname\AC@used
1736 \fi%
1737 \AC@addtoAC@clearlist{#1}%
1738 \fi
1739 }%
1740 % \end{macrocode}
1741 % \end{macro}
1742 %
1743 %
1744 % \begin{macro}{\acf}
1745 % \begin{macro}{\acfa}
1746 % \begin{macro}{\@acf}
1747 % \begin{macro}{\Acf}
1748 % \begin{macro}{\Acfa}
1749 % \begin{macro}{\@Acf}
1750 % The user macro \cmd{\acf} always prints the full name with
1751 % the acronym. The format depends on \cmd{\acffont} and
1752 % \cmd{\acfsfont}, and on the option |footnote| handled below.
1753 % The acronym is added to the clear list to keep track of the
1754 % used acronyms and it is marked as used by by |\gdef|ining
1755 % the |\AC@FN| to be |\AC@used| after its first use.
1756 %
1757 % The option |footnote| leads to a redefinition of \cmd{\acf},
1758 % making the full name appear as a footnote. There is then
1759 % no need for \cmd{\acffont} and \cmd{\acfsfont}. If the option
1760 % |footnote| is not specified, the optional variable determines
1761 % the penalty for a line break.
1762 % \begin{macrocode}
1763 \newcommand*{\acf}{\AC@starredfalse\protect\acfa}%
1764 \WithSuffix\newcommand\acf*{\AC@starredtrue\protect\acfa}%
1765 % \end{macrocode}
1766 % \begin{macrocode}
1767 \newcommand*{\Acf}{\AC@starredfalse\protect\Acfa}%
1768 \WithSuffix\newcommand\Acf*{\AC@starredtrue\protect\Acfa}%
1769 % \end{macrocode}
1770 % \begin{macrocode}
1771 \newcommand*{\acfa}[2][\AC@linebreakpenalty]{%
1772 \texorpdfstring{\protect\@acf[#1]{#2}}{\AC@acl{#2} (#2)}}
1773 % \end{macrocode}
1774 % \begin{macrocode}
1775 \newcommand*{\Acfa}[2][\AC@linebreakpenalty]{%
1776 \texorpdfstring{\protect\@Acf[#1]{#2}}{\AC@Acl{#2} (#2)}}
1777 % \end{macrocode}
1778 % \begin{macrocode}
1779 \newcommand*{\@acf}[2][\AC@linebreakpenalty]{%
1780 \ifAC@footnote
1781 \acsfont{\AC@acs{#2}}%
1782 \footnote{\AC@placelabel{#2}\AC@acl{#2}{}}%
1783 \else
1784 \acffont{%
1785 \AC@placelabel{#2}\AC@acl{#2}%
1786 \nolinebreak[#1] %
1787 \acfsfont{(\acsfont{\AC@acs{#2}})}%
1788 }%
1789 \fi
1790 \ifAC@starred\else\AC@logged{#2}\fi}
1791 % \end{macrocode}
1792 % \begin{macrocode}
1793 \newcommand*{\@Acf}[2][\AC@linebreakpenalty]{%
1794 \ifAC@footnote
1795 \acsfont{\AC@acs{#2}}%
1796 \footnote{\AC@placelabel{#2}\AC@Acl{#2}{}}%
1797 \else
1798 \acffont{%
1799 \AC@placelabel{#2}\AC@Acl{#2}%
1800 \nolinebreak[#1] %
1801 \acfsfont{(\acsfont{\AC@acs{#2}})}%
1802 }%
1803 \fi
1804 \ifAC@starred\else\AC@logged{#2}\fi}
1805 % \end{macrocode}
1806 % \end{macro}
1807 % \end{macro}
1808 % \end{macro}
1809 % \end{macro}
1810 % \end{macro}
1811 % \end{macro}
1812 %
1813 % \begin{macro}{\ac}
1814 % \begin{macro}{\@ac}
1815 % \begin{macro}{\Ac}
1816 % \begin{macro}{\@Ac}
1817 % The first time an acronym is accessed its Full Name (FN) is
1818 % printed. The next time just (FN). When the |footnote| option is
1819 % used the short form (FN) is always used. The optional variable
1820 % is being passed to \cmd{\acf}, in case it is used.
1821 % \begin{macrocode}
1822 \newcommand*{\ac}{\AC@starredfalse\protect\@ac}%
1823 \WithSuffix\newcommand\ac*{\AC@starredtrue\protect\@ac}%
1824 % \end{macrocode}
1825 % \begin{macrocode}
1826 \newcommand*{\Ac}{\AC@starredfalse\protect\@Ac}%
1827 \WithSuffix\newcommand\Ac*{\AC@starredtrue\protect\@Ac}%
1828 % \end{macrocode}
1829 % \begin{macrocode}
1830 \newcommand{\@ac}[2][\AC@linebreakpenalty]{%
1831 \ifAC@dua
1832 \ifAC@starred\acl*{#2}\else\acl{#2}\fi%
1833 \else
1834 \expandafter\ifx\csname AC@\AC@prefix#2\endcsname\AC@used%
1835 \ifAC@starred\acs*{#2}\else\acs{#2}\fi%
1836 \else
1837 \ifAC@starred\acf*[#1]{#2}\else\acf[#1]{#2}\fi%
1838 \fi
1839 \fi}
1840 % \end{macrocode}
1841 % \begin{macrocode}
1842 \newcommand{\@Ac}[2][\AC@linebreakpenalty]{%
1843 \ifAC@dua
1844 \ifAC@starred\Acl*{#2}\else\Acl{#2}\fi%
1845 \else
1846 \expandafter\ifx\csname AC@\AC@prefix#2\endcsname\AC@used%
1847 \ifAC@starred\acs*{#2}\else\acs{#2}\fi%
1848 \else
1849 \ifAC@starred\Acf*[#1]{#2}\else\Acf[#1]{#2}\fi%
1850 \fi
1851 \fi}
1852 % \end{macrocode}
1853 % \end{macro}
1854 % \end{macro}
1855 % \end{macro}
1856 % \end{macro}
1857 %
1858 % \begin{macro}{\iac}
1859 % \begin{macro}{\@iac}
1860 % \begin{macro}{\@iaci}
1861 % \begin{macro}{\Iac}
1862 % \begin{macro}{\@Iac}
1863 % Indefinite article correct expansion. The optional variable
1864 % is being passed to \cmd{\ac}.
1865 % \begin{macrocode}
1866 \newcommand*{\iac}{\AC@starredfalse\protect\@iac}%
1867 \WithSuffix\newcommand\iac*{\AC@starredtrue\protect\@iac}%
1868 \newcommand*{\Iac}{\AC@starredfalse\protect\@Iac}%
1869 \WithSuffix\newcommand\Iac*{\AC@starredtrue\protect\@Iac}%
1870 % \end{macrocode}
1871 % \begin{macrocode}
1872 \newcommand*{\@iaci}[1]{%
1873 \ifcsname fn@#1@IL\endcsname
1874 \ifAC@dua
1875 \@firstupper@maybe{\csname fn@#1@IL\endcsname}%
1876 \else
1877 \expandafter\ifx\csname AC@\AC@prefix#1\endcsname\AC@used%
1878 \csname fn@#1@IS\endcsname%
1879 \else
1880 \@firstupper@maybe{\csname fn@#1@IL\endcsname}%
1881 \fi
1882 \fi
1883 \else
1884 a%
1885 \fi
1886 }
1887 \newcommand*{\@iac}[2][\AC@linebreakpenalty]{%
1888 \@iaci{#2} \ifAC@starred\ac*[#1]{#2}\else\ac[#1]{#2}\fi%
1889 }
1890 \newcommand*{\@Iac}[2][\AC@linebreakpenalty]{%
1891 \@firstupper{\@iaci{#2}}\space%
1892 \ifAC@starred\ac*[#1]{#2}\else\ac[#1]{#2}\fi%
1893 }
1894 % \end{macrocode}
1895 % \end{macro}
1896 % \end{macro}
1897 % \end{macro}
1898 % \end{macro}
1899 % \end{macro}
1900 %
1901 % \begin{macro}{\acsp}
1902 % \begin{macro}{\acspa}
1903 % \begin{macro}{\@acsp}
1904 % The user macro \cmd{\acsp} prints the plural short form of the
1905 % acronym.
1906 % This is the acronym itself or the \meta{short name}, if the
1907 % optional argument is given in the definition of the acronym plus
1908 % an `s'.
1909 % \begin{macrocode}
1910 \newcommand*{\acsp}{\AC@starredfalse\protect\acspa}%
1911 \WithSuffix\newcommand\acsp*{\AC@starredtrue\protect\acspa}%
1912 % \end{macrocode}
1913 % \begin{macrocode}
1914 \newcommand*{\acspa}[1]{%
1915 \texorpdfstring{\protect\@acsp{#1}}{\AC@acsp{#1}}}
1916 % \end{macrocode}
1917 % \begin{macrocode}
1918 \newcommand*{\@acsp}[1]{%
1919 \acsfont{\AC@placelabel@part{#1}\AC@acsp{#1}}%
1920 \ifAC@starred\else\AC@logged{#1}\fi}
1921 % \end{macrocode}
1922 % \end{macro}
1923 % \end{macro}
1924 % \end{macro}
1925 %
1926 % \begin{macro}{\aclp}
1927 % \begin{macro}{\@aclp}
1928 % \begin{macro}{\Aclp}
1929 % \begin{macro}{\@Aclp}
1930 % The user macro \cmd{\aclp} prints the plural full name of the
1931 % acronym.
1932 % \begin{macrocode}
1933 \newcommand*{\aclp}{\AC@starredfalse\protect\@aclp}%
1934 \WithSuffix\newcommand\aclp*{\AC@starredtrue\protect\@aclp}%
1935 % \end{macrocode}
1936 % \begin{macrocode}
1937 \newcommand*{\Aclp}{\AC@starredfalse\protect\@Aclp}%
1938 \WithSuffix\newcommand\Aclp*{\AC@starredtrue\protect\@Aclp}%
1939 % \end{macrocode}
1940 % \begin{macrocode}
1941 \newcommand*{\@aclp}[1]{%
1942 \AC@placelabel@part{#1}\AC@aclp{#1}%
1943 \ifAC@starred\else\AC@logged{#1}\fi}
1944 % \end{macrocode}
1945 % \begin{macrocode}
1946 \newcommand*{\@Aclp}[1]{%
1947 \AC@placelabel@part{#1}\AC@Aclp{#1}%
1948 \ifAC@starred\else\AC@logged{#1}\fi}
1949 % \end{macrocode}
1950 % \end{macro}
1951 % \end{macro}
1952 % \end{macro}
1953 % \end{macro}
1954 %
1955 % \begin{macro}{\acfp}
1956 % \begin{macro}{\acfpa}
1957 % \begin{macro}{\@acfp}
1958 % \begin{macro}{\Acfp}
1959 % \begin{macro}{\Acfpa}
1960 % \begin{macro}{\@Acfp}
1961 % The user macro \cmd{\acfp} always prints the plural full name with
1962 % the plural of the acronym. The format depends on \cmd{\acffont} and
1963 % \cmd{\acfsfont}, and on the option |footnote| handled below.
1964 %
1965 % The option |footnote| leads to a redefinition of \cmd{\acfp},
1966 % making the full name appear as a footnote. There is then no need
1967 % for \cmd{\acffont} and \cmd{\acfsfont}. If the option |footnote| is
1968 % not specified, the optional variable determines the penalty for a
1969 % line break.
1970 % \begin{macrocode}
1971 \newcommand*{\acfp}{\AC@starredfalse\protect\acfpa}%
1972 \WithSuffix\newcommand\acfp*{\AC@starredtrue\protect\acfpa}%
1973 % \end{macrocode}
1974 % \begin{macrocode}
1975 \newcommand*{\Acfp}{\AC@starredfalse\protect\Acfpa}%
1976 \WithSuffix\newcommand\Acfp*{\AC@starredtrue\protect\Acfpa}%
1977 % \end{macrocode}
1978 % \begin{macrocode}
1979 \newcommand*{\acfpa}[2][\AC@linebreakpenalty]{%
1980 \texorpdfstring{\protect\@acfp[#1]{#2}}{\AC@aclp{#2} (\AC@acsp{#2})}}
1981 % \end{macrocode}
1982 % \begin{macrocode}
1983 \newcommand*{\Acfpa}[2][\AC@linebreakpenalty]{%
1984 \texorpdfstring{\protect\@Acfp[#1]{#2}}{\AC@Aclp{#2} (\AC@acsp{#2})}}
1985 % \end{macrocode}
1986 % \begin{macrocode}
1987 \newcommand*{\@acfp}[2][\AC@linebreakpenalty]{%
1988 \ifAC@footnote
1989 \acsfont{\AC@acsp{#2}}%
1990 \footnote{\AC@placelabel{#2}\AC@aclp{#2}{}}%
1991 \else
1992 \acffont{%
1993 \AC@placelabel{#2}\AC@aclp{#2}%
1994 \nolinebreak[#1] %
1995 \acfsfont{(\acsfont{\AC@acsp{#2}})}%
1996 }%
1997 \fi
1998 \ifAC@starred\else\AC@logged{#2}\fi}
1999 % \end{macrocode}
2000 % \begin{macrocode}
2001 \newcommand*{\@Acfp}[2][\AC@linebreakpenalty]{%
2002 \ifAC@footnote
2003 \acsfont{\AC@acsp{#2}}%
2004 \footnote{\AC@placelabel{#2}\AC@Aclp{#2}{}}%
2005 \else
2006 \acffont{%
2007 \AC@placelabel{#2}\AC@Aclp{#2}%
2008 \nolinebreak[#1] %
2009 \acfsfont{(\acsfont{\AC@acsp{#2}})}%
2010 }%
2011 \fi
2012 \ifAC@starred\else\AC@logged{#2}\fi}
2013 % \end{macrocode}
2014 % \end{macro}
2015 % \end{macro}
2016 % \end{macro}
2017 % \end{macro}
2018 % \end{macro}
2019 % \end{macro}
2020 %
2021 % \begin{macro}{\acp}
2022 % \begin{macro}{\@acp}
2023 % \begin{macro}{\Acp}
2024 % \begin{macro}{\@Acp}
2025 % The first time an acronym is accessed Full Names (FNs) is
2026 % printed. The next time just (FNs).The optional variable
2027 % is being passed to \cmd{\acfp}, in case it is used.
2028 % \begin{macrocode}
2029 \newcommand*{\acp}{\AC@starredfalse\protect\@acp}%
2030 \WithSuffix\newcommand\acp*{\AC@starredtrue\protect\@acp}%
2031 % \end{macrocode}
2032 % \begin{macrocode}
2033 \newcommand*{\Acp}{\AC@starredfalse\protect\@Acp}%
2034 \WithSuffix\newcommand\Acp*{\AC@starredtrue\protect\@Acp}%
2035 % \end{macrocode}
2036 % \begin{macrocode}
2037 \newcommand{\@acp}[2][\AC@linebreakpenalty]{%
2038 \ifAC@dua
2039 \ifAC@starred\aclp*{#2}\else\aclp{#2}\fi%
2040 \else
2041 \expandafter\ifx\csname AC@\AC@prefix#2\endcsname\AC@used
2042 \ifAC@starred\acsp*{#2}\else\acsp{#2}\fi%
2043 \else
2044 \ifAC@starred\acfp*[#1]{#2}\else\acfp[#1]{#2}\fi%
2045 \fi
2046 \fi}
2047 % \end{macrocode}
2048 % \begin{macrocode}
2049 \newcommand{\@Acp}[2][\AC@linebreakpenalty]{%
2050 \ifAC@dua
2051 \ifAC@starred\Aclp*{#2}\else\Aclp{#2}\fi%
2052 \else
2053 \expandafter\ifx\csname AC@\AC@prefix#2\endcsname\AC@used
2054 \ifAC@starred\acsp*{#2}\else\acsp{#2}\fi%
2055 \else
2056 \ifAC@starred\Acfp*[#1]{#2}\else\Acfp[#1]{#2}\fi%
2057 \fi
2058 \fi}
2059 % \end{macrocode}
2060 % \end{macro}
2061 % \end{macro}
2062 % \end{macro}
2063 % \end{macro}
2064 %
2065 %
2066 % \begin{macro}{\acfi}
2067 % \begin{macro}{\acfia}
2068 % \begin{macro}{\Acfi}
2069 % \begin{macro}{\Acfia}
2070 % The Full Name is printed in italics and the abbreviated is printed in upshape.
2071 % The optional variable determines the penalty for a line break.
2072 % \begin{macrocode}
2073 \newcommand*{\acfi}{\AC@starredfalse\protect\acfia}%
2074 \WithSuffix\newcommand\acfi*{\AC@starredtrue\protect\acfia}%
2075 % \end{macrocode}
2076 % \begin{macrocode}
2077 \newcommand*{\Acfi}{\AC@starredfalse\protect\Acfia}%
2078 \WithSuffix\newcommand\Acfi*{\AC@starredtrue\protect\Acfia}%
2079 % \end{macrocode}
2080 % \begin{macrocode}
2081 \newcommand{\acfia}[2][\AC@linebreakpenalty]{%
2082 \texorpdfstring{\protect\@acfi[#1]{#2}}{{\AC@acl{#2}} (#2)}}
2083 % \end{macrocode}
2084 % \begin{macrocode}
2085 \newcommand{\Acfia}[2][\AC@linebreakpenalty]{%
2086 \texorpdfstring{\protect\@Acfi[#1]{#2}}{{\AC@Acl{#2}} (#2)}}
2087 % \end{macrocode}
2088 % \begin{macrocode}
2089 \newcommand*{\@acfi}[2][\AC@linebreakpenalty]{%
2090 \acffont{%
2091 \AC@placelabel{#2}{\itshape\AC@acl{#2}}%
2092 \nolinebreak[#1] %
2093 \acfsfont{(\acsfont{\AC@acs{#2}})}%
2094 }%
2095 \ifAC@starred\else\AC@logged{#2}\fi}
2096 % \end{macrocode}
2097 % \begin{macrocode}
2098 \newcommand*{\@Acfi}[2][\AC@linebreakpenalty]{%
2099 \acffont{%
2100 \AC@placelabel{#2}{\itshape\AC@Acl{#2}}%
2101 \nolinebreak[#1] %
2102 \acfsfont{(\acsfont{\AC@acs{#2}})}%
2103 }%
2104 \ifAC@starred\else\AC@logged{#2}\fi}
2105 % \end{macrocode}
2106 % \end{macro}
2107 % \end{macro}
2108 % \end{macro}
2109 % \end{macro}
2110 %
2111 %
2112 % \begin{macro}{\acfip}
2113 % \begin{macro}{\acfipa}
2114 % \begin{macro}{\Acfip}
2115 % \begin{macro}{\Acfipa}
2116 % The plural of the full name is printed in italics and the plural of
2117 % the acronym is printed in upshape.
2118 % The optional variable determines the penalty for a line break.
2119 % \begin{macrocode}
2120 \newcommand*{\acfip}{\AC@starredfalse\protect\acfipa}%
2121 \WithSuffix\newcommand\acfip*{\AC@starredtrue\protect\acfipa}%
2122 % \end{macrocode}
2123 % \begin{macrocode}
2124 \newcommand*{\Acfip}{\AC@starredfalse\protect\Acfipa}%
2125 \WithSuffix\newcommand\Acfip*{\AC@starredtrue\protect\Acfipa}%
2126 % \end{macrocode}
2127 % \begin{macrocode}
2128 \newcommand{\acfipa}[2][\AC@linebreakpenalty]{%
2129 \texorpdfstring{\protect\@acfip[#1]{#2}}{{\AC@aclp{#2}} (#2)}}
2130 % \end{macrocode}
2131 % \begin{macrocode}
2132 \newcommand{\Acfipa}[2][\AC@linebreakpenalty]{%
2133 \texorpdfstring{\protect\@Acfip[#1]{#2}}{{\AC@Aclp{#2}} (#2)}}
2134 % \end{macrocode}
2135 % \begin{macrocode}
2136 \newcommand*{\@acfip}[2][\AC@linebreakpenalty]{%
2137 \acffont{%
2138 \AC@placelabel{#2}{\itshape\AC@aclp{#2}}%
2139 \nolinebreak[#1] %
2140 \acfsfont{(\acsfont{\AC@acsp{#2}})}%
2141 }%
2142 \ifAC@starred\else\AC@logged{#2}\fi}
2143 % \end{macrocode}
2144 % \begin{macrocode}
2145 \newcommand*{\@Acfip}[2][\AC@linebreakpenalty]{%
2146 \acffont{%
2147 \AC@placelabel{#2}{\itshape\AC@Aclp{#2}}%
2148 \nolinebreak[#1] %
2149 \acfsfont{(\acsfont{\AC@acsp{#2}})}%
2150 }%
2151 \ifAC@starred\else\AC@logged{#2}\fi}
2152 % \end{macrocode}
2153 % \end{macro}
2154 % \end{macro}
2155 % \end{macro}
2156 % \end{macro}
2157 %
2158 % \begin{macro}{\acused}
2159 % Marks the acronym as used. Don't confuse this with
2160 % \cmd{\acronymused}!
2161 % \begin{macrocode}
2162 \newcommand{\acused}[1]{%
2163 \global\expandafter\let\csname AC@\AC@prefix#1\endcsname\AC@used%
2164 \AC@addtoAC@clearlist{#1}}
2165 % \end{macrocode}
2166 % \end{macro}
2167 %
2168 % \begin{macro}{\acsu}
2169 % \begin{macro}{\acsua}
2170 % Print the short form of the acronym and mark it as used.
2171 % \begin{macrocode}
2172 \newcommand*{\acsu}{\AC@starredfalse\protect\acsua}%
2173 \WithSuffix\newcommand\acsu*{\AC@starredtrue\protect\acsua}%
2174 % \end{macrocode}
2175 % \begin{macrocode}
2176 \newcommand{\acsua}[1]{%
2177 \ifAC@starred\acs*{#1}\else\acs{#1}\fi\acused{#1}}
2178 % \end{macrocode}
2179 % \end{macro}
2180 % \end{macro}
2181 %
2182 % \begin{macro}{\aclu}
2183 % \begin{macro}{\aclua}
2184 % \begin{macro}{\Aclu}
2185 % \begin{macro}{\Aclua}
2186 % Print the long form of the acronym and mark it as used.
2187 % \begin{macrocode}
2188 \newcommand*{\aclu}{\AC@starredfalse\protect\aclua}%
2189 \WithSuffix\newcommand\aclu*{\AC@starredtrue\protect\aclua}%
2190 % \end{macrocode}
2191 % \begin{macrocode}
2192 \newcommand*{\Aclu}{\AC@starredfalse\protect\Aclua}%
2193 \WithSuffix\newcommand\Aclu*{\AC@starredtrue\protect\Aclua}%
2194 % \end{macrocode}
2195 % \begin{macrocode}
2196 \newcommand{\aclua}[1]{%
2197 \ifAC@starred\acl*{#1}\else\acl{#1}\fi\acused{#1}}
2198 % \end{macrocode}
2199 % \begin{macrocode}
2200 \newcommand{\Aclua}[1]{%
2201 \ifAC@starred\Acl*{#1}\else\Acl{#1}\fi\acused{#1}}
2202 % \end{macrocode}
2203 % \end{macro}
2204 % \end{macro}
2205 % \end{macro}
2206 % \end{macro}
2207 %
2208 % \begin{macrocode}
2209 \endinput
2210 %</acronym>
2211 % \end{macrocode}
2212 % That's it.
2213 % \Finale