Am 16.05.2013 22:07, schrieb Tino Langer:

I tried it with the following snippet of tex-code
...
\multicolumn{6}{|l|}{\cellcolor[gray]{0.7}HIER EIN TEXT}\tabularnewline
...

Here, \cellcolor[gray]{0.7} should be surrounded by an ERT. But in LyX it isn't 
it. Have it to be
marked as one command?

You found a bug. Attached is the original LyX-file. When you export this to TeX you get the attached TeX file. When you import the TeX file (which contains your command), you get the attached result. And in the result the square brackets are indeed not in TeX-code so the document is uncompilable.
Could you please report this bug to our bugtracker:
http://www.lyx.org/trac/wiki/BugTrackerHome
(set the component to "tex2lyx" and CC "uwestoehr")

regards Uwe
%% LyX 2.0.6 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{colortbl}

\makeatother

\usepackage{babel}
\begin{document}
\begin{tabular}{|cccccc|}
\multicolumn{6}{|c|}{\cellcolor[gray]{0.7}HIER EIN TEXT}\tabularnewline
 &  &  &  &  & \tabularnewline
\end{tabular}
\end{document}

Attachment: tex2lyx-original.lyx
Description: application/lyx

Attachment: tex2lyx-test.lyx
Description: application/lyx

Reply via email to