#include "author.h"
#include "gettext.h"
+#include "LColor.h"
+
#include "support/lyxalgo.h" // for lyx::count
#include "support/lyxlib.h"
#include "support/lstrings.h"
sides = LyXTextClass::OneSide;
columns = 1;
pagestyle = "default";
+ compressed = false;
for (int iter = 0; iter < 4; ++iter) {
user_defined_bullets[iter] = ITEMIZE_DEFAULTS[iter];
temp_bullets[iter] = ITEMIZE_DEFAULTS[iter];
if (tmpret == -1)
++tmpret;
paragraph_separation =
- static_cast<BufferParams::PARSEP>(tmpret);
+ static_cast<PARSEP>(tmpret);
} else if (token == "\\defskip") {
lex.nextToken();
defskip = VSpace(lex.getString());
int tmpret = lex.findToken(string_paperpackages);
if (tmpret == -1) {
++tmpret;
- paperpackage = BufferParams::PACKAGE_NONE;
+ paperpackage = PACKAGE_NONE;
} else
paperpackage = PAPER_PACKAGES(tmpret);
} else if (token == "\\use_geometry") {
use_geometry = lex.getInteger();
} else if (token == "\\use_amsmath") {
lex.nextToken();
- use_amsmath = static_cast<BufferParams::AMS>(
+ use_amsmath = static_cast<AMS>(
lex.getInteger());
} else if (token == "\\use_natbib") {
lex.nextToken();
} else if (token == "\\tracking_changes") {
lex.nextToken();
tracking_changes = lex.getInteger();
+ } else if (token == "\\branch") {
+ lex.nextToken();
+ string branch = lex.getString();
+ branchlist.add(branch);
+ while (true) {
+ lex.nextToken();
+ string const tok = lex.getString();
+ if (tok == "\\end_branch")
+ break;
+ if (tok == "\\selected") {
+ lex.nextToken();
+ branchlist.setSelected(branch, lex.getInteger());
+ }
+ // not yet operational
+ if (tok == "\\color") {
+ lex.nextToken();
+ string color = lex.getString();
+ branchlist.setColor(branch, color);
+ // Update also the LColor table:
+ if (color == "none")
+ color = lcolor.getX11Name(LColor::background);
+ lcolor.fill(static_cast<LColor::color>(lcolor.size()),
+ branch, color);
+ }
+ }
} else if (token == "\\author") {
lex.nextToken();
istringstream ss(STRCONV(lex.getString()));
if (tmpret == -1)
++tmpret;
orientation =
- static_cast<BufferParams::PAPER_ORIENTATION>(tmpret);
+ static_cast<PAPER_ORIENTATION>(tmpret);
} else if (token == "\\paperwidth") {
lex.next();
paperwidth = lex.getString();
<< "\n\\use_numerical_citations " << use_numerical_citations
<< "\n\\paperorientation " << string_orientation[orientation]
<< '\n';
+
+ std::list<Branch>::const_iterator it = branchlist.begin();
+ std::list<Branch>::const_iterator end = branchlist.end();
+ for (; it != end; ++it) {
+ os << "\\branch " << it->getBranch()
+ << "\n\\selected " << it->getSelected()
+ << "\n\\color " << it->getColor()
+ << "\n\\end_branch"
+ << "\n";
+ }
+
if (!paperwidth.empty())
os << "\\paperwidth "
<< VSpace(paperwidth).asLyXCommand() << '\n';
string const paper_option = paperSizeName();
if (paper_option != "letter" ||
orientation != ORIENTATION_LANDSCAPE) {
- // dvips won't accept -t letter -t landscape.
+ // dvips won't accept -t letter -t landscape.
// In all other cases, include the paper size
// explicitly.
result = lyxrc.print_paper_flag;