1

The vertical line at the end of the cell where i used cell merge is missing.

enter image description here

  • 5
    Using \multicolumn{3}{c|}{...} should restore that puppy... Note that \multicolumn takes 3 arguments. :) – Werner Oct 23 '13 at 19:21
  • 2
    Welcome to TeX.SX! You can have a look on our starter guide to familiarize yourself further with our format. In particular, please don't use screenshots for code- we need to be able to copy & paste it in order to work with it :) – cmhughes Oct 23 '13 at 19:45
  • 1
    Something is wrong with your use of multirow, you should use the \multirow{}{}{} command if you want to have that content in multiple rows (not the other way). Check this. – masu Oct 23 '13 at 20:23
  • @Werner: the arguments are fine, the third parameter will be the entire cell but not more. A bit risky sometimes but it should work. – masu Oct 23 '13 at 21:05
2

That's not the only problem with your example.

Please note the following examples:

enter image description here

\documentclass{article}

\usepackage{multirow}

\begin{document}

multirow and multicolumn without brackets (brackets doesn't change much in this case, but they should be there)

\begin{center}
\begin{tabular}{|c|c|c|}
\hline  & \multicolumn{2}{c}.\\
\hline A & B & C \\
\hline D & \multirow{2}{*}E & F \\
\hline & G &\\
\hline
\end{tabular}
\end{center}

... border added

\begin{center}
\begin{tabular}{|c|c|c|}
\hline  & \multicolumn{2}{c|}{.}\\
\hline A & B & C \\
\hline D & \multirow{2}{*}{E} & F \\
\hline & G &\\
\hline
\end{tabular}
\end{center}

multiple borders added (no effect if matching)

\begin{center}
\begin{tabular}{|c|c|c|}
\hline  & \multicolumn{2}{|c|}{.}\\
\hline A & B & C \\
\hline D & \multirow{2}{*}{E} & F \\
\hline & G &\\
\hline
\end{tabular}
\end{center}

multiple borders added (affected if not matching)

\begin{center}
\begin{tabular}{|c|c|c|}
\hline  & \multicolumn{2}{||c|}{.}\\
\hline A & B & C \\
\hline D & \multirow{2}{*}{E} & F \\
\hline & G &\\
\hline
\end{tabular}
\end{center}

multirow changed

\begin{center}
\begin{tabular}{|c|c|c|}
\hline  & \multicolumn{2}{c|}{.}\\
\hline A & B & C \\
\hline \multirow{2}{*}{D} & E & \multirow{2}{*}{F} \\
\hline & G &\\
\hline
\end{tabular}
\end{center}

line fixed

\begin{center}
\begin{tabular}{|c|c|c|}
\hline  & \multicolumn{2}{c|}{.}\\
\hline A & B & C \\
\hline \multirow{2}{*}{D} & E & \multirow{2}{*}{F} \\
\cline{2-2} & G &\\
\hline
\end{tabular}
\end{center}

alignm to top

\begin{center}
\begin{tabular}{|c|c|c|}
\hline  & \multicolumn{2}{c|}{.}\\
\hline A & B & C \\
\hline D & E & F \\
\cline{2-2}
 & G &\\
\hline
\end{tabular}
\end{center}

\end{document}

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.