]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.cpp
DocBook: for MathML, mrow removal from decoration, script, frac
[lyx.git] / src / LaTeXFeatures.cpp
index 63b00bf28249a47999de2b3396aa0c2a4b551406..cec1078a5658da44322eebdb2782f33f963fa962 100644 (file)
@@ -193,6 +193,12 @@ static docstring const tabularnewline_def = from_ascii(
        "%% Because html converters don't know tabularnewline\n"
        "\\providecommand{\\tabularnewline}{\\\\}\n");
 
+static docstring const cellvarwidth_def = from_ascii(
+       "%% Variable width box for table cells\n"
+       "\\newenvironment{cellvarwidth}[1][t]\n"
+       "    {\\begin{varwidth}[#1]{\\linewidth}}\n"
+       "    {\\@finalstrut\\@arstrutbox\\end{varwidth}}\n");
+
 // We want to omit the file extension for includegraphics, but this does not
 // work when the filename contains other dots.
 // Idea from http://www.tex.ac.uk/cgi-bin/texfaq2html?label=unkgrfextn
@@ -554,11 +560,10 @@ docstring const lyxgreyedoutDef(bool const rtl, bool const ct, bool const lua, b
                        ods << "  \\if@rl%\n";
                ods << "    \\everypar{%\n";
                if (lua)
-                       ods << "      \\pardir TRT \\textdir TRT\\textcolor{note_fontcolor}\\ignorespaces%\n"
-                           << "    }%\n";
+                       ods << "      \\pardir TRT \\textdir TRT\\textcolor{note_fontcolor}\\ignorespaces%\n";
                else
-                       ods << "      \\textcolor{note_fontcolor}\\beginL\\ignorespaces%\n"
-                           << "    }%\n";
+                       ods << "      \\textcolor{note_fontcolor}\\beginL\\ignorespaces%\n";
+               ods << "    }%\n";
                if (ct)
                        ods << "    \\colorlet{lyxadded}{lyxadded!30}\\colorlet{lyxdeleted}{lyxdeleted!30}%\n";
                if (lua)
@@ -1696,6 +1701,9 @@ TexString LaTeXFeatures::getMacros() const
        if (mustProvide("NeedTabularnewline"))
                macros << tabularnewline_def;
 
+       if (mustProvide("cellvarwidth"))
+               macros << cellvarwidth_def;
+
        // greyed-out environment (note inset)
        // the color is specified in the routine
        // getColorOptions() to avoid LaTeX-package clashes