The branch, 2.0.x, has been updated. - Log -----------------------------------------------------------------
commit 51cc0a9b8d803d363cdec099dd10d9e25364068f Author: Vincent van Ravesteijn <[email protected]> Date: Sat Sep 22 23:14:34 2012 +0200 Fix bug #6389: Make columns RTL in RTL document (cherry picked from commit 29e64597d045e8cb6ebebb67de75835d128f6be3) diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index 6139356..6c70647 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -1112,6 +1112,9 @@ void BufferParams::validate(LaTeXFeatures & features) const { features.require(documentClass().requires()); + if (columns > 1 && language->rightToLeft()) + features.require("rtloutputdblcol"); + if (outputChanges) { bool dvipost = LaTeXFeatures::isAvailable("dvipost"); bool xcolorulem = LaTeXFeatures::isAvailable("ulem") && diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 909a5d3..15a4ffd 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -275,6 +275,42 @@ static docstring const lyxref_def = from_ascii( " {\\def\\RSlemtxt{lemma~}\\newref{lem}{name = \\RSlemtxt}}\n" " {}\n"); +// Make sure the columns are also outputed as rtl +static docstring const rtloutputdblcol_def = from_ascii( + "\\def\\@outputdblcol{%\n" + " \\if@firstcolumn\n" + " \\global \\@firstcolumnfalse\n" + " \\global \\setbox\\@leftcolumn \\box\\@outputbox\n" + " \\else\n" + " \\global \\@firstcolumntrue\n" + " \\setbox\\@outputbox \\vbox {%\n" + " \\hb@xt@\\textwidth {%\n" + " \\kern\\textwidth \\kern-\\columnwidth %**\n" + " \\hb@xt@\\columnwidth {%\n" + " \\box\\@leftcolumn \\hss}%\n" + " \\kern-\\textwidth %**\n" + " \\hfil\n" + " {\\normalcolor\\vrule \\@width\\columnseprule}%\n" + " \\hfil\n" + " \\kern-\\textwidth %**\n" + " \\hb@xt@\\columnwidth {%\n" + " \\box\\@outputbox \\hss}%\n" + " \\kern-\\columnwidth \\kern\\textwidth %**\n" + " }%\n" + " }%\n" + " \\@combinedblfloats\n" + " \\@outputpage\n" + " \\begingroup\n" + " \\@dblfloatplacement\n" + " \\@startdblcolumn\n" + " \\@whilesw\\if@fcolmade \\fi\n" + " {\\@outputpage\n" + " \\@startdblcolumn}%\n" + " \\endgroup\n" + " \\fi\n" + "}\n" + "\\@mparswitchtrue\n"); + ///////////////////////////////////////////////////////////////////// // @@ -962,6 +998,9 @@ docstring const LaTeXFeatures::getMacros() const if (mustProvide("ct-none")) macros << changetracking_none_def; + if (mustProvide("rtloutputdblcol")) + macros << rtloutputdblcol_def; + return macros.str(); } ----------------------------------------------------------------------- Summary of changes: src/BufferParams.cpp | 3 +++ src/LaTeXFeatures.cpp | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 0 deletions(-) hooks/post-receive -- The LyX Source Repository
