X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Foutput_latex.cpp;h=c24a5320e117cdebdb48711c67772be31a5ae8a2;hb=4ed0312c51704780af1c452d3a82a84171b3725a;hp=1061f3d28f07f659b2b15181282d13eede4467ec;hpb=047004cb0fca7247a6e13dde9f22c9a56ab245e6;p=lyx.git diff --git a/src/output_latex.cpp b/src/output_latex.cpp index 1061f3d28f..c24a5320e1 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -1063,7 +1063,7 @@ void TeXOnePar(Buffer const & buf, else if (outer_language->lang() == "arabic_arabi") os << "\\textLR{"; // remaining RTL languages currently is hebrew - else if (par_language->rightToLeft()) + else if (par_language->rightToLeft() && !runparams.isFullUnicode()) os << "\\R{"; else os << "\\L{"; @@ -1174,7 +1174,7 @@ void TeXOnePar(Buffer const & buf, && (pit == 0 || !priorpar->hasSameLayout(par))) { os << from_ascii(par.params().spacing().writeEnvirBegin(useSetSpace)) - << '\n'; + << '\n'; } if (style.isCommand()) { @@ -1499,21 +1499,22 @@ void TeXOnePar(Buffer const & buf, Layout const & next_layout = nextpar->layout(); if (!next_layout.isCommand()) { // Here we now try to avoid spurious empty lines by - // outputting a paragraph break only if: (case 1) the - // paragraph style allows parbreaks and no \begin, \end - // or \item tags are going to follow (i.e., if the next - // isn't the first or the current isn't the last - // paragraph of an environment or itemize) and the - // depth and alignment of the following paragraph is - // unchanged, or (case 2) the following is a - // non-environment paragraph whose depth is increased - // but whose alignment is unchanged, or (case 3) the - // paragraph is not an environment and the next one is a - // non-itemize-like env at lower depth, or (case 4) the - // paragraph is a command not followed by an environment - // and the alignment of the current and next paragraph - // is unchanged, or (case 5) the current alignment is - // changed and a standard paragraph follows. + // outputting a paragraph break only if: + // (case 1) the paragraph style allows parbreaks and + // no \begin, \end or \item tags are going to follow + // (i.e., if the next isn't the first or the current + // isn't the last paragraph of an environment or itemize) + // and the depth and alignment of the following paragraph is + // unchanged, or + // (case 2) the following is a non-environment paragraph + // whose depth is increased but whose alignment is unchanged, or + // (case 3) the paragraph is not an environment and the next one + // is a non-itemize-like env at lower depth, or + // (case 4) the paragraph is a command not followed by an + // environment and the alignment of the current and next + // paragraph is unchanged, or + // (case 5) the current alignment is changed and a + // standard paragraph follows. DocumentClass const & tclass = bparams.documentClass(); if ((style == next_layout && !style.parbreak_is_newline @@ -1523,7 +1524,8 @@ void TeXOnePar(Buffer const & buf, && style.latextype != LATEX_LIST_ENVIRONMENT && style.align == par.getAlign(bparams) && nextpar->getDepth() == par.getDepth() - && nextpar->getAlign(bparams) == par.getAlign(bparams)) + && (nextpar->getAlign(bparams) == par.getAlign(bparams) + || par.params().spacing() != nextpar->params().spacing())) || (!next_layout.isEnvironment() && nextpar->getDepth() > par.getDepth() && nextpar->getAlign(bparams) == next_layout.align)