summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/acro/README4
-rw-r--r--Master/texmf-dist/doc/latex/acro/acro_en.pdfbin534088 -> 459831 bytes
-rw-r--r--Master/texmf-dist/doc/latex/acro/acro_en.tex141
-rw-r--r--Master/texmf-dist/tex/latex/acro/acro.sty240
4 files changed, 289 insertions, 96 deletions
diff --git a/Master/texmf-dist/doc/latex/acro/README b/Master/texmf-dist/doc/latex/acro/README
index b7b055f2500..9e15f1da87a 100644
--- a/Master/texmf-dist/doc/latex/acro/README
+++ b/Master/texmf-dist/doc/latex/acro/README
@@ -1,9 +1,9 @@
--------------------------------------------------------------------------
-the ACRO package v0.4a
+the ACRO package v0.5
Typeset Acronyms
-2012/10/07
+2012/11/30
--------------------------------------------------------------------------
Clemens Niederberger
Web: https://bitbucket.org/cgnieder/acro/
diff --git a/Master/texmf-dist/doc/latex/acro/acro_en.pdf b/Master/texmf-dist/doc/latex/acro/acro_en.pdf
index deb39439ed4..abb090fe4bd 100644
--- a/Master/texmf-dist/doc/latex/acro/acro_en.pdf
+++ b/Master/texmf-dist/doc/latex/acro/acro_en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/acro/acro_en.tex b/Master/texmf-dist/doc/latex/acro/acro_en.tex
index 37749ff72b9..a2d59b21066 100644
--- a/Master/texmf-dist/doc/latex/acro/acro_en.tex
+++ b/Master/texmf-dist/doc/latex/acro/acro_en.tex
@@ -63,25 +63,12 @@
\ChangeEmph{(}[-.01em,.04em]{)}[.04em,-.05em]
\addcmds{
- ac,
- aca,
- acap,
- acf,
- acfp,
- acl,
- aclp,
- acp,
- acresetall,
- DeclareAcronymFormat,
- acs,
- acsetup,
- acsp,
+ ac,aca,acap,acf,acfp,acl,aclp,acp,acreset,acresetall,acs,acsetup,acsp,
addcolon,
- nato,
- DeclareAcronym,
+ DeclareAcronym,DeclareAcronymCitation,DeclareAcronymFormat,
+ DeclareAcronymPDFString,
linewidth,
- newlist,
- ny,
+ nato,newlist,ny,
printacronyms,
setlist
}
@@ -203,6 +190,9 @@
\DeclareAcronymCitation{ny}{NewYork}
\DeclareAcronym{ot}{ot}{Other Test}
\DeclareAcronymFormat{ot}{\scshape}
+\DeclareAcronym{pdf}{pdf}{Portable Document Format}
+ \DeclareAcronymFormat{pdf}{\scshape}
+ \DeclareAcronymPDFString{pdf}{PDF}
\DeclareAcronym{sw}{SW}{Sammelwerk,e}
\DeclareAcronym{test}{ST}{Some Test}
\DeclareAcronym{texse}{\{TeX\}.SE}{\TeX\ StackExchange}
@@ -210,6 +200,23 @@
\usepackage{imakeidx}
\makeindex[columns=3,options={-sl \jobname.ist},intoc]
+\usepackage{marginnote}
+\makeatletter
+\newcommand*\sinceversion[1]{%
+ \@bsphack
+ \marginnote{%
+ \footnotesize\sffamily\RaggedRight
+ \textcolor{black!75}{Introduced in version~#1}}%
+ \@esphack}
+\newcommand*\changedversion[1]{%
+ \@bsphack
+ \marginnote{%
+ \footnotesize\sffamily\RaggedRight
+ \textcolor{black!75}{Changed in version~#1}}%
+ \@esphack}
+\renewcommand*\cnpkgdoctriangle{}
+\makeatother
+
\begin{document}
\section{Licence and Requirements}
Permission is granted to copy, distribute and/or modify this software under the
@@ -253,14 +260,16 @@ some macros have the same name and meaning\footnote{\emph{Not} in the sense of
\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.
+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+
+ \Befehl{DeclareAcronymPDFString}{<id>}\ma{<pdf entry>,<plural ending>}
+ \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:
@@ -302,29 +311,39 @@ 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.
+ \befehl{ac}*{<id>} basic command; the first output is different from subsequent
+ ones.
+ \befehl{Ac}*{<id>} same as \cmd{ac} but capitalizes the first letter of the
+ long form.
+ \befehl{acs}*{<id>} \h{s}hort form; the actual acronym.
+ \befehl{acl}*{<id>} \h{l}ong form; the meaning of the acronym.
+ \befehl{Acl}*{<id>} same as \cmd{acl} but capitalizes first letter.
+ \befehl{aca}*{<id>} \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}*{<id>} first form; output like the first time \cmd{ac} is output.
+ \befehl{Acf}*{<id>} same as \cmd{acf} but capitalizes first letter of the long
+ form.
+ \befehl{acp}*{<id>} \h{p}lural form of \cmd{ac};
+ \befehl{Acp}*{<id>} same as \cmd{acp} but capitalizes first letter of the long
+ form.
+ \befehl{acsp}*{<id>} plural form of \cmd{acs};
+ \befehl{aclp}*{<id>} plural form of \cmd{acl};
+ \befehl{Aclp}*{<id>} same as \cmd{aclp} but capitalizes first letter.
+ \befehl{acap}*{<id>} plural form of \cmd{aca};
+ \befehl{acfp}*{<id>} plural form of \cmd{acf};
+ \befehl{Acfp}*{<id>} 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.
+\sinceversion{0.5}If you use the starred variant an acronym will not be marked as
+used. This proves useful if an acronym is typeset in a section title, for example,
+since then the appearance in the table of contents won't mark it as used.
+
\begin{beispiel}
% preamble: \DeclareAcronym{cd}{cd}{Compact Disc}
% \DeclareAcronymFormat{cd}{\scshape}
@@ -422,23 +441,57 @@ 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}
+\subsection{Reset or Mark as Used}\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:
+for the first time you can call one of these commands:
\begin{beschreibung}
+ \Befehl{acreset}{<comma separated list of ids>}\sinceversion{0.5}
\Befehl{acresetall}
\end{beschreibung}
\begin{beispiel}
- \acresetall
- \ac{ny}
+ \acreset{ny}\ac{ny}
\end{beispiel}
-Beware that this command acts \emph{globally} and effects \emph{all} acronyms!
+Beware that both commands act \emph{globally}! There is also one command that
+effectively is the opposite of \cmd{acreset}, i.e., it marks an acronym as used:
+\begin{beschreibung}
+ \Befehl{acuse}{<comma separated list of ids>}\sinceversion{0.5}
+\end{beschreibung}
\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.
+
+\subsection{\cmd{ac} and Friends in \acs*{pdf} Bookmarks}
+\noindent\sinceversion{0.5}\acro's commands usually are not expandable which
+means they'd leave unallowed tokens in \acs{pdf} bookmarks. \paket{hyperref}
+offers \cmd{texorpdfstring} to circumvent that issue manually but that isn't
+really a nice solution. What's the point of having macros to get output for you
+if you have to specify it manually after all?
+
+That is why \acro offers a preliminary solution for this. In a bookmark every
+\cmd{ac} like command falls back to a simple text string typesetting what \cmd{acs}
+would do (or \cmd{acsp} for plural forms). These text strings both can accessed
+manually and can be modified to an output reserved for \acs{pdf} bookmarks.
+
+\begin{beschreibung}
+ \befehl{acpdfstring}{<id>} access the text string used in \acs{pdf} bookmarks.
+ \befehl{acpdfstringplural}{<id>} access the plural form of the text string used
+ in \acs{pdf} bookmarks.
+ \Befehl{DeclareAcronymPDFString}{<id>}\ma{<pdf entry>,<plural ending>} \cnpkgdocarrow\
+ declare a custom text string for \acs{pdf} bookmarks.
+\end{beschreibung}
+
+For example the \acs{pdf} acronym used in the title for this section is defined
+as follows:
+\begin{beispiel}[code only]
+ \DeclareAcronym{pdf}{pdf}{Portable Document File}
+ \DeclareAcronymFormat{pdf}{\scshape}
+ \DeclareAcronymPDFString{pdf}{PDF}
+\end{beispiel}
+
+
\secidx*{Additional Commands}
\section{Printing the List}\label{sec:print_lists}\secidx{Printing the List}
@@ -506,8 +559,8 @@ There are a few options which change the general behaviour of \acro.
%%
\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}.
+ command that takes the cite key as argument is valid, for example \paket*{biblatex}'s%
+ \footnote{\CTANurl{biblatex}} \cmd*{footcite}.
%%
\Option{cite-space}{<code>}\Default{\cmd*{nobreakspace}}
Depending on the citation command in use a space should be inserted before the
@@ -529,7 +582,7 @@ options or via the setup command:
\end{beschreibung}
\begin{beispiel}
- % with \acsetup{macros}; remember I used \acresetall before
+ % with \acsetup{macros}
we could have used these before: \nato, \ny
\end{beispiel}
diff --git a/Master/texmf-dist/tex/latex/acro/acro.sty b/Master/texmf-dist/tex/latex/acro/acro.sty
index 7bac91c42d3..2ef9dc94a6b 100644
--- a/Master/texmf-dist/tex/latex/acro/acro.sty
+++ b/Master/texmf-dist/tex/latex/acro/acro.sty
@@ -31,8 +31,8 @@
\RequirePackage{expl3,xparse,l3keys2e,xtemplate}
\ProvidesExplPackage
{acro}
- {2012/10/07}
- {0.4a}
+ {2012/11/30}
+ {0.5}
{Typeset Acronyms}
% error messages:
@@ -51,6 +51,7 @@
\seq_new:N \l__acro_tmpa_seq
% boolean variables:
+\bool_new:N \l__acro_mark_as_used_bool
\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
@@ -112,6 +113,8 @@
\prop_new:N \l__acro_citation_prop
\prop_new:N \l__acro_citation_pre_prop
\prop_new:N \l__acro_citation_post_prop
+\prop_new:N \l__acro_pdfstring_prop
+\prop_new:N \l__acro_pdfstring_plural_prop
% length variables:
\dim_new:N \l__acro_table_width_dim
@@ -190,9 +193,18 @@
{ \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 }
+ \prop_put:Nnn \l__acro_pdfstring_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 } }
+ {
+ \prop_put:Nnn \l__acro_short_plural_prop
+ { #2 } { \l__acro_default_plural_tl }
+ \prop_put:Nnx \l__acro_pdfstring_plural_prop
+ { #2 } { #3 \l__acro_default_plural_tl }
+ }
+ {
+ \prop_put:Nnn \l__acro_short_plural_prop { #2 } { #4 }
+ \prop_put:Nnx \l__acro_pdfstring_plural_prop { #2 } { #3 #4 }
+ }
\IfNoValueTF { #5 }
{ \prop_put:Nnn \l__acro_alt_prop { #2 } { #2 } }
{ \prop_put:Nnn \l__acro_alt_prop { #2 } { #5 } }
@@ -204,8 +216,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_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 }
@@ -853,16 +865,19 @@
% style for that:
\cs_new:Npn \acro_is_used:nTF #1#2#3
{
- \bool_if:cTF { g_acro_#1_used_bool }
+ \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_if:NT \l__acro_mark_as_used_bool
{
- \bool_gset_true:c { g_acro_#1_label_bool }
- \label{ac:#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 }
}
- \bool_gset_true:c { g_acro_#1_used_bool }
#3
}
}
@@ -1059,144 +1074,184 @@
{ \acro_citation:nnnn { #1 } { #2 } { #3 } { #4 } }
\@onlypreamble \DeclareAcronymCitation
+\NewDocumentCommand \DeclareAcronymPDFString
+ { m >{ \SplitArgument { 1 } { , } } m }
+ { \acro_pdfstring:nnn { #1 } #2 }
+\@onlypreamble \DeclareAcronymPDFstring
+
+\cs_new:Npn \acro_use_if:n #1
+ {
+ \IfBooleanTF { #1 }
+ { \bool_set_false:N \l__acro_mark_as_used_bool }
+ { \bool_set_true:N \l__acro_mark_as_used_bool }
+ }
+
% automatic:
-\NewDocumentCommand \ac { m }
+\NewDocumentCommand \ac { sm }
{
\group_begin:
- \acro_use:n { #1 }
+ \acro_use_if:n { #1 }
+ \acro_use:n { #2 }
\group_end:
}
-\NewDocumentCommand \Ac { m }
+\NewDocumentCommand \Ac { sm }
{
\group_begin:
+ \acro_use_if:n { #1 }
\bool_set_true:N \l__acro_first_upper_bool
- \acro_use:n { #1 }
+ \acro_use:n { #2 }
\group_end:
}
-\NewDocumentCommand \acp { m }
+\NewDocumentCommand \acp { sm }
{
\group_begin:
+ \acro_use_if:n { #1 }
\bool_set_true:N \l__acro_use_plural_bool
- \acro_use:n { #1 }
+ \acro_use:n { #2 }
\group_end:
}
-\NewDocumentCommand \Acp { m }
+\NewDocumentCommand \Acp { sm }
{
\group_begin:
+ \acro_use_if:n { #1 }
\bool_set_true:N \l__acro_use_plural_bool
\bool_set_true:N \l__acro_first_upper_bool
- \acro_use:n { #1 }
+ \acro_use:n { #2 }
\group_end:
}
% short:
-\NewDocumentCommand \acs { m }
+\NewDocumentCommand \acs { sm }
{
\group_begin:
- \acro_short:n { #1 }
+ \acro_use_if:n { #1 }
+ \acro_short:n { #2 }
\group_end:
}
-\NewDocumentCommand \acsp { m }
+\NewDocumentCommand \acsp { sm }
{
\group_begin:
+ \acro_use_if:n { #1 }
\bool_set_true:N \l__acro_use_plural_bool
- \acro_short:n { #1 }
+ \acro_short:n { #2 }
\group_end:
}
% alt:
-\NewDocumentCommand \aca { m }
+\NewDocumentCommand \aca { sm }
{
\group_begin:
- \acro_alt:n { #1 }
+ \acro_use_if:n { #1 }
+ \acro_alt:n { #2 }
\group_end:
}
-\NewDocumentCommand \acap { m }
+\NewDocumentCommand \acap { sm }
{
\group_begin:
+ \acro_use_if:n { #1 }
\bool_set_true:N \l__acro_use_plural_bool
- \acro_alt:n { #1 }
+ \acro_alt:n { #2 }
\group_end:
}
% long:
-\NewDocumentCommand \acl { m }
+\NewDocumentCommand \acl { sm }
{
\group_begin:
- \acro_long:n { #1 }
+ \acro_use_if:n { #1 }
+ \acro_long:n { #2 }
\group_end:
}
-\NewDocumentCommand \Acl { m }
+\NewDocumentCommand \Acl { sm }
{
\group_begin:
+ \acro_use_if:n { #1 }
\bool_set_true:N \l__acro_first_upper_bool
- \acro_long:n { #1 }
+ \acro_long:n { #2 }
\group_end:
}
-\NewDocumentCommand \aclp { m }
+\NewDocumentCommand \aclp { sm }
{
\group_begin:
+ \acro_use_if:n { #1 }
\bool_set_true:N \l__acro_use_plural_bool
- \acro_long:n { #1 }
+ \acro_long:n { #2 }
\group_end:
}
-\NewDocumentCommand \Aclp { m }
+\NewDocumentCommand \Aclp { sm }
{
\group_begin:
+ \acro_use_if:n { #1 }
\bool_set_true:N \l__acro_use_plural_bool
\bool_set_true:N \l__acro_first_upper_bool
- \acro_long:n { #1 }
+ \acro_long:n { #2 }
\group_end:
}
% first:
-\NewDocumentCommand \acf { m }
+\NewDocumentCommand \acf { sm }
{
\group_begin:
- \acro_first:n { #1 }
+ \acro_use_if:n { #1 }
+ \acro_first:n { #2 }
\group_end:
}
-\NewDocumentCommand \Acf { m }
+\NewDocumentCommand \Acf { sm }
{
\group_begin:
+ \acro_use_if:n { #1 }
\bool_set_true:N \l__acro_first_upper_bool
- \acro_first:n { #1 }
+ \acro_first:n { #2 }
\group_end:
}
-\NewDocumentCommand \acfp { m }
+\NewDocumentCommand \acfp { sm }
{
\group_begin:
+ \acro_use_if:n { #1 }
\bool_set_true:N \l__acro_use_plural_bool
- \acro_first:n { #1 }
+ \acro_first:n { #2 }
\group_end:
}
-\NewDocumentCommand \Acfp { m }
+\NewDocumentCommand \Acfp { sm }
{
\group_begin:
+ \acro_use_if:n { #1 }
\bool_set_true:N \l__acro_use_plural_bool
\bool_set_true:N \l__acro_first_upper_bool
- \acro_first:n { #1 }
+ \acro_first:n { #2 }
\group_end:
}
% reset outputs, they'll behave like the first time again (!not like the _only_
% time!):
+\cs_new:Npn \acro_reset:n #1
+ { \bool_gset_false:c { g__acro_#1_used_bool } }
+
+\cs_new:Npn \acro_mark_as_used:n #1
+ { \bool_gset_true:c { g__acro_#1_used_bool } }
+
+\cs_new:Npn \acro_reset_all:
+ { \prop_map_inline:Nn \l__acro_short_prop { \acro_reset:n { ##1 } } }
+
\NewDocumentCommand \acresetall {}
- {
- \prop_map_inline:Nn \l__acro_short_prop
- { \bool_gset_false:c { g_acro_##1_used_bool } }
- }
+ { \acro_reset_all: }
+
+\NewDocumentCommand \acreset { > { \SplitList { , } } m }
+ { \ProcessList { #1 } { \acro_reset:n } }
+
+\NewDocumentCommand \acuse { > { \SplitList { , } } m }
+ { \ProcessList { #1 } { \acro_mark_as_used:n } }
% typeset the list:
\NewDocumentCommand \printacronyms { G{}o }
@@ -1204,12 +1259,86 @@
\ProcessKeysOptions { acro }
+% ---------------------------------------------------------------------------
+% PDF bookmark support
+\cs_new:Npn \acpdfstring
+ { \acro_pdf_string:n }
+
+\cs_new:Npn \acpdfstringplural
+ { \acro_pdf_string_plural:n }
+
+\cs_new:Npn \acro_tl_if_eq:nnTF #1#2
+ { \ifx#1#2\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi }
+
+\cs_new:Npn \acro_pdf_string:n #1
+ {
+ \acro_tl_if_eq:nnTF {*} {#1}
+ { \prop_get:Nn \l__acro_pdfstring_prop }
+ { \prop_get:Nn \l__acro_pdfstring_prop { #1 } }
+ }
+
+\cs_new:Npn \acro_pdf_string_plural:n #1
+ {
+ \acro_tl_if_eq:nnTF {*} {#1}
+ { \prop_get:Nn \l__acro_pdfstring_plural_prop }
+ { \prop_get:Nn \l__acro_pdfstring_plural_prop { #1 } }
+ }
+
+\cs_new:Npn \acro_pdfstring:nnn #1#2#3
+ {
+ \prop_put:Nnx \l__acro_pdfstring_prop { #1 } { #2 }
+ \IfNoValueTF { #3 }
+ {
+ \prop_put:Nnx \l__acro_pdfstring_plural_prop
+ { #1 } { #2 \l__acro_default_plural_tl }
+ }
+ {
+ \prop_put:Nnx \l__acro_pdfstring_plural_prop
+ { #1 } { #2 #3 }
+ }
+ }
+
\AtBeginDocument
{
\@ifpackageloaded { hyperref }
- { \bool_set_true:N \l__acro_hyperref_loaded_bool } {}
+ {
+ \bool_set_true:N \l__acro_hyperref_loaded_bool
+ \pdfstringdefDisableCommands
+ {
+ \cs_set_eq:NN \ac \acpdfstring
+ \cs_set_eq:NN \Ac \acpdfstring
+ \cs_set_eq:NN \acs \acpdfstring
+ \cs_set_eq:NN \acl \acpdfstring
+ \cs_set_eq:NN \Acl \acpdfstring
+ \cs_set_eq:NN \acf \acpdfstring
+ \cs_set_eq:NN \Acf \acpdfstring
+ \cs_set_eq:NN \aca \acpdfstring
+ \cs_set_eq:NN \acp \acpdfstringplural
+ \cs_set_eq:NN \Acp \acpdfstringplural
+ \cs_set_eq:NN \acsp \acpdfstringplural
+ \cs_set_eq:NN \aclp \acpdfstringplural
+ \cs_set_eq:NN \Aclp \acpdfstringplural
+ \cs_set_eq:NN \acfp \acpdfstringplural
+ \cs_set_eq:NN \Acfp \acpdfstringplural
+ \cs_set_eq:NN \acap \acpdfstringplural
+ }
+ } {}
}
+% --------------------------------------------------------------------------
+% language support
+\RequirePackage { translations }
+\DeclareTranslation { English } { acronym-list-name } { Acronyms }
+\DeclareTranslation { American } { acronym-list-name } { Acronyms }
+\DeclareTranslation { British } { acronym-list-name } { Acronyms }
+\DeclareTranslation { French } { acronym-list-name } { Acronymes }
+\DeclareTranslation { German } { acronym-list-name } { Abk\"urzungen }
+\DeclareTranslation { Italian } { acronym-list-name } { Acronimi }
+\DeclareTranslation { Spanish } { acronym-list-name } { Siglas }
+\DeclareTranslation { Catalan } { acronym-list-name } { Sigles }
+\DeclareTranslation { Turkish } { acronym-list-name } { K\i saltmalar }
+\tl_set:Nn \l__acro_list_name_tl { \GetTranslation { acronym-list-name } }
+
\tex_endinput:D
% --------------------------------------------------------------------------
% HISTORY:
@@ -1234,8 +1363,19 @@
2012/07/24 v0.3e - adapted to updated l3kernel
2012/09/28 v0.4 - added means to add citations to acronyms
2012/10/07 v0.4a - new options: "uc-cmd", "list-long-format"
+ - preliminary language support, needs package `translations'
+2012/11/30 v0.5 - added starred variants of the commands that won't mark an
+ acronym as used
+ - added \acreset{<id>}
+ - added preliminary support for pdf strings: in pdf strings
+ always the singular lowercase short version is inserted
+ (the equivalent of \acs)
% --------------------------------------------------------------------------
% TODO:
-- Sprach-Support Überschrift der Acronym-Liste
-- Option `totoc'? \ No newline at end of file
+- Option `totoc'!?
+- accsupp Support?
+- revise list styles to allow _full_ customization by creating own instances!
+ this probably needs a handfull of macros that give access to the entries
+ without worrying about internals
+- record and list _all_ pagenumbers where an acronym occurs \ No newline at end of file