Graphics, Figures & TablesColored multirow with clines

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
RSKueffner
Posts: 5
Joined: Thu Feb 25, 2010 9:16 am

Colored multirow with clines

Post by RSKueffner »

Hey guys. I am attempting to assemble a table that has a row and column header with a base table. I have separated the components so that I may reduce the complexity of my problem. The column header, row header, and base table have become separate tables in corollary. The row header is shown below.

In short, using multirow, I observe that an hline will overwrite the column color. A cline{a-b} however will not. If I use an hline it will intercept the multirow column. What I need is a row delimiter in the second column and none in the first.

It also appears that the column delimiter is weaker than in a normal table. I have also included the column header for comparison. If compiled into a single table, the column header would have the same issues as the row header. I would like to leave the top left 2 cell box empty with no horizontal or vertical lines.

Thanks

Code: Select all

\usepackage[table]{xcolor}
    \definecolor{H}{gray}{0.70}
\usepackage{multirow}
\usepackage{rotating}


\begin{document}

    \newcolumntype{H}{>{\columncolor{H}}c}

    \begin{table}[h!]
        \begin{center}
            \renewcommand{\arraystretch}{1.5}
            \begin{tabular}{*{4}{|H}|}
                \hline
                \multicolumn{4}{|H|}{Sub-Shell} \\
                \hline
                    F &
                    D &
                    P &
                    S \\
                \hline
            \end{tabular}
        \end{center}
        \label{T1C}
    \end{table}
    
    \begin{table}[h!]
        \begin{center}
            \renewcommand{\arraystretch}{1.5}
            \begin{tabular}{*{2}{|H}|}
                \hline
                    &
                    1 \\
                \cline{2-2}
                    &
                    2 \\
                \cline{2-2}
                    &
                    3 \\
                \cline{2-2}
                    &
                    4 \\
                \cline{2-2}
                    &
                    5 \\
                \cline{2-2}
                    &
                    6 \\
                \cline{2-2}
                    &
                    7 \\
                \cline{2-2}
                    \multirow{-8}{*}{\rotatebox{90}{Shell}} &
                    8 \\
                \hline
            \end{tabular}
        \end{center}
        \label{T1R}
    \end{table}

\end{document}
PS: I have used Slackware, Ubuntu, and Windows; all exhibiting the same errors. I do not believe it is a problem with my pdf viewer. I do notice however that different zooms have different color artifacts in the first column with the rotated multirow text. I have attached a copy of the pdf.
Attachments
Document.pdf
(7.68 KiB) Downloaded 379 times

Recommended reading 2024:

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

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

Post Reply