Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am creating a table, in which I want to separate groups of lines, using \smallskip. However, at the very left of the table there is a \multirow cell, whose vertical lines are now broken.

Is there a nice solution for this? Resulting image:

enter image description here

\documentclass[runningheads]{llncs}
\usepackage{amsmath,amssymb} % define this before the line numbering.
\usepackage{rotating}
\usepackage{multirow}
\usepackage{hhline}
\begin{document}
\pagestyle{headings}
\mainmatter
    \begin{table}[t]    
        \footnotesize 
        \begin{center}
            \label{table:Sequences}
            \setlength{\tabcolsep}{1pt} 
            \begin{tabular}{|c|c|c|c|c|}
                \cline{5-5}
                \cline{5-5}
                \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{|c|}{\textit{blah}}\\
                \cline{5-5}
                \noalign{\smallskip}
                \cline{1-1}\cline{3-3}\cline{5-5}
                \multirow{11}{*}{\centering\begin{turn}{90}\textit{Broken Multirow}\end{turn}  } & {} & \multirow{3}{*}{\centering\begin{turn}{90}\textit{a}\end{turn}   }      & {} & { $1$ } \\           \cline{5-5}
                                                    {} & {} &                                   {}      & {} & { $2$ } \\           \cline{5-5}
                                                    {} & {} &                                   {}      & {} & { $3$ } \\   \cline{3-3}     \cline{5-5}\noalign{\smallskip}
                                                                                                            \cline{3-3}     \cline{5-5}
                                                    {} & {} & \multirow{3}{*}{\centering\begin{turn}{90}\textit{b}\end{turn}     }  & {} & { $1$ } \\           \cline{5-5}
                                                    {} & {} &                                   {}  & {} & { $2$ } \\           \cline{5-5}
                                                    {} & {} &                                   {}  & {} & { $3$ } \\   \cline{3-3}     \cline{5-5}\noalign{\smallskip}
                                                                                                            \cline{3-3}     \cline{5-5}
                                                    {} & {} & \multirow{3}{*}{\centering\begin{turn}{90}\textit{c}\end{turn}     }  & {} & { $1$ } \\           \cline{5-5}
                                                    {} & {} &                                   {}  & {} & { $2$ } \\           \cline{5-5}
                                                    {} & {} &                                   {}  & {} & { $3$ } \\   \cline{3-3}     \cline{5-5}\noalign{\smallskip}
                                                                                                            \cline{3-3}     \cline{5-5}
                                                    {} & {} & \multirow{3}{*}{\centering\begin{turn}{90}\textit{d}\end{turn}     }  & {} & { $1$ } \\           \cline{5-5}
                                                    {} & {} &                                   {}  & {} & { $2$ } \\           \cline{5-5}
                                                    {} & {} &                                   {}  & {} & { $3$ } \\   \cline{3-3}     \cline{5-5}
                \cline{1-1}\cline{3-3}\cline{5-5}
            \end{tabular}
        \end{center}
    \end{table}
\end{document}
\pagestyle{headings}
\mainmatter
    \begin{table}[t]    
        \footnotesize 
        \begin{center}
            \label{table:Sequences}
            \setlength{\tabcolsep}{1pt} 
            \begin{tabular}{|c|c|c|c|c|}
                \cline{5-5}
                \cline{5-5}
                \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{|c|}{\textit{blah}}\\
                \cline{5-5}
                \noalign{\smallskip}
                \cline{1-1}\cline{3-3}\cline{5-5}
                \multirow{11}{*}{\centering\begin{turn}{90}\textit{Broken Multirow}\end{turn}  } & {} & \multirow{3}{*}{\centering\begin{turn}{90}\textit{a}\end{turn}   }      & {} & { $1$ } \\           \cline{5-5}
                                                    {} & {} &                                   {}      & {} & { $2$ } \\           \cline{5-5}
                                                    {} & {} &                                   {}      & {} & { $3$ } \\   \cline{3-3}     \cline{5-5}\noalign{\smallskip}
                                                                                                            \cline{3-3}     \cline{5-5}
                                                    {} & {} & \multirow{3}{*}{\centering\begin{turn}{90}\textit{b}\end{turn}     }  & {} & { $1$ } \\           \cline{5-5}
                                                    {} & {} &                                   {}  & {} & { $2$ } \\           \cline{5-5}
                                                    {} & {} &                                   {}  & {} & { $3$ } \\   \cline{3-3}     \cline{5-5}\noalign{\smallskip}
                                                                                                            \cline{3-3}     \cline{5-5}
                                                    {} & {} & \multirow{3}{*}{\centering\begin{turn}{90}\textit{c}\end{turn}     }  & {} & { $1$ } \\           \cline{5-5}
                                                    {} & {} &                                   {}  & {} & { $2$ } \\           \cline{5-5}
                                                    {} & {} &                                   {}  & {} & { $3$ } \\   \cline{3-3}     \cline{5-5}\noalign{\smallskip}
                                                                                                            \cline{3-3}     \cline{5-5}
                                                    {} & {} & \multirow{3}{*}{\centering\begin{turn}{90}\textit{d}\end{turn}     }  & {} & { $1$ } \\           \cline{5-5}
                                                    {} & {} &                                   {}  & {} & { $2$ } \\           \cline{5-5}
                                                    {} & {} &                                   {}  & {} & { $3$ } \\   \cline{3-3}     \cline{5-5}
                \cline{1-1}\cline{3-3}\cline{5-5}
            \end{tabular}
        \end{center}
    \end{table}
\end{document}
share|improve this question
1  
Welcome to TeX.SE. t would be helpful if you composed a fully compilable MWE including \documentclass and the appropriate packages that reproduces the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem. –  Peter Grill May 17 at 0:25
    
If you load array, you can specify extrarowheight. Maybe that would work better? –  cfr May 17 at 0:34
    
As requested, minimal example added. I tried with extrarowheight but without much success I have to admit. –  dim_tz May 17 at 0:47
1  
Instead of \noalign{\smallskip}, use \\[\dimexpr-\normalbaselineskip+\smallskipamount]. –  Werner May 17 at 1:04
    
@Werner: It works! If you want you can post this as an answer and I will accept this. After this I will post a full compile-able code snippet. –  dim_tz May 17 at 1:06

1 Answer 1

Don't use \smallskip, but the hhline package instead, and makecell to ease the formatting of multirow cells:

    \documentclass[a4paper]{article}
    \usepackage[utf8]{inputenc}
    \usepackage{heuristica} 

    \usepackage{array}
    \usepackage{graphicx} 
    \usepackage{multirow}
    \usepackage{hhline}
    \usepackage{makecell}
    \renewcommand\cellgape{\Gape[6pt]}
    \renewcommand\theadfont{\itshape}

    \begin{document}

    \begin{table}[!h]
    \begin{tabular}{*{3}{| >{\centering\arraybackslash}m{1cm}|}}
    \hhline{|-||-||-|}
    \multirowthead{9}[-0.5\baselineskip]{\rotatebox{90}{\itshape Unbroken Multirow}} &\multirowthead{3}{\rotatebox{90}{Set 1}} & A1 \\%
    \cline{3-3}
        & & B1 \\
    \cline{3-3}
        & & C1 \\
    \hhline{|~|:=::=:} 
    &\multirowthead{3}{\rotatebox{90}{Set 2}} & A2 \\
    \cline{3-3}
        & & B2 \\
    \cline{3-3}
        & & C2 \\
    \hhline{|~|:=::=:} 
    &\multirowthead{3}{\rotatebox{90}{Set 3}} & A3 \\
    \cline{3-3}
        & & B3 \\
    \cline{3-3}
        & &C3 \\
    \hhline{|-||-||-|}
    \end{tabular}
    \end{table}

    \end{document} 

enter image description here

share|improve this answer
    
hm, actually the = in the \hhline gives a black gap between the "sets", while in your case output is different. Any idea? I do not use \usepackage[utf8]{inputenc} and \usepackage{heuristica}, as I get errors. –  dim_tz May 17 at 14:52
    
You probably get errors because your source file is not UTF8 encoded. Note that TeXMaker can convert to UTF8 — provided you know the actual encoding. Any way this is not related to the font : I tried Computer Modern, Latin Modern and Minion Pro, always without any black gap. Wouldn't that be a problem of your viewer? –  Bernard May 17 at 15:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.