*/
HSpace indentation;
VSpace defskip;
+ HSpace math_indentation;
PDFOptions pdfoptions;
LayoutFileIndex baseClass_;
FormatList exportableFormatList;
cite_engine_type_ = ENGINE_TYPE_DEFAULT;
makeDocumentClass();
paragraph_separation = ParagraphIndentSeparation;
+ is_math_indent = false;
+ math_indentation = "default";
quotes_style = InsetQuotesParams::EnglishQuotes;
dynamic_quotes = false;
fontsize = "default";
fonts_default_family = "default";
useNonTeXFonts = false;
use_microtype = false;
+ use_dash_ligatures = true;
fonts_expert_sc = false;
fonts_old_figures = false;
fonts_sans_scale[0] = 100;
}
+HSpace const & BufferParams::getMathIndentation() const
+{
+ return pimpl_->math_indentation;
+}
+
+
+void BufferParams::setMathIndentation(HSpace const & indent)
+{
+ pimpl_->math_indentation = indent;
+}
+
+
HSpace const & BufferParams::getIndentation() const
{
return pimpl_->indentation;
lex >> fonts_cjk;
} else if (token == "\\use_microtype") {
lex >> use_microtype;
+ } else if (token == "\\use_dash_ligatures") {
+ lex >> use_dash_ligatures;
} else if (token == "\\paragraph_separation") {
string parsep;
lex >> parsep;
if (pimpl_->defskip.kind() == VSpace::DEFSKIP)
// that is invalid
pimpl_->defskip = VSpace(VSpace::MEDSKIP);
+ } else if (token == "\\is_math_indent") {
+ lex >> is_math_indent;
+ } else if (token == "\\math_indentation") {
+ lex.next();
+ string math_indentation = lex.getString();
+ pimpl_->math_indentation = HSpace(math_indentation);
} else if (token == "\\quotes_style") {
string qstyle;
lex >> qstyle;
os << "\\font_cjk " << fonts_cjk << '\n';
}
os << "\\use_microtype " << convert<string>(use_microtype) << '\n';
+ os << "\\use_dash_ligatures " << convert<string>(use_dash_ligatures) << '\n';
os << "\\graphics " << graphics_driver << '\n';
os << "\\default_output_format " << default_output_format << '\n';
os << "\\output_sync " << output_sync << '\n';
os << "\n\\paragraph_indentation " << getIndentation().asLyXCommand();
else
os << "\n\\defskip " << getDefSkip().asLyXCommand();
+ os << "\n\\is_math_indent " << is_math_indent;
+ if (is_math_indent && getMathIndentation().asLyXCommand() != "default")
+ os << "\n\\math_indentation " << getMathIndentation().asLyXCommand();
os << "\n\\quotes_style "
<< string_quotes_style[quotes_style]
<< "\n\\dynamic_quotes " << dynamic_quotes
&& orientation == ORIENTATION_LANDSCAPE)
clsoptions << "landscape,";
+ if (is_math_indent)
+ clsoptions << "fleqn,";
+
// language should be a parameter to \documentclass
if (language->babel() == "hebrew"
&& default_language->babel() != "hebrew")
}
}
+ if (is_math_indent) {
+ // when formula indentation
+ // only output something when it is not the default
+ if (getMathIndentation().asLyXCommand() != "default") {
+ os << "\\setlength{\\mathindent}{"
+ << from_utf8(getMathIndentation().asLatexCommand())
+ << "}\n";
+ }
+ }
+
// Now insert the LyX specific LaTeX commands...
features.resolveAlternatives();
features.expandMultiples();