]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.cpp
Fix typo
[lyx.git] / src / LaTeXFeatures.cpp
index 7960ad2625be6c7b5abf50cd1d2cac495209be78..e2abc6dbedfb3d5c7bdda71493a95a7ad483732a 100644 (file)
@@ -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");
+
 
 /////////////////////////////////////////////////////////////////////
 //
@@ -442,13 +478,24 @@ bool LaTeXFeatures::isProvided(string const & name) const
                || params_.font_encoding() == "OT1");
        bool const complete = (params_.fonts_sans == "default")
                && (params_.fonts_typewriter == "default");
+       bool const nomath = (params_.fonts_math == "default");
        return params_.documentClass().provides(name)
                || theLaTeXFonts().getLaTeXFont(
-                       from_ascii(params_.fonts_roman)).provides(name, ot1, complete)
+                       from_ascii(params_.fonts_roman)).provides(name, ot1,
+                                                                 complete,
+                                                                 nomath)
+               || theLaTeXFonts().getLaTeXFont(
+                       from_ascii(params_.fonts_sans)).provides(name, ot1,
+                                                                complete,
+                                                                nomath)
                || theLaTeXFonts().getLaTeXFont(
-                       from_ascii(params_.fonts_sans)).provides(name, ot1, complete)
+                       from_ascii(params_.fonts_typewriter)).provides(name, ot1,
+                                                                      complete,
+                                                                      nomath)
                || theLaTeXFonts().getLaTeXFont(
-                       from_ascii(params_.fonts_typewriter)).provides(name, ot1, complete);
+                       from_ascii(params_.fonts_math)).provides(name, ot1,
+                                                                      complete,
+                                                                      nomath);
 }
 
 bool LaTeXFeatures::mustProvide(string const & name) const
@@ -1065,6 +1112,9 @@ docstring const LaTeXFeatures::getMacros() const
        if (mustProvide("ct-none"))
                macros << changetracking_none_def;
 
+       if (mustProvide("rtloutputdblcol"))
+               macros << rtloutputdblcol_def;
+
        return macros.str();
 }