]> git.lyx.org Git - lyx.git/commitdiff
Avoid empty option in babelCall
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 25 Aug 2024 11:23:57 +0000 (13:23 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 25 Aug 2024 11:23:57 +0000 (13:23 +0200)
src/BufferParams.cpp

index e8f302537c03ca5c5c471ef38053ebe03c31fde8..5930aaf7b9633bfc9493c6f16c45abbdbf725747 100644 (file)
@@ -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();
 }