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)?

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}

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.