1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
|
% arara: pdflatex
% arara: biber
% arara: pdflatex
% arara: pdflatex
% --------------------------------------------------------------------------
% the ACRO package
%
% Typeset Acronyms
%
% --------------------------------------------------------------------------
% Clemens Niederberger
% Web: https://bitbucket.org/cgnieder/acro/
% E-Mail: contact@mychemistry.eu
% --------------------------------------------------------------------------
% Copyright 2011-2012 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Clemens Niederberger.
% --------------------------------------------------------------------------
% The acro package consists of the files
% - acro.sty, acro_en.tex, acro_en.pdf, README
% --------------------------------------------------------------------------
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
%
% if you want to compile this documentation you'll need the document class
% `cnpkgdoc' which you can get here:
% https://bitbucket.org/cgnieder/cnpkgdoc/
% the class is licensed LPPL 1.3 or later
%
\documentclass[DIV10,toc=index,toc=bib,hyperfootnotes=false]{cnpkgdoc}
\docsetup{
pkg = {[single,macros,sort]acro} ,
language = en ,
code-box = {
backgroundcolor = gray!7!white ,
skipbelow = .6\baselineskip plus .5ex minus .5ex ,
skipabove = .6\baselineskip plus .5ex minus .5ex ,
roundcorner = 3pt ,
} ,
gobble = 1
}
\acsetup{hyperref}
\cnpkgusecolorscheme{friendly}
\usepackage{fnpct}
\renewcommand*\othersectionlevelsformat[3]{%
\textcolor{main}{#3\autodot}\enskip}
\renewcommand*\partformat{%
\textcolor{main}{\partname~\thepart\autodot}}
\usepackage[biblatex]{embrac}[2012/06/29]
\ChangeEmph{[}[,.02em]{]}[.055em,-.08em]
\ChangeEmph{(}[-.01em,.04em]{)}[.04em,-.05em]
\addcmds{
ac,
aca,
acap,
acf,
acfp,
acl,
aclp,
acp,
acresetall,
DeclareAcronymFormat,
acs,
acsetup,
acsp,
addcolon,
nato,
DeclareAcronym,
linewidth,
newlist,
ny,
printacronyms,
setlist
}
\usepackage{filecontents}
\usepackage[backend=biber,style=alphabetic,maxnames=10]{biblatex}
\addbibresource{\jobname.bib}
\begin{filecontents}{\jobname.bib}
@package{abbrevs,
title = {abbrevs},
author = {Matt Swift},
date = {2001-09-08},
version = {1.4},
url = {http://www.ctan.org/pkg/abbrevs}
}
@package{acromake,
title = {acromake},
author = {Paul A. Thompson},
date = {1995-07-16},
version = {na},
url = {http://www.ctan.org/pkg/acromake}
}
@package{acronym,
title = {acronym -- An Acronym Environment for \LaTeXe},
author = {Tobias Oetiker},
date = {2010-09-08},
version = {1.36},
url = {http://www.ctan.org/pkg/acronym}
}
@package{acroterm,
title = {acroterm},
author = {Jakob Voss},
date = {2010-11-19},
version = {0.1},
url = {http://www.ctan.org/pkg/acroterm}
}
@package{glossaries,
title = {glossaries},
author = {Nicola L.C. Talbot},
date = {2011-04-12},
version = {3.01},
url = {http://www.ctan.org/pkg/glossaries}
}
@package{nomencl,
title = {nomencl -- A Package to Create a Nomenclature},
author = {Boris Veytsman and Bernd Schandl and Lee Netherton and C.V. Radhakrishnan},
date = {2005-09-22},
version = {4.2},
url = {http://www.ctan.org/pkg/nomencl}
}
@online{wikipedia,
author = {Wikipedia},
title = {Acronym and initialism},
urldate = {2012-06-21},
url = {http://en.wikipedia.org/wiki/Acronyms},
year = {2012}
}
@online{NewYork,
author = {Wikipedia},
title = {New York City},
urldate = {2012-09-27},
url = {http://en.wikipedia.org/wiki/New_York_City},
year = {2012}
}
\end{filecontents}
\begin{filecontents}{\jobname.ist}
heading_prefix "{\\bfseries "
heading_suffix "\\hfil}\\nopagebreak\n"
headings_flag 1
delim_0 "\\dotfill "
delim_1 "\\dotfill "
delim_2 "\\dotfill "
delim_r "\\textendash"
suffix_2p "\\nohyperpage{\\,f.}"
suffix_3p "\\nohyperpage{\\,ff.}"
\end{filecontents}
\TitlePicture{\parbox{.75\linewidth}{%
\acro not only allows you to create acronyms in a simple way but also lets you
add them to different classes of acronyms. Lists can be created of separate classes
wherever you want the list to appear.\par
\acro also provides an option \key{single} which ignores acronyms that are used
only once in the whole document.\par
As an experimental feature \acro also offers the option \key{sort} which
automatically sorts the list created by \cmd{printacronyms}.}}
% additional packages:
\usepackage{longtable,enumitem,ragged2e,amssymb}
\newcommand*\wikipedia{%\libertineGlyph{W.alt}\kern-.055em
\textsc{Wikipedia}}
\newcommand*\h[1]{\textcolor{main}{\textbf{#1}}}
\ExplSyntaxOn
\NewDocumentCommand \Default {g}
{
\hfill\llap
{
\IfNoValueTF { #1 }
{(initially~empty)}
{Default:~\code{#1}}
}
\newline
}
\ExplSyntaxOff
\DeclareAcronym{cd}{cd}{Compact Disc}
\DeclareAcronymFormat{cd}{\scshape}
\DeclareAcronym{id}{id}{identification string}
\DeclareAcronymFormat{id}{\scshape}
\DeclareAcronym{jpg}{JPEG}[JPG]{Joint Photographic Experts Group}
\DeclareAcronym{la}{LA,}{Los Angeles,}[city]
\DeclareAcronym*{mp}{MP}{Member of Parliament,Members of Parliament}
\DeclareAcronym{nato}{nato}{North Atlantic Treaty Organization}{\textit{deutsch}: Organisation des Nordatlantikvertrags}
\DeclareAcronymFormat{nato}{\scshape}
\DeclareAcronym{ny}{NY,}{New York,}[city]
\DeclareAcronymCitation{ny}{NewYork}
\DeclareAcronym{ot}{ot}{Other Test}
\DeclareAcronymFormat{ot}{\scshape}
\DeclareAcronym{sw}{SW}{Sammelwerk,e}
\DeclareAcronym{test}{ST}{Some Test}
\DeclareAcronym{texse}{\{TeX\}.SE}{\TeX\ StackExchange}
\usepackage{imakeidx}
\makeindex[columns=3,options={-sl \jobname.ist},intoc]
\begin{document}
\section{Licence and Requirements}
Permission is granted to copy, distribute and/or modify this software under the
terms of the \LaTeX{} Project Public License, version 1.3 or later
(\url{http://www.latex-project.org/lppl.txt}). The package has the status
``maintained.''
\acro loads and needs the following packages: \paket{expl3},
\paket{xparse}, \paket{xtemplate} and \paket{l3keys2e}.
\section{About}
\begin{zitat}[\cite{wikipedia}]
Acronyms and initialisms are abbreviations formed from the initial components
in a phrase or a word. These components may be individual letters (as in CEO)
or parts of words (as in Benelux and Ameslan). There is no universal agreement
on the precise definition of the various terms nor on written usage.
\end{zitat}
After \wikipedia\ told us what acronyms are and we won't confuse them with units
or other kinds of abbreviations -- why would we need another package for them?
There are several already: \paket{acronym}~\cite{acronym}, \paket{acromake}%
~\cite{acromake}, \paket{acroterm}~\cite{acroterm}, the abbreviations package
\paket{abbrevs}~\cite{abbrevs} (the current version 1.4 has a bug\footnote{see
\url{http://tex.stackexchange.com/q/59840/5049} for solutions.}, though), the
nomenclature package \paket{nomencl}~\cite{nomencl}, and of course the mighty
\paket{glossaries}~\cite{glossaries}. So there is really no \emph{need} for a
new package.
On the other hand \paket{acronym}, the best of the acronym specific packages,
has one or two shortcomings and sometimes using \paket{glossaries} seems a bit
of an overkill (or simply inconvenient as one has to run \code{makeglossaries},
\code{makeindex} or \code{xindy}, then). So \acro stands somewhere in between
(but much closer to \paket{acronym}).
The main reason for the existance of \acro is a question on \acs{texse}%
\footnote{\url{http://tex.stackexchange.com/q/59449/5049}} which intrigued
me and in consequence led to \acro and it's option \key{single}.
\acro has many similarities with the \paket{acronym} package. In fact, quite
some macros have the same name and meaning\footnote{\emph{Not} in the sense of
\code{\textbackslash\textcolor{code}{meaning}}!}.
\section{Basics}\secidx{Basics}
\subsection{Creating New Acronyms}\secidx[new acronyms]{Basics}
Acronyms are created with the command \cmd{DeclareAcronym} that can only be used in
the preamble.
\begin{beschreibung}
\Befehl{DeclareAcronym}*{<id>}\ma{<short>,<pl>}\oa{<alt.>}\ma{<long>,<pl>}\ma{<extra>}\oa{<class>}
\verb+% can be used only in preamble+
\Befehl{DeclareAcronymFormat}{<id>}\ma{<format>} \verb+% can be used only in preamble+
\Befehl{DeclareAcronymCitation}{<id>}\oa{<pre>}\oa{<post>}\ma{<cite keys>}
\verb+% can be used only in preamble+
\end{beschreibung}
Although \cmd{DeclareAcronym} has quite a number of arguments. In the simplest
case you'll only need three:
\begin{beispiel}[code only]
% preamble
\DeclareAcronym{test}{ST}{Some Test}
\end{beispiel}
This creates the acronym ``\acs{test}'' with the \acs{id} ``test'' and the long
form ``\acl{test}.'' The other arguments will be described later in this document.
\cmd{DeclareAcronymFormat} lets you assign a special format to an acronym. Maybe
small caps:
\begin{beispiel}[code only]
% preamble:
\DeclareAcronym{ot}{ot}{Other Test}
\DeclareAcronymFormat{ot}{\scshape}
\end{beispiel}
The short form now looks like this: \acs{ot}.
With \cmd{DeclareAcronymCitation} you can add a key as used in \cmd*{cite} that
is added to the first or every appearance of the acronym (depending on an option
that is described later).
\begin{beispiel}[code only]
% preamble:
\DeclareAcronym{ny}{NY,}{New York,}
\DeclareAcronymCitation{ny}{NewYork}
% bib file for use with biber/biblatex:
@online{NewYork,
author = {Wikipedia},
title = {New York City},
urldate = {2012-09-27},
url = {http://en.wikipedia.org/wiki/New_York_City},
year = {2012}
}
\end{beispiel}
The first appearance now looks as follows\footnote{The appearance of the citation
of course depends on the citation style you're using.}: \acf{ny}.
\subsection{Using the Acronyms -- the Commands}\secidx[using acronyms]{Basics}
Acronyms are used with with one of the following commands:
\begin{beschreibung}
\befehl{ac} basic command; the first output is different from subsequent ones.
\befehl{Ac} same as \cmd{ac} but capitalizes the first letter of the long form.
\befehl{acs} \h{s}hort form; the actual acronym.
\befehl{acl} \h{l}ong form; the meaning of the acronym.
\befehl{Acl} same as \cmd{acl} but capitalizes first letter.
\befehl{aca} \h{a}lternative short form as specified in the \oa{<short>} argument
of \cmd{DeclareAcronym}; if it hasn't been specified this is identical to \cmd{acs}.
\befehl{acf} first form; output like the first time \cmd{ac} is output.
\befehl{Acf} same as \cmd{acf} but capitalizes first letter of the long form.
\befehl{acp} \h{p}lural form of \cmd{ac};
\befehl{Acp} same as \cmd{acp} but capitalizes first letter of the long form.
\befehl{acsp} plural form of \cmd{acs};
\befehl{aclp} plural form of \cmd{acp};
\befehl{Aclp} same as \cmd{aclp} but capitalizes first letter.
\befehl{acap} plural form of \cmd{aca};
\befehl{acfp} plural form of \cmd{acf};
\befehl{Acfp} same as \cmd{acfp} but capitalizes first letter of the long form.
\end{beschreibung}
If an acronym is used the first time with \cmd{ac} its output is different from
subsequent uses. To be clear on this: the first time! If the acronym has been
used with \emph{any} of the output commands before it is \emph{not} the first
time any more.
\begin{beispiel}
% preamble: \DeclareAcronym{cd}{cd}{Compact Disc}
% \DeclareAcronymFormat{cd}{\scshape}
first time: \ac{cd} \\
second time: \ac{cd} \\
short: \acs{cd} \\
alternative: \aca{cd} \\
first again: \acf{cd} \\
long: \acl{cd} \\
short plural: \acsp{cd} \\
long plural: \aclp{cd}
\end{beispiel}
\subsection{Plural Forms}\secidx[plural forms]{Basics}
If an acronym is defined in the standard way \acro uses an `s' that's appended to
both the short and the long form when one of the plural commands is used. However,
that is not always the best solution. For one thing not all acronyms may have a
plural form. Second, the plural form especially of the long forms may be fomed
differently. And third, other languages can have other plural endings.
For this reason \cmd{DeclareAcronym} provides additional arguments:
\begin{beschreibung}
\Befehl{DeclareAcronym}{<id>}\ma{<short>,<plural ending>}\ma{<long>,<plural ending>}
\Befehl{DeclareAcronym}*{<id>}\ma{<short>,<plural ending>}\ma{<long>,<plural form>}
\end{beschreibung}
These arguments are optional. If they're not used, the default setting is `s'.
If you use the starred version the long form will be replaced by the specified
plural form when necessary. A given short plural will still be appended.
\begin{beispiel}
% preamble:
% \DeclareAcronym{cd}{\textsc{cd}}{Compact Disc}
% \DeclareAcronymFormat{cd}{\scshape}
% \DeclareAcronym{ny}{NY,}{New York,}
% \DeclareAcronym{sw}{SW}{Sammelwerk,e}
% \DeclareAcronym*{mp}{MP}{Member of Parliament,Members of Parliament}
\acsp{cd}, \aclp{cd} \\
\acsp{ny}, \aclp{ny} \\
\acsp{sw}, \aclp{sw} \\
\acsp{mp}, \aclp{mp}
\end{beispiel}
\subsection{Alternative Short Forms}\secidx[alternative forms]{Basics}
For some acronyms it might be useful to have alternative forms. For this
\cmd{DeclareAcronym} has another optional argument:
\begin{beschreibung}
\Befehl{DeclareAcronym}{<id>}\ma{<short>}\oa{<alternative>}\ma{<long>}
\end{beschreibung}
\begin{beispiel}
% preamble \DeclareAcronym{jpg}{JPEG}[JPG]{Joint Photographic Experts Group}
default: \acs{jpg} \\
alt.: \aca{jpg}
\end{beispiel}
The alternative form uses the same plural ending as the default short form and
is formatted in the same way.
\subsection{Extra Information for the List Entry}\secidx[extra information]{Basics}
Of course you can print a list of acronyms where their meaning is explained.
Sometimes it can be useful to add additional information there. This is done with
another optional argument to \cmd{DeclareAcronym}:
\begin{beschreibung}
\Befehl{DeclareAcronym}{<id>}\ma{<short>}\ma{<long>}\ma{<extra>}
\end{beschreibung}
These information will only be displayed in the list. See section~\ref{sec:print_lists}
for the impact of the following example.
\begin{beispiel}
% preamble:
% \DeclareAcronym{nato}{nato}{North Atlantic Treaty Organization}{\textit{deutsch}: Organisation des Nordatlantikvertrags}
% \DeclareAcronymFormat{nato}{\scshape}
The \ac{nato} is an intergovernmental military alliance based on the
North Atlantic Treaty which was signed on 4~April 1949. \ac{nato}
headquarters are in Brussels, Belgium, one of the 28 member states
across North America and Europe, the newest of which, Albania and
Croatia, joined in April 2009.
\end{beispiel}
\secidx*{Basics}
\section{Additional Commands and Possibilities}\secidx{Additional Commands}
\subsection{Using Classes}\secidx[classes]{Additional Commands}
The acronyms of \acro can be divided into different classes. This doesn't change
the output but allows different acronym lists, see section~\ref{sec:print_lists}.
For this \cmd{DeclareAcronym} has an optional argument:
\begin{beschreibung}
\Befehl{DeclareAcronym}{<id>}\ma{<short>}\ma{<long>}\oa{<class>}
\end{beschreibung}
\begin{beispiel}
% preamble:
% \DeclareAcronym{la}{LA,}{Los Angeles,}[city]
% \DeclareAcronym{ny}{NY,}{New York,}[city]
\acl{la} (\acs{la}) \\
\acl{ny} (\acs{ny})
\end{beispiel}
This might be useful if you can and want to divide your acronyms into different
types, technical and grammatical ones, say, that shall be listed in different
lists.
\subsection{Resetting}\secidx[resetting]{Additional Commands}
If you want for some reason to fool \acro into thinking that an acronym is used
for the first time you can call this command:
\begin{beschreibung}
\Befehl{acresetall}
\end{beschreibung}
\begin{beispiel}
\acresetall
\ac{ny}
\end{beispiel}
Beware that this command acts \emph{globally} and effects \emph{all} acronyms!
\subsection{Labels}\secidx[labels]{Additional Commands}
The first usage of an acronym sets a label \verb+\label{ac:<id>}+, regardless
which command has been used to typeset it. This label is used to create the page
numbers in the list (see section~\ref{sec:print_lists} for details) but can also
be used for other references if needed.
\secidx*{Additional Commands}
\section{Printing the List}\label{sec:print_lists}\secidx{Printing the List}
Printing the whole list of acronyms is easy: just place \cmd{printacronyms}
wherever you want the list to be.
\begin{beschreibung}
\Befehl{printacronyms}{<list of classes>}\oa{<excluded classes>} \cnpkgdocarrow\
the first \emph{optional} (!) argument \ma{<list of classes>} takes a comma-separated
list of the classes of acronyms that should be in the list. If the argument is
left out, \emph{all} acronyms are printed. In the optional argument \oa{<excluded
classes>} classes can be specified that shall not be included into the list.
\end{beschreibung}
\begin{beispiel}[below]
\acsetup{hyperref=false,extra-style=comma}
\printacronyms[city]
\acsetup{list-name=City Acronyms}
\printacronyms{city}
\end{beispiel}
You can see that the default layout is a \code{description} list with a
\code{section*} title. Both can be changed, see section~\ref{sec:customization}.
The command \cmd{printacronyms} needs two \LaTeX\ runs. This is a precaution to
avoid error messages with a possibly empty list. But since almost all documents
need at least two runs and often are compiled much more often than that, this
fact shouldn't cause too much inconvenience.
\secidx*{Printing the List}
\section{Customization}\label{sec:customization}\secidx{Customization}
\subsection{General Options}\secidx[general options]{Customization}
There are a few options which change the general behaviour of \acro.
\default{Underlined} values are used if no value is given.
\begin{beschreibung}
%%
\Option{single}{\default{true}|false}\Default{false}
If set to \code{true} an acronym that's used only once '(with \cmd{ac}) in a
document will only print the long form and will not be printed in the list.
%%
\Option{hyperref}{\default{true}|false}\Default{false}
If set to \code{true} the short forms of the acronyms will be linked to their
list entry.
%%
\Option{only-used}{\default{true}|false}\Default{true}
This option is \code{true} as default. It means that only acronyms that are
actually used in the document are printed in the list. If \code{false}, all
acronyms defined with \cmd{DeclareAcronym} will be written to the list.
%%
\Option{macros}{\default{true}|false}\Default{false}
If set to \code{true} this option will create a macro \cmd{<id>} for each
acronym as a shortcut for \cmd{ac}{<id>}. Already existing macros will
\emph{not} be overwritten.
%%
\Option{strict}{\default{true}|false}\Default{false}
If set to \code{true} and the option \key{macros}{true} is in effect then
already existing macros will be overwritten.
%%
\Option{sort}{\default{true}|false}\Default{false}
If set to \code{true} the acronym list will be sorted automatically. The
entries are sorted by their \acs{id} ignoring upper and lower case. This
option needs the experimental package \paket*{l3sort} (from the
\paket{l3experimental} bundle) and can only be set in the preamble.
%%
\Option{cite}{\default{all}|first|none}\Default{first}
This option decides whether citations that are added vie \cmd{DeclareAcronymCitation}
are added to each first, every or no appearance of an acronym.
%%
\Option{cite-cmd}{<cmd>}\Default{\cmd*{cite}}
This option determines which command is used for the citation. Each citation
command that takes the cite key as argument is valid, for example \paket{biblatex}'s
\cmd*{footcite}.
%%
\Option{cite-space}{<code>}\Default{\cmd*{nobreakspace}}
Depending on the citation command in use a space should be inserted before the
citation or maybe not (e.g.\ \cmd*{footcite}\ldots). This option allows you to
set this. Actually it can be used to place arbitrary code right before the
citation.\catcode`\_=11
\Option{uc-cmd}{<cmd>}\Default{\cmd*{acro_first_upper_case:n}}
The command that is used to capitalize the first word in the \cmd{Ac} and the
like commands. You can change it to another one like for example
\cmd*{makefirstuc}\footnote{from the \paket*{mfirstuc} package} or
\cmd*{MakeTextUppercase}\footnote{from the \paket*{textcase} package}.\catcode`\_=8
\end{beschreibung}
All options of this and the following sections can be set up either as package
options or via the setup command:
\begin{beschreibung}
\Befehl{acsetup}{<options>} set up \acro anywhere in the document. Or separate
package loading from setup.
\end{beschreibung}
\begin{beispiel}
% with \acsetup{macros}; remember I used \acresetall before
we could have used these before: \nato, \ny
\end{beispiel}
\subsection{Options Regarding Acronyms}\secidx[acronyms]{Customization}
The options described in this section all influence the layout of one of the
possible output forms of the acronyms.
\begin{beschreibung}
%%
\Option{short-format}{<format>}\Default
Sets a format for all short forms. For example \key{short-format}{\cmd{scshape}}
would print all short forms in small caps.
%%
\Option{long-format}{<format>}\Default
The same for the long forms.
%%
\Option{list-long-format}{<format>}\Default
An extra format for the long entries in the list. If not used this is the same
as \key{long-format}.
%%
\Option{extra-format}{<format>}\Default
The same for the extra information.
%%
\Option{first-style}{default|plain|footnote|square|short|reversed|plain-reversed}\\
\null\Default{default}
The basic style of the first appearance of an acronym.
%%
\Option{extra-style}{plain|comma|paren|bracket}\Default{plain}
Defines the way the extra information is printed in the list.
%%
\Option{plural-ending}{<tokenlist>}\Default{s}
With this option the default plural ending can be set.
\end{beschreibung}
\begin{beispiel}
% (Keep in mind that we're in
% a minipage here!)
\acsetup{first-style=footnote}
\acf{ny} \\
\acsetup{first-style=square}
\acf{ny} \\
\acsetup{first-style=short}
\acf{ny} \\
\acsetup{first-style=reversed}
\acf{ny} \\
\acsetup{first-style=plain}
\acf{ny} \\
\acsetup{first-style=plain-reversed}
\acf{ny}
\end{beispiel}
\subsection{Options Regarding the List}\secidx[list]{Customization}
\begin{beschreibung}
%%
\Option{page-ref}{none|plain|comma|paren}\Default{none}
The style with which the page number of the first appearance of the acronym
in the text is displayed.
%%
\Option{page-name}{<page name>}\Default{p.}
The ``name'' of the page label.
%%
\Option{list-type}{table|<list>}\Default{description}
This option let's you choose how the list is printed. \code{<list>} can be any
valid list like
\code{itemize} or \code{description}.
%%
\Option{list-style}{list|tabular|longtable|extra-tabular|extra-longtable|\\
extra-tabular-rev|extra-longtable-rev}\Default{list}
If you choose \key{list-type}{table} you have to specify which kind of table
should be used. If you choose \code{longtable}, \code{extra-longtable} or
\code{extra-longtable-rev} you have to load \paket{longtable} in your preamble.
The values \code{extra-longtable} and \code{extra-longtable-rev} put the extra
information in a column of its own.
%%
\Option{list-header}{chapter|chapter*|section|section*|subsection|subsection*}\\
The header type of the list.\Default{section*}
%%
\Option{list-name}{<list name>}\Default{Acronyms}
The name of the list. This is what's written in the list-header.
%%
\Option{list-table-width}\Default{.7\cmd{linewidth}}
This has only an effect if you chose \key{list-type}{table}. The second column
(or the third if you choose one of the \code{-rev} styles) of the table is a
\code{p} column whose width can be specified with this option.
%%
\Option{list-caps}{\default{true}|false}\Default{false}
Print the first letters of the long form capitalized.
\end{beschreibung}
If you for example have loaded \paket{enumitem} you can define a custom list for
the acronym list:
\begin{beispiel}
% preamble:
% \usepackage{enumitem}
\newlist{acronyms}{description}{1}
\newcommand*\addcolon[1]{#1:}
\setlist[acronyms]{labelwidth=3em,leftmargin=3.5em,noitemsep,itemindent=0pt,font=\addcolon}
\acsetup{list-type=acronyms,hyperref=false,extra-style=comma}
\printacronyms
\end{beispiel}
\secidx*{Customization}
\section{hyperref Support}\secidx{\paket{hyperref} support}[hyperref Support]
The option \key{hyperref}{true} adds internal links from all short (or alternative)
forms to their respective list entries. Of course this only works if you have
loaded the \paket{hyperref} package in your preamble. You should use this option
with care: if you don't use \cmd{printacronyms} anywhere this option will result
in loads of \paket{hyperref} warnings. Also printing several lists can result in
warnings if don't clearly separate the lists into different classes. If an acronym
appears in more than one list there will also be more than one hypertarget for this
acronym.
\secidx*{\paket{hyperref} support}[hyperref Support]
\appendix
\section{All Acronyms Used in this Documentation}\label{sec:documentation_acronyms}
\begin{beispiel}[code only]
\acsetup{
list-type = table,
list-style = longtable,
list-header = subsection*,
extra-style = comma,
page-ref = comma,
list-name = All Acronyms}
\printacronyms
\end{beispiel}
\acsetup{
list-type = table,
list-style = longtable,
list-header = subsection*,
extra-style = comma,
page-ref = comma,
list-name = All Acronyms}
\printacronyms
\begin{beispiel}[code only]
\acsetup{
list-type = table,
list-style = longtable,
list-header = subsection*,
page-ref = comma,
list-name = City-Acronyms}
\printacronyms{city}
\end{beispiel}
\acsetup{list-name=City-Acronyms}
\printacronyms{city}
{\RaggedRight\EmbracOff
\printbibliography}
\indexprologue{%
\noindent Section titles are indicated \textbf{bold}, packages \textsf{sans serif},
commands \cmd*{brown} and options \textcolor{key}{\code{yellow}}.}
\printindex
\end{document}
|