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.
\documentclass[]{article}
\usepackage{bigstrut}
\usepackage{multirow}
\usepackage{array}
\usepackage{tabularx}


\begin{document}

    \newcolumntype{R}{>{\raggedleft\arraybackslash}X}

    \begin{tabularx}{\linewidth}{X R}

    Column 1 & Column 2 \\ \hline

    1.1 & \multirow{2}[2]{*}{2a} \bigstrut[t] \\
    1.2 &     \bigstrut[b] \\ \hline 

    1.3 & \multirow{3}[2]{*}{2b} \bigstrut[t] \\
    1.4 &   \\
    1.5 &   \bigstrut[b] \\ \hline

    1.6 & 2c \bigstrut \\ \hline

    \end{tabularx}

\end{document}

The output for this code I'm getting is: enter image description here

My question is:

Notice how in the 1st two sections, viz. 2a and 2b, \bigstrut[b] is adding an extra amount of space when used in conjunction with \multirow. I checked some table tutorials online where they make use of this same construct, yet with no difficulty! Why is this happening?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

I don't think you should normally put anything other than the \multirow arguments in the initial cell, nor anything at all in the cells that are spanned. Also you need a \noindent before the table so that the full width table fits on a line.

I don't know if this is the layout you wanted but it doesn't have the big gaps. I just moved the struts to the first column.

\documentclass[]{article}
\usepackage{bigstrut}
\usepackage{multirow}
\usepackage{array}
\usepackage{tabularx}


\begin{document}

    \newcolumntype{R}{>{\raggedleft\arraybackslash}X}

    \noindent
    \begin{tabularx}{\linewidth}{X R}

    Column 1 & Column 2 \\ \hline

    1.1\bigstrut[t] & \multirow{2}[2]{*}{2a} \\
    1.2\bigstrut[b] &     \\ \hline 

    1.3\bigstrut[t] & \multirow{3}[2]{*}{2b} \\
    1.4 &   \\
    1.5\bigstrut[b] &   \\ \hline

    1.6\bigstrut & 2c \\ \hline

    \end{tabularx}

\end{document}
share|improve this answer
    
Following your advice, how would I incorporate struts in a table where all \multirow is used for all rows? –  Chatterjee Jul 23 '12 at 19:51
1  
You can put struts into the text of the multirow cell eg a tt] strut at the start and a [b] strut at the end, (but I'm not sure why you need struts at all, the basic latex array code puts them in already and if you want to make them bigger you can use \arraystretch as all that does is make the struts bigger –  David Carlisle Jul 23 '12 at 20:11

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.