X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLaTeXFeatures.cpp;h=cec1078a5658da44322eebdb2782f33f963fa962;hb=1cbac6fcb40d6e0803198624c047769adec2fe09;hp=63b00bf28249a47999de2b3396aa0c2a4b551406;hpb=e3e8b600eb856fed95304bb5fab5aefcb5d4cefe;p=lyx.git diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 63b00bf282..cec1078a56 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -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