summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/acronym/acronym.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/acronym/acronym.sty')
-rw-r--r--Master/texmf-dist/tex/latex/acronym/acronym.sty54
1 files changed, 50 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/acronym/acronym.sty b/Master/texmf-dist/tex/latex/acronym/acronym.sty
index 50ffdf77b68..76d6606c8fc 100644
--- a/Master/texmf-dist/tex/latex/acronym/acronym.sty
+++ b/Master/texmf-dist/tex/latex/acronym/acronym.sty
@@ -40,10 +40,10 @@
%%
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesPackage{acronym}[2012/09/04
- v1.37
+\ProvidesPackage{acronym}[2012/10/29
+ v1.38
Support for acronyms (Tobias Oetiker)]
-\RequirePackage{suffix}
+\RequirePackage{suffix,xstring}
\newif\ifAC@footnote
\AC@footnotefalse
\DeclareOption{footnote}{\AC@footnotetrue}
@@ -186,6 +186,7 @@
\newenvironment{acronym}[1][1]{%
\providecommand*{\acro}{\AC@acro}%
\providecommand*{\acroplural}{\AC@acroplural}%
+ \providecommand*{\acroindefinite}{\AC@acroindefinite}%
\long\def\acroextra##1{##1}%
\def\@tempa{1}\def\@tempb{#1}%
\ifx\@tempa\@tempb%
@@ -243,6 +244,21 @@
{\string\newacro{#1}[\string\AC@hyperlink{#1}{#2}]{#3}}%
\@esphack
\endgroup}
+\newcommand*\newacroindefinite[3]{%
+ \expandafter\gdef\csname fn@#1@IS\endcsname{#2}%
+ \expandafter\gdef\csname fn@#1@IL\endcsname{#3}%
+}
+\newcommand*\acrodefindefinite[3]{%
+ \@bsphack
+ \protected@write\@auxout{}{\string\newacroindefinite{#1}{#2}{#3}}%
+ \@esphack
+}
+\newcommand\AC@acroindefinite[3]{
+ \@bsphack
+ \protected@write\@auxout{}%
+ {\string\newacroindefinite{#1}{\string\AC@hyperlink{#1}{#2}}{#3}}%
+ \@esphack
+}
\newcommand*\newacroplural[1]{%
\@ifnextchar[%]
{\AC@newacroplurali{#1}}{\AC@newacropluralii{#1}}%
@@ -320,7 +336,7 @@
\texorpdfstring{\protect\@acs{#1}}{#1}}
\newcommand*{\@acs}[1]{%
\acsfont{\AC@acs{#1}}%
-%% having a footnote on acs sort of defetes the purpose
+%% having a footnote on acs sort of defeats the purpose
%% \ifAC@footnote
%% \footnote{\AC@acl{#1}{}}%
%% \fi
@@ -436,6 +452,36 @@
\ifAC@starred\acf*{#1}\else\acf{#1}\fi%
\fi
\fi}
+\newcommand{\@firstupper}[1]{%
+ \StrLeft{#1}{1}[\firstletter]%
+ \StrGobbleLeft{#1}{1}[\remainder]%
+ \MakeUppercase\firstletter\remainder
+}
+\newcommand*{\iac}{\AC@starredfalse\protect\@iac}%
+\WithSuffix\newcommand\iac*{\AC@starredtrue\protect\@iac}%
+\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@#1\endcsname\AC@used%
+ \csname fn@#1@IS\endcsname%
+ \else
+ \csname fn@#1@IL\endcsname%
+ \fi
+ \fi
+ \else
+ a%
+ \fi
+}
+\newcommand*{\@iac}[1]{%
+ \@iaci{#1} \ifAC@starred\ac*{#1}\else\ac{#1}\fi%
+}
+\newcommand*{\@Iac}[1]{%
+ \@firstupper{\@iaci{#1}} \ifAC@starred\ac*{#1}\else\ac{#1}\fi%
+}
\newcommand*{\acsp}{\AC@starredfalse\protect\acspa}%
\WithSuffix\newcommand\acsp*{\AC@starredtrue\protect\acspa}%
\newcommand*{\acspa}[1]{%