summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/acronym/CHANGES24
-rw-r--r--Master/texmf-dist/doc/latex/acronym/acronym.pdfbin272577 -> 275184 bytes
-rw-r--r--Master/texmf-dist/source/latex/acronym/acronym.dtx177
-rw-r--r--Master/texmf-dist/source/latex/acronym/acronym.ins4
-rw-r--r--Master/texmf-dist/tex/latex/acronym/acronym.sty127
5 files changed, 260 insertions, 72 deletions
diff --git a/Master/texmf-dist/doc/latex/acronym/CHANGES b/Master/texmf-dist/doc/latex/acronym/CHANGES
index f98d1f9b5cf..a986a417f97 100644
--- a/Master/texmf-dist/doc/latex/acronym/CHANGES
+++ b/Master/texmf-dist/doc/latex/acronym/CHANGES
@@ -1,10 +1,34 @@
+Version 1.44 (Feb 2020)
+
+- added the |printonlyreused| option, which allows to automatically exclude acronyms from the list of acronyms if they are used only once
+
+Version 1.43 (Feb 2020)
+
+fixed unconventional dots spacing in list of acronyms
+-- Marcus Meeßen
+
+enhanced list of acronyms with hyperrefs
+-- Marcus Meeßen
+
+fixed collisions between acronyms and package commands, can be turned of with
+the |noacroprefix| option
+-- Marcus Meeßen
+
Version 1.42 (Nov 2019)
fix the carriage return with long lines (line 234/235) -- Philippe Chauvat
+
fix page number display for acfi Acfi -- Tobi Oetiker
+
fix double space and missing used flag with acfi -- Horst Schirmeier
+two features were added -- Oz Davidi
+ * Now it is possible to forbid a line break between the full name and the short name (when they are printed together). It is possible to control it individually (for each command), and also globally (with the |nolinebreak| option).
+ * Added the \Ac{p,f,fp,l,lp,lu} commands. They work exactly the same way as the \ac commands, but prints the full name, starting with an upper case letter (in case it was defined with a lower case letter).
+
+correting issue with long lines due to carriage return misplaced -- Philippe Chauvat
+
Version 1.41 (Mar 2015)
change names of internal macros to avoid nameing conflics with pageslts
diff --git a/Master/texmf-dist/doc/latex/acronym/acronym.pdf b/Master/texmf-dist/doc/latex/acronym/acronym.pdf
index 109766fa153..4d042bc7425 100644
--- a/Master/texmf-dist/doc/latex/acronym/acronym.pdf
+++ b/Master/texmf-dist/doc/latex/acronym/acronym.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/acronym/acronym.dtx b/Master/texmf-dist/source/latex/acronym/acronym.dtx
index 62df769abb4..c64031f7cc4 100644
--- a/Master/texmf-dist/source/latex/acronym/acronym.dtx
+++ b/Master/texmf-dist/source/latex/acronym/acronym.dtx
@@ -2,7 +2,7 @@
%
% Doc-Source file to use with LaTeX2e
%
-% Copyright 1994-2019 by Tobias Oetiker (tobi@oetiker.ch) and many Contributors.
+% Copyright 1994-2020 by Tobias Oetiker (tobi@oetiker.ch) and many Contributors.
% All rights reserved.
%
% This work may be distributed and/or modified under the conditions of
@@ -35,7 +35,7 @@
%</driver>
% \fi
%
-% \CheckSum{1389}
+% \CheckSum{1518}
%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -66,7 +66,7 @@
% \ensuremath, \expandafter}
% \DoNotIndex{\fi, \footnote}
% \DoNotIndex{\gdef, \global}
-% \DoNotIndex{\hfill, \hyperlink, \hypertarget}
+% \DoNotIndex{\hfill, \hyperlink, \hyperref, \hypertarget}
% \DoNotIndex{\if@filesw, \ifx, \item}
% \DoNotIndex{\label, \labelsep, \labelwidth, \leftmargin, \let,
% \long}
@@ -82,7 +82,8 @@
% \DoNotIndex{\textbf, \textsf, \textsmaller, \textsuperscript, \the}
% \DoNotIndex{\usepackage}
%
-%
+% \changes{v1.44}{2020/02/07}{Marcus Meeßen \cmd{hskip} Added the |printonlyreused| option, which allows to automatically exclude acronyms from the list of acronyms if they are used only once}
+% \changes{v1.43}{2020/02/05}{Marcus Meeßen \cmd{hskip} Fixed unconventional dots spacing in list of acronyms, enhanced list of acronyms with hyperrefs, and fixed collisions between acronyms and package commands, which can be turned of with the |noacroprefix| option}
% \changes{v1.42}{2019/11/11}{Philippe Chauvat \cmd{hskip} Fix the carriage return with long lines, Tobi Oetiker and Horst Schirmeier fixed usedflag and page number entries for acfi and Acfi}
% \changes{v1.41}{2015/03/21}{Tobi Oetiker and Jason Mills \cmd{hskip} fix nameing conflicts with pageslts package}
% \changes{v1.40}{2014/09/29}{Hartmut Henkel - remove \cmd{hskip} instances, since they cause bad formating since space at the end of a line can not be collapsed anymore}
@@ -423,11 +424,12 @@
% In standard mode, the acronym-list will consist of all defined
% acronyms, regardless if the the acronym was used in the text
% before or not. This behavior can be changed by loading the
-% package with the parameter \texttt{printonlyused}:
+% package with the parameter \texttt{printonlyused} (used at least once) or
+% \texttt{printonlyreused} (use more than once):
% \begin{quote}
% |\usepackage[printonlyused]{acronym}|
% \end{quote}
-% In \texttt{printonlyused}-mode you can add to each acronym the
+% In \texttt{printonly(re)used}-mode you can add to each acronym the
% the page number where it was first used by additionally specifying
% the option \texttt{withpage}.
% \begin{quote}
@@ -675,8 +677,8 @@ blocks to be tested separately. The latter are commonly indicated as
% First we test that we got the right format and name the package.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesPackage{acronym}[2019/11/11
- v1.42
+\ProvidesPackage{acronym}[2020/02/07
+ v1.44
Support for acronyms (Tobias Oetiker)]
\RequirePackage{suffix,xstring}
% \end{macrocode}
@@ -710,6 +712,18 @@ blocks to be tested separately. The latter are commonly indicated as
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\ifAC@noacroprefix}
+% With the |noacroprefix| option the acronym commands are not prefixed. This
+% reproduces the old behavior of version <1.43, but can cause collisions
+% between user-defined acronyms and commands of this package.
+% \begin{macrocode}
+\newif\ifAC@noacroprefix
+\AC@noacroprefixfalse
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareOption{noacroprefix}{\AC@noacroprefixtrue}
+% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\ifAC@printonlyused}
% We need a marker
@@ -723,6 +737,18 @@ blocks to be tested separately. The latter are commonly indicated as
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\ifAC@printonlyreused}
+% With the |printonlyreused| option, only those acronyms are included in the
+% list of acronyms that have been used more than once, i.e. at least twice.
+% \begin{macrocode}
+\newif\ifAC@printonlyreused
+\AC@printonlyreusedfalse
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareOption{printonlyreused}{\AC@printonlyreusedtrue}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\ifAC@withpage}
% A marker which tells us to print page numbers.
% \begin{macrocode}
@@ -834,15 +860,21 @@ blocks to be tested separately. The latter are commonly indicated as
% \subsection{Hyperlinks and PDF support}
%
% \begin{macro}{\AC@hyperlink}
+% \begin{macro}{\AC@hyperref}
% \begin{macro}{\AC@hypertarget}
+% \begin{macro}{\AC@phantomsection}
% Define dummy hyperlink commands
% \begin{macrocode}
\def\AC@hyperlink#1#2{#2}
+\def\AC@hyperref[#1]#2{#2}
\def\AC@hypertarget#1#2{#2}
\def\AC@phantomsection{}
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\AC@raisedhypertarget}
% Make sure that hyperlink processing gets enabled before we process
% the document if hyperref has been loaded in the mean time.
@@ -852,6 +884,7 @@ blocks to be tested separately. The latter are commonly indicated as
\AtBeginDocument{%
\@ifpackageloaded{hyperref}
{\let\AC@hyperlink=\hyperlink
+ \let\AC@hyperref=\hyperref
\newcommand*\AC@raisedhypertarget[2]{%
\Hy@raisedlink{\hypertarget{#1}{}}#2}%
\let\AC@hypertarget=\AC@raisedhypertarget
@@ -867,6 +900,19 @@ blocks to be tested separately. The latter are commonly indicated as
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\AC@pageref}
+% Use |\pageref*| instead of |\pageref| when the |hyperref| package is used.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifpackageloaded{hyperref}{%
+ \let\AC@pageref=\@pagerefstar%
+ }{%
+ \let\AC@pageref=\pageref%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \noindent
% The \texttt{hyperref} package defines \cmd{\pdfstringdefDisableCommands}
% and \cmd{\texorpdfstring} for text in bookmarks. If undefined, then provide them
@@ -952,7 +998,7 @@ blocks to be tested separately. The latter are commonly indicated as
% \end{macrocode}
% \begin{macrocode}
\def\AC@reset#1{%
- \global\expandafter\let\csname AC@#1\endcsname\relax
+ \global\expandafter\let\csname AC@\AC@prefix#1\endcsname\relax
}
% \end{macrocode}
% \end{macro}
@@ -967,7 +1013,7 @@ blocks to be tested separately. The latter are commonly indicated as
%
% \begin{macro}{\AC@populated}
% An on/off flag to note if any acronyms were logged. This
-% is needed for the first run with |printonlyused| option,
+% is needed for the first run with |printonly(re)used| option,
% because the acronym list are then empty, resulting in a
% |"missing item"| error.
%
@@ -1008,12 +1054,22 @@ blocks to be tested separately. The latter are commonly indicated as
% (called by the \texttt{aux} file).
% \begin{macrocode}
\newcommand*{\acronymused}[1]{%
- \expandafter\ifx\csname acused@#1\endcsname\AC@used
- \relax
- \else
- \global\expandafter\let\csname acused@#1\endcsname\AC@used
- \global\let\AC@populated\AC@used
- \fi}
+ \expandafter\ifx\csname acused@#1@once\endcsname\AC@used%
+ \expandafter\ifx\csname acused@#1@twice\endcsname\AC@used%
+ \relax%
+ \else%
+ \global\expandafter\let\csname acused@#1@twice\endcsname\AC@used%
+ \global\let\AC@populated\AC@used%
+ \fi%
+ \else%
+ \global\expandafter\let\csname acused@#1@once\endcsname\AC@used%
+ \ifAC@printonlyreused%
+ \relax%
+ \else%
+ \global\let\AC@populated\AC@used%
+ \fi%
+ \fi%
+}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1029,6 +1085,18 @@ blocks to be tested separately. The latter are commonly indicated as
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{AC@prefix}
+% Returns the prefix used to build the defined acronym commands as long as
+% the |noacroprefix| option is disabled. Otherwise the output is empty, so
+% the old behaviour from version <1.43 is reproduced.
+% \begin{macrocode}
+\ifAC@noacroprefix
+ \newcommand*\AC@prefix{}
+\else
+ \newcommand*\AC@prefix{acronyms@}
+\fi
+% \end{macrocode}
+% \end{macro}
%
% \subsection{Defining acronyms}
%
@@ -1170,35 +1238,68 @@ blocks to be tested separately. The latter are commonly indicated as
% \begin{macro}{\AC@@acro}
% \begin{macrocode}
\newcommand*\AC@acro[1]{%
- \@ifnextchar[{\AC@@acro{#1}}{\AC@@acro{#1}[#1]}}
+ \@ifnextchar[{%
+ \csname AC@\AC@prefix{}@acro\endcsname{#1}%
+ }{%
+ \csname AC@\AC@prefix{}@acro\endcsname{#1}[#1]%
+ }%
+}
% \end{macrocode}
% \begin{macrocode}
-\newcommand\AC@@acro{}
-\def\AC@@acro#1[#2]#3{%
+\expandafter\newcommand\csname AC@\AC@prefix{}@acro\endcsname{}
+\expandafter\def\csname AC@\AC@prefix{}@acro\endcsname#1[#2]#3{%
\ifAC@nolist%
\else%
- \ifAC@printonlyused%
- \expandafter\ifx\csname acused@#1\endcsname\AC@used%
- \item[\protect\AC@hypertarget{#1}{\aclabelfont{#2}}] #3%
+ \ifnum%
+ \ifAC@printonlyused 1%
+ \else\ifAC@printonlyreused 1%
+ \else 0\fi\fi%
+ =1%
+ \ifnum%
+ \ifAC@printonlyused%
+ \expandafter\ifx\csname acused@#1@once\endcsname\AC@used 1 \else 0 \fi%
+ \else\ifAC@printonlyreused%
+ \expandafter\ifx\csname acused@#1@twice\endcsname\AC@used 1 \else 0 \fi%
+ \else 0 \fi\fi%
+ =1%
+ \item[\protect\AC@hypertarget{#1}{%
+ \AC@hyperref[acro:#1]{\aclabelfont{#2}\hfill}%
+ }]\AC@hyperref[acro:#1]{#3}%
\ifAC@withpage%
\expandafter\ifx\csname r@acro:#1\endcsname\relax%
\PackageInfo{acronym}{%
Acronym #1 used in text but not spelled out in
full in text}%
\else%
- \dotfill\pageref{acro:#1}%
+ \nobreak\leaders\hbox{$\m@th\mkern\@dotsep mu\hbox{.}\mkern\@dotsep mu$}\hfill%
+ \nobreak\hb@xt@\@pnumwidth{%
+ \hfil\normalfont\normalcolor\AC@pageref{acro:#1}%
+ }%
\fi%
\fi\\%
\fi%
- \else%
- \item[\protect\AC@hypertarget{#1}{\aclabelfont{#2}}] #3%
- \fi%
- \fi%
- \begingroup
+ \else%
+ \item[\protect\AC@hypertarget{#1}{\AC@hyperref[acro:#1]{\aclabelfont{#2}\hfill}}]\AC@hyperref[acro:#1]{#3}%
+ \fi%
+ \fi%
+ \begingroup
\def\acroextra##1{}%
\@bsphack
- \protected@write\@auxout{}%
- {\string\newacro{#1}[\string\AC@hyperlink{#1}{#2}]{#3}}%
+ \ifAC@printonlyreused%
+ \protected@write\@auxout{}{%
+ \string\newacro{#1}[%
+ \expandafter\ifx\csname acused@#1@twice\endcsname\AC@used%
+ \string\AC@hyperlink{#1}{#2}%
+ \else%
+ {#2}%
+ \fi%
+ ]{#3}%
+ }%
+ \else%
+ \protected@write\@auxout{}{%
+ \string\newacro{#1}[\string\AC@hyperlink{#1}{#2}]{#3}%
+ }%
+ \fi%
\@esphack
\endgroup
\ignorespaces}
@@ -1535,11 +1636,11 @@ blocks to be tested separately. The latter are commonly indicated as
\fi
}%
\newcommand*\AC@placelabel[1]{%
- \expandafter\ifx\csname AC@#1\endcsname\AC@used
+ \expandafter\ifx\csname AC@\AC@prefix#1\endcsname\AC@used
\else
{\AC@phantomsection\@verridelabel{acro:#1}}%
\ifAC@starred\else%
- \global\expandafter\let\csname AC@#1\endcsname\AC@used
+ \global\expandafter\let\csname AC@\AC@prefix#1\endcsname\AC@used
\fi%
\AC@addtoAC@clearlist{#1}%
\fi
@@ -1638,7 +1739,7 @@ blocks to be tested separately. The latter are commonly indicated as
\ifAC@dua
\ifAC@starred\acl*{#2}\else\acl{#2}\fi%
\else
- \expandafter\ifx\csname AC@#2\endcsname\AC@used%
+ \expandafter\ifx\csname AC@\AC@prefix#2\endcsname\AC@used%
\ifAC@starred\acs*{#2}\else\acs{#2}\fi%
\else
\ifAC@starred\acf*[#1]{#2}\else\acf[#1]{#2}\fi%
@@ -1650,7 +1751,7 @@ blocks to be tested separately. The latter are commonly indicated as
\ifAC@dua
\ifAC@starred\Acl*{#2}\else\Acl{#2}\fi%
\else
- \expandafter\ifx\csname AC@#2\endcsname\AC@used%
+ \expandafter\ifx\csname AC@\AC@prefix#2\endcsname\AC@used%
\ifAC@starred\acs*{#2}\else\acs{#2}\fi%
\else
\ifAC@starred\Acf*[#1]{#2}\else\Acf[#1]{#2}\fi%
@@ -1681,7 +1782,7 @@ blocks to be tested separately. The latter are commonly indicated as
\ifAC@dua
\csname fn@#1@IL\endcsname%
\else
- \expandafter\ifx\csname AC@#1\endcsname\AC@used%
+ \expandafter\ifx\csname AC@\AC@prefix#1\endcsname\AC@used%
\csname fn@#1@IS\endcsname%
\else
\csname fn@#1@IL\endcsname%
@@ -1844,7 +1945,7 @@ blocks to be tested separately. The latter are commonly indicated as
\ifAC@dua
\ifAC@starred\aclp*{#2}\else\aclp{#2}\fi%
\else
- \expandafter\ifx\csname AC@#2\endcsname\AC@used
+ \expandafter\ifx\csname AC@\AC@prefix#2\endcsname\AC@used
\ifAC@starred\acsp*{#2}\else\acsp{#2}\fi%
\else
\ifAC@starred\acfp*[#1]{#2}\else\acfp[#1]{#2}\fi%
@@ -1856,7 +1957,7 @@ blocks to be tested separately. The latter are commonly indicated as
\ifAC@dua
\ifAC@starred\Aclp*{#2}\else\Aclp{#2}\fi%
\else
- \expandafter\ifx\csname AC@#2\endcsname\AC@used
+ \expandafter\ifx\csname AC@\AC@prefix#2\endcsname\AC@used
\ifAC@starred\acsp*{#2}\else\acsp{#2}\fi%
\else
\ifAC@starred\Acfp*[#1]{#2}\else\Acfp[#1]{#2}\fi%
@@ -1919,7 +2020,7 @@ blocks to be tested separately. The latter are commonly indicated as
% \cmd{\acronymused}!
% \begin{macrocode}
\newcommand{\acused}[1]{%
-\global\expandafter\let\csname AC@#1\endcsname\AC@used%
+\global\expandafter\let\csname AC@\AC@prefix#1\endcsname\AC@used%
\AC@addtoAC@clearlist{#1}}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/acronym/acronym.ins b/Master/texmf-dist/source/latex/acronym/acronym.ins
index 0af1e114c07..9dc36c5ac1c 100644
--- a/Master/texmf-dist/source/latex/acronym/acronym.ins
+++ b/Master/texmf-dist/source/latex/acronym/acronym.ins
@@ -4,7 +4,7 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright 1995--2010 by Tobias Oetiker (tobi@oetiker.ch)
+%% Copyright 1995--2020 by Tobias Oetiker (tobi@oetiker.ch)
%% and individual authors listed elsewhere
%% in this file.
%% All rights reserved.
@@ -31,7 +31,7 @@
\keepsilent
\preamble
- Copyright 1995--2009 by Tobias Oetiker (tobi@oetiker.ch)
+ Copyright 1995--2020 by Tobias Oetiker (tobi@oetiker.ch)
and individual authors listed elsewhere.
All rights reserved.
diff --git a/Master/texmf-dist/tex/latex/acronym/acronym.sty b/Master/texmf-dist/tex/latex/acronym/acronym.sty
index c582d6e9b9c..ebd2a86d946 100644
--- a/Master/texmf-dist/tex/latex/acronym/acronym.sty
+++ b/Master/texmf-dist/tex/latex/acronym/acronym.sty
@@ -5,7 +5,7 @@
%% The original source files were:
%%
%% acronym.dtx (with options: `acronym')
-%% Copyright 1995--2009 by Tobias Oetiker (tobi@oetiker.ch)
+%% Copyright 1995--2020 by Tobias Oetiker (tobi@oetiker.ch)
%% and individual authors listed elsewhere.
%% All rights reserved.
%%
@@ -40,8 +40,8 @@
%%
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesPackage{acronym}[2019/11/11
- v1.42
+\ProvidesPackage{acronym}[2020/02/07
+ v1.44
Support for acronyms (Tobias Oetiker)]
\RequirePackage{suffix,xstring}
\newif\ifAC@footnote
@@ -50,9 +50,15 @@
\newif\ifAC@nohyperlinks
\AC@nohyperlinksfalse
\DeclareOption{nohyperlinks}{\AC@nohyperlinkstrue}
+\newif\ifAC@noacroprefix
+\AC@noacroprefixfalse
+\DeclareOption{noacroprefix}{\AC@noacroprefixtrue}
\newif\ifAC@printonlyused
\AC@printonlyusedfalse
\DeclareOption{printonlyused}{\AC@printonlyusedtrue}
+\newif\ifAC@printonlyreused
+\AC@printonlyreusedfalse
+\DeclareOption{printonlyreused}{\AC@printonlyreusedtrue}
\newif\ifAC@withpage
\AC@withpagefalse
\DeclareOption{withpage}{\AC@withpagetrue}
@@ -83,6 +89,7 @@
\def\AC@linebreakpenalty{3}
\fi
\def\AC@hyperlink#1#2{#2}
+\def\AC@hyperref[#1]#2{#2}
\def\AC@hypertarget#1#2{#2}
\def\AC@phantomsection{}
\ifAC@nohyperlinks
@@ -90,6 +97,7 @@
\AtBeginDocument{%
\@ifpackageloaded{hyperref}
{\let\AC@hyperlink=\hyperlink
+ \let\AC@hyperref=\hyperref
\newcommand*\AC@raisedhypertarget[2]{%
\Hy@raisedlink{\hypertarget{#1}{}}#2}%
\let\AC@hypertarget=\AC@raisedhypertarget
@@ -103,6 +111,13 @@
}{}}%
\fi
\AtBeginDocument{%
+ \@ifpackageloaded{hyperref}{%
+ \let\AC@pageref=\@pagerefstar%
+ }{%
+ \let\AC@pageref=\pageref%
+ }%
+}
+\AtBeginDocument{%
\providecommand\texorpdfstring[2]{#1}%
\providecommand\pdfstringdefDisableCommands[1]{}%
\pdfstringdefDisableCommands{%
@@ -152,7 +167,7 @@
}
\newcommand*\acresetall{\the\AC@clearlist\AC@clearlist={}}
\def\AC@reset#1{%
- \global\expandafter\let\csname AC@#1\endcsname\relax
+ \global\expandafter\let\csname AC@\AC@prefix#1\endcsname\relax
}
\newcommand*\AC@used{@<>@<>@}
\newcommand{\AC@populated}{}
@@ -167,17 +182,32 @@
}%
}
\newcommand*{\acronymused}[1]{%
- \expandafter\ifx\csname acused@#1\endcsname\AC@used
- \relax
- \else
- \global\expandafter\let\csname acused@#1\endcsname\AC@used
- \global\let\AC@populated\AC@used
- \fi}
+ \expandafter\ifx\csname acused@#1@once\endcsname\AC@used%
+ \expandafter\ifx\csname acused@#1@twice\endcsname\AC@used%
+ \relax%
+ \else%
+ \global\expandafter\let\csname acused@#1@twice\endcsname\AC@used%
+ \global\let\AC@populated\AC@used%
+ \fi%
+ \else%
+ \global\expandafter\let\csname acused@#1@once\endcsname\AC@used%
+ \ifAC@printonlyreused%
+ \relax%
+ \else%
+ \global\let\AC@populated\AC@used%
+ \fi%
+ \fi%
+}
\newcommand{\@firstupper}[1]{%
\StrLeft{#1}{1}[\firstletter]%
\StrGobbleLeft{#1}{1}[\remainder]%
\MakeUppercase\firstletter\remainder%
}
+\ifAC@noacroprefix
+ \newcommand*\AC@prefix{}
+\else
+ \newcommand*\AC@prefix{acronyms@}
+\fi
\newcommand*\newacro[1]{%
\@ifnextchar[{\AC@newacro{#1}}{\AC@newacro{#1}[#1]}}
\newcommand\AC@newacro{}
@@ -239,33 +269,66 @@
\end{AC@deflist}%
\fi}%
\newcommand*\AC@acro[1]{%
- \@ifnextchar[{\AC@@acro{#1}}{\AC@@acro{#1}[#1]}}
-\newcommand\AC@@acro{}
-\def\AC@@acro#1[#2]#3{%
+ \@ifnextchar[{%
+ \csname AC@\AC@prefix{}@acro\endcsname{#1}%
+ }{%
+ \csname AC@\AC@prefix{}@acro\endcsname{#1}[#1]%
+ }%
+}
+\expandafter\newcommand\csname AC@\AC@prefix{}@acro\endcsname{}
+\expandafter\def\csname AC@\AC@prefix{}@acro\endcsname#1[#2]#3{%
\ifAC@nolist%
\else%
- \ifAC@printonlyused%
- \expandafter\ifx\csname acused@#1\endcsname\AC@used%
- \item[\protect\AC@hypertarget{#1}{\aclabelfont{#2}}] #3%
+ \ifnum%
+ \ifAC@printonlyused 1%
+ \else\ifAC@printonlyreused 1%
+ \else 0\fi\fi%
+ =1%
+ \ifnum%
+ \ifAC@printonlyused%
+ \expandafter\ifx\csname acused@#1@once\endcsname\AC@used 1 \else 0 \fi%
+ \else\ifAC@printonlyreused%
+ \expandafter\ifx\csname acused@#1@twice\endcsname\AC@used 1 \else 0 \fi%
+ \else 0 \fi\fi%
+ =1%
+ \item[\protect\AC@hypertarget{#1}{%
+ \AC@hyperref[acro:#1]{\aclabelfont{#2}\hfill}%
+ }]\AC@hyperref[acro:#1]{#3}%
\ifAC@withpage%
\expandafter\ifx\csname r@acro:#1\endcsname\relax%
\PackageInfo{acronym}{%
Acronym #1 used in text but not spelled out in
full in text}%
\else%
- \dotfill\pageref{acro:#1}%
+ \nobreak\leaders\hbox{$\m@th\mkern\@dotsep mu\hbox{.}\mkern\@dotsep mu$}\hfill%
+ \nobreak\hb@xt@\@pnumwidth{%
+ \hfil\normalfont\normalcolor\AC@pageref{acro:#1}%
+ }%
\fi%
\fi\\%
\fi%
- \else%
- \item[\protect\AC@hypertarget{#1}{\aclabelfont{#2}}] #3%
- \fi%
- \fi%
- \begingroup
+ \else%
+ \item[\protect\AC@hypertarget{#1}{\AC@hyperref[acro:#1]{\aclabelfont{#2}\hfill}}]\AC@hyperref[acro:#1]{#3}%
+ \fi%
+ \fi%
+ \begingroup
\def\acroextra##1{}%
\@bsphack
- \protected@write\@auxout{}%
- {\string\newacro{#1}[\string\AC@hyperlink{#1}{#2}]{#3}}%
+ \ifAC@printonlyreused%
+ \protected@write\@auxout{}{%
+ \string\newacro{#1}[%
+ \expandafter\ifx\csname acused@#1@twice\endcsname\AC@used%
+ \string\AC@hyperlink{#1}{#2}%
+ \else%
+ {#2}%
+ \fi%
+ ]{#3}%
+ }%
+ \else%
+ \protected@write\@auxout{}{%
+ \string\newacro{#1}[\string\AC@hyperlink{#1}{#2}]{#3}%
+ }%
+ \fi%
\@esphack
\endgroup
\ignorespaces}
@@ -448,11 +511,11 @@
\fi
}%
\newcommand*\AC@placelabel[1]{%
- \expandafter\ifx\csname AC@#1\endcsname\AC@used
+ \expandafter\ifx\csname AC@\AC@prefix#1\endcsname\AC@used
\else
{\AC@phantomsection\@verridelabel{acro:#1}}%
\ifAC@starred\else%
- \global\expandafter\let\csname AC@#1\endcsname\AC@used
+ \global\expandafter\let\csname AC@\AC@prefix#1\endcsname\AC@used
\fi%
\AC@addtoAC@clearlist{#1}%
\fi
@@ -497,7 +560,7 @@
\ifAC@dua
\ifAC@starred\acl*{#2}\else\acl{#2}\fi%
\else
- \expandafter\ifx\csname AC@#2\endcsname\AC@used%
+ \expandafter\ifx\csname AC@\AC@prefix#2\endcsname\AC@used%
\ifAC@starred\acs*{#2}\else\acs{#2}\fi%
\else
\ifAC@starred\acf*[#1]{#2}\else\acf[#1]{#2}\fi%
@@ -507,7 +570,7 @@
\ifAC@dua
\ifAC@starred\Acl*{#2}\else\Acl{#2}\fi%
\else
- \expandafter\ifx\csname AC@#2\endcsname\AC@used%
+ \expandafter\ifx\csname AC@\AC@prefix#2\endcsname\AC@used%
\ifAC@starred\acs*{#2}\else\acs{#2}\fi%
\else
\ifAC@starred\Acf*[#1]{#2}\else\Acf[#1]{#2}\fi%
@@ -522,7 +585,7 @@
\ifAC@dua
\csname fn@#1@IL\endcsname%
\else
- \expandafter\ifx\csname AC@#1\endcsname\AC@used%
+ \expandafter\ifx\csname AC@\AC@prefix#1\endcsname\AC@used%
\csname fn@#1@IS\endcsname%
\else
\csname fn@#1@IL\endcsname%
@@ -595,7 +658,7 @@
\ifAC@dua
\ifAC@starred\aclp*{#2}\else\aclp{#2}\fi%
\else
- \expandafter\ifx\csname AC@#2\endcsname\AC@used
+ \expandafter\ifx\csname AC@\AC@prefix#2\endcsname\AC@used
\ifAC@starred\acsp*{#2}\else\acsp{#2}\fi%
\else
\ifAC@starred\acfp*[#1]{#2}\else\acfp[#1]{#2}\fi%
@@ -605,7 +668,7 @@
\ifAC@dua
\ifAC@starred\Aclp*{#2}\else\Aclp{#2}\fi%
\else
- \expandafter\ifx\csname AC@#2\endcsname\AC@used
+ \expandafter\ifx\csname AC@\AC@prefix#2\endcsname\AC@used
\ifAC@starred\acsp*{#2}\else\acsp{#2}\fi%
\else
\ifAC@starred\Acfp*[#1]{#2}\else\Acfp[#1]{#2}\fi%
@@ -634,7 +697,7 @@
}%
\ifAC@starred\else\AC@logged{#2}\fi}
\newcommand{\acused}[1]{%
-\global\expandafter\let\csname AC@#1\endcsname\AC@used%
+\global\expandafter\let\csname AC@\AC@prefix#1\endcsname\AC@used%
\AC@addtoAC@clearlist{#1}}
\newcommand*{\acsu}{\AC@starredfalse\protect\acsua}%
\WithSuffix\newcommand\acsu*{\AC@starredtrue\protect\acsua}%