0

I'm using the tabular environment. I would like for one row (where I describe each subsection) to go horizontally across the table, and not to stay in one column. This is what I currently have:

\begin{center}
\begin{tabular}{p{4cm} p{13cm}}
\textbf{Table 1} I would like this to go across the table and not stay in column 1\\ \hline
\textit{Predisposing factors} \\ \hline
variable 1 & description \\
variable 2 & description \\
variable i & description \\
\textit{I would like this to go across the table as well} \\
\end{tabular}
\end{center}

I would really appreciate any help.

  • 2
    You are looking for multicolumn i think. – Johannes_B Jul 4 '15 at 15:29
  • 2
    and of course \captionof{table}{the actual caption} for the caption. No need to number by hand. Using a float environment would have some benefits though. – Johannes_B Jul 4 '15 at 15:31
  • @Johannes_B An answer? – cfr Jul 5 '15 at 2:48
  • @cfr I bet this is a clear duplicate, i am just to lazy to search for a matching one. Do you want to answer? – Johannes_B Jul 5 '15 at 7:10
1
\begin{center}
\begin{table}
\begin{tabular}{p{4cm} p{13cm}}
\multicolumn{2}{l}{\textbf{Table 1} This will now go across the table} \hline
\textit{Predisposing factors} \\ \hline
variable 1 & description \\
variable 2 & description \\
variable i & description \\
\end{tabular}
\end{table}
\end{center}
| improve this answer | |

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.