From c56f0538a00c75d3f88228874c3453a9a9bbd957 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnter=20Milde?= Date: Mon, 6 Jul 2015 14:10:34 +0200 Subject: [PATCH] Fix clash between marvosym and bbding packages (fixes #7811). Both marvosym and bbding define the "Cross" macro. To prevent a compilation error due to conflicting definitions, we undefine the "Cross" macro if both packages are required. --- src/LaTeXFeatures.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index d5b8b2f266..64cbb9ee19 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -722,7 +722,6 @@ char const * simplefeatures[] = { "pmboxdraw", "bbding", "ifsym", - "marvosym", "txfonts", "pxfonts", "mathdesign", @@ -902,6 +901,13 @@ string const LaTeXFeatures::getPackages() const params_.use_package("cancel") != BufferParams::package_off) packages << "\\usepackage{cancel}\n"; + // marvosym and bbding both define the \Cross macro + if (mustProvide("marvosym")) { + if (mustProvide("bbding")) + packages << "\\let\\Cross\\relax\n"; + packages << "\\usepackage{marvosym}\n"; + } + // accents must be loaded after amsmath if (mustProvide("accents") && params_.use_package("accents") != BufferParams::package_off) -- 2.39.5