[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: guard \nolimits@ for issue #744 (#745) (f2aee924)
GitHub
noreply at github.com
Thu Jan 6 15:10:17 CET 2022
Repository : https://github.com/latex3/latex2e
On branch : develop
Link : https://github.com/latex3/latex2e/commit/f2aee924e499324e29b152aa7ed5ad0a46c86339
>---------------------------------------------------------------
commit f2aee924e499324e29b152aa7ed5ad0a46c86339
Author: David Carlisle <d.p.carlisle at gmail.com>
Date: Thu Jan 6 14:10:17 2022 +0000
guard \nolimits@ for issue #744 (#745)
* guard \nolimits@ for issue #744
* eol
* move testfiles to search config
* news item for issue #744
>---------------------------------------------------------------
f2aee924e499324e29b152aa7ed5ad0a46c86339
base/doc/ltnews35.tex | 8 ++++++--
required/tools/bm.dtx | 7 +++++--
required/tools/changes.txt | 4 ++++
required/tools/testfiles-search/github-0744.lvt | 18 ++++++++++++++++++
required/tools/testfiles-search/github-0744.tlg | 24 ++++++++++++++++++++++++
5 files changed, 57 insertions(+), 4 deletions(-)
diff --git a/base/doc/ltnews35.tex b/base/doc/ltnews35.tex
index cbdc24ee..62d07040 100644
--- a/base/doc/ltnews35.tex
+++ b/base/doc/ltnews35.tex
@@ -454,9 +454,13 @@ the column material out instead running the column short.
\sxissue{q/624940}
-\subsection{???}
+\subsection{\pkg{bm}: Fix for \pkg{amsmath} operators}
+
+An internal command used in the definition of operator commands such
+as \cs{sin} in \pkg{amsmath} has been guarded in \cs{bm} to prevent
+internal syntax errors due to premature expansion.
%
-\githubissue{???}
+\githubissue{744}
diff --git a/required/tools/bm.dtx b/required/tools/bm.dtx
index 57e5bf0d..daf4dce6 100644
--- a/required/tools/bm.dtx
+++ b/required/tools/bm.dtx
@@ -22,7 +22,7 @@
% \fi
%
% \iffalse
-%% Copyright 1996 1997 1998 1999 2002 2003 2004 2016 2017 2019
+%% Copyright 1996 1997 1998 1999 2002 2003 2004 2016 2017 2019 2021 2022
%% David Carlisle Frank Mittelbach
%%
%% Development of this package was commissioned by Y&Y Inc.
@@ -36,7 +36,7 @@
%<driver>\ProvidesFile{bm.drv}
% \fi
% \ProvidesFile{bm.dtx}
- [2021/11/14 v1.2e Bold Symbol Support (DPC/FMi)]
+ [2022/01/05 v1.2f Bold Symbol Support (DPC/FMi)]
%
% \iffalse
%<*driver>
@@ -839,9 +839,12 @@
\unvcopy{\GenericError{##1}{##2}{##3}{##4}}}%
% \end{macrocode}
% For AMS definitions.
+% \changes{v1.2f}{2022/01/05}
+% {Guard \cs{nolimits@}, gh/744}
% \begin{macrocode}
\let\DN@\copy
\let\FN@\copy
+ \let\nolimits@\copy
\let\next@\copy
\global\let\bm at first\@empty
% \end{macrocode}
diff --git a/required/tools/changes.txt b/required/tools/changes.txt
index 9c090901..db7a495a 100644
--- a/required/tools/changes.txt
+++ b/required/tools/changes.txt
@@ -5,6 +5,10 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
=======================================================================
+2022-01-05 David Carlisle <David.Carlisle at latex-project.org>
+
+ * bm.dtx: Guard \nolimits@ for gh issue 744
+
2021-12-05 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
* multicol.dtx (subsection{Manual column breaking} \label{sec:colbreak}):
diff --git a/required/tools/testfiles-search/github-0744.lvt b/required/tools/testfiles-search/github-0744.lvt
new file mode 100644
index 00000000..07794a23
--- /dev/null
+++ b/required/tools/testfiles-search/github-0744.lvt
@@ -0,0 +1,18 @@
+\documentclass{article}
+\input{test2e}
+\let\@@end\@@@end % test2e incompatibilty with bm....
+
+\usepackage{bm,amsmath}
+
+
+% issue #744 bm incorrectly expands amsmath \qopname lookahead
+
+\begin{document}
+
+\START
+
+% this should not error
+\sbox0{$\bm{\sin\left(x\right)}$}
+\showbox0
+
+\END
diff --git a/required/tools/testfiles-search/github-0744.tlg b/required/tools/testfiles-search/github-0744.tlg
new file mode 100644
index 00000000..8f57dedc
--- /dev/null
+++ b/required/tools/testfiles-search/github-0744.tlg
@@ -0,0 +1,24 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+> \box...=
+\hbox(7.5+2.5)x31.32065
+.\mathon
+.\hbox(6.94444+0.0)x14.11935
+..\hbox(6.94444+0.0)x14.11935
+...\mathon
+...\hbox(6.94444+0.0)x14.11935
+....\kern 0.0
+....\OT1/cmr/bx/n/10 s
+....\OT1/cmr/bx/n/10 i
+....\OT1/cmr/bx/n/10 n
+...\mathoff
+.\glue(\thinmuskip) 1.66663
+.\hbox(7.5+2.5)x15.53467
+..\hbox(7.5+2.5)x4.4722
+...\OT1/cmr/bx/n/10 (
+..\OML/cmm/b/it/10 x
+..\hbox(7.5+2.5)x4.4722
+...\OT1/cmr/bx/n/10 )
+.\mathoff
+! OK.
+l. ...\showbox0
More information about the latex3-commits
mailing list.