diff options
author | Karl Berry <karl@freefriends.org> | 2012-07-23 21:41:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-07-23 21:41:18 +0000 |
commit | 9ac64d0dc268cfdbd79ccb2a49b3d8ffca523d00 (patch) | |
tree | d7c9714bacdc115f3abc88cfe5422799390ecb29 /Master/texmf-dist | |
parent | ecfa5f36d1f895ffa3ccbd7b65ea54cffdbb518d (diff) |
new latex package acro (23jul12)
git-svn-id: svn://tug.org/texlive/trunk@27113 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/acro/README | 31 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/acro/acro_en.pdf | bin | 0 -> 729164 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/acro/acro_en.tex | 641 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/acro/example_one.tex | 46 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/acro/example_two.tex | 66 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/acro/acro.sty | 1119 |
6 files changed, 1903 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/acro/README b/Master/texmf-dist/doc/latex/acro/README new file mode 100644 index 00000000000..3cdcc90e8b2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/acro/README @@ -0,0 +1,31 @@ +-------------------------------------------------------------------------- +the ACRO package + + Typeset Acronyms + +2012/07/23 v0.3d +-------------------------------------------------------------------------- +Clemens Niederberger +Web: https://bitbucket.org/cgnieder/acro/ +E-Mail: contact@mychemistry.eu +-------------------------------------------------------------------------- +Copyright 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. +--------------------------------------------------------------------------
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/acro/acro_en.pdf b/Master/texmf-dist/doc/latex/acro/acro_en.pdf Binary files differnew file mode 100644 index 00000000000..b07b88e9ba7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/acro/acro_en.pdf diff --git a/Master/texmf-dist/doc/latex/acro/acro_en.tex b/Master/texmf-dist/doc/latex/acro/acro_en.tex new file mode 100644 index 00000000000..b9bef5e7af5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/acro/acro_en.tex @@ -0,0 +1,641 @@ +% arara: pdflatex +% arara: makeindex: { sort: true, style: acro_en.ist } +% 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 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} , + code-box = { + backgroundcolor = gray!7!white , + skipbelow = .6\baselineskip plus .5ex minus .5ex , + skipabove = .6\baselineskip plus .5ex minus .5ex , + roundcorner = 3pt , + } , + gobble = 1 +} + +% Layout: +\usepackage[osf]{libertine} +\acsetup{hyperref} +\cnpkgcolors{ + main => cnpkgred , + key => yellow!40!brown , + module => cnpkgblue , + link => black!90 +} +\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] + +% highlight commands in listings: +\addcmds{ + ac, + aca, + acap, + acf, + acfp, + acl, + aclp, + acp, + acresetall, + DeclareAcronymFormat, + acs, + acsetup, + acsp, + addcolon, + nato, + DeclareAcronym, + linewidth, + newlist, + ny, + printacronyms, + setlist +} + +\usepackage{filecontents} + +% bibliography: +\usepackage[backend=biber,style=alphabetic,maxnames=10]{biblatex} +\addbibresource{\jobname.bib} +\begin{filecontents}{\jobname.bib} +@software{abbrevs, + title = {abbrevs}, + author = {Matt Swift}, + date = {2001-09-08}, + version = {1.4}, + url = {http://www.ctan.org/pkg/abbrevs} +} +@software{acromake, + title = {acromake}, + author = {Paul A. Thompson}, + date = {1995-07-16}, + version = {na}, + url = {http://www.ctan.org/pkg/acromake} +} +@software{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} +} +@software{acroterm, + title = {acroterm}, + author = {Jakob Voss}, + date = {2010-11-19}, + version = {0.1}, + url = {http://www.ctan.org/pkg/acroterm} +} +@software{glossaries, + title = {glossaries}, + author = {Nicola L.C. Talbot}, + date = {2011-04-12}, + version = {3.01}, + url = {http://www.ctan.org/pkg/glossaries} +} +@software{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} +} +\end{filecontents} + +% index: +\usepackage{makeidx} +\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} + +% abstract: +\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}.}} + +% footnotes: +\usepackage{fnpct} +% \usepackage{bigfoot} +% \DeclareNewFootnote[para]{default} + +% additional packages: +\usepackage{longtable,enumitem,ragged2e} + +% custom macros: +\newcommand*\wikipedia{\libertineGlyph{W.alt}\kern-.055em\textsc{ikipedia}} +\newcommand*\h[1]{\textcolor{main}{\textbf{#1}}} + +\ExplSyntaxOn +\NewDocumentCommand \Default {g} + { + \hfill\llap + { + \IfNoValueTF { #1 } + {(initially~empty)} + {Default:~\code{#1}} + } + \newline + } +\ExplSyntaxOff + +% define acronyms: +\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] +\DeclareAcronym{ot}{ot}{Other Test} + \DeclareAcronymFormat{ot}{\scshape} +\DeclareAcronym{sw}{SW}{Sammelwerk,e} +\DeclareAcronym{test}{ST}{Some Test} +\DeclareAcronym{texse}{\{TeX\}.SE}{\TeX\ StackExchange} + +\makeindex +\begin{document} +\newpage +\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+ +\end{beschreibung} +Although this command 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}. + +\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. +\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{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} + +\setindexpreamble{Section titles are indicated \textbf{bold}, packages +\textsf{sans serif}, commands \code{\textbackslash\textcolor{code}{brown}} + and options \textcolor{key}{\code{yellow}}.\par\bigskip} +\printindex +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/acro/example_one.tex b/Master/texmf-dist/doc/latex/acro/example_one.tex new file mode 100644 index 00000000000..e2bff36d42c --- /dev/null +++ b/Master/texmf-dist/doc/latex/acro/example_one.tex @@ -0,0 +1,46 @@ +% arara: pdflatex +% arara: pdflatex +\documentclass{scrartcl} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage{acro} +\acsetup{ + page-ref = paren,% Seitennummer in Klammern + extra-style = comma,% extra-Informationen mit Komma anhängen + only-used = false,% für das Beispiel auch die nicht verwendeten in die Liste aufnehmen + sort = true % Liste sortieren +} + +\usepackage{longtable,siunitx} + +\DeclareAcronym{ecm}{ECM} {Electro Chemical Machining}{Elektrochemisches Abtragen} +\DeclareAcronym{adc}{ADC} {Analog-to-Digital-Converter} +\DeclareAcronym{edm}{EDM} {Electro Discharge Machining} +\DeclareAcronym{ecdm}{ECDM}{Electro Chemical Discharge Machining}{Kombination aus \acs{ecm} und \acs{edm}} + +% "Acronyme" (tatsächlich physikalische Größen) einer speziellen Klasse: +\DeclareAcronym{f}{\ensuremath{f}}{Frequenz}{\si{\hertz}}[physics] +\DeclareAcronym{A}{\ensuremath{A}}{Fläche}{\si{\metre^2}}[physics] +\DeclareAcronym{C}{\ensuremath{C}}{Kapazität}{\si{\farad}}[physics] +\DeclareAcronym{F}{\ensuremath{F}}{Kraft}{\si{\newton}}[physics] + +\begin{document} + +erstes Mal: \ac{ecm} + +zweites Mal: \ac{ecm} + +% alle außer der Klasse 'physics' auflisten: +\acsetup{list-name=Abkürzungsverzeichnis} +\printacronyms[physics] + +% nur die Klasse 'physics' auflisten: +\acsetup{ + list-name = Formelverzeichnis, + list-type = table, + list-style = extra-longtable-rev, + extra-style = plain +} +\printacronyms{physics} + +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/acro/example_two.tex b/Master/texmf-dist/doc/latex/acro/example_two.tex new file mode 100644 index 00000000000..75b009e33d0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/acro/example_two.tex @@ -0,0 +1,66 @@ +% arara: pdflatex +% arara: pdflatex +% this file is an adapted version of acrotest.tex shipped out with the `acronym' +% package +\documentclass{article} +\usepackage[colorlinks]{hyperref} +\usepackage{acro} +\acsetup{sort,page-ref=comma,extra-style=paren,hyperref} + +\DeclareAcronym{CDMA}{CDMA}{Code Division Multiple Access} +\DeclareAcronym{GSM}{GSM}{Global System for Mobile communication} +\DeclareAcronym{NA}{\ensuremath{N_{\mathrm A}}}{Number of Avogadro}{see \S\ref{Chem}} +\DeclareAcronym{NAD+}{NAD\textsuperscript{+}}{Nicotinamide Adenine Dinucleotide} +\DeclareAcronym{NUA}{NUA}{Not Used Acronym} +\DeclareAcronym{TDMA}{TDMA}{Time Division Multiple Access} +\DeclareAcronym{UA}{UA}{Used Acronym} +\DeclareAcronym{lox}{\ensuremath{LOX}}{Liquid Oxygen}% +\DeclareAcronym{lh2}{\ensuremath{LH_2}}{Liquid Hydrogen}% +\DeclareAcronym{IC}{IC}{Integrated Circuit}% +\DeclareAcronym*{BUT}{BUT}{Block Under Test,Blocks Under Test}% +\begin{document} + +\section{Intro} +In the early nineties, \acs{GSM} was deployed in many European +countries. \ac{GSM} offered for the first time international +roaming for mobile subscribers. The \acs{GSM}'s use of \ac{TDMA} as +its communication standard was debated at length. And every now +and then there are big discussion whether \ac{CDMA} should have +been chosen over \ac{TDMA}. + +\section{Furthermore} +\acreset +The reader could have forgotten all the nice acronyms, so we repeat the +meaning again. + +If you want to know more about \acf{GSM}, \acf{TDMA}, \acf{CDMA} +and other acronyms, just read a book about mobile communication. Just +to mention it: There is another \ac{UA}, just for testing purposes! + +\begin{figure}[h] +Figure +\caption{A float also admits references like \ac{GSM} or \acf{CDMA}.} +\end{figure} + +\subsection{Some chemistry and physics} +\label{Chem} +\ac{NAD+} is a major electron acceptor in the oxidation +of fuel molecules. The reactive part of \ac{NAD+} is its nictinamide +ring, a pyridine derivate. + +One mol consists of \acs{NA} atoms or molecules. There is a relation +between the constant of Boltzmann and the \acl{NA}: +\begin{equation} + k = R/\acs{NA} +\end{equation} + +\acl{lox}/\acl{lh2} (\acs{lox}/\acs{lh2}) + +\subsection{Some testing fundamentals} +When testing \acp{IC}, one typically wants to identify functional +blocks to be tested separately. The latter are commonly indicated as +\acp{BUT}. To test a \ac{BUT} requires defining a testing strategy\dots + +\printacronyms + +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/acro/acro.sty b/Master/texmf-dist/tex/latex/acro/acro.sty new file mode 100644 index 00000000000..6b5cb5cd1ce --- /dev/null +++ b/Master/texmf-dist/tex/latex/acro/acro.sty @@ -0,0 +1,1119 @@ +% -------------------------------------------------------------------------- +% 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. +% -------------------------------------------------------------------------- +\RequirePackage{expl3,xparse,l3keys2e,xtemplate} +\ProvidesExplPackage + {acro} + {2012/07/23} + {0.3d} + {Typeset Acronyms} + +% error messages: +\msg_new:nnnn { acro } { undefined } + { You've~requested~acronym~`#1'~but~it~seems~that~it~was~never~defined! } + { + You've~requested~acronym~`#1'~\msg_line_context: \c_space_tl but~you~ + apperantly~haven't~defined~it,~yet!~Maybe~you've~mispelled~it? + } + +% boolean variables: +\bool_new:N \l_acro_use_single_bool +\bool_new:N \l_acro_print_only_used_bool +\bool_set_true:N \l_acro_print_only_used_bool +\bool_new:N \l_acro_use_plural_bool +\bool_new:N \l_acro_hyperref_loaded_bool +\bool_new:N \l_acro_use_hyperref_bool +\bool_new:N \l_acro_custom_format_bool +\bool_new:N \l_acro_strict_bool +\bool_new:N \l_acro_create_macros_bool +\bool_new:N \l_acro_first_upper_bool +\bool_new:N \l_acro_sort_bool +\bool_new:N \l_acro_capitalize_list_bool + +% tokenlist variables: +\tl_new:N \l_acro_short_format_tl +\tl_new:N \l_acro_long_format_tl +\tl_new:N \l_acro_extra_format_tl +\tl_new:N \l_acro_first_instance_tl +\tl_set:Nn \l_acro_first_instance_tl { default } +\tl_new:N \l_acro_extra_instance_tl +\tl_set:Nn \l_acro_extra_instance_tl { default } +\tl_new:N \l_acro_page_instance_tl +\tl_set:Nn \l_acro_page_instance_tl { none } +\tl_new:N \l_acro_page_name_tl +\tl_set:Nn \l_acro_page_name_tl { p. } +\tl_new:N \l_acro_list_instance_tl +\tl_set:Nn \l_acro_list_instance_tl { list } +\tl_new:N \l_acro_list_type_tl +\tl_set:Nn \l_acro_list_type_tl { description } +\tl_new:N \l_acro_list_title_tl +\tl_set:Nn \l_acro_list_title_tl { section* } +\tl_new:N \l_acro_list_name_tl +\tl_set:Nn \l_acro_list_name_tl { Acronyms } +\tl_new:N \l_acro_short_tl +\tl_new:N \l_acro_short_plural_tl +\tl_new:N \l_acro_default_plural_tl +\tl_set:Nn \l_acro_default_plural_tl { s } +\tl_new:N \l_acro_alt_tl +\tl_new:N \l_acro_long_tl +\tl_new:N \l_acro_custom_format_tl +\tl_new:N \l_acro_first_between_tl + +% property list variables: +\prop_new:N \l_acro_short_prop +\prop_new:N \l_acro_alt_prop +\prop_new:N \l_acro_long_prop +\prop_new:N \l_acro_class_prop +\prop_new:N \l_acro_replace_plural_prop +\prop_new:N \l_acro_short_plural_prop +\prop_new:N \l_acro_long_plural_prop +\prop_new:N \l_acro_extra_prop +\prop_new:N \l_acro_format_prop + +% length variables: +\dim_new:N \l_acro_table_width_dim +\dim_set:Nn \l_acro_table_width_dim { .7\linewidth } + +% options: +\keys_define:nn { acro } + { + macros .bool_set:N = \l_acro_create_macros_bool , + strict .bool_set:N = \l_acro_strict_bool , + sort .bool_set:N = \l_acro_sort_bool , + short-format .tl_set:N = \l_acro_short_format_tl , + long-format .tl_set:N = \l_acro_long_format_tl , + extra-format .tl_set:N = \l_acro_extra_format_tl , + single .bool_set:N = \l_acro_use_single_bool , + first-style .tl_set:N = \l_acro_first_instance_tl , + extra-style .tl_set:N = \l_acro_extra_instance_tl , + page-ref .tl_set:N = \l_acro_page_instance_tl , + page-name .tl_set:N = \l_acro_page_name_tl , + list-style .tl_set:N = \l_acro_list_instance_tl , + list-type .tl_set:N = \l_acro_list_type_tl , + list-header .tl_set:N = \l_acro_list_title_tl , + list-name .tl_set:N = \l_acro_list_name_tl , + list-table-width .dim_set:N = \l_acro_table_width_dim , + hyperref .bool_set:N = \l_acro_use_hyperref_bool , + only-used .bool_set:N = \l_acro_print_only_used_bool , + plural-ending .tl_set:N = \l_acro_default_plural_tl , + list-caps .bool_set:N = \l_acro_capitalize_list_bool , + } + +% setup command: +\NewDocumentCommand \acsetup { m } + { \keys_set:nn { acro } { #1 } \ignorespaces } + +% -------------------------------------------------------------------------- +% adding an acronym, internal command: +% #1: use/replace plural (boolean) +% #2: id +% #3: short +% #4: short plural +% #5: alt +% #6: long +% #7: long plural +% #8: class +% #9: extra +\cs_new:Npn \acro_new:nnnnnnnnn #1#2#3#4#5#6#7#8#9 + { + \IfBooleanTF { #1 } + { \prop_put:Nnn \l_acro_replace_plural_prop { #2 } { \c_true_bool } } + { \prop_put:Nnn \l_acro_replace_plural_prop { #2 } { \c_false_bool } } + \prop_put:Nnn \l_acro_short_prop { #2 } { #3 } + \IfNoValueTF { #4 } + { \prop_put:Nnn \l_acro_short_plural_prop { #2 } { \l_acro_default_plural_tl } } + { \prop_put:Nnn \l_acro_short_plural_prop { #2 } { #4 } } + \IfNoValueTF { #5 } + { \prop_put:Nnn \l_acro_alt_prop { #2 } { #2 } } + { \prop_put:Nnn \l_acro_alt_prop { #2 } { #5 } } + \prop_put:Nnn \l_acro_long_prop { #2 } { #6 } + \IfNoValueTF { #7 } + { \prop_put:Nnn \l_acro_long_plural_prop { #2 } { \l_acro_default_plural_tl } } + { \prop_put:Nnn \l_acro_long_plural_prop { #2 } { #7 } } + \IfNoValueF { #8 } + { \prop_put:Nnn \l_acro_class_prop { #2 } { #8} } + \IfNoValueF { #9 } + { \prop_put:Nnn \l_acro_extra_prop { #2 } { #9 } } + \bool_new:c { g_acro_#2_used_bool } + \bool_new:c { g_acro_#2_label_bool } + \bool_if:NT \l_acro_create_macros_bool + { + \cs_if_exist:cTF { #2 } + { + \bool_if:NT \l_acro_strict_bool + { \cs_set:cpn { #2 } { \ac { #2 } } } + } + { \cs_new:cpn { #2 } { \ac { #2 } } } + } + } + +% typeset the short form: +\cs_new:Npn \acro_write_short:n #1 + { + \mode_if_horizontal:F { \leavevmode } + \group_begin: + \bool_if:NTF \l_acro_custom_format_bool + { \l_acro_custom_format_tl } + { \l_acro_short_format_tl } + { \hbox:n { #1 } } + \group_end: + \bool_if:NT \l_acro_use_plural_bool + { \tl_use:N \l_acro_short_plural_tl } + } +\cs_generate_variant:Nn \acro_write_short:n { V } + +% typeset the longform,...: +\cs_new:Npn \acro_write:Nn #1#2 + { + \mode_if_horizontal:F { \leavevmode } + \group_begin: + \tl_use:N #1 + \bool_if:NTF \l_acro_first_upper_bool + { \tl_to_uppercase:n { \tl_head:n { #2 } } \tl_tail:n { #2 } } + { #2 } + \group_end: + } +\cs_generate_variant:Nn \acro_write:Nn { NV,No,Nf } + +% -------------------------------------------------------------------------- +% hyperref support +\cs_new_eq:NN \acro_hyper_target:nn \use_ii:nn +\cs_new_eq:NN \acro_hyper_link:nn \use_ii:nn + +\cs_new:Npn \acro_activate_hyperref_support: + { + \bool_if:nT { \l_acro_hyperref_loaded_bool && \l_acro_use_hyperref_bool } + { + \cs_set_eq:NN \acro_hyper_link:nn \hyperlink + \cs_set:Npn \acro_hyper_target:nn ##1##2 + { \raisebox { 3ex } [ 0pt ] { \hypertarget { ##1 } { } } ##2 } + } + } + +\cs_new:Npn \acro_make_link:nNN #1#2#3 + { + \tl_set:Nn #2 + { + \acro_hyper_link:nn { #1 } { \phantom { #3 } } + \acro_is_single:nTF { #1 } { \hbox_overlap_left:n { #3 } } + { + \bool_if:nTF { \l_acro_use_hyperref_bool && \l_acro_hyperref_loaded_bool } + { \textcolor { \@linkcolor } { \hbox_overlap_left:n { #3 } } } + { \hbox_overlap_left:n { #3 } } + } + } + } + +% -------------------------------------------------------------------------- +% output style of the first time an acronym is used +\bool_new:N \l_acro_first_use_brackets_bool +\bool_new:N \l_acro_first_only_short_bool +\bool_new:N \l_acro_first_reversed_bool +\tl_new:N \l_acro_first_brackets_tl + +% #1: short +% #2: long +\DeclareObjectType { acro-first } { 2 } + +\DeclareTemplateInterface { acro-first } { text } { 2 } + { + brackets : boolean = true , + brackets-type : tokenlist = () , + only-short : boolean = false , + reversed : boolean = false , + between : tokenlist , + } +\DeclareTemplateCode { acro-first } { text } { 2 } + { + brackets = \l_acro_first_use_brackets_bool , + brackets-type = \l_acro_first_brackets_tl , + only-short = \l_acro_first_only_short_bool , + reversed = \l_acro_first_reversed_bool , + between = \l_acro_first_between_tl , + } + { + \AssignTemplateKeys + \bool_if:nT { !\l_acro_first_only_short_bool && !\l_acro_first_reversed_bool } + { + \acro_write:No \l_acro_long_format_tl { #2 } + \tl_use:N \c_space_tl + \tl_if_blank:VF \l_acro_first_between_tl + { + \tl_use:N \l_acro_first_between_tl + \tl_use:N \c_space_tl + } + } + \bool_if:nT { \l_acro_first_use_brackets_bool && !\l_acro_first_reversed_bool } + { \tl_head:N \l_acro_first_brackets_tl } + \acro_write_short:n { #1 } + \bool_if:nT { \l_acro_first_use_brackets_bool && !\l_acro_first_reversed_bool } + { \tl_tail:N \l_acro_first_brackets_tl } + \bool_if:nT { !\l_acro_first_only_short_bool && \l_acro_first_reversed_bool } + { + \tl_if_blank:VF \l_acro_first_between_tl + { + \tl_use:N \c_space_tl + \tl_use:N \l_acro_first_between_tl + } + \tl_use:N \c_space_tl + \bool_if:nT { \l_acro_first_use_brackets_bool && \l_acro_first_reversed_bool } + { \tl_head:N \l_acro_first_brackets_tl } + \acro_write:No \l_acro_long_format_tl { #2 } + \bool_if:nT { \l_acro_first_use_brackets_bool && \l_acro_first_reversed_bool } + { \tl_tail:N \l_acro_first_brackets_tl } + } + } + +\DeclareTemplateInterface { acro-first } { footnote } { 2 } { } +\DeclareTemplateCode { acro-first } { footnote } { 2 } { } + { + \AssignTemplateKeys + \acro_write_short:n { #1 } + \footnote { \acro_write:No \l_acro_long_format_tl { #2 } } + } + +% the different styles: +\DeclareInstance { acro-first } { default } { text } { } +\DeclareInstance { acro-first } { square } { text } + { brackets-type = [] } +\DeclareInstance { acro-first } { plain } { text } + { brackets = false , between = -- } +\DeclareInstance { acro-first } { plain-reversed } { text } + { brackets = false , between = -- , reversed = true } +\DeclareInstance { acro-first } { footnote } { footnote } { } +\DeclareInstance { acro-first } { short } { text } + { only-short = true , brackets = false } +\DeclareInstance { acro-first } { reversed } { text } + { reversed = true } + +% -------------------------------------------------------------------------- +% formatting the extras information: +\bool_new:N \l_acro_extra_punct_bool +\bool_new:N \l_acro_extra_use_brackets_bool +\tl_new:N \l_acro_extra_brackets_tl +\tl_new:N \l_acro_extra_punct_tl + +\DeclareObjectType { acro-extra } { 1 } + +\DeclareTemplateInterface { acro-extra } { default } { 1 } + { + punct : boolean = false , + punct-symbol : tokenlist = {,} , + brackets : boolean = true , + brackets-type : tokenlist = () + } + +\DeclareTemplateCode { acro-extra } { default } { 1 } + { + punct = \l_acro_extra_punct_bool , + punct-symbol = \l_acro_extra_punct_tl , + brackets = \l_acro_extra_use_brackets_bool , + brackets-type = \l_acro_extra_brackets_tl + } + { + \AssignTemplateKeys + \bool_if:NT \l_acro_extra_punct_bool + { \tl_use:N \l_acro_extra_punct_tl \tl_use:N \c_space_tl } + \bool_if:NT \l_acro_extra_use_brackets_bool + { \tl_head:N \l_acro_extra_brackets_tl } + \acro_write:Nn \l_acro_extra_format_tl { #1 } + \bool_if:NT \l_acro_extra_use_brackets_bool + { \tl_tail:N \l_acro_extra_brackets_tl } + } + +% the different styles: +\DeclareInstance { acro-extra } { default } { default } + { brackets = false , punct = true , punct-symbol = . } +\DeclareInstance { acro-extra } { plain } { default } + { brackets = false , punct = false } +\DeclareInstance { acro-extra } { paren } { default } { } +\DeclareInstance { acro-extra } { bracket } { default } { brackets-type=[] } +\DeclareInstance { acro-extra } { comma } { default } + { punct = true, brackets = false } + +% -------------------------------------------------------------------------- +% outputting the page number: +\bool_new:N \l_acro_page_punct_bool +\bool_new:N \l_acro_page_display_bool +\tl_new:N \l_acro_page_punct_tl +\dim_new:N \l_acro_page_space_dim + +\cs_new:Npn \acro_no_break: { \tex_penalty:D \c_ten_thousand } + +\DeclareObjectType { acro-page-number } { 1 } + +\DeclareTemplateInterface { acro-page-number } { default } { 1 } + { + display : boolean = true , + punct : boolean = false , + punct-symbol : tokenlist = {,} , + brackets : boolean = false , + brackets-type : tokenlist = () , + space : length = .3ex , + name : tokenlist , + } + +\DeclareTemplateCode { acro-page-number } { default } { 1 } + { + display = \l_acro_page_display_bool , + punct = \l_acro_page_punct_bool , + punct-symbol = \l_acro_page_punct_tl , + brackets = \l_acro_page_brackets_bool , + brackets-type = \l_acro_page_brackets_tl , + space = \l_acro_page_space_dim , + name = \l_acro_page_name_tl , + } + { + \AssignTemplateKeys + \bool_if:NT \l_acro_page_display_bool + { + \bool_if:NT \l_acro_page_punct_bool + { \tl_use:N \l_acro_page_punct_tl } + \tl_use:N \c_space_tl + \bool_if:NT \l_acro_page_brackets_bool + { \tl_head:N \l_acro_page_brackets_tl } + \tl_use:N \l_acro_page_name_tl + \acro_no_break: + \skip_horizontal:N \l_acro_page_space_dim + \acro_no_break: + \pageref { ac:#1 } + \bool_if:NT \l_acro_page_brackets_bool + { \tl_tail:N \l_acro_page_brackets_tl } + } + } + +% the different styles: +\DeclareInstance { acro-page-number } { default } { default } + { punct = true , punct-symbol = . } +\DeclareInstance { acro-page-number } { plain } { default } + { punct = false } +\DeclareInstance { acro-page-number } { comma } { default } { punct = true } +\DeclareInstance { acro-page-number } { paren } { default } + { brackets=true , punct-symbol = ~ } +\DeclareInstance { acro-page-number } { none } { default } + { display = false } + +% -------------------------------------------------------------------------- +% the title of the list: +\cs_new:Npn \acro_list_title_format:n #1 { #1 } + +\DeclareObjectType { acro-title } { 1 } + +\DeclareTemplateInterface { acro-title } { sectioning } { 1 } + { name-format : function 1 = #1 } + +\DeclareTemplateCode { acro-title } { sectioning } { 1 } + { name-format = \acro_list_title_format:n } + { + \AssignTemplateKeys + \acro_list_title_format:n { #1 } + } + +% the different styles: +\DeclareInstance { acro-title } { chapter* } { sectioning } + { name-format = \chapter* { #1 } } +\DeclareInstance { acro-title } { part* } { sectioning } + { name-format = \part* { #1 } } +\DeclareInstance { acro-title } { section* } { sectioning } + { name-format = \section* { #1 } } +\DeclareInstance { acro-title } { subsection* } { sectioning } + { name-format = \subsection* { #1 } } +\DeclareInstance { acro-title } { chapter } { sectioning } + { name-format = \chapter { #1 } } +\DeclareInstance { acro-title } { part } { sectioning } + { name-format = \part { #1 } } +\DeclareInstance { acro-title } { section } { sectioning } + { name-format = \section { #1 } } +\DeclareInstance { acro-title } { subsection } { sectioning } + { name-format = \subsection { #1 } } + +% -------------------------------------------------------------------------- +% outputting the whole list +\DeclareObjectType { acro-list } { 3 } + +% excluded items: +\bool_new:N \l_acro_is_excluded_bool +\cs_generate_variant:Nn \tl_if_eq:nnT { nV } +% #1: id +% #2: excluded classes +% #3: continue if not excluded +\cs_new:Npn \acro_is_excluded:nnF #1#2#3 + { + \bool_set_false:N \l_acro_is_excluded_bool + \IfNoValueTF { #2 } + { #3 } + { + \clist_map_inline:nn { #2 } + { + \prop_get:NnN \l_acro_class_prop { #1 } \l_tmpa_tl + \tl_if_eq:nVT { ##1 } \l_tmpa_tl + { \bool_set_true:N \l_acro_is_excluded_bool } + } + \bool_if:NF \l_acro_is_excluded_bool { #3 } + } + } + +% build the list, dummy functions to be redefined in the template code: +\cs_new:Npn \acro_print_list_short:nn #1#2 { } +\cs_new:Npn \acro_print_list_long:n #1 { } +\cs_new:Npn \acro_print_list_extra:n #1 { } +\cs_new:Npn \acro_print_list_page:n #1 { } + +% Test, if acronyms should be printed or not; needs testing for in/excluded +% classes and options `only-used' and `single': +\cs_new:Npn \acro_list_allow_items:nn #1#2 + { + \prop_map_inline:Nn \l_acro_short_prop + { + \acro_get:n { ##1 } + \bool_if:nT + { + ( \l_acro_use_single_bool && \cs_if_exist_p:c { acro@##1@twice } ) || + ( !\l_acro_use_single_bool && \cs_if_exist_p:c { acro@##1@once } && \l_acro_print_only_used_bool ) || + ( !\l_acro_use_single_bool && !\l_acro_print_only_used_bool ) + } + { + \acro_is_excluded:nnF { ##1 } { #2 } + { + \tl_if_blank:nTF { #1 } + { + \acro_print_list_short:nn { ##1 } { ##2 } + \bool_if:NT \l_acro_capitalize_list_bool + { \bool_set_true:N \l_acro_first_upper_bool } + \acro_print_list_long:n { ##1 } + \bool_set_false:N \l_acro_first_upper_bool + \acro_print_list_extra:n { ##1 } + \acro_print_list_page:n { ##1 } + } + { + \clist_map_inline:nn { #1 } + { + \prop_get:NnNT \l_acro_class_prop { ##1 } \l_tmpa_tl + { + \tl_set:Nn \l_tmpb_tl { ####1 } + \tl_trim_spaces:N \l_tmpa_tl + \tl_trim_spaces:N \l_tmpb_tl + \tl_if_eq:NNT \l_tmpa_tl \l_tmpb_tl + { + \acro_print_list_short:nn { ##1 } { ##2 } + \bool_if:NT \l_acro_capitalize_list_bool + { \bool_set_true:N \l_acro_first_upper_bool } + \acro_print_list_long:n { ##1 } + \bool_set_false:N \l_acro_first_upper_bool + \acro_print_list_extra:n { ##1 } + \acro_print_list_page:n { ##1 } + } + } + } + } + } + } + } + } + +% list template: +\DeclareTemplateInterface { acro-list } { list } { 3 } + { } + +\DeclareTemplateCode { acro-list } { list } { 3 } + { } + { + \AssignTemplateKeys + \acro_activate_hyperref_support: + \cs_set:Npn \acro_print_list_short:nn ##1##2 + { \item [ \acro_hyper_target:nn { ##1 } { \acro_write_short:n { ##2 } } ] } + \cs_set:Npn \acro_print_list_long:n ##1 + { \acro_write:Nf \l_acro_long_format_tl { \prop_get:Nn \l_acro_long_prop { ##1 } } } + \cs_set:Npn \acro_print_list_extra:n ##1 + { + \prop_get:NnNT \l_acro_extra_prop { ##1 } \l_tmpa_tl + { + \UseInstance { acro-extra } { \l_acro_extra_instance_tl } + { \l_tmpa_tl } + } + } + \cs_set:Npn \acro_print_list_page:n ##1 + { + \bool_if:nT { \cs_if_exist_p:c { acro@##1@once } } + { \UseInstance { acro-page-number } { \l_acro_page_instance_tl } { ##1 } } + } + \begin { #1 } + \acro_list_allow_items:nn { #2 } { #3 } + \end { #1 } + } + +% table template: +\tl_new:N \l_acro_list_table_tl +\tl_new:N \l_acro_list_table_spec_tl + +\DeclareTemplateInterface { acro-list } { table } { 3 } + { + table : tokenlist = longtable , + table-spec : tokenlist = lp{\l_acro_table_width_dim} + } + +\DeclareTemplateCode { acro-list } { table } { 3 } + { + table = \l_acro_list_table_tl , + table-spec = \l_acro_list_table_spec_tl + } + { + \AssignTemplateKeys + \acro_activate_hyperref_support: + \cs_set:Npn \acro_print_list_short:nn ##1##2 + { \acro_hyper_target:nn { ##1 } { \acro_write_short:n { ##2 } } & } + \cs_set:Npn \acro_print_list_long:n ##1 + { \acro_write:Nf \l_acro_long_format_tl { \prop_get:Nn \l_acro_long_prop { ##1 } } } + \cs_set:Npn \acro_print_list_extra:n ##1 + { + \prop_get:NnNT \l_acro_extra_prop { ##1 } \l_tmpa_tl + { + \UseInstance { acro-extra } { \l_acro_extra_instance_tl } + { \l_tmpa_tl } + } + } + \cs_set:Npn \acro_print_list_page:n ##1 + { + \bool_if:nT { \cs_if_exist_p:c { acro@##1@once } } + { \UseInstance { acro-page-number } { \l_acro_page_instance_tl } { ##1 } } + \tabularnewline + } + \exp_args:Noo \begin { \l_acro_list_table_tl } { \l_acro_list_table_spec_tl } + \acro_list_allow_items:nn { #2 } { #3 } + \exp_args:No \end { \l_acro_list_table_tl } + } + +% extra-table template: +\DeclareTemplateInterface { acro-list } { extra-table } { 3 } + { + table : tokenlist = longtable , + table-spec : tokenlist = lp{\l_acro_table_width_dim}ll + } + +\DeclareTemplateCode { acro-list } { extra-table } { 3 } + { + table = \l_acro_list_table_tl , + table-spec = \l_acro_list_table_spec_tl + } + { + \AssignTemplateKeys + \acro_activate_hyperref_support: + \cs_set:Npn \acro_print_list_short:nn ##1##2 + { \acro_hyper_target:nn { ##1 } { \acro_write_short:n { ##2 } } & } + \cs_set:Npn \acro_print_list_long:n ##1 + { \acro_write:Nf \l_acro_long_format_tl { \prop_get:Nn \l_acro_long_prop { ##1 } } & } + \cs_set:Npn \acro_print_list_extra:n ##1 + { + \prop_get:NnNT \l_acro_extra_prop { ##1 } \l_tmpa_tl + { + \UseInstance { acro-extra } { \l_acro_extra_instance_tl } + { \l_tmpa_tl } + } + & + } + \cs_set:Npn \acro_print_list_page:n ##1 + { + \bool_if:nT { \cs_if_exist_p:c { acro@##1@once } } + { \UseInstance { acro-page-number } { \l_acro_page_instance_tl } { ##1 } } + \tabularnewline + } + \exp_args:Noo \begin { \l_acro_list_table_tl } { \l_acro_list_table_spec_tl } + \acro_list_allow_items:nn { #2 } { #3 } + \exp_args:No \end { \l_acro_list_table_tl } + } + +% extra-table-rev template: +\DeclareTemplateInterface { acro-list } { extra-table-rev } { 3 } + { + table : tokenlist = longtable , + table-spec : tokenlist = llp{\l_acro_table_width_dim}l + } + +\DeclareTemplateCode { acro-list } { extra-table-rev } { 3 } + { + table = \l_acro_list_table_tl , + table-spec = \l_acro_list_table_spec_tl + } + { + \AssignTemplateKeys + \acro_activate_hyperref_support: + \cs_set:Npn \acro_print_list_short:nn ##1##2 + { \acro_hyper_target:nn { ##1 } { \acro_write_short:n { ##2 } } & } + \cs_set:Npn \acro_print_list_extra:n ##1 + { + \bool_if:NT \l_acro_capitalize_list_bool + { \bool_set_true:N \l_acro_first_upper_bool } + \acro_write:Nf \l_acro_long_format_tl + { \prop_get:Nn \l_acro_long_prop { ##1 } } & + } + \cs_set:Npn \acro_print_list_long:n ##1 + { + \prop_get:NnNT \l_acro_extra_prop { ##1 } \l_tmpa_tl + { + \UseInstance { acro-extra } { \l_acro_extra_instance_tl } + { \l_tmpa_tl } + } + & + } + \cs_set:Npn \acro_print_list_page:n ##1 + { + \bool_if:nT { \cs_if_exist_p:c { acro@##1@once } } + { \UseInstance { acro-page-number } { \l_acro_page_instance_tl } { ##1 } } + \tabularnewline + } + \exp_args:Noo \begin { \l_acro_list_table_tl } { \l_acro_list_table_spec_tl } + \acro_list_allow_items:nn { #2 } { #3 } + \exp_args:No \end { \l_acro_list_table_tl } + } + +% the different styles: +\DeclareInstance { acro-list } { list } { list } { } +\DeclareInstance { acro-list } { tabular } { table } + { table = tabular } +\DeclareInstance { acro-list } { longtable } { table } + { table = longtable } +\DeclareInstance { acro-list } { extra-longtable } { extra-table } + { table = longtable } +\DeclareInstance { acro-list } { extra-tabular } { extra-table } + { table = tabular } +\DeclareInstance { acro-list } { extra-longtable-rev } { extra-table-rev } + { table = longtable } +\DeclareInstance { acro-list } { extra-tabular-rev } { extra-table-rev } + { table = tabular } + +% -------------------------------------------------------------------------- +% automatic typesetting, the internals of \ac: +% #1: id +\cs_new:Npn \acro_use:n #1 + { + % get the acronym and the plural settings: + \acro_get:n { #1 } + \acro_set_plural:n { #1 } + \acro_is_used:nTF { #1 } + { + % this is not the first time + \acro_write_short:V \l_acro_short_tl + } + { + % this is the first time + \acro_is_single:nTF { #1 } + { \acro_write:NV \l_acro_long_format_tl \l_acro_long_tl } + { + \UseInstance { acro-first } { \l_acro_first_instance_tl } + { \l_acro_short_tl } { \l_acro_long_tl } + } + } + } + +\cs_new:Npn \acro_is_single:nTF #1#2#3 + { + \bool_if:nTF { !\l_acro_use_single_bool || \cs_if_exist_p:c { acro@#1@twice } } + { #3 } { #2 } + } + +\cs_new:Npn \acro_is_single:nT #1#2 + { + \bool_if:nF { !\l_acro_use_single_bool || \cs_if_exist_p:c { acro@#1@twice } } + { #2 } + } + +% -------------------------------------------------------------------------- +% some helpers we'll need more often: +\cs_new:Npn \acro_get:n #1 + { + \acro_activate_hyperref_support: + \prop_get:NnNF \l_acro_short_prop { #1 } \l_tmpa_tl + { \msg_error:nnx { acro } { undefined } { #1 } } + \acro_make_link:nNN { #1 } \l_acro_short_tl \l_tmpa_tl + \prop_get:NnN \l_acro_short_plural_prop { #1 } \l_acro_short_plural_tl + \prop_get:NnN \l_acro_long_prop { #1 } \l_acro_long_tl + \prop_get:NnN \l_acro_alt_prop { #1 } \l_tmpb_tl + \acro_make_link:nNN { #1 } \l_acro_alt_tl \l_tmpb_tl + \prop_get:NnNTF \l_acro_format_prop { #1 } \l_acro_custom_format_tl + { \bool_set_true:N \l_acro_custom_format_bool } + { \bool_set_false:N \l_acro_custom_format_bool } + } + +\cs_generate_variant:Nn \tl_put_right:Nn { NV } + +\cs_new:Npn \acro_set_plural:n #1 + { + \bool_if:NT \l_acro_use_plural_bool + { + \bool_if:nTF { \prop_get:Nn \l_acro_replace_plural_prop { #1 } } + { + \prop_get:NnN \l_acro_short_plural_prop { #1 } \l_acro_alt_tl + \prop_get:NnN \l_acro_long_plural_prop { #1 } \l_acro_long_tl + } + { + \tl_put_right:Nn \l_acro_long_tl + { \prop_get:Nn \l_acro_long_plural_prop { #1 } } + } + } + } + +% -------------------------------------------------------------------------- +% enable us to know if the acronym is used only once and provide a different +% style for that: +\cs_new:Npn \acro_is_used:nTF #1#2#3 + { + \bool_if:cTF { g_acro_#1_used_bool } + { \iow_now:Nx \@auxout { \string \acro@used@twice { #1 } } #2 } + { + \iow_now:Nx \@auxout { \string \acro@used@once { #1 } } + \bool_if:cF { g_acro_#1_label_bool } + { + \bool_gset_true:c { g_acro_#1_label_bool } + \label{ac:#1} + } + \bool_gset_true:c { g_acro_#1_used_bool } + #3 + } + } + +\cs_new:Npn \acro_is_used:n #1 + { \acro_is_used:nTF { #1 } { } { } } + +\cs_new:Npn \acro@used@once #1 + { \expandafter\xdef\csname acro@#1@once \endcsname { #1 } } +\cs_new:Npn \acro@used@twice #1 + { \expandafter\xdef\csname acro@#1@twice \endcsname { #1 } } + +\AtEndDocument + { + \cs_set:Npn \acro@used@twice #1 + { + \def\reserved@a{#1}% + \expandafter\ifx\csname acro@#1@twice \endcsname\reserved@a\else + \@tempswatrue\fi + } + } + +% -------------------------------------------------------------------------- +% the standard internals: +\cs_new:Npn \acro_short:n #1 + { + \acro_get:n { #1 } + \acro_set_plural:n { #1 } + \acro_is_used:n { #1 } + \acro_is_single:nT { #1 } + { \cs_set_eq:NN \acro_hyper_link:nn \use_ii:nn } + \acro_write_short:V \l_acro_short_tl + } + +% get alternative entry: +\cs_new:Npn \acro_alt:n #1 + { + \acro_get:n { #1 } + \acro_set_plural:n { #1 } + \acro_is_used:n { #1 } + \acro_is_single:nT { #1 } + { \cs_set_eq:NN \acro_hyper_link:nn \use_ii:nn } + \acro_write_short:V \l_acro_alt_tl + } + +% get long entry: +\cs_new:Npn \acro_long:n #1 + { + \acro_get:n { #1 } + \acro_set_plural:n { #1 } + \acro_is_used:n { #1 } + \acro_is_single:nT { #1 } + { \cs_set_eq:NN \acro_hyper_link:nn \use_ii:nn } + \acro_write:NV \l_acro_long_format_tl \l_acro_long_tl + } + +% output like the first time: +\cs_new:Npn \acro_first:n #1 + { + \acro_get:n { #1 } + \acro_set_plural:n { #1 } + \acro_is_used:n { #1 } + \acro_is_single:nT { #1 } + { \cs_set_eq:NN \acro_hyper_link:nn \use_ii:nn } + \UseInstance { acro-first } { \l_acro_first_instance_tl } + { \l_acro_short_tl } { \l_acro_long_tl } + } + +% set custom format: +\cs_new:Npn \acro_format:nn #1#2 + { \prop_put:Nnn \l_acro_format_prop { #1 } { #2 } } + +% -------------------------------------------------------------------------- +% experimental sorting feature: +\AtBeginDocument + { + \bool_if:NT \l_acro_sort_bool + { + \RequirePackage { l3sort } + \prop_new:N \l_tmpa_prop + \seq_new:N \l_tmpa_seq + + \cs_new:Npn \acro_sort_prop:N #1 + { + \seq_clear:N \l_tmpa_seq + \prop_map_inline:Nn #1 + { \seq_put_right:Nn \l_tmpa_seq { ##1 } } + \seq_sort:Nn \l_tmpa_seq + { + \tl_to_lowercase:n { + \int_compare:nTF { \pdfstrcmp { ##1 } { ##2 } = -1 } + { \sort_ordered: } + { \sort_reversed: } + } + } + \prop_clear:N \l_tmpa_prop + \seq_map_inline:Nn \l_tmpa_seq + { + \prop_get:NnN #1 { ##1 } \l_tmpa_tl + \prop_put:NnV \l_tmpa_prop { ##1 } \l_tmpa_tl + } + \prop_set_eq:NN #1 \l_tmpa_prop + } + } + } + +% -------------------------------------------------------------------------- +% print the whole list: +\cs_new:Npn \acro_print_acronyms:nn #1#2 + { + \iow_now:Nx \@auxout { \string \acro@print@list } + \bool_if:NT \l_acro_sort_bool + { \acro_sort_prop:N \l_acro_short_prop } + \UseInstance { acro-title } { \l_acro_list_title_tl } + { \l_acro_list_name_tl } + \cs_if_exist:NTF \acro@printed@list + { + \UseInstance { acro-list } { \l_acro_list_instance_tl } + { \l_acro_list_type_tl } { #1 } { #2 } + } + { \@latex@warning@no@line {Rerun~to~get~acronym~list~right} } + } + +\cs_new:Npn \acro@print@list + { \cs_if_exist:NF \acro@printed@list { \cs_new:Npn \acro@printed@list {} } } + +% -------------------------------------------------------------------------- +% USER COMMANDS +% adding an acronym, user command: +% #1: use/replace plural (boolean) +% #2: id +% #3: short +% #4: short plural +% #5: alt +% #6: long +% #7: long plural +% #8: class +% #9: extra +\NewDocumentCommand \DeclareAcronym { sm>{\SplitArgument{1}{,}}mo>{\SplitArgument{1}{,}}+mgo } + { \acro_new:nnnnnnnnn { #1 } { #2 } #3 { #4 } #5 { #7 } { #6 } } +\@onlypreamble \DeclareAcronym + +\NewDocumentCommand \DeclareAcronymFormat { mm } + { \acro_format:nn { #1 } { #2 } } +\@onlypreamble \DeclareAcronymFormat + +% automatic: +\NewDocumentCommand \ac { m } + { + \group_begin: + \acro_use:n { #1 } + \group_end: + } + +\NewDocumentCommand \Ac { m } + { + \group_begin: + \bool_set_true:N \l_acro_first_upper_bool + \acro_use:n { #1 } + \group_end: + } + +\NewDocumentCommand \acp { m } + { + \group_begin: + \bool_set_true:N \l_acro_use_plural_bool + \acro_use:n { #1 } + \group_end: + } + +\NewDocumentCommand \Acp { m } + { + \group_begin: + \bool_set_true:N \l_acro_use_plural_bool + \bool_set_true:N \l_acro_first_upper_bool + \acro_use:n { #1 } + \group_end: + } + +% short: +\NewDocumentCommand \acs { m } + { + \group_begin: + \acro_short:n { #1 } + \group_end: + } + +\NewDocumentCommand \acsp { m } + { + \group_begin: + \bool_set_true:N \l_acro_use_plural_bool + \acro_short:n { #1 } + \group_end: + } + +% alt: +\NewDocumentCommand \aca { m } + { + \group_begin: + \acro_alt:n { #1 } + \group_end: + } + +\NewDocumentCommand \acap { m } + { + \group_begin: + \bool_set_true:N \l_acro_use_plural_bool + \acro_alt:n { #1 } + \group_end: + } + +% long: +\NewDocumentCommand \acl { m } + { + \group_begin: + \acro_long:n { #1 } + \group_end: + } + +\NewDocumentCommand \Acl { m } + { + \group_begin: + \bool_set_true:N \l_acro_first_upper_bool + \acro_long:n { #1 } + \group_end: + } + +\NewDocumentCommand \aclp { m } + { + \group_begin: + \bool_set_true:N \l_acro_use_plural_bool + \acro_long:n { #1 } + \group_end: + } + +\NewDocumentCommand \Aclp { m } + { + \group_begin: + \bool_set_true:N \l_acro_use_plural_bool + \bool_set_true:N \l_acro_first_upper_bool + \acro_long:n { #1 } + \group_end: + } + +% first: +\NewDocumentCommand \acf { m } + { + \group_begin: + \acro_first:n { #1 } + \group_end: + } + +\NewDocumentCommand \Acf { m } + { + \group_begin: + \bool_set_true:N \l_acro_first_upper_bool + \acro_first:n { #1 } + \group_end: + } + +\NewDocumentCommand \acfp { m } + { + \group_begin: + \bool_set_true:N \l_acro_use_plural_bool + \acro_first:n { #1 } + \group_end: + } + +\NewDocumentCommand \Acfp { m } + { + \group_begin: + \bool_set_true:N \l_acro_use_plural_bool + \bool_set_true:N \l_acro_first_upper_bool + \acro_first:n { #1 } + \group_end: + } + +% reset outputs, they'll behave like the first time again (!not like the _only_ +% time!): +\NewDocumentCommand \acresetall {} + { + \prop_map_inline:Nn \l_acro_short_prop + { \bool_gset_false:c { g_acro_##1_used_bool } } + } + +% typeset the list: +\NewDocumentCommand \printacronyms { G{}o } + { \acro_print_acronyms:nn { #1 } { #2 } } + +\ProcessKeysOptions { acro } + +\AtBeginDocument + { + \@ifpackageloaded { hyperref } + { \bool_set_true:N \l_acro_hyperref_loaded_bool } {} + } + +\tex_endinput:D +% -------------------------------------------------------------------------- +% HISTORY: +2012/06/22 v0.1 - first public release +2012/06/23 v0.1a - bug fix, added `strict' and `macros' option and creation of + shortcut macros + - added capitalized version of long forms + - added `sort' option +2012/06/24 v0.1b - added \Acf and \Acfp, added option `plural-ending' +2012/06/24 v0.1c - added excluded argument to \printacronyms +2012/06/24 v0.2 - renamed \NewAcronym => \DeclareAcronym + \AcronymFormat => \DeclareAcronymFormat +2012/06/25 v0.2a - new first-style's: `short' and `reversed' +2012/06/25 v0.3 - new list formats: extra-tabular, extra-longtable, + extra-tabular-rev, extra-longtable-rev + - extra precaution when using \printacronyms to avoid errors. +2012/06/27 v0.3a - new option `list-caps', \Acp added +2012/06/29 v0.3b - extended the `text' template to the `acro-first' object + - added `acro-first' instances `plain' and `plain-reversed' +2012/07/16 v0.3c - small adjustments to the documentation +2012/07/23 v0.3d - first CTAN version + +% -------------------------------------------------------------------------- +% TODO: +- Sprach-Support Überschrift der Acronym-Liste +- Option `totoc'?
\ No newline at end of file |