summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/acronym
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-12-12 00:36:11 +0000
committerKarl Berry <karl@freefriends.org>2009-12-12 00:36:11 +0000
commit1b2dc80bc47f12c5846e7616c287a772be5de763 (patch)
tree57f3f28a50595d83ec5d89a246e35d9ed9d17649 /Master/texmf-dist/tex/latex/acronym
parent0021f310470a4bbc682ebece240c34c416223e82 (diff)
acronym update (11dec09)
git-svn-id: svn://tug.org/texlive/trunk@16368 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/acronym')
-rw-r--r--Master/texmf-dist/tex/latex/acronym/acronym.sty94
1 files changed, 76 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/latex/acronym/acronym.sty b/Master/texmf-dist/tex/latex/acronym/acronym.sty
index 0ba3fe32380..4e9041450aa 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--2005 by Tobias Oetiker (oetiker@ee.ethz.ch)
+%% Copyright 1995--2009 by Tobias Oetiker (tobi@oetiker.ch)
%% and individual authors listed elsewhere.
%% All rights reserved.
%%
@@ -38,9 +38,10 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
+%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesPackage{acronym}[2009/01/25
- v1.34
+\ProvidesPackage{acronym}[2009/10/20
+ v1.35
Support for acronyms (Tobias Oetiker)]
\RequirePackage{suffix}
\newif\ifAC@footnote
@@ -124,7 +125,7 @@
\let\acsu\acs
\let\aclu\acl
\def\AChy@acf#1{\AC@acl{#1} (\AC@acs{#1})}%
- \def\AChy@acfp#1{\AC@acl{#1}s (\AC@acs{#1}s)}%
+ \def\AChy@acfp#1{\AC@aclp{#1} (\AC@acsp{#1})}%
}%
}
\newtoks\AC@clearlist
@@ -155,17 +156,15 @@
\global\let\AC@populated\AC@used
\fi}
\newcommand*\newacro[1]{%
- \@ifnextchar[{\AC@newacro{#1}}{\AC@newacro{#1}[\AC@temp]}}
+ \@ifnextchar[{\AC@newacro{#1}}{\AC@newacro{#1}[#1]}}
\newcommand\AC@newacro{}
\def\AC@newacro#1[#2]#3{%
- \def\AC@temp{#1}%
\expandafter\gdef\csname fn@#1\endcsname{{#2}{#3}}%
}
\newcommand*\acrodef[1]{%
- \@ifnextchar[{\AC@acrodef{#1}}{\AC@acrodef{#1}[\AC@temp]}}
+ \@ifnextchar[{\AC@acrodef{#1}}{\AC@acrodef{#1}[#1]}}
\newcommand\AC@acrodef{}
\def\AC@acrodef#1[#2]#3{%
- \def\AC@temp{#1}%
\@bsphack
\protected@write\@auxout{}{\string\newacro{#1}[#2]{#3}}%
\@esphack}
@@ -186,6 +185,7 @@
\newcommand{\acroextra}[1]{}
\newenvironment{acronym}[1][1]{%
\providecommand*{\acro}{\AC@acro}%
+ \providecommand*{\acroplural}{\AC@acroplural}%
\long\def\acroextra##1{##1}%
\def\@tempa{1}\def\@tempb{#1}%
\ifx\@tempa\@tempb%
@@ -214,10 +214,9 @@
\end{AC@deflist}%
\fi}%
\newcommand*\AC@acro[1]{%
- \@ifnextchar[{\AC@@acro{#1}}{\AC@@acro{#1}[\AC@temp]}}
+ \@ifnextchar[{\AC@@acro{#1}}{\AC@@acro{#1}[#1]}}
\newcommand\AC@@acro{}
\def\AC@@acro#1[#2]#3{%
- \def\AC@temp{#1}%
\ifAC@nolist%
\else%
\ifAC@printonlyused%
@@ -244,6 +243,65 @@
{\string\newacro{#1}[\string\AC@hyperlink{#1}{#2}]{#3}}%
\@esphack
\endgroup}
+\newcommand*\newacroplural[1]{%
+ \@ifnextchar[%]
+ {\AC@newacroplurali{#1}}{\AC@newacropluralii{#1}}%
+}
+\newcommand\AC@newacroplurali{}
+\def\AC@newacroplurali#1[#2]#3{%
+ \expandafter\gdef\csname fn@#1@PS\endcsname{#2}%
+ \expandafter\gdef\csname fn@#1@PL\endcsname{#3}%
+}
+\newcommand\AC@newacropluralii[2]{%
+ \expandafter\gdef\csname fn@#1@PL\endcsname{#2}%
+}
+\newcommand*\acrodefplural[1]{%
+ \@ifnextchar[%]
+ {\AC@acrodefplurali{#1}}{\AC@acrodefpluralii{#1}}%
+}
+\newcommand\AC@acrodefplurali{}
+\def\AC@acrodefplurali#1[#2]#3{%
+ \@bsphack
+ \protected@write\@auxout{}{\string\newacroplural{#1}[#2]{#3}}%
+ \@esphack
+}
+\newcommand\AC@acrodefpluralii[2]{%
+ \@bsphack
+ \protected@write\@auxout{}{\string\newacroplural{#1}{#2}}%
+ \@esphack
+}
+\newcommand*\AC@acroplural[1]{%
+ \@ifnextchar[%]
+ {\AC@acroplurali{#1}}{\AC@acropluralii{#1}}%
+}
+\newcommand\AC@acroplurali{}
+\def\AC@acroplurali#1[#2]#3{%
+ \@bsphack
+ \protected@write\@auxout{}%
+ {\string\newacroplural{#1}[\string\AC@hyperlink{#1}{#2}]{#3}}%
+ \@esphack
+}
+\newcommand\AC@acropluralii[2]{
+ \@bsphack
+ \protected@write\@auxout{}%
+ {\string\newacroplural{#1}[\string\AC@hyperlink{#1}{\AC@acs{#1}}]{#2}}%
+ \@esphack
+}
+\newcommand*\AC@aclp[1]{%
+ \ifcsname fn@#1@PL\endcsname
+ \csname fn@#1@PL\endcsname
+ \else
+ \AC@acl{#1}s%
+ \fi
+}
+\newcommand*\AC@acsp[1]{%
+ \ifcsname fn@#1@PS\endcsname
+ \csname fn@#1@PS\endcsname
+ \else
+ \AC@acs{#1}s%
+ \fi
+}
+
\newif\ifAC@starred
\newcommand*\AC@get[3]{%
\ifx#1\relax
@@ -379,28 +437,28 @@
\newcommand*{\acsp}{\AC@starredfalse\protect\acspa}%
\WithSuffix\newcommand\acsp*{\AC@starredtrue\protect\acspa}%
\newcommand*{\acspa}[1]{%
- \texorpdfstring{\protect\@acsp{#1}}{#1s}}
+ \texorpdfstring{\protect\@acsp{#1}}{\AC@acsp{#1}}}
\newcommand*{\@acsp}[1]{%
- \acsfont{\AC@acs{#1}s}%
+ \acsfont{\AC@acsp{#1}}%
\ifAC@starred\else\AC@logged{#1}\fi}
\newcommand*{\aclp}{\AC@starredfalse\protect\@aclp}%
\WithSuffix\newcommand\aclp*{\AC@starredtrue\protect\@aclp}%
\newcommand*{\@aclp}[1]{%
- \AC@acl{#1}s%
+ \AC@aclp{#1}%
\ifAC@starred\else\AC@logged{#1}\fi}
\newcommand*{\acfp}{\AC@starredfalse\protect\acfpa}%
\WithSuffix\newcommand\acfp*{\AC@starredtrue\protect\acfpa}%
\newcommand*{\acfpa}[1]{%
- \texorpdfstring{\protect\@acfp{#1}}{\AC@acl{#1}s (#1s)}}
+ \texorpdfstring{\protect\@acfp{#1}}{\AC@aclp{#1} (\AC@acsp{#1})}}
\newcommand*{\@acfp}[1]{%
\ifAC@footnote
- \acsfont{\AC@acs{#1}s}%
- \footnote{\AC@placelabel{#1}\AC@acl{#1}s{}}%
+ \acsfont{\AC@acsp{#1}}%
+ \footnote{\AC@placelabel{#1}\AC@aclp{#1}{}}%
\else
\acffont{%
- \AC@placelabel{#1}\AC@acl{#1}s%
+ \AC@placelabel{#1}\AC@aclp{#1}%
\nolinebreak[3] %
- \acfsfont{(\acsfont{\AC@acs{#1}s})}%
+ \acfsfont{(\acsfont{\AC@acsp{#1}})}%
}%
\fi
\ifAC@starred\else\AC@logged{#1}\fi}