From: Juergen Spitzmueller Date: Sun, 25 Aug 2024 11:23:57 +0000 (+0200) Subject: Avoid empty option in babelCall X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=66aa0d86994f173a0be18478d75c74a37ffcf815;p=lyx.git Avoid empty option in babelCall --- diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index e8f302537c..5930aaf7b9 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -3539,7 +3539,7 @@ string BufferParams::babelCall(LaTeXFeatures const & features, string lang_opts, lang_opts = getStringFromVector(blangs); // The prefs may require the languages to // be submitted to babel itself (not the class). - if (langoptions || have_mods) + if ((langoptions || have_mods) && !lang_opts.empty()) return "\\usepackage[" + lang_opts + "]{babel}" + os.str(); return "\\usepackage{babel}" + os.str(); }