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.
This commit is contained in:
Günter Milde 2015-07-06 14:10:34 +02:00
parent b3f97f0b8a
commit c56f0538a0

View File

@ -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)