Skip to content

Commit a181f4a

Browse files
authored
Merge branch 'master' into error-option
2 parents af79339 + 64627d4 commit a181f4a

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

acronym.dtx

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
%
33
% Doc-Source file to use with LaTeX2e
44
%
5-
% Copyright 1994-2024 by Tobias Oetiker ([email protected]) and many Contributors.
5+
% Copyright 1994-2025 by Tobias Oetiker ([email protected]) and many Contributors.
66
% All rights reserved.
77
%
88
% This work may be distributed and/or modified under the conditions of
@@ -82,7 +82,7 @@
8282
% \DoNotIndex{\textbf, \textsf, \textsmaller, \textsuperscript, \the}
8383
% \DoNotIndex{\usepackage}
8484
%
85-
% \changes{v1.50}{2024/09/26}{Theo von Arx adds the option 'error' to throw errors upon undefined acronyms}
85+
% \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}
8686
% \changes{v1.49}{2024/03/30}{Chris Landis adds noforwardlinks option and fixes targets for forward links to acs/acl/etc.-only use}
8787
% \changes{v1.48}{2021/10/09}{Bruno Le Floch corrected capitalization of acronyms with a custom plural form.}
8888
% \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.}
@@ -603,6 +603,7 @@
603603
%<*acrotest>
604604
\documentclass{article}
605605
\usepackage[colorlinks]{hyperref}
606+
\usepackage{amsmath}
606607
\usepackage[printonlyused,withpage]{acronym}
607608
\begin{document}
608609

@@ -637,7 +638,7 @@ ring, a pyridine derivate.
637638
One mol consists of \acs{NA} atoms or molecules. There is a relation
638639
between the constant of Boltzmann and the \acl{NA}:
639640
\begin{equation}
640-
k = R/\acs{NA}
641+
k = R/\acs{NA}\label{my:eq}
641642
\end{equation}
642643

643644
\acl{lox}/\acl{lh2} (\acsu{lox}/\acsu{lh2})
@@ -646,7 +647,7 @@ between the constant of Boltzmann and the \acl{NA}:
646647
and final states are different. An example for \iac{LFVP} is
647648
neutrinoless double beta decay.
648649

649-
\subsection{Some testing fundamentals}
650+
\subsection{Some testing \acp{IC} fundamentals}
650651
When testing \acp{IC}, one typically wants to identify functional
651652
blocks to be tested separately. The latter are commonly indicated as
652653
\acp{BUT}. To test a \ac{BUT} requires defining a testing strategy\dots{}
@@ -694,8 +695,8 @@ blocks to be tested separately. The latter are commonly indicated as
694695
% First we test that we got the right format and name the package.
695696
% \begin{macrocode}
696697
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
697-
\ProvidesPackage{acronym}[2024/03/30
698-
v1.49
698+
\ProvidesPackage{acronym}[2025/01/17
699+
v1.50
699700
Support for acronyms (Tobias Oetiker)]
700701
\RequirePackage{suffix,xstring}
701702
% \end{macrocode}
@@ -1643,17 +1644,21 @@ blocks to be tested separately. The latter are commonly indicated as
16431644
%
16441645
% \subsection{Helper functions to unset labels}
16451646
%
1646-
% \begin{macro}{\@verridelabel} The internal \cmd{\@verridelabel}
1647+
% \begin{macro}{\AC@verridelabel} The internal \cmd{\AC@verridelabel}
16471648
% command lets us 'redefine' an acronym label such that the page
16481649
% reference in the acronym list points where it should be pointing and
16491650
% not just to the very first occurrence of the acronym, where it may not
1650-
% even be expanded. (code by Ulrich Diez)
1651+
% even be expanded. (code by Ulrich Diez).
16511652
%
16521653
% \begin{macrocode}
1653-
\newcommand*\@verridelabel[1]{%
1654+
\newcommand*\AC@verridelabel[1]{%
16541655
\@bsphack
16551656
\protected@write\@auxout{}{\string\AC@undonewlabel{#1}}%
1656-
\label{#1}%
1657+
\ifdefined\ltx@label%
1658+
\ltx@label{#1}%
1659+
\else%
1660+
\label{#1}%
1661+
\fi%
16571662
\AC@overriddenmessage rs{#1}%
16581663
\@esphack
16591664
}%
@@ -1719,13 +1724,13 @@ blocks to be tested separately. The latter are commonly indicated as
17191724
\newcommand*\AC@placelabel@part[1]{%
17201725
\expandafter\ifx\csname AC@\AC@prefix#1\endcsname\AC@used
17211726
\else
1722-
{\AC@phantomsection\@verridelabel{acro:#1}}%
1727+
\texorpdfstring{\AC@phantomsection\AC@verridelabel{acro:#1}}{}%
17231728
\fi
17241729
}%
17251730
\newcommand*\AC@placelabel[1]{%
17261731
\expandafter\ifx\csname AC@\AC@prefix#1\endcsname\AC@used
17271732
\else
1728-
{\AC@phantomsection\@verridelabel{acro:#1}}%
1733+
{\AC@phantomsection\AC@verridelabel{acro:#1}}%
17291734
\ifAC@starred\else%
17301735
\global\expandafter\let\csname AC@\AC@prefix#1\endcsname\AC@used
17311736
\fi%

0 commit comments

Comments
 (0)