diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/acronym/CHANGES | 27 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/acronym/acronym.pdf | bin | 299705 -> 320084 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/acronym/acrotest.tex | 5 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/acronym/acronym.dtx | 70 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/acronym/acronym.sty | 33 |
5 files changed, 99 insertions, 36 deletions
diff --git a/Master/texmf-dist/doc/latex/acronym/CHANGES b/Master/texmf-dist/doc/latex/acronym/CHANGES index b4a3b731061..1aa353a9bce 100644 --- a/Master/texmf-dist/doc/latex/acronym/CHANGES +++ b/Master/texmf-dist/doc/latex/acronym/CHANGES @@ -1,3 +1,10 @@ +Version 1.50 (Jan 2025) +- Adds error option +-- Theo von Arx + +- Fixes label regression #60 +-- Tobi with lots of help + Version 1.49 (Mar 2024) - Adds noforwardlinks option @@ -29,7 +36,7 @@ Version 1.45 (Mar 2020) - Fixed hyperref regression and the longstanding "missing aux" bug. -- Marcus Meeßen - + Version 1.44 (Feb 2020) - added the |printonlyreused| option, which allows to automatically exclude acronyms from the list of acronyms if they are used only once @@ -59,7 +66,7 @@ two features were added -- Oz Davidi * Now it is possible to forbid a line break between the full name and the short name (when they are printed together). It is possible to control it individually (for each command), and also globally (with the |nolinebreak| option). * Added the \Ac{p,f,fp,l,lp,lu} commands. They work exactly the same way as the \ac commands, but prints the full name, starting with an upper case letter (in case it was defined with a lower case letter). -correting issue with long lines due to carriage return misplaced -- Philippe Chauvat +correting issue with long lines due to carriage return misplaced -- Philippe Chauvat Version 1.41 (Mar 2015) @@ -81,7 +88,7 @@ has its optional argument provided Version 1.38 (Oct 2012) add support for dynamic indefinite articles depending on the acronym form used --- Ash Hughes +-- Ash Hughes fix for non hyphenation of first word in long form -- Martin Rüßler @@ -138,14 +145,14 @@ Version 1.26 (June 2006) supress lone item when nolist is in effect 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 ... +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 +acl(p), acfi, acsu & aclu -- Stefan Pinnow (Mo-Gul here gmx.net) Version 1.21 (September 2005): fixed the \acused command again ... broke it @@ -212,8 +219,8 @@ 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 +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 @@ -223,12 +230,12 @@ 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 +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, +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> diff --git a/Master/texmf-dist/doc/latex/acronym/acronym.pdf b/Master/texmf-dist/doc/latex/acronym/acronym.pdf Binary files differindex 2ab41525718..e3e55ced515 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 f7fa973a991..4032401323f 100644 --- a/Master/texmf-dist/doc/latex/acronym/acrotest.tex +++ b/Master/texmf-dist/doc/latex/acronym/acrotest.tex @@ -25,6 +25,7 @@ %% \documentclass{article} \usepackage[colorlinks]{hyperref} +\usepackage{amsmath} \usepackage[printonlyused,withpage]{acronym} \begin{document} @@ -59,7 +60,7 @@ ring, a pyridine derivate. One mol consists of \acs{NA} atoms or molecules. There is a relation between the constant of Boltzmann and the \acl{NA}: \begin{equation} - k = R/\acs{NA} + k = R/\acs{NA}\label{my:eq} \end{equation} \acl{lox}/\acl{lh2} (\acsu{lox}/\acsu{lh2}) @@ -68,7 +69,7 @@ between the constant of Boltzmann and the \acl{NA}: and final states are different. An example for \iac{LFVP} is neutrinoless double beta decay. -\subsection{Some testing fundamentals} +\subsection{Some testing \acp{IC} fundamentals} When testing \acp{IC}, one typically wants to identify functional blocks to be tested separately. The latter are commonly indicated as \acp{BUT}. To test a \ac{BUT} requires defining a testing strategy\dots{} diff --git a/Master/texmf-dist/source/latex/acronym/acronym.dtx b/Master/texmf-dist/source/latex/acronym/acronym.dtx index b332333810d..ea861c650fa 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-2024 by Tobias Oetiker (tobi@oetiker.ch) and many Contributors. +% Copyright 1994-2025 by Tobias Oetiker (tobi@oetiker.ch) and many Contributors. % All rights reserved. % % This work may be distributed and/or modified under the conditions of @@ -35,7 +35,7 @@ %</driver> % \fi % -% \CheckSum{1634} +% \CheckSum{1664} % %% \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 @@ -73,7 +73,7 @@ % \DoNotIndex{\makelabel, \mathrm} % \DoNotIndex{\NeedsTeXFormat, \newcommand, \newenvironment, % \newif, \newtoks, \noexpand, \nolinebreak, \null} -% \DoNotIndex{\PackageWarning, \ProcessOptions, \protect, +% \DoNotIndex{\PackageWarning, \PackageError, \ProcessOptions, \protect, % \protected@write, \providecommand, \ProvidesPackage} % \DoNotIndex{\raggedright, \ref, \relax, \renewcommand, % \RequirePackage} @@ -82,6 +82,7 @@ % \DoNotIndex{\textbf, \textsf, \textsmaller, \textsuperscript, \the} % \DoNotIndex{\usepackage} % +% \changes{v1.50}{2025/01/16}{Theo von Arx adds the option 'error' to throw errors upon undefined acronyms, Tobi integrates patches for issue/60 ltx and amsmath} % \changes{v1.49}{2024/03/30}{Chris Landis adds noforwardlinks option and fixes targets for forward links to acs/acl/etc.-only use} % \changes{v1.48}{2021/10/09}{Bruno Le Floch corrected capitalization of acronyms with a custom plural form.} % \changes{v1.47}{2020/04/10}{Tobi Oetiker and Marcus Meeßen \cmd{hskip} Fixed several bugs in macros that use capitalisation, a bug were the output depends on the position of the list of acronyms, and a bug were nested hyperlinks could cause errors.} @@ -602,6 +603,7 @@ %<*acrotest> \documentclass{article} \usepackage[colorlinks]{hyperref} +\usepackage{amsmath} \usepackage[printonlyused,withpage]{acronym} \begin{document} @@ -636,7 +638,7 @@ ring, a pyridine derivate. One mol consists of \acs{NA} atoms or molecules. There is a relation between the constant of Boltzmann and the \acl{NA}: \begin{equation} - k = R/\acs{NA} + k = R/\acs{NA}\label{my:eq} \end{equation} \acl{lox}/\acl{lh2} (\acsu{lox}/\acsu{lh2}) @@ -645,7 +647,7 @@ between the constant of Boltzmann and the \acl{NA}: and final states are different. An example for \iac{LFVP} is neutrinoless double beta decay. -\subsection{Some testing fundamentals} +\subsection{Some testing \acp{IC} fundamentals} When testing \acp{IC}, one typically wants to identify functional blocks to be tested separately. The latter are commonly indicated as \acp{BUT}. To test a \ac{BUT} requires defining a testing strategy\dots{} @@ -693,8 +695,8 @@ blocks to be tested separately. The latter are commonly indicated as % First we test that we got the right format and name the package. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{acronym}[2024/03/30 - v1.49 +\ProvidesPackage{acronym}[2025/01/17 + v1.50 Support for acronyms (Tobias Oetiker)] \RequirePackage{suffix,xstring} % \end{macrocode} @@ -703,6 +705,17 @@ blocks to be tested separately. The latter are commonly indicated as % % \subsection{Options} % +% \begin{macro}{\ifAC@error} +% The option |error| lets this package throw compile errors instead of warnings in case of undefined acronyms. +% \begin{macrocode} +\newif\ifAC@error +\AC@errorfalse +% \end{macrocode} +% \begin{macrocode} +\DeclareOption{error}{\AC@errortrue} +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\ifAC@footnote} % The option |footnote| leads to a redefinition of \cmd{\acf}, % \cmd{\Acf}, \cmd{\acfp}, and \cmd{\Acfp}, making the full name appear @@ -1510,10 +1523,29 @@ blocks to be tested separately. The latter are commonly indicated as % \end{macrocode} % \end{macro} % -% \begin{macro}{\AC@get} -% If the acronym is undefined, the internal macro \cmd{\AC@get} -% warns the user by printing the name in bold with an exclamation +% \begin{macro}{\AC@logundefined} +% The internal macro \cmd{\AC@logundefined} either throws a warning or an error +% (if option |error| is set) and prints the name of the acronym in bold with an exclamation % mark at the end. +% \begin{macrocode} +\newcommand\AC@logundefined[1]{% + \ifAC@error% + \ifx\AC@populated\AC@used% + \PackageError{acronym}{#1}{You should define the acronym with + \protect\acrodef, \protect\newacro, or \protect\acro.} + \else% + \PackageWarning{acronym}{#1}% + \fi% + \else% + \PackageWarning{acronym}{#1}% + \fi% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\AC@get} +% If the acronym is undefined, call the internal macro \cmd{\AC@undefined} +% for error handling. % If defined, \cmd{\AC@get} uses the same mechanism used by the LaTeX % kernel commands \cmd{\ref} and \cmd{\pageref} to return the short % \cmd{\AC@acs} and long forms \cmd{\AC@acl} of the acronym @@ -1521,7 +1553,7 @@ blocks to be tested separately. The latter are commonly indicated as % \begin{macrocode} \newcommand*\AC@get[3]{% \ifx#1\relax - \PackageWarning{acronym}{Acronym `#3' is not defined}% + \AC@logundefined{Acronym #3 is not defined}% \textbf{#3!}% \else \@firstupper@maybe{\expandafter#2#1}% @@ -1612,17 +1644,21 @@ blocks to be tested separately. The latter are commonly indicated as % % \subsection{Helper functions to unset labels} % -% \begin{macro}{\@verridelabel} The internal \cmd{\@verridelabel} +% \begin{macro}{\AC@verridelabel} The internal \cmd{\AC@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) +% even be expanded. (code by Ulrich Diez). % % \begin{macrocode} -\newcommand*\@verridelabel[1]{% +\newcommand*\AC@verridelabel[1]{% \@bsphack \protected@write\@auxout{}{\string\AC@undonewlabel{#1}}% - \label{#1}% + \ifdefined\ltx@label% + \ltx@label{#1}% + \else% + \label{#1}% + \fi% \AC@overriddenmessage rs{#1}% \@esphack }% @@ -1688,13 +1724,13 @@ blocks to be tested separately. The latter are commonly indicated as \newcommand*\AC@placelabel@part[1]{% \expandafter\ifx\csname AC@\AC@prefix#1\endcsname\AC@used \else - {\AC@phantomsection\@verridelabel{acro:#1}}% + \texorpdfstring{\AC@phantomsection\AC@verridelabel{acro:#1}}{}% \fi }% \newcommand*\AC@placelabel[1]{% \expandafter\ifx\csname AC@\AC@prefix#1\endcsname\AC@used \else - {\AC@phantomsection\@verridelabel{acro:#1}}% + {\AC@phantomsection\AC@verridelabel{acro:#1}}% \ifAC@starred\else% \global\expandafter\let\csname AC@\AC@prefix#1\endcsname\AC@used \fi% diff --git a/Master/texmf-dist/tex/latex/acronym/acronym.sty b/Master/texmf-dist/tex/latex/acronym/acronym.sty index 26054b1c25e..f449c7dad5b 100644 --- a/Master/texmf-dist/tex/latex/acronym/acronym.sty +++ b/Master/texmf-dist/tex/latex/acronym/acronym.sty @@ -40,10 +40,13 @@ %% %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{acronym}[2024/03/30 - v1.49 +\ProvidesPackage{acronym}[2025/01/17 + v1.50 Support for acronyms (Tobias Oetiker)] \RequirePackage{suffix,xstring} +\newif\ifAC@error +\AC@errorfalse +\DeclareOption{error}{\AC@errortrue} \newif\ifAC@footnote \AC@footnotefalse \DeclareOption{footnote}{\AC@footnotetrue} @@ -422,9 +425,21 @@ } \newif\ifAC@starred \newif\ifAC@upper +\newcommand\AC@logundefined[1]{% + \ifAC@error% + \ifx\AC@populated\AC@used% + \PackageError{acronym}{#1}{You should define the acronym with + \protect\acrodef, \protect\newacro, or \protect\acro.} + \else% + \PackageWarning{acronym}{#1}% + \fi% + \else% + \PackageWarning{acronym}{#1}% + \fi% +} \newcommand*\AC@get[3]{% \ifx#1\relax - \PackageWarning{acronym}{Acronym `#3' is not defined}% + \AC@logundefined{Acronym #3 is not defined}% \textbf{#3!}% \else \@firstupper@maybe{\expandafter#2#1}% @@ -460,10 +475,14 @@ \newcommand*{\@Acl}[1]{% \AC@placelabel@part{#1}\AC@Acl{#1}% \ifAC@starred\else\AC@logged{#1}\fi} -\newcommand*\@verridelabel[1]{% +\newcommand*\AC@verridelabel[1]{% \@bsphack \protected@write\@auxout{}{\string\AC@undonewlabel{#1}}% - \label{#1}% + \ifdefined\ltx@label% + \ltx@label{#1}% + \else% + \label{#1}% + \fi% \AC@overriddenmessage rs{#1}% \@esphack }% @@ -529,13 +548,13 @@ \newcommand*\AC@placelabel@part[1]{% \expandafter\ifx\csname AC@\AC@prefix#1\endcsname\AC@used \else - {\AC@phantomsection\@verridelabel{acro:#1}}% + \texorpdfstring{\AC@phantomsection\AC@verridelabel{acro:#1}}{}% \fi }% \newcommand*\AC@placelabel[1]{% \expandafter\ifx\csname AC@\AC@prefix#1\endcsname\AC@used \else - {\AC@phantomsection\@verridelabel{acro:#1}}% + {\AC@phantomsection\AC@verridelabel{acro:#1}}% \ifAC@starred\else% \global\expandafter\let\csname AC@\AC@prefix#1\endcsname\AC@used \fi% |