fontsTypewriterScale = 100;
inputenc = "auto";
graphicsDriver = "default";
+ defaultOutputFormat = "default";
sides = OneSide;
columns = 1;
listings_params = string();
pagestyle = "default";
+ // white is equal to no background color
+ backgroundcolor = lyx::rgbFromHexName("#ffffff");
compressed = false;
for (int iter = 0; iter < 4; ++iter) {
user_defined_bullet(iter) = ITEMIZE_DEFAULTS[iter];
lex >> inputenc;
} else if (token == "\\graphics") {
readGraphicsDriver(lex);
+ } else if (token == "\\default_output_format") {
+ lex >> defaultOutputFormat;
} else if (token == "\\font_roman") {
lex.eatLine();
fontsRoman = lex.getString();
color = lcolor.getX11Name(Color_background);
// FIXME UNICODE
lcolor.setColor(to_utf8(branch), color);
-
}
}
} else if (token == "\\author") {
string orient;
lex >> orient;
orientation = paperorientationtranslator().find(orient);
+ } else if (token == "\\backgroundcolor") {
+ lex.eatLine();
+ backgroundcolor = lyx::rgbFromHexName(lex.getString());
} else if (token == "\\paperwidth") {
lex >> paperwidth;
} else if (token == "\\paperheight") {
os << "\\font_cjk " << fontsCJK << '\n';
}
os << "\n\\graphics " << graphicsDriver << '\n';
+ os << "\\default_output_format " << defaultOutputFormat << '\n';
if (!float_placement.empty()) {
os << "\\float_placement " << float_placement << '\n';
<< "\n\\cite_engine " << citeenginetranslator().find(cite_engine_)
<< "\n\\use_bibtopic " << convert<string>(use_bibtopic)
<< "\n\\paperorientation " << string_orientation[orientation]
+ << "\n\\backgroundcolor " << lyx::X11hexname(backgroundcolor)
<< '\n';
BranchList::const_iterator it = branchlist().begin();
texrow.newline();
}
+ // only output when the background color is not white
+ if (backgroundcolor != lyx::rgbFromHexName("#ffffff")) {
+ // only require color here, the background color will be defined
+ // in LaTeXFeatures.cpp to avoid interferences with the LaTeX
+ // package pdfpages
+ features.require("color");
+ features.require("pagecolor");
+ }
+
// Only if class has a ToC hierarchy
if (tclass.hasTocLevels()) {
if (secnumdepth != tclass.secnumdepth()) {