as discussed our support for the formula numbering side should be complete. There are document classes that uses left numbering as default and with the class option "reqno" this can be changed to right numbering. reqno requires the loading of amsamth.
makeDocumentClass();
paragraph_separation = ParagraphIndentSeparation;
is_math_indent = false;
- math_number_before = false;
+ math_number_before = "default";
quotes_style = InsetQuotesParams::EnglishQuotes;
dynamic_quotes = false;
fontsize = "default";
if (is_math_indent)
clsoptions << "fleqn,";
- if (math_number_before)
+ if (math_number_before == "true")
clsoptions << "leqno,";
+ else if (math_number_before == "false") {
+ clsoptions << "reqno,";
+ features.require("amsmath");
+ }
// language should be a parameter to \documentclass
if (language->babel() == "hebrew"
bool is_math_indent;
- /// number formulas before them
- bool math_number_before;
+ /// number formulas before or not
+ std::string math_number_before;
/** Whether paragraphs are separated by using a indent like in
* articles or by using a little skip like in letters.
bc().addCheckedLineEdit(mathsModule->MathIndentLE);
mathsModule->MathNumberingPosCO->addItem(qt_("Left"));
mathsModule->MathNumberingPosCO->addItem(qt_("Default"));
- mathsModule->MathNumberingPosCO->setCurrentIndex(2);
+ mathsModule->MathNumberingPosCO->addItem(qt_("Right"));
+ mathsModule->MathNumberingPosCO->setCurrentIndex(1);
// latex class
}
switch (mathsModule->MathNumberingPosCO->currentIndex()) {
case 0:
- bp_.math_number_before = true;
+ bp_.math_number_before = "true";
break;
case 1:
- bp_.math_number_before = false;
+ bp_.math_number_before = "default";
+ break;
+ case 2:
+ bp_.math_number_before = "false";
break;
default:
// this should never happen
- bp_.math_number_before = false;
+ bp_.math_number_before = "default";
break;
}
mathsModule->MathIndentCO->setCurrentIndex(indent);
enableMathIndent(indent);
}
- if (bp_.math_number_before)
+ if (bp_.math_number_before == "true")
mathsModule->MathNumberingPosCO->setCurrentIndex(0);
- else
+ else if (bp_.math_number_before == "default")
mathsModule->MathNumberingPosCO->setCurrentIndex(1);
+ else if (bp_.math_number_before == "false")
+ mathsModule->MathNumberingPosCO->setCurrentIndex(2);
map<string, string> const & packages = BufferParams::auto_packages();
for (map<string, string>::const_iterator it = packages.begin();
h_font_tt_scale[1] = "100";
//h_font_cjk
h_is_mathindent = "0";
- h_math_number_before = "0";
+ h_math_number_before = "default";
h_graphics = "default";
h_default_output_format = "default";
h_html_be_strict = "false";
// formula numbering side
if ((it = find(opts.begin(), opts.end(), "leqno"))
!= opts.end()) {
- h_math_number_before = "1";
+ h_math_number_before = "true";
+ opts.erase(it);
+ }
+ else if ((it = find(opts.begin(), opts.end(), "reqno"))
+ != opts.end()) {
+ h_math_number_before = "false";
opts.erase(it);
}