diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/acronym/CHANGES | 121 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/acronym/acronym.pdf | bin | 148681 -> 151635 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/acronym/acrotest.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/acronym/acronym.dtx | 133 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/acronym/acronym.sty | 110 |
5 files changed, 191 insertions, 175 deletions
diff --git a/Master/texmf-dist/doc/latex/acronym/CHANGES b/Master/texmf-dist/doc/latex/acronym/CHANGES deleted file mode 100644 index f836e4bd1b7..00000000000 --- a/Master/texmf-dist/doc/latex/acronym/CHANGES +++ /dev/null @@ -1,121 +0,0 @@ -<Version 1.27 (April 2008) add option 'addpage' to add pagenumber of first -occurenace to list of acronyms. --- Tobias Oetiker (tobi with oetiker.ch) - -Version 1.26 (June 2006) supress lone item when nolist is in effect --- Immo Köster <Immo.Koester there rwth-aachen.de> - -Version 1.25 (November 2005) properly handle acronyms in pdfbookmarks --- Heiko Oberdiek <oberdiek there uni-freiburg.de> - -Version 1.24 (October 2005) ac* commands are now not fragile anymore ... --- José Emilio Vila Forcén jose.vila there cui.unige.ch - -Version 1.23 (October 2005) fixed typo in nolist option. added comment about fragility of ac commands. --- Tobias Oetiker (tobi with oetiker.ch) - -Version 1.22 (October 2005) added starred versions of ac(p), acf(p), acs(p), -acl(p), acfi, acsu & aclu --- Stefan Pinnow (Mo-Gul here gmx.net) - -Version 1.21 (September 2005): fixed the \acused command again ... broke it -in 1.20 (this time I amended the docs, so that the intention becomes clear). -Set acronyms as used in the first run, not only in the second one. --- Tobi Oetiker tobi at oetiker.ch - -added new option nolist to suppress printing the acronym list all together --- José Emilio Vila Forcén jose.vila there cui.unige.ch - -Version 1.20 (August 2005): make the acused command actually work --- Richard Walker Richard.Walker there cs.anu.edu.au - -Version 1.19 (April 2005): three new commands acused (set-used), acsu (adds to used), aclu (adds to used) --- Lee Netherton ltn100 there ohm.york.ac.uk - -Version 1.18 (April 2005): added additional format option for Full Name (acfi) --- Manuel G"ortz mgoertz there kom.tu-darmstadt.de - -Version 1.17 (November 2004): added don't use acronyms (dua) option --- Oliver Creighton - -Version 1.16 (November 2004): fix version number --- Oliver Creighton <creighto there in.tum.de> -new option to suppress all acronym printing -- don't use acronyms (dua) - -Version 1.16 (November 2004): fix version number --- tobi there oetiker.ch - -Version 1.15 (November 2004): fix for acresetall to work when ac is called -in grouped material. --- Hendri Adriaens <Hendri there uvt.nl> - -Version 1.14 (October 2004): fix acsp and acfp for footnote mode --- Markus Ortner <m.ortner there icie.jku.at> - -Version 1.13 (July 2004): deflist renamed to AC there deflist to -avoid unnecessary naming conflict. --- Peter May <peter.may there philips.com> - -Version 1.13 (July 2004): printonlyused was not working anymore --- Tobi Oetiker <tobi at oetiker.ch> - -Version 1.13 (July 2004): if the footnote option was on, footnotes were -printed for ALL acronyms ALL the time, this looked rather odd if the same -acronym was used more than once on the same page. Changed it so that -footnote printing follows the same rules as normal acronym printing (only -print footnote first time). One might think about changing this, so that -either footnotes get printed 'once' per page. Or that the footnote marks are -issued once per acronym and page, so that all instances of the same acronym -on a page get the same footnote mark. Feel free to contribute patches. --- Tobi Oetiker <tobi at oetiker.ch> - -Version 1.12 (June 2004): Make acronyms robust and compatible -with pdf bookmarks. --- Danie Els <dnjels there sun.ac.za> - -Version 1.11 (June 2004): Make hyperlinks work inside optional -item text by replacing hypertarget with raisedhypertarget --- Martin Salois <Martin.Salois there drdc-rddc.gc.ca> - -Version 1.10 (May 2004): Fix for the bug of a \cs{}\cs{} following an -acronym. Add footnote optional out for \cmd{\acs}. Fix for list of acronyms -in front matter and addition of \cmd{\acroextra} command. --- Danie Els <dnjels there sun.ac.za> - -Version 1.9 (October 2003): Fix hyperref processing to work regardles -of calling order. 'printused' now prints every acronym used not only -the ones called through \ac. --- Danie Els <dnjels there sun.ac.za> and Tobi Oetiker - -Version 1.8 (October 2003): When the hyperref package is loaded before the -acronym package, all acronyms will become a hyperlink to their own -definition. --- Martin Salois <Martin.Salois there drdc-rddc.gc.ca> - -Version 1.7 (September 2003): Added \acresetall for resetting the 'used'-tag -of \ac. With the new option 'printonlyused', the acronym-list will consist of -the used acronyms only and not of all defined acronyms; Optional in a special -deflist - environment. --- Sebastian Max <smx there comnets.rwth-aachen.de> - -Version 1.6 (May 2000): Added the smaller option and the macros \acsfont, -\acffont, and \acfsfont used to control the appearance of \acs and \acf. --- Ingo Lepper <lepper there math.uni-muenster.de> - -Version 1.5 (May 2000): Added support for english plural forms and the -footnote option. --- David Sterratt <David.C.Sterratt there ed.ac.uk> - -Version 1.4 (February 2000): A formatted acronym string, which is allowed -to contain indices, for example, is now possible. For this purpose -the syntax of \acro and \acrodef now permits an optional argument: - \acro{<acronym>}{<full name>} (without opt. arg.) - \acro{<acronym>}[<short name>]{<full name>} (with opt. arg.) -The user macros \ac, \acs, \acl, and \acf print now <short name> -instead of <acronym>, if available. --- Heiko Oberdiek <oberdiek there ruf.uni-freiburg.de> - -Version 1.2 (August 1996) features a new command: \acl to print the -expanded acronym with out even mentioning that there is an acronym for -this word. --- Tobias Oetiker <tobi at oetiker.ch> diff --git a/Master/texmf-dist/doc/latex/acronym/acronym.pdf b/Master/texmf-dist/doc/latex/acronym/acronym.pdf Binary files differindex 265ed251eb3..449d49dc904 100644 --- a/Master/texmf-dist/doc/latex/acronym/acronym.pdf +++ b/Master/texmf-dist/doc/latex/acronym/acronym.pdf diff --git a/Master/texmf-dist/doc/latex/acronym/acrotest.tex b/Master/texmf-dist/doc/latex/acronym/acrotest.tex index 8075419078d..532ff3146ef 100644 --- a/Master/texmf-dist/doc/latex/acronym/acrotest.tex +++ b/Master/texmf-dist/doc/latex/acronym/acrotest.tex @@ -22,8 +22,8 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} %% - \documentclass{article} +\usepackage{hyperref} \usepackage[printonlyused,withpage]{acronym} \begin{document} diff --git a/Master/texmf-dist/source/latex/acronym/acronym.dtx b/Master/texmf-dist/source/latex/acronym/acronym.dtx index 212ee413f93..c1c711ae893 100644 --- a/Master/texmf-dist/source/latex/acronym/acronym.dtx +++ b/Master/texmf-dist/source/latex/acronym/acronym.dtx @@ -35,7 +35,7 @@ %</driver> % \fi % -% \CheckSum{744} +% \CheckSum{833} % %% \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 @@ -83,7 +83,10 @@ % \DoNotIndex{\usepackage} % % -% \changes{v1.27}{2008/04/18}{Added withpage option to print page numbers into acronym list by tobi and Domagoj Babic, babic@cs.ubc.ca} +% \changes{v1.30}{2008/04/22}{Ulrich Diez corrected code to redefine labels and adjusted behavior with \cmd{\AC@used}} +% \changes{v1.29}{2008/04/22}{added code to redefine labels as acronyms are used multiple times, makeing the right page numbers show up for the withpage option (code by Ulrich Diez on comp.text.tex, integration by Domagoj Babic, babic AT cs.ubc.ca)} +% \changes{v1.28}{2008/04/19}{add linebreak to items list by tobi} +% \changes{v1.27}{2008/04/18}{Added withpage option to print page numbers into acronym list by tobi and Domagoj Babic, babic AT cs.ubc.ca} % \changes{v1.26}{2006/06/26}{Don't put out an empty item if nolist is in effect by Immo.Koester@rwth-aachen.de} % \changes{v1.25}{2005/11/11}{Properly handle acronym commands in PDF Bookmarks by Heiko Oberdiek oberdiek@uni-freiburg.de} % \changes{v1.24}{2005/10/25}{Now the acronyms commands and fixed a bug in the option nolist, by Jose Emilio Vila Forcen, jemilio@ieee.org} @@ -367,7 +370,7 @@ % % \item The text of \meta{acronym} is used verbatim in bookmarks and % not \meta{short name} for pdf\TeX\ with \texttt{hyperref}. - +% % \item When the long form of the acronym is used in sectional headers % (for pdf\TeX\ with \texttt{hyperref}), it will end up in the pdf % bookmarks. In that case it is good to hide unusual text such as @@ -403,6 +406,7 @@ % \begin{macrocode} %<*acrotest> \documentclass{article} +\usepackage{hyperref} \usepackage[printonlyused,withpage]{acronym} \begin{document} @@ -478,8 +482,8 @@ between the constant of Boltzmann and the \acl{NA}: % First we test that we got the right format and name the package. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{acronym}[2008/04/18 - v1.27 +\ProvidesPackage{acronym}[2008/04/22 + v1.30 Support for acronyms (Tobias Oetiker)] \RequirePackage{suffix} % \end{macrocode} @@ -608,7 +612,6 @@ between the constant of Boltzmann and the \acl{NA}: % \end{macro} % \end{macro} % -% % \subsection{Hyperlinks and PDF support} % % \begin{macro}{\AC@hyperlink} @@ -617,6 +620,7 @@ between the constant of Boltzmann and the \acl{NA}: % \begin{macrocode} \def\AC@hyperlink#1#2{#2} \def\AC@hypertarget#1#2{#2} +\def\AC@phantomsection{} % \end{macrocode} % \end{macro} % \end{macro} @@ -631,7 +635,15 @@ between the constant of Boltzmann and the \acl{NA}: {\let\AC@hyperlink=\hyperlink \newcommand*\AC@raisedhypertarget[2]{% \Hy@raisedlink{\hypertarget{#1}{}}#2}% - \let\AC@hypertarget=\AC@raisedhypertarget}{}} + \let\AC@hypertarget=\AC@raisedhypertarget + \def\AC@phantomsection{% + \Hy@GlobalStepCount\Hy@linkcounter + \edef\@currentHref{section*.\the \Hy@linkcounter}% + \Hy@raisedlink{% + \hyper@anchorstart{\@currentHref}\hyper@anchorend + }% + }% + }{}}% \fi % \end{macrocode} % \end{macro} @@ -711,7 +723,11 @@ between the constant of Boltzmann and the \acl{NA}: % \end{macrocode} % \begin{macrocode} \def\AC@reset#1{% - \global\expandafter\let\csname ac@#1\endcsname\relax} + \global\expandafter\let\csname ac@#1\endcsname\relax + \@ifundefined{s@acro:#1}{% + \global\@namedef{s@acro:#1}{}% + }{}% +} % \end{macrocode} % \end{macro} % \end{macro} @@ -928,10 +944,12 @@ between the constant of Boltzmann and the \acl{NA}: \item[\protect\AC@hypertarget{#1}{\acsfont{#2}}] #3% \ifAC@withpage% \expandafter\ifx\csname r@acro:#1\endcsname\relax% - \G@refundefinedtrue% + \PackageWarning{acronym}{% + Acronym #1 used in text but not spelled out in + full in text}% \else% \dotfill\pageref{acro:#1}% - \fi% + \fi\\% \fi% \fi% \else% @@ -1041,6 +1059,79 @@ between the constant of Boltzmann and the \acl{NA}: % \end{macro} % \end{macro} % +% \subsection{Helper functions to unset labels} +% +% \begin{macro}{\@verridelabel} The internal \cmd{\@verridelabel} +% command lets us 'redefine' an acronym label such that the page +% reference in the acronym list points where it should be pointing and +% not just to the very first occurrence of the acronym, where it may not +% even be expanded. (code by Ulrich Diez) +% +% \begin{macrocode} +\newcommand*\@verridelabel[1]{% + \@bsphack + \protected@write\@auxout{}{\string\undonewlabel{#1}}% + \@overriddenmessage s{#1}% + \label{#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*\@overriddenmessage[2]{% + \@ifundefined{#1@#2}{\global\@namedef{#1@#2}{i}}{% + \expandafter\g@addto@macro\csname #1@#2\endcsname{i}% + }% + \@latex@warning{Label `#2' overridden}% +}% +\newcommand*\my@testdef[3]{% + \@ifundefined{s@#2}\@secondoftwo\@firstofone + {% + \expandafter\ifx\csname s@#2\endcsname\empty + \expandafter\@firstofone + \else + \expandafter\xdef\csname s@#2\endcsname{% + \expandafter\expandafter + \expandafter\@gobble + \csname s@#2\endcsname + }% + \expandafter\@gobble + \fi + }% + {% + \@testdef{#1}{#2}{#3}% + }% +}% +\protected@write\@auxout{}{% + \string\reset@newl@bel +}% +\newcommand*\reset@newl@bel{% + \ifx\@newl@bel\@testdef + \let\@newl@bel\my@testdef + \let\undonewlabel\@gobble + \fi +}% +\newcommand*\AC@placelabel[1]{% + \expandafter\ifx\csname ac@#1\endcsname\AC@used + {\AC@phantomsection\@verridelabel{acro:#1}}% + \else + \global\expandafter\let\csname ac@#1\endcsname\AC@used + {\AC@phantomsection + \@ifundefined{s@acro:#1}{\label}{\@verridelabel}{acro:#1}}% + \AC@addtoclearlist{#1}% + \fi +}% +% \end{macrocode} +% \end{macro} +% +% % \begin{macro}{\acf} % \begin{macro}{\acfa} % \begin{macro}{\@acf} @@ -1066,21 +1157,14 @@ between the constant of Boltzmann and the \acl{NA}: \newcommand*{\@acf}[1]{% \ifAC@footnote \acsfont{\AC@acs{#1}}% - \footnote{\AC@acl{#1}{}}% + \footnote{\AC@placelabel{#1}\AC@acl{#1}{}}% \else \acffont{% - \AC@acl{#1}% + \AC@placelabel{#1}\AC@acl{#1}% \nolinebreak[3] % \acfsfont{(\acsfont{\AC@acs{#1}})}% }% \fi - \expandafter\ifx\csname ac@#1\endcsname\AC@used - \relax% - \else - \global\expandafter\let\csname ac@#1\endcsname\AC@used - \label{acro:#1}% - \AC@addtoclearlist{#1}% - \fi \ifAC@starred\else\AC@logged{#1}\fi} % \end{macrocode} % \end{macro} @@ -1174,21 +1258,14 @@ between the constant of Boltzmann and the \acl{NA}: \newcommand*{\@acfp}[1]{% \ifAC@footnote \acsfont{\AC@acs{#1}}s% - \footnote{\AC@acl{#1}s{}}% + \footnote{\AC@placelabel{#1}\AC@acl{#1}s{}}% \else \acffont{% - \AC@acl{#1}s% + \AC@placelabel{#1}\AC@acl{#1}s% \nolinebreak[3] % \acfsfont{(\acsfont{\AC@acs{#1}}s)}% }% \fi - \expandafter\ifx\csname ac@#1\endcsname\AC@used - \relax% - \else - \global\expandafter\let\csname ac@#1\endcsname\AC@used - \label{acro:#1}% - \AC@addtoclearlist{#1}% - \fi \ifAC@starred\else\AC@logged{#1}\fi} % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/tex/latex/acronym/acronym.sty b/Master/texmf-dist/tex/latex/acronym/acronym.sty index 74d30c76359..a093e188baa 100644 --- a/Master/texmf-dist/tex/latex/acronym/acronym.sty +++ b/Master/texmf-dist/tex/latex/acronym/acronym.sty @@ -38,10 +38,9 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} %% - \NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{acronym}[2008/04/18 - v1.27 +\ProvidesPackage{acronym}[2008/04/22 + v1.30 Support for acronyms (Tobias Oetiker)] \RequirePackage{suffix} \newif\ifAC@footnote @@ -76,6 +75,7 @@ \newcommand*{\acfsfont}[1]{#1} \def\AC@hyperlink#1#2{#2} \def\AC@hypertarget#1#2{#2} +\def\AC@phantomsection{} \ifAC@nohyperlinks \else \AtBeginDocument{% @@ -83,7 +83,15 @@ {\let\AC@hyperlink=\hyperlink \newcommand*\AC@raisedhypertarget[2]{% \Hy@raisedlink{\hypertarget{#1}{}}#2}% - \let\AC@hypertarget=\AC@raisedhypertarget}{}} + \let\AC@hypertarget=\AC@raisedhypertarget + \def\AC@phantomsection{% + \Hy@GlobalStepCount\Hy@linkcounter + \edef\@currentHref{section*.\the \Hy@linkcounter}% + \Hy@raisedlink{% + \hyper@anchorstart{\@currentHref}\hyper@anchorend + }% + }% + }{}}% \fi \AtBeginDocument{% \providecommand\texorpdfstring[2]{#1}% @@ -125,7 +133,11 @@ } \newcommand*\acresetall{\the\clearlist\clearlist={}} \def\AC@reset#1{% - \global\expandafter\let\csname ac@#1\endcsname\relax} + \global\expandafter\let\csname ac@#1\endcsname\relax + \@ifundefined{s@acro:#1}{% + \global\@namedef{s@acro:#1}{}% + }{}% +} \newcommand*\AC@used{@<>@<>@} \newcommand{\AC@populated}{} \newcommand*{\AC@logged}[1]{% @@ -215,10 +227,12 @@ \item[\protect\AC@hypertarget{#1}{\acsfont{#2}}] #3% \ifAC@withpage% \expandafter\ifx\csname r@acro:#1\endcsname\relax% - \G@refundefinedtrue% + \PackageWarning{acronym}{% + Acronym #1 used in text but not spelled out in + full in text}% \else% \dotfill\pageref{acro:#1}% - \fi% + \fi\\% \fi% \fi% \else% @@ -260,6 +274,66 @@ \newcommand*{\@acl}[1]{% \AC@acl{#1}% \ifAC@starred\else\AC@logged{#1}\fi} +\newcommand*\@verridelabel[1]{% + \@bsphack + \protected@write\@auxout{}{\string\undonewlabel{#1}}% + \@overriddenmessage s{#1}% + \label{#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*\@overriddenmessage[2]{% + \@ifundefined{#1@#2}{\global\@namedef{#1@#2}{i}}{% + \expandafter\g@addto@macro\csname #1@#2\endcsname{i}% + }% + \@latex@warning{Label `#2' overridden}% +}% +\newcommand*\my@testdef[3]{% + \@ifundefined{s@#2}\@secondoftwo\@firstofone + {% + \expandafter\ifx\csname s@#2\endcsname\empty + \expandafter\@firstofone + \else + \expandafter\xdef\csname s@#2\endcsname{% + \expandafter\expandafter + \expandafter\@gobble + \csname s@#2\endcsname + }% + \expandafter\@gobble + \fi + }% + {% + \@testdef{#1}{#2}{#3}% + }% +}% +\protected@write\@auxout{}{% + \string\reset@newl@bel +}% +\newcommand*\reset@newl@bel{% + \ifx\@newl@bel\@testdef + \let\@newl@bel\my@testdef + \let\undonewlabel\@gobble + \fi +}% +\newcommand*\AC@placelabel[1]{% + \expandafter\ifx\csname ac@#1\endcsname\AC@used + {\AC@phantomsection\@verridelabel{acro:#1}}% + \else + \global\expandafter\let\csname ac@#1\endcsname\AC@used + {\AC@phantomsection + \@ifundefined{s@acro:#1}{\label}{\@verridelabel}{acro:#1}}% + \AC@addtoclearlist{#1}% + \fi +}% \newcommand*{\acf}{\AC@starredfalse\protect\acfa}% \WithSuffix\newcommand\acf*{\AC@starredtrue\protect\acfa}% \newcommand*{\acfa}[1]{% @@ -267,21 +341,14 @@ \newcommand*{\@acf}[1]{% \ifAC@footnote \acsfont{\AC@acs{#1}}% - \footnote{\AC@acl{#1}{}}% + \footnote{\AC@placelabel{#1}\AC@acl{#1}{}}% \else \acffont{% - \AC@acl{#1}% + \AC@placelabel{#1}\AC@acl{#1}% \nolinebreak[3] % \acfsfont{(\acsfont{\AC@acs{#1}})}% }% \fi - \expandafter\ifx\csname ac@#1\endcsname\AC@used - \relax% - \else - \global\expandafter\let\csname ac@#1\endcsname\AC@used - \label{acro:#1}% - \AC@addtoclearlist{#1}% - \fi \ifAC@starred\else\AC@logged{#1}\fi} \newcommand*{\ac}{\AC@starredfalse\protect\@ac}% \WithSuffix\newcommand\ac*{\AC@starredtrue\protect\@ac}% @@ -314,21 +381,14 @@ \newcommand*{\@acfp}[1]{% \ifAC@footnote \acsfont{\AC@acs{#1}}s% - \footnote{\AC@acl{#1}s{}}% + \footnote{\AC@placelabel{#1}\AC@acl{#1}s{}}% \else \acffont{% - \AC@acl{#1}s% + \AC@placelabel{#1}\AC@acl{#1}s% \nolinebreak[3] % \acfsfont{(\acsfont{\AC@acs{#1}}s)}% }% \fi - \expandafter\ifx\csname ac@#1\endcsname\AC@used - \relax% - \else - \global\expandafter\let\csname ac@#1\endcsname\AC@used - \label{acro:#1}% - \AC@addtoclearlist{#1}% - \fi \ifAC@starred\else\AC@logged{#1}\fi} \newcommand*{\acp}{\AC@starredfalse\protect\@acp}% \WithSuffix\newcommand\acp*{\AC@starredtrue\protect\@acp}% |