From c77ab339c121ba95cb25b6853545eba2780c025c Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sun, 10 Jan 2021 09:55:45 +0100 Subject: [PATCH] Avoid \@ifundefined after user preamble Users might have used \makeatother (#11163). \ifdefined (of e-tex) can be considered available nowadays. --- src/BufferParams.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index bc83548fa8..f3f59cfc44 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -2240,8 +2240,10 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features, // use \PassOptionsToPackage here because the user could have // already loaded subfig in the preamble. if (features.mustProvide("subfig")) - atlyxpreamble << "\\@ifundefined{showcaptionsetup}{}{%\n" - " \\PassOptionsToPackage{caption=false}{subfig}}\n" + atlyxpreamble << "\\ifdefined\\showcaptionsetup\n" + " % Caption package is used. Advise subfig not to load it again.\n" + " \\PassOptionsToPackage{caption=false}{subfig}\n" + "\\fi\n" "\\usepackage{subfig}\n"; // Itemize bullet settings need to be last in case the user