// Noindent?
if (params().noindent())
os << "\\noindent ";
-
+
+ // Do we have a manual left indent?
+ if (!params().leftIndent().zero())
+ os << "\\leftindent " << params().leftIndent().asString() << " ";
+
// Alignment?
if (params().align() != LYX_ALIGN_LAYOUT) {
int h = 0;
}
}
+ if (!params().leftIndent().zero())
+ features.require("ParagraphLeftIndent");
+
// then the insets
LyXLayout const & lout = textclasslist[bparams.textclass][layout()];
tmp->setLabelWidthString(params().labelWidthString());
}
- bool isempty = textclasslist[bparams.textclass][layout()].keepempty;
+ bool isempty = (textclasslist[bparams.textclass][layout()].keepempty &&
+ !size());
if (!isempty && (size() > pos || !size() || flag == 2)) {
tmp->layout(layout());
tmp->params().align(params().align());
texrow.newline();
}
}
+
+ bool leftindent_open = false;
+ if (!params().leftIndent().zero()) {
+ os << "\\begin{LyXParagraphLeftIndent}{" <<
+ params().leftIndent().asLatexString() << "}\n";
+ texrow.newline();
+ leftindent_open = true;
+ }
if (style.isEnvironment()) {
if (style.latextype == LATEX_LIST_ENVIRONMENT) {
}
} while (par
&& par->layout() == layout()
- && par->params().depth() == params().depth());
+ && par->params().depth() == params().depth()
+ && par->params().leftIndent() == params().leftIndent());
if (style.isEnvironment()) {
os << "\\end{" << style.latexname() << "}\n";
texrow.newline();
}
+ if (leftindent_open) {
+ os << "\\end{LyXParagraphLeftIndent}\n";
+ texrow.newline();
+ }
+
lyxerr[Debug::LATEX] << "TeXEnvironment...done " << par << endl;
return par; // ale970302
}
bool Paragraph::isRightToLeftPar(BufferParams const & bparams) const
{
return lyxrc.rtl_support
- && getParLanguage(bparams)->RightToLeft();
+ && getParLanguage(bparams)->RightToLeft()
+ && !(inInset() && inInset()->owner() &&
+ inInset()->owner()->lyxCode() == Inset::ERT_CODE);
}