if (tok == "\\color") {
lex.eatLine();
string color = lex.getString();
- if (branch_ptr)
+ if (branch_ptr) {
branch_ptr->setColor(color);
+ if (branch_ptr->color() == "none")
+ color = lcolor.getX11HexName(Color_background);
+ }
// Update also the Color table:
if (color == "none")
color = lcolor.getX11HexName(Color_background);
+ else if (color.size() != 7 || color[0] != '#')
+ color = lcolor.getFromLyXName(color);
// FIXME UNICODE
lcolor.setColor(to_utf8(branch), color);
}
os << "\\branch " << to_utf8(br.branch())
<< "\n\\selected " << br.isSelected()
<< "\n\\filename_suffix " << br.hasFileNameSuffix()
- << "\n\\color " << lyx::X11hexname(br.color())
+ << "\n\\color " << br.color()
<< "\n\\end_branch"
<< "\n";
}
// 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
}
-void BufferParams::makeDocumentClass(bool const clone)
+void BufferParams::makeDocumentClass(bool clone, bool internal)
{
if (!baseClass())
return;
for (auto const & mod : layout_modules_)
mods.push_back(mod);
- doc_class_ = getDocumentClass(*baseClass(), mods, cite_engine_, clone);
+ doc_class_ = getDocumentClass(*baseClass(), mods, cite_engine_, clone, internal);
TextClass::ReturnValues success = TextClass::OK;
if (!forced_local_layout_.empty())
bool const ot1 = (main_font_encoding() == "default" || main_font_encoding() == "OT1");
bool const dryrun = features.runparams().dryrun;
bool const complete = (fontsSans() == "default" && fontsTypewriter() == "default");
- bool const nomath = (fontsMath() == "default");
+ bool const nomath = (fontsMath() != "auto");
// ROMAN FONTS
os << theLaTeXFonts().getLaTeXFont(from_ascii(fontsRoman())).getLaTeXCode(