1

Is there a way to close the cells containing "Field A" and "Field B" only, i.e. with excluding the cell on the top left? Below is a minimal working environment. Thanks for your hints and suggestions.

\begin{tabular}{p{0.5cm}c|c|c|c|}
        \cline{2-5}
        & \multicolumn{1}{|c|}{Type} 
        & $a$ & $b$ & $c$ \\
        \hline\hline
        \parbox[t]{2mm}{\multirow{3}{*}{\rotatebox[origin=c]{90}{Field A}}} 
        & \multicolumn{1}{|c|}{Interface 1} 
        & $x_1$ 
        & $y_1$ 
        & $z_1$ \\
        \cline{2-5}
        & \multicolumn{1}{|c|}{Interface 2} 
        & $x_2$ 
        & $y_2$ 
        & $z_2$ \\
        \cline{2-5}
        & \multicolumn{1}{|c|}{Interface 3} 
        & $x_3$ 
        & $y_3$ 
        & $z_3$ \\
        \hline\hline
        \parbox[t]{2mm}{\multirow{3}{*}{\rotatebox[origin=c]{90}{Field B}}} 
        & \multicolumn{1}{|c|}{Interface 1} 
        & $x_1$ 
        & $y_1$ 
        & $z_1$ \\
        \cline{2-5}
        & \multicolumn{1}{|c|}{Interface 2} 
        & $x_2$ 
        & $y_2$ 
        & $z_2$ \\
        \cline{2-5}
        & \multicolumn{1}{|c|}{Interface 3} 
        & $x_3$ 
        & $y_3$ 
        & $z_3$ \\
        \hline
\end{tabular}
2
  • (i) please extend your code snippet to complete but small document which we can compile. as it is; (ii) what you mean with " close the cells" write vertical lines on beginning those multirow cells?
    – Zarko
    Commented Apr 24, 2019 at 16:48
  • 1
    You could use \begin{tabular}{|p{0.5cm}c|c|c|c|} and \multicolumn{1}{c|}{} for the empty cell.
    – leandriis
    Commented Apr 24, 2019 at 16:48

1 Answer 1

3

Put a \multicolumn{1}{c}{} as the first cell to have a cell without the vertical line.

I've used

\cline{2-5}
\multicolumn{1}{c}{}\\[-10pt]\hline

to avoid a double horizontal line below the first empty cell.

As Zarko pointed out, \parboxes are not needed.

\documentclass{article}
\usepackage{multirow}
\usepackage{rotating}
\begin{document}

\begin{table}[t]
\begin{tabular}{|p{0.5cm}c|c|c|c|}
        \cline{2-5}
        \multicolumn{1}{c}{}& \multicolumn{1}{|c|}{Type} 
        & $a$ & $b$ & $c$ \\
        \cline{2-5}
        \multicolumn{1}{c}{}\\[-10pt]\hline
        \multirow{3}{*}{\rotatebox[origin=c]{90}{Field A}} 
        & \multicolumn{1}{|c|}{Interface 1} 
        & $x_1$ 
        & $y_1$ 
        & $z_1$ \\
        \cline{2-5}
        & \multicolumn{1}{|c|}{Interface 2} 
        & $x_2$ 
        & $y_2$ 
        & $z_2$ \\
        \cline{2-5}
        & \multicolumn{1}{|c|}{Interface 3} 
        & $x_3$ 
        & $y_3$ 
        & $z_3$ \\
        \hline\hline
        \multirow{3}{*}{\rotatebox[origin=c]{90}{Field B}} 
        & \multicolumn{1}{|c|}{Interface 1} 
        & $x_1$ 
        & $y_1$ 
        & $z_1$ \\
        \cline{2-5}
        & \multicolumn{1}{|c|}{Interface 2} 
        & $x_2$ 
        & $y_2$ 
        & $z_2$ \\
        \cline{2-5}
        & \multicolumn{1}{|c|}{Interface 3} 
        & $x_3$ 
        & $y_3$ 
        & $z_3$ \\
        \hline
\end{tabular}
\end{table}
\end{document}

enter image description here

2
  • 3
    is a \parbox[t]{2mm}{...} in multi row cell really needed? the very same result you obtain without it :-)
    – Zarko
    Commented Apr 24, 2019 at 16:57
  • 2
    @Zarko You're right, I'll leave it out
    – CarLaTeX
    Commented Apr 24, 2019 at 16:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .