2

Consider the code:

\documentclass{article}
\begin{document}
    \begin{table}           
        \begin{tabular}{|c|c|c|}
            \hline 
            1  & 2  & 3\tabularnewline 
            \hline 
            4  & \multicolumn{2}{c}{5}  \tabularnewline
            \hline 
        \end{tabular}
    \end{table}
\end{document}

It produces the table:

enter image description here

How do I "close" the cell (add the right boundary as in the line above)?

0

1 Answer 1

3

You need to tell multicolumn to use those vertical lines.

cell

\documentclass{article}
\begin{document}
    \begin{table}           
        \begin{tabular}{|c|c|c|}
            \hline 
            1  & 2  & 3\\\hline 
            4  & \multicolumn{2}{c|}{5}\\\hline 
        \end{tabular}
    \end{table}
\end{document}

You must log in to answer this question.

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