X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLaTeXFeatures.cpp;h=cec1078a5658da44322eebdb2782f33f963fa962;hb=1cbac6fcb40d6e0803198624c047769adec2fe09;hp=b55b0be3073b4d1c32c59c8c61b6ea02afb337df;hpb=65af4e44bb63e540e0f3b298e479182b247a3665;p=lyx.git diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index b55b0be307..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 @@ -1695,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