From 3ebb5d696023c7c1dd3c42045057c647fbe5cd2f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 19 Apr 2008 17:07:47 +0000 Subject: acronym update (18apr08) git-svn-id: svn://tug.org/texlive/trunk@7519 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/acronym/acronym.dtx | 48 +++++++++++++++++----- 1 file changed, 37 insertions(+), 11 deletions(-) (limited to 'Master/texmf-dist/source/latex/acronym') diff --git a/Master/texmf-dist/source/latex/acronym/acronym.dtx b/Master/texmf-dist/source/latex/acronym/acronym.dtx index 40dfc51b878..212ee413f93 100644 --- a/Master/texmf-dist/source/latex/acronym/acronym.dtx +++ b/Master/texmf-dist/source/latex/acronym/acronym.dtx @@ -2,7 +2,7 @@ % % Doc-Source file to use with LaTeX2e % -% Copyright 1994-2005 by Tobias Oetiker (oetiker@ee.ethz.ch) and many Contributors. +% Copyright 1994-2008 by Tobias Oetiker (tobi@oetiker.ch) and many Contributors. % All rights reserved. % % This work may be distributed and/or modified under the conditions of @@ -16,7 +16,7 @@ % version 2003/12/01 or later. % % This work has the LPPL maintenance status "maintained". -% The Current Maintainer of this work is Tobias Oetiker (oetiker@ee.ethz.ch). +% The Current Maintainer of this work is Tobias Oetiker (tobi@oetiker.ch). % %<*driver> \documentclass{ltxdoc} @@ -35,7 +35,7 @@ % % \fi % -% \CheckSum{725} +% \CheckSum{744} % %% \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,6 +83,7 @@ % \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.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} @@ -337,7 +338,7 @@ % For example, if \textit{HBCI} is the longest acronym used, the % list should start with % \begin{quote} -% |\begin{acronym}[HBCI]| +% |\begin{acronym}[HBCI]| % \end{quote} % % In standard mode, the acronym-list will consist of all defined @@ -345,11 +346,16 @@ % before or not. This behavior can be changed by loading the % package with the parameter \texttt{printonlyused}: % \begin{quote} -% |\usepackage[printonlyused]{acronym}| +% |\usepackage[printonlyused]{acronym}| +% \end{quote} +% In \texttt{printonlyused}-mode you can add to each acronym the +% the page number where it was first used by additionally specifying +% the option \texttt{withpage}. +% \begin{quote} +% |\usepackage[printonlyused,withpage]{acronym}| % \end{quote} % -% -% \subsection{Miscellaneous} +% \subsection{Miscellaneous} % \subsubsection*{Sectioning and pdf marks} % Acronyms are robust (since version 1.12) and can be used in % sectional headers such as \cmd{\chapter}, \cmd{\section}, etc., @@ -397,7 +403,7 @@ % \begin{macrocode} %<*acrotest> \documentclass{article} -\usepackage[printonlyused]{acronym} +\usepackage[printonlyused,withpage]{acronym} \begin{document} \section{Intro} @@ -472,8 +478,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}[2006/06/26 - v1.26 +\ProvidesPackage{acronym}[2008/04/18 + v1.27 Support for acronyms (Tobias Oetiker)] \RequirePackage{suffix} % \end{macrocode} @@ -519,6 +525,17 @@ between the constant of Boltzmann and the \acl{NA}: % \end{macrocode} % \end{macro} % +% \begin{macro}{\ifAC@withpage} +% A marker which tells us to print page numbers. +% \begin{macrocode} +\newif\ifAC@withpage +\AC@withpagefalse +% \end{macrocode} +% \begin{macrocode} +\DeclareOption{withpage}{\AC@withpagetrue} +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\ifAC@smaller} % The option |smaller| leads to a redefinition of \cmd{\acsfont}. % We want to make the acronym appear smaller. Since this should @@ -909,6 +926,13 @@ between the constant of Boltzmann and the \acl{NA}: \ifAC@printonlyused% \expandafter\ifx\csname acused@#1\endcsname\AC@used% \item[\protect\AC@hypertarget{#1}{\acsfont{#2}}] #3% + \ifAC@withpage% + \expandafter\ifx\csname r@acro:#1\endcsname\relax% + \G@refundefinedtrue% + \else% + \dotfill\pageref{acro:#1}% + \fi% + \fi% \fi% \else% \item[\protect\AC@hypertarget{#1}{\acsfont{#2}}] #3% @@ -1054,6 +1078,7 @@ between the constant of Boltzmann and the \acl{NA}: \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} @@ -1161,7 +1186,8 @@ between the constant of Boltzmann and the \acl{NA}: \relax% \else \global\expandafter\let\csname ac@#1\endcsname\AC@used - \AC@addtoclearlist{#1}% + \label{acro:#1}% + \AC@addtoclearlist{#1}% \fi \ifAC@starred\else\AC@logged{#1}\fi} % \end{macrocode} -- cgit v1.2.3