mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Fix bug #6389: Make columns RTL in RTL document
This commit is contained in:
parent
6b8ed2fa1d
commit
29e64597d0
@ -1163,6 +1163,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") &&
|
||||
|
@ -277,6 +277,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");
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -1072,6 +1108,9 @@ docstring const LaTeXFeatures::getMacros() const
|
||||
if (mustProvide("ct-none"))
|
||||
macros << changetracking_none_def;
|
||||
|
||||
if (mustProvide("rtloutputdblcol"))
|
||||
macros << rtloutputdblcol_def;
|
||||
|
||||
return macros.str();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user