summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/acronym
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-04-19 17:07:47 +0000
committerKarl Berry <karl@freefriends.org>2008-04-19 17:07:47 +0000
commit3ebb5d696023c7c1dd3c42045057c647fbe5cd2f (patch)
treea7984a535f71bab54ada2efe6b22b1741364f8d8 /Master/texmf-dist/source/latex/acronym
parent72147e3ae3a6498662f02959e574ae113b1196e6 (diff)
acronym update (18apr08)
git-svn-id: svn://tug.org/texlive/trunk@7519 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/acronym')
-rw-r--r--Master/texmf-dist/source/latex/acronym/acronym.dtx48
1 files changed, 37 insertions, 11 deletions
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 @@
%</driver>
% \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}