1

I am having issues with creating my table with multirow. Vertical aligment is not centered properly (letters are more at "top"). I think that is caused by "hline". When I use "toprule, midrule,.." aligment is good, but these commands have has issues with broken vertical borders. Please help me.

\documentclass[a4paper,12pt]{report} \usepackage{array} \usepackage{multirow} \newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}} \usepackage{tabularx} \usepackage[none]{hyphenat} \begin{document} \begin{table}[htbf] \center \begin{tabular}{|M{1.7cm}|M{1.8cm}|} \hline bla &bla\\ \hline \multirow{4}{*}{bla} &bla\\ \cline{2-2} &bla\\ \cline{2-2} &bla\\ \cline{2-2} &bla\\ \cline{2-2} \hline \end{tabular} \end{table} \end{document}

enter image description here

2
  • It looks optically not centered because none of your content has "descenders" (letters that protrude below the baseline). Try with "jab" or "tag" instead of "bla" and you will see. Nov 21, 2015 at 0:05
  • 1
    Content of multirow cell is well centered. If you not satisfied with it, multirow macro offer option for manual adjustment of cell content position: \multirow{nrows}[bigstruts]{width}[fixup]{text} where in fixup you write lenght for offset content (positive to move up, negative to move down)
    – Zarko
    Nov 21, 2015 at 0:10

1 Answer 1

0

Use \extrarowheight or, better, don't use vertical lines and load booktabs. Here is a demo of both solutions:

\documentclass[a4paper,12pt]{report}
\usepackage{array, booktabs}
\usepackage{multirow}
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}
\usepackage{makecell}
\setcellgapes[t]{4pt}

\begin{document}

\begin{table}[!htbp] \centering%
  \setlength\extrarowheight{2pt}
  \begin{tabular}{|M{1.7cm}|M{1.8cm}|}
    \hline
    bla & bla \\
    \hline
    \multirow{4}{*}{bla} & bla \\
    \cline{2-2} & bla \\
    \cline{2-2} & bla \\
    \cline{2-2} & bla \\
    \hline
  \end{tabular}
\end{table}

\begin{table}[!htbp] \centering%
  \begin{tabular}{M{1.7cm} M{1.8cm}}
    \toprule
    bla & bla \\
    \midrule
    \multirow{4}{*}{bla} & bla \\[2pt]
                         & bla \\[2pt]
                         & bla \\[2pt]
                         & bla \\
    \bottomrule
  \end{tabular}
\end{table}

\end{document} 

enter image description here

You must log in to answer this question.

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