Re: Table row shading throws compile error

2022-07-06 Thread Rich Shepard

On Wed, 6 Jul 2022, Herbert Voss wrote:

I tried this in a fresh document (KomaScript Report class) by adding 
\usepackage{xcolor, colortbl} to the preamble, and my table with your ERT 
and column name in row 1, column 1 compiled just fine. You didn't specify 
what module you are using, and a MWE would be helpful.


\usepackage[table]{xcolor}
does the same


Herbert,

Thanks for this alternative. I missed seeing it in your LaTeX table book.

Regards,

Rich
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Table row shading throws compile error

2022-07-06 Thread Rich Shepard

On Wed, 6 Jul 2022, Daniel wrote:


As a workaround you could use an ERT with
\cellcolor{lightgray}
in each cell.


Daniel,

I've never before used colors in tables so I'm new to doing so. Because this
document is going to a regulatory agency whose staff can be fussy about
appearences I decided to add a bit of glitter to the header rows of the few
tables in the document.

Using \cellcolor{} does the job, and for my very infrequent use it's the
solution I'll use.

Thanks very much,

Rich
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Table row shading throws compile error

2022-07-05 Thread Herbert Voss




Am 05.07.22 um 23:54 schrieb Paul A. Rubin:

On 7/5/22 17:37, Rich Shepard wrote:

I suspect this is another outdated module issue but I've not seen the
reason.

The first column in row 1 of a table contains the ERT 
\rowcolor{lightgray}

Species Common Name. TeX doesn't like it; see attached error log. It is
ignored but I'd like to fix the issue.

Rich



I tried this in a fresh document (KomaScript Report class) by adding 
\usepackage{xcolor, colortbl} to the preamble, and my table with your 
ERT and column name in row 1, column 1 compiled just fine. You didn't 
specify what module you are using, and a MWE would be helpful.


\usepackage[table]{xcolor}

does the same


HErbert
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Table row shading throws compile error

2022-07-05 Thread Daniel

On 06/07/2022 00:55, Paul A. Rubin wrote:

On 7/5/22 18:14, Rich Shepard wrote:

On Tue, 5 Jul 2022, Paul A. Rubin wrote:


I tried this in a fresh document (KomaScript Report class) by adding
\usepackage{xcolor, colortbl} to the preamble, and my table with your 
ERT
and column name in row 1, column 1 compiled just fine. You didn't 
specify

what module you are using, and a MWE would be helpful.


Paul,

I had \usepackage{colortbl}; just added xcolor. Made no difference. MWE
attached, with the build log.

Thanks,

Rich

Well, the introduction of table borders causes LyX to introduce 
"multicolumns" of one column each, which somehow seems to conflict 
(slightly) with the \rowcolor command. Maybe a TeXpert can figure out a 
workaround, but I suspect this is one of those LaTeX things you just 
need to accept ... unless maybe you want to experiment with using LaTeX 
commands to introduce the border lines yourself.


FWIW, I tried editing the LaTeX to move the \rowcolor file before rather 
than in the first cell. It seemed to fix the problem, but I can't find 
any way in LyX to wedge a custom command/setting into a table before the 
first row. The Embedded Objects help manual says to color rows the way 
you are currently doing it, if that is any consolation.


Paul


For columns, LyX supports an ominous "LaTeX argument" in the table 
settings which injects LaTeX code into the column header. Maybe 
something similar would be needed for the row settings?


Daniel

--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Table row shading throws compile error

2022-07-05 Thread Daniel

On 06/07/2022 00:14, Rich Shepard wrote:

On Tue, 5 Jul 2022, Paul A. Rubin wrote:


I tried this in a fresh document (KomaScript Report class) by adding
\usepackage{xcolor, colortbl} to the preamble, and my table with your ERT
and column name in row 1, column 1 compiled just fine. You didn't specify
what module you are using, and a MWE would be helpful.


Paul,

I had \usepackage{colortbl}; just added xcolor. Made no difference. MWE
attached, with the build log.

Thanks,

Rich


As a workaround you could use an ERT with

\cellcolor{lightgray}

in each cell.

Daniel

--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Table row shading throws compile error

2022-07-05 Thread Paul A. Rubin

On 7/5/22 18:14, Rich Shepard wrote:

On Tue, 5 Jul 2022, Paul A. Rubin wrote:


I tried this in a fresh document (KomaScript Report class) by adding
\usepackage{xcolor, colortbl} to the preamble, and my table with your 
ERT
and column name in row 1, column 1 compiled just fine. You didn't 
specify

what module you are using, and a MWE would be helpful.


Paul,

I had \usepackage{colortbl}; just added xcolor. Made no difference. MWE
attached, with the build log.

Thanks,

Rich

Well, the introduction of table borders causes LyX to introduce 
"multicolumns" of one column each, which somehow seems to conflict 
(slightly) with the \rowcolor command. Maybe a TeXpert can figure out a 
workaround, but I suspect this is one of those LaTeX things you just 
need to accept ... unless maybe you want to experiment with using LaTeX 
commands to introduce the border lines yourself.


FWIW, I tried editing the LaTeX to move the \rowcolor file before rather 
than in the first cell. It seemed to fix the problem, but I can't find 
any way in LyX to wedge a custom command/setting into a table before the 
first row. The Embedded Objects help manual says to color rows the way 
you are currently doing it, if that is any consolation.


Paul

--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Table row shading throws compile error

2022-07-05 Thread Rich Shepard

On Tue, 5 Jul 2022, Paul A. Rubin wrote:


I tried this in a fresh document (KomaScript Report class) by adding
\usepackage{xcolor, colortbl} to the preamble, and my table with your ERT
and column name in row 1, column 1 compiled just fine. You didn't specify
what module you are using, and a MWE would be helpful.


Paul,

I had \usepackage{colortbl}; just added xcolor. Made no difference. MWE
attached, with the build log.

Thanks,

Rich#LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 544
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass scrreprt
\begin_preamble
\date{}
%\usepackage{newpxtext}
%\usepackage{newpxmath}
\usepackage{mathpazo,amssymb}
\usepackage{graphicx,relsize}
\usepackage{scrlayer-scrpage}
\usepackage{xcolor,colortbl}
\definecolor{lightgray}{gray}{0.8}
\pagestyle{scrheadings}
\lehead{Biological Evaluation}
\rohead{Biological Evaluation}
\refoot{Applied Ecosystem Services, LLC}
\lofoot{Applied Ecosystem Services, LLC}
\automark*{section}
%DeclareNolabel{
%  \nolabel{\regexp{[\p{S}\p{Z}\p{C}]+}}
%}
\end_preamble
\options headsepline=on, footsepline=on
\use_default_options true
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding utf8
\fontencoding global
\font_roman "default" "default"
\font_sans "default" "default"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\use_microtype false
\use_dash_ligatures true
\graphics default
\default_output_format pdf2
\output_sync 0
\bibtex_command biber mergedate=compact
\index_command default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize letterpaper
\use_geometry true
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 0
\use_package mathdots 0
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine biblatex-natbib
\cite_engine_type authoryear
\biblatex_bibstyle authoryear
\biblatex_citestyle authoryear
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 0
\use_minted 0
\index Index
\shortcut idx
\color #008000
\end_index
\leftmargin 2cm
\topmargin 4cm
\bottommargin 2cm
\headsep 1.5cm
\secnumdepth 2
\tocdepth 2
\paragraph_separation skip
\defskip medskip
\is_math_indent 0
\math_numbering_side default
\quotes_style english
\dynamic_quotes 0
\papercolumns 1
\papersides 2
\paperpagestyle plain
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Subsubsection*
I.
 Is the project located within designated/proposed critical habitat for
 any of these species?
\end_layout

\begin_layout Standard
\align center
\begin_inset Tabular







\begin_inset Text

\begin_layout Plain Layout
\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
rowcolor{lightgray}
\end_layout

\end_inset

Species common name
\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout
Yes
\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout
No
\end_layout

\end_inset




\begin_inset Text

\begin_layout Plain Layout
Southern resident killer whale
\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout
\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
checkmark
\end_layout

\end_inset


\end_layout

\end_inset




\begin_inset Text

\begin_layout Plain Layout
Marbled murrelet
\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout
\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
checkmark
\end_layout

\end_inset


\end_layout

\end_inset




\begin_inset Text

\begin_layout Plain Layout
Northern spotted owl
\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout
\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
checkmark
\end_layout

\end_inset


\end_layout

\end_inset




\begin_inset Text

\begin_layout Plain Layout
Western snowy plover
\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout
\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
checkmark
\end_layout

\end_inset


\end_layout

\end_inset




\begin_inset Text

\begin_layout Plain Layout
Green sturgeon
\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout
\begin_inset ERT
status open

\begin_layout Plain Layout



Re: Table row shading throws compile error

2022-07-05 Thread Paul A. Rubin

On 7/5/22 17:37, Rich Shepard wrote:

I suspect this is another outdated module issue but I've not seen the
reason.

The first column in row 1 of a table contains the ERT 
\rowcolor{lightgray}

Species Common Name. TeX doesn't like it; see attached error log. It is
ignored but I'd like to fix the issue.

Rich



I tried this in a fresh document (KomaScript Report class) by adding 
\usepackage{xcolor, colortbl} to the preamble, and my table with your 
ERT and column name in row 1, column 1 compiled just fine. You didn't 
specify what module you are using, and a MWE would be helpful.


Paul

--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users