3

I'm trying to get my table correctly displayed but I don't know why it's not working: enter image description here

Can someone please help me? Here is the code of the picture:

    \documentclass[a4paper,12pt,twoside]{book}
\usepackage[bottom=25mm,top=25mm, left=30mm, right=25mm]{geometry}
\usepackage[utf8x]{inputenc}
\usepackage[spanish, es-tabla, es-noshorthands, es-nosectiondot]{babel}
\usepackage{multirow}% http://ctan.org/pkg/multirow
\usepackage{hhline}% http://ctan.org/pkg/hhline
\begin{document}
\begin{table}[ph]
  \centering
  \begin{tabular}{|c|c|c|c|}
    \hline
    \multicolumn{4}{ |c| }{Blah} \\
    \hline
\multirow{1}{*}{C1F1} &  C2F1 & C3F1 & C4F1\\ \hline
\multirow{2}{*}{C1F2} & C2F2 \\& C2F2 &\multirow{2}{*}{C3F2} & \multirow{2}{*}{C4F2}\\ \hline
\multirow{1}{*}{C1F3} & C2F3 & C3F3 & C4F3 \\ \hline
\multirow{2}{*}{C1F4} & C2F4 \\& C2F4 &\multirow{2}{*}{C3F4}  & \multirow{2}{*}{C4F4}\\ \hline
  \end{tabular}
  \caption{blablabla}
  \label{blabla}
\end{table}
\end{document}
  • You need to use \multirow{-2}{*}{C3F2} (note the minus sign), which means the two rows above this row. – Peter Grill May 20 '14 at 20:27
  • ...or move the \multirow command up one cell. – Werner May 20 '14 at 20:30
  • Thanks for the answers, but if I do that the vertical line between columns is broken in the middle of the cell :( – user51654 May 20 '14 at 20:33
2

The following code should fix your problem. I moved the \multirow one line up and created the empty cells in which the multirow expands. Also I removed the \multirow{1} and organized the table a bit.

C1F1                  & C2F1 & C3F1                  & C4F1                  \\ \hline
\multirow{2}{*}{C1F2} & C2F2 & \multirow{2}{*}{C3F2} & \multirow{2}{*}{C4F2} \\
                      & C2F2 &                       &                       \\ \hline
C1F3                  & C2F3 & C3F3                  & C4F3                  \\ \hline
\multirow{2}{*}{C1F4} & C2F4 & \multirow{2}{*}{C3F4} & \multirow{2}{*}{C4F4} \\
                      & C2F4 &                       &                       \\ \hline

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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