Re: Question about row table color & error

2015-12-20 Thread Pedro Neves

On 20-12-2015 21:40, Paul A Rubin wrote:


Don't ask me why, but apparenty \rowcolor does not play well with 
multicolumn table cells. If you leave the first instance of \rowcolor 
alone but change the second instance to \cellcolor{lightgray}, I think 
you get what you want.

Hi Paul:

Yes, I do. It works fine using \cellcolor.

Thanks a lot.

Pedro


Re: Question about row table color & error

2015-12-20 Thread Paul A Rubin

Pedro,

Please reply to (or copy) the list in the future, so that the 
conversation stays visible.


Don't ask me why, but apparenty \rowcolor does not play well with 
multicolumn table cells. If you leave the first instance of \rowcolor 
alone but change the second instance to \cellcolor{lightgray}, I think 
you get what you want. (Cf. http://wiki.lyx.org/LyX/Tables#toc6)


Paul

On 12/20/2015 04:03 PM, Pedro Neves wrote:

On 20-12-2015 20:29, Paul A. Rubin wrote:

Most likely you are inserting the ERT in the designated
row in a place that offends LaTeX's sensibilities. If you can post a
minimal
example, perhaps someone can diagnose it.


Probably...
Here goes a small example, where it works on the first table and fails
on the second.


Cheers:

Pedro




Re: Question about row table color & error

2015-12-20 Thread Paul A . Rubin
I am unable to reproduce the problem here (LyX 2.1.4 on Linux Mint 17.2);
the document compiles correctly (with a gray table row) the first time, with
no error messages. Most likely you are inserting the ERT in the designated
row in a place that offends LaTeX's sensibilities. If you can post a minimal
example, perhaps someone can diagnose it.



Question about row table color & error

2015-12-19 Thread Pedro Neves

Hi all:

I'm trying to set a gray coloured row on my table, using the following 
lines on my document preamble:


\usepackage{colortbl}

\definecolor{lightgray}{gray}{0.8}


and the following ert on my table row:


\rowcolor{lightgray}


When I try to visualise the pdf (ctrl+r) I keep getting the error:

--

! Misplaced \noalign.

-

I've found a referece to this error, with an explanation here:



http://comments.gmane.org/gmane.editors.lyx.general/33836, which 
explains why it happens, but even if I set the entire table to roman 
font, the error still occurs.


I've noticed however that if I follow the steps outlined bellow, the 
error still occurs, but I'm able to view the pdf with the intended output:


1 - remove the ert code from the table
2 - view the pdf (with ctrl+r) and leave the pdf open
3 - re-insert the code (\rowcolor{lightgray} in the cell
4 - regenerate the pdf (ctrl+r)

Any ideas why this happens?


Thanks in advance:

Best regards:

Pedro

P.S. - I'm using Lyx 2.1.4 on Kubuntu 15.10