\documentclass{beamer}
\usepackage{subfig}
\begin{document}
test
\end{document}
returns undefined control sequence
\@@magyar@captionfix
(It was not so in January; I am on fully updated pretest)
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this community\documentclass{beamer}
\usepackage{subfig}
\begin{document}
test
\end{document}
returns undefined control sequence
\@@magyar@captionfix
(It was not so in January; I am on fully updated pretest)
It is enough to add a definition of the command to \relax
\documentclass{beamer}
\usepackage{subfig}
\makeatletter
\let\@@magyar@captionfix\relax
\makeatother
\begin{document}
test
\end{document}
This is due to a change to \@ifundefined in the 2018 LaTeX release.
caption3.sty has
\@ifundefined{@@magyar@captionfix}\AtBeginDocument\@firstofone{%
\g@addto@macro\@@magyar@captionfix{%
\let\caption@lfmt@simple@magyar\caption@lfmt@simpleMagyar
\let\caption@lfmt@simpleMagyar\caption@lfmt@default@magyar}}
which relies on the side effect that \@ifundefined defines the tested command to be \relax. That side effect is almost always unwanted and in the 2018 LaTeX release this is changed, as noted in LaTeX News 28. I have mailed the author suggesting
\@ifundefined{@@magyar@captionfix}%
{\let\@@magyar@captionfix\@empty\AtBeginDocument}
\@firstofone
{%
\g@addto@macro\@@magyar@captionfix{%
\let\caption@lfmt@simple@magyar\caption@lfmt@simpleMagyar
\let\caption@lfmt@simpleMagyar\caption@lfmt@default@magyar}}
\@ifundefined changed... While I perfectly understand the reason behind, this is a pretty fundamental kernel macro that now behaves differently. I am afraid we are going to see a lot of similar version clashes for a long time.
\ifx\foo\@undefined and it working until another package does \@ifundefined{foo} there are really very few legitimate cases where a package intentionally uses the implicit \let to \relax intentionally (we found two and changed them before the release) the use here missed our search but the previous behaviour, although it avoided an error here was clearly accidental, it defined \@@magyar@captionfix to be an infinite loop
Apr 12, 2018 at 6:57
This bug has been fixed in https://gitlab.com/axelsommerfeldt/caption/commit/e03e61eb7c5987644cb1d8ed336dbb5e8ee2f96f and should be included version v1.7-167 of the caption3 package
Given what samcarter and Axel Sommerfeldt report above, that the bug has been fixed and put on the CTAN, you may want to consider updating the caption library files, and for that matter, freshen all your installed LaTeX files. If you have a TexLive installation, the way to do this is given here, namely, from the command line: sudo tlmgr update --self, then sudo tlmgr update --all. I did this and it fixed the problem.