summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-04-11 22:20:38 +0000
committerKarl Berry <karl@freefriends.org>2020-04-11 22:20:38 +0000
commita0fc5a65fc2886b3bd8a04e94db45c2f9f126d24 (patch)
tree4106d1450864fc4c39fe8f1f1ac456f210c21157 /Master/texmf-dist/tex
parentab92e63936783c8aaee1aa7d8b665db287565e96 (diff)
acronym (11apr20)
git-svn-id: svn://tug.org/texlive/trunk@54651 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/acronym/acronym.sty57
1 files changed, 33 insertions, 24 deletions
diff --git a/Master/texmf-dist/tex/latex/acronym/acronym.sty b/Master/texmf-dist/tex/latex/acronym/acronym.sty
index 134d97500b6..cd6f1cf2921 100644
--- a/Master/texmf-dist/tex/latex/acronym/acronym.sty
+++ b/Master/texmf-dist/tex/latex/acronym/acronym.sty
@@ -40,8 +40,8 @@
%%
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesPackage{acronym}[2020/03/13
- v1.46
+\ProvidesPackage{acronym}[2020/04/17
+ v1.47
Support for acronyms (Tobias Oetiker)]
\RequirePackage{suffix,xstring}
\newif\ifAC@footnote
@@ -172,7 +172,6 @@
\newcommand*\AC@used{@<>@<>@}
\newcommand{\AC@populated}{}
\newcommand*{\AC@logged}[1]{%
- \acronymused{#1}% mark it as used in the current run too
\@bsphack
\protected@write\@auxout{}{\string\acronymused{#1}}%
\@esphack}
@@ -199,9 +198,8 @@
\fi%
}
\newcommand{\@firstupper}[1]{%
- \StrLeft{#1}{1}[\firstletter]%
- \StrGobbleLeft{#1}{1}[\remainder]%
- \MakeUppercase\firstletter\remainder%
+ \StrSplit{#1}{1}{\head}{\tail}%
+ \MakeUppercase\head\tail%
}
\ifAC@noacroprefix
\newcommand*\AC@prefix{}
@@ -344,7 +342,7 @@
\newcommand\AC@acroindefinite[3]{
\@bsphack
\protected@write\@auxout{}%
- {\string\newacroindefinite{#1}{\string\AC@hyperlink{#1}{#2}}{#3}}%
+ {\string\newacroindefinite{#1}{#2}{#3}}%
\@esphack
}
\newcommand*\newacroplural[1]{%
@@ -399,7 +397,9 @@
\fi
}
\newcommand*\AC@Aclp[1]{%
- \@firstupper\expandafter{\AC@aclp{#1}}%
+ \AC@uppertrue%
+ \AC@aclp{#1}%
+ \AC@upperfalse%
}
\newcommand*\AC@acsp[1]{%
\ifcsname fn@#1@PS\endcsname
@@ -409,19 +409,27 @@
\fi
}
\newif\ifAC@starred
+\newif\ifAC@upper
\newcommand*\AC@get[3]{%
- \ifx#1\relax
- \PackageWarning{acronym}{Acronym `#3' is not defined}%
- \textbf{#3!}%
+ \ifx#1\relax
+ \PackageWarning{acronym}{Acronym `#3' is not defined}%
+ \textbf{#3!}%
+ \else
+ \ifAC@upper
+ \@firstupper{\expandafter#2#1}%
\else
- \expandafter#2#1%
- \fi}
+ \expandafter#2#1%
+ \fi
+ \fi
+}
\newcommand*\AC@acs[1]{%
\mbox{\expandafter\AC@get\csname fn@#1\endcsname\@firstoftwo{#1}}}
\newcommand*\AC@acl[1]{%
\expandafter\AC@get\csname fn@#1\endcsname\@secondoftwo{#1}}
\newcommand*\AC@Acl[1]{%
- \@firstupper\expandafter{\AC@acl{#1}}%
+ \AC@uppertrue%
+ \AC@acl{#1}%
+ \AC@upperfalse%
}
\newcommand*{\acs}{\AC@starredfalse\protect\acsa}%
\WithSuffix\newcommand\acs*{\AC@starredtrue\protect\acsa}%
@@ -581,25 +589,26 @@
\newcommand*{\Iac}{\AC@starredfalse\protect\@Iac}%
\WithSuffix\newcommand\Iac*{\AC@starredtrue\protect\@Iac}%
\newcommand*{\@iaci}[1]{%
- \ifcsname fn@#1@IL\endcsname
- \ifAC@dua
- \csname fn@#1@IL\endcsname%
- \else
- \expandafter\ifx\csname AC@\AC@prefix#1\endcsname\AC@used%
+ \ifcsname fn@#1@IL\endcsname
+ \ifAC@dua
+ \csname fn@#1@IL\endcsname%
+ \else
+ \expandafter\ifx\csname AC@\AC@prefix#1\endcsname\AC@used%
\csname fn@#1@IS\endcsname%
\else
\csname fn@#1@IL\endcsname%
\fi
- \fi
- \else
- a%
- \fi
+ \fi
+ \else
+ a%
+ \fi
}
\newcommand*{\@iac}[2][\AC@linebreakpenalty]{%
\@iaci{#2} \ifAC@starred\ac*[#1]{#2}\else\ac[#1]{#2}\fi%
}
\newcommand*{\@Iac}[2][\AC@linebreakpenalty]{%
- \@firstupper{\@iaci{#2}} \ifAC@starred\ac*[#1]{#2}\else\ac[#1]{#2}\fi%
+ \@firstupper{\@iaci{#2}}\space%
+ \ifAC@starred\ac*[#1]{#2}\else\ac[#1]{#2}\fi%
}
\newcommand*{\acsp}{\AC@starredfalse\protect\acspa}%
\WithSuffix\newcommand\acsp*{\AC@starredtrue\protect\acspa}%