Is it possible to have a customized table in LaTeX that has the following features?
- Be able to define Width and/or Height for specific row/column
- Be able to highlight/color a specific row or column or a cell
- Be able to align horizontally and/or vertically the columns/rows
This is waht I have been using so far for individual features:
For the feature #1: http://www.sascha-frank.com/Faq/tables_six.html
For the feature #2: http://texblog.org/2011/04/19/highlight-table-rowscolumns-with-color/
For the feature #3: https://tex.stackexchange.com/a/46393
But I couldn't manage to make one piece of code that can adjust all of these features together. Is this possible in LaTeX? Thanks in advance.
EDIT:
So for example I use this code to have a table that I can specify width of the columns and change the color of a specific row and/or column:
\documentclass[a4paper]{article}
\usepackage{array}
% to change color of row and column
\usepackage{color, colortbl}
\definecolor{mColor1}{rgb}{0.9,0.9,0.9}
\begin{document}
\newcolumntype{a}{>{\columncolor{mColor1}}l}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}
\begin{table}[h]
\caption{table}
\centering
\begin{tabular}{| a | L{1.2cm} | C{1.5cm} | R{3cm} |}
\hline
\rowcolor{mColor1}
1 & 2 \newline 2.1 & 3 & 4 \\
\hline
1 & 2 & 3 & 4 \\
\hline
1 & 2 & 3 & 4 \\
\hline
\end{tabular}
\end{table}
\end{document}
However, I don't know:
- How to change the color of a column that has a specific width size (how to use color and size together)?
- How to specify height of a row? and be able to change its color?
- How to change the vertical and horizontal alignments for the columns/row that has specific color and size?
Thanks in advance