diff options
author | Karl Berry <karl@freefriends.org> | 2008-06-18 18:35:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-06-18 18:35:15 +0000 |
commit | 37d6399c04038e5d6d55095dedf516dfc49548c0 (patch) | |
tree | 58ffd9fd68f4822be4b814e4aea674d786a2d313 /Master/texmf-dist/tex/latex/acronym | |
parent | a63b3cf004ff93cac025d38a450b9e383a16e044 (diff) |
acronym update (17jun08)
git-svn-id: svn://tug.org/texlive/trunk@8844 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/acronym')
-rw-r--r-- | Master/texmf-dist/tex/latex/acronym/acronym.sty | 61 |
1 files changed, 37 insertions, 24 deletions
diff --git a/Master/texmf-dist/tex/latex/acronym/acronym.sty b/Master/texmf-dist/tex/latex/acronym/acronym.sty index 35060cbec3e..263e071b0fc 100644 --- a/Master/texmf-dist/tex/latex/acronym/acronym.sty +++ b/Master/texmf-dist/tex/latex/acronym/acronym.sty @@ -39,8 +39,8 @@ %% Right brace \} Tilde \~} %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{acronym}[2008/05/21 - v1.31 +\ProvidesPackage{acronym}[2008/05/28 + v1.32 Support for acronyms (Tobias Oetiker)] \RequirePackage{suffix} \newif\ifAC@footnote @@ -134,9 +134,6 @@ \newcommand*\acresetall{\the\AC@clearlist\AC@clearlist={}} \def\AC@reset#1{% \global\expandafter\let\csname ac@#1\endcsname\relax - \@ifundefined{s@acro:#1}{% - \global\@namedef{s@acro:#1}{}% - }{}% } \newcommand*\AC@used{@<>@<>@} \newcommand{\AC@populated}{} @@ -227,7 +224,7 @@ \item[\protect\AC@hypertarget{#1}{\acsfont{#2}}] #3% \ifAC@withpage% \expandafter\ifx\csname r@acro:#1\endcsname\relax% - \PackageWarning{acronym}{% + \PackageInfo{acronym}{% Acronym #1 used in text but not spelled out in full in text}% \else% @@ -277,27 +274,45 @@ \newcommand*\@verridelabel[1]{% \@bsphack \protected@write\@auxout{}{\string\undonewlabel{#1}}% - \@overriddenmessage s{#1}% \label{#1}% + \@overriddenmessage rs{#1}% \@esphack }% -\newcommand*\undonewlabel{\@und@newl@bel r}% -\newcommand*\@und@newl@bel[2]{% - \@ifundefined{#1@#2}{% - \@latex@error{Label `#2' shall be overridden although it does - not yet^^Jexist}{A label which does not exist cannot be - overridden.}% - }{% - \global\expandafter\let\csname #1@#2\endcsname\relax +\newcommand*\undonewlabel{\@und@newl@bel rs}% +\newcommand*\@und@newl@bel[3]{% + \@ifundefined{#1@#3}% + {% + \global\expandafter\let\csname#2@#3\endcsname\@nnil + }% + {% + \global\expandafter\let\csname#1@#3\endcsname\relax }% }% -\newcommand*\@overriddenmessage[2]{% - \@ifundefined{#1@#2}{\global\@namedef{#1@#2}{i}}{% - \expandafter\g@addto@macro\csname #1@#2\endcsname{i}% +\newcommand*\@overriddenmessage[3]{% + \expandafter\ifx\csname#2@#3\endcsname\@nnil + \expandafter\@firstoftwo + \else + \@ifundefined{#1@#3}% + {% + \@ifundefined{#2@#3}% + {\expandafter\@firstoftwo}% + {\expandafter\@secondoftwo}% + }% + {\expandafter\@secondoftwo}% + \fi + {% + \PackageInfo{acronym}{Label `#3' newly defined as it + shall be overridden^^Jalthough it is yet undefined}% + \global\expandafter\let\csname#2@#3\endcsname\empty + }% + {% + \PackageInfo{acronym}{Label `#3' overridden}% + \@ifundefined{#2@#3}{% + \global\expandafter\let\csname#2@#3\endcsname\empty}{}% + \expandafter\g@addto@macro\csname#2@#3\endcsname{i}% }% - \@latex@warning{Label `#2' overridden}% }% -\newcommand*\my@testdef[3]{% +\newcommand*\ac@testdef[3]{% \@ifundefined{s@#2}\@secondoftwo\@firstofone {% \expandafter\ifx\csname s@#2\endcsname\empty @@ -320,17 +335,15 @@ }% \newcommand*\reset@newl@bel{% \ifx\@newl@bel\@testdef - \let\@newl@bel\my@testdef + \let\@newl@bel\ac@testdef \let\undonewlabel\@gobble \fi }% \newcommand*\AC@placelabel[1]{% \expandafter\ifx\csname ac@#1\endcsname\AC@used - {\AC@phantomsection\@verridelabel{acro:#1}}% \else + {\AC@phantomsection\@verridelabel{acro:#1}}% \global\expandafter\let\csname ac@#1\endcsname\AC@used - {\AC@phantomsection - \@ifundefined{s@acro:#1}{\label}{\@verridelabel}{acro:#1}}% \AC@addtoAC@clearlist{#1}% \fi }% |