This does not make any difference currently, since the only instance of the
Preamble class is a global one, but it is cleaner and will be needed for
parsing the encoding with a second Preamble instance.
"rotfloat", "splitidx", "setspace", "subscript", "textcomp", "tipa", "tipx",
"tone", "ulem", "url", "varioref", "verbatim", "wrapfig", "xcolor", "xunicode", 0};
"rotfloat", "splitidx", "setspace", "subscript", "textcomp", "tipa", "tipx",
"tone", "ulem", "url", "varioref", "verbatim", "wrapfig", "xcolor", "xunicode", 0};
-// used for the handling of \newindex
-int index_number = 0;
-
// codes used to remove packages that are loaded automatically by LyX.
// Syntax: package_beg_sep<name>package_mid_sep<package loading code>package_end_sep
const char package_beg_sep = '\001';
// codes used to remove packages that are loaded automatically by LyX.
// Syntax: package_beg_sep<name>package_mid_sep<package loading code>package_end_sep
const char package_beg_sep = '\001';
Preamble::Preamble() : one_language(true), explicit_babel(false),
Preamble::Preamble() : one_language(true), explicit_babel(false),
- title_layout_found(false), h_font_cjk_set(false)
+ title_layout_found(false), index_number(0), h_font_cjk_set(false)
{
//h_backgroundcolor;
//h_boxbgcolor;
{
//h_backgroundcolor;
//h_boxbgcolor;
// check the case that a standard color is used
if (space.empty() && is_known(argument, known_basic_colors)) {
h_fontcolor = rgbcolor2code(argument);
// check the case that a standard color is used
if (space.empty() && is_known(argument, known_basic_colors)) {
h_fontcolor = rgbcolor2code(argument);
- preamble.registerAutomaticallyLoadedPackage("color");
+ registerAutomaticallyLoadedPackage("color");
} else if (space.empty() && argument == "document_fontcolor")
} else if (space.empty() && argument == "document_fontcolor")
- preamble.registerAutomaticallyLoadedPackage("color");
+ registerAutomaticallyLoadedPackage("color");
// check the case that LyX's document_fontcolor is defined
// but not used for \color
else {
// check the case that LyX's document_fontcolor is defined
// but not used for \color
else {
if (is_known(argument, known_basic_colors)) {
h_backgroundcolor = rgbcolor2code(argument);
} else if (argument == "page_backgroundcolor")
if (is_known(argument, known_basic_colors)) {
h_backgroundcolor = rgbcolor2code(argument);
} else if (argument == "page_backgroundcolor")
- preamble.registerAutomaticallyLoadedPackage("color");
+ registerAutomaticallyLoadedPackage("color");
// check the case that LyX's page_backgroundcolor is defined
// but not used for \pagecolor
else {
// check the case that LyX's page_backgroundcolor is defined
// but not used for \pagecolor
else {
/// was at least one title layout found?
bool title_layout_found;
/// was at least one title layout found?
bool title_layout_found;
+ /// used for the handling of \newindex
+ int index_number;
+
std::ostringstream h_preamble;
std::string h_backgroundcolor;
std::string h_biblio_style;
std::ostringstream h_preamble;
std::string h_backgroundcolor;
std::string h_biblio_style;