1

This question already has an answer here:

I am trying to create a \multirow and \multicolumn table in Texmaker. I have specified to put vertical lines in the code but somehow my last column is missing partially the vertical line. I have posted my code below. Could someone help me out to understand where am I wrong? Thanks a lot in advance.

\begin{table}[h] 
\centering 
\begin{tabular}{|p{3cm}|p{3cm}|p{3cm}|} \hline 
Macrophase & \multicolumn{2}{|c|}{Activity} \\ \hline 
\multirow{8}{*}{} & Description & \\ \cline{2-3} 
& Macrophase Actors  \\ \cline{2-3} 
& Duration and Frequency \\ \cline{2-3} 
& Inputs \\ \cline{2-3} 
& Software Utilized \\ \cline{2-3}  
& Outputs \\ \cline{2-3}  
& Criticalities \\ \cline{2-3}  
& KPIs \\ \hline   
\end{tabular}   
\caption{caption}   
\label{table:sample}   
\end{table}   

enter image description here

marked as duplicate by Masroor, user36296, Andrew Swann, TeXnician, Werner tables Aug 29 '17 at 15:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

migrated from tex.meta.stackexchange.com Aug 29 '17 at 14:34

This question came from our discussion, support, and feature requests site for users of TeX, LaTeX, ConTeXt, and related typesetting systems.

  • Yeah, because originally columns are three and then one of them is further divided into two. – Israr Aug 29 '17 at 14:28
1
\documentclass{article}
\usepackage{multirow}

\begin{document}
\begin{table}[h]
\centering
\begin{tabular}{|*{3}{p{3cm}|}}         \hline
Macrophase
    & \multicolumn{2}{c|}{Activity} \\  \hline
    & Description               &   \\  \cline{2-3}
    & Macrophase Actors         &   \\  \cline{2-3}
    & Duration and Frequency    &   \\  \cline{2-3}
    & Inputs                    &   \\  \cline{2-3}
    & Software Utilized         &   \\  \cline{2-3}
    & Outputs                   &   \\  \cline{2-3}
    & Criticalities             &   \\  \cline{2-3}
    & KPIs                      &   \\  \hline
\end{tabular}
\caption{caption}
\label{table:sample}
\end{table}
\end{document}

enter image description here

note: your table has declared three columns, but you in table use -- with exception of the first row -- only (the first) two. it always to be use all, even if they are empty.

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