Graphics, Figures & TablesHow to shade a column in a table and other problems w tables

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
tdcpina
Posts: 39
Joined: Wed Apr 15, 2009 4:22 pm

How to shade a column in a table and other problems w tables

Post by tdcpina »

Hi guys,

I want to know the best manner to shade a column or one line within a table.

Other thing,

I've inserted the symbols < > in the table but it happens that the symbols take into ? ! I don't know the cause of this. There is a special command to insert this symbols. Or have I to insert any special package? I have the amsmath package introduced in my document.

Thanks a lot in advance,
Tiago

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

raza2u
Posts: 2
Joined: Thu May 07, 2009 10:08 am

Re: How to shade a column in a table and other problems w tables

Post by raza2u »

Hi
you can use following commands to shade a row but there will be a problem of lines visiblility and text with merged cells.(I posted the same prob a bit earlier on this forum)
%%%----
\documentclass[a4paper,12pt,onecolumn]{article}
\usepackage{multirow,colortbl}
\providecommand{\shadeRow}{\rowcolor[rgb]{0.9, 0.9, 0.9}} %%Define Shade
\begin{tabular}{|c|c|c|}
\hline
\shadRow
R11 & $< >$ & R13\\ %%% Row 1 (not shaded)
\hline
\end{tabular}
\end{document}
%%%---------------------
Regarding other problem of <> just use $<>$, it will be ok.
Raza
tadek
Posts: 1
Joined: Thu Apr 23, 2009 6:08 pm

How to shade a column in a table and other problems w tables

Post by tadek »

when used:

Code: Select all

\documentclass[a4paper,12pt,onecolumn]{article}
\usepackage{multirow,colortbl}
\providecommand{\shadeRow}{\rowcolor[rgb]{0.95, 0.95, 0.95}} %%Define Shade
\begin{document}
\begin{tabular}{|c|c|c|}
\hline
first & second & third \\
\hline

\shadeRow
R11 & $< >$ & R13\\ %%% Row 1 (not shaded)
\hline
a & b & c \\
\hline
\end{tabular}
\end{document}
%%%---------------------
indeed row is shaded but some solid lines are missing. How to overcome that?
tadek
Post Reply