0

I've created a table with 3 columns:

\begin{table}[htbp]
    \begin{tabular}{ p{6cm} || >{\centering\arraybackslash} p{3cm} || >{\centering\arraybackslash} p{3cm} }     
\hline
 \text Dummy & Dummy & Dummy \\
 \hline \\
  \text Dummy & Dummy & Dummy \\
  \text Dummy & Dummy & Dummy \\
  \text Dummy & Dummy & Dummy \\
  \text Dummy & Dummy & Dummy \\
  \text Dummy & Dummy & Dummy \\
  \text Dummy & Dummy & Dummy \\
  \text Dummy & Dummy & Dummy \\
  \text Dummy & Dummy & Dummy \\ \\
  \hline
 \end{tabular} 
 \caption{Dummy}
 \label{fig:CAMean}
\end{table}

It comes out as this: Dummy Table

I dont understand why the 2nd vertical line is skipping some parts?

  • Welcome to TeX.SX! Please provide full examples, not just fragments – user31729 Mar 19 '15 at 15:41
  • you have a spurious extra rows from \\ after \hline and \\ \\ , just delete those. – David Carlisle Mar 19 '15 at 16:02
1

With some 'improvements'

\documentclass{article}

\usepackage{booktabs}
\usepackage{array}

\newcommand{\text}{}


\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}

\begin{document}

\begin{table}[htbp]
    \begin{tabular}{ p{6cm} ||C{3cm} ||C{3cm}}
\hline
 \text Dummy & Dummy & Dummy \\
 \hline  & & \\
  \text Dummy & Dummy & Dummy \\
  \text Dummy & Dummy & Dummy \\
  \text Dummy & Dummy & Dummy \\
  \text Dummy & Dummy & Dummy \\
  \text Dummy & Dummy & Dummy \\
  \text Dummy & Dummy & Dummy \\
  \text Dummy & Dummy & Dummy \\
  \text Dummy & Dummy & Dummy \\ 
  & & \\
  \hline
 \end{tabular} 
 \caption{Dummy}
 \label{fig:CAMean}


\begin{center}
\begin{tabular}{ p{6cm} ||C{3cm} ||C{3cm}}
\toprule
 \text Dummy & Dummy & Dummy \tabularnewline
 \midrule  & & \tabularnewline
  \text Dummy & Dummy & Dummy \tabularnewline
  \text Dummy & Dummy & Dummy \tabularnewline
  \text Dummy & Dummy & Dummy \tabularnewline
  \text Dummy & Dummy & Dummy \tabularnewline
  \text Dummy & Dummy & Dummy \tabularnewline
  \text Dummy & Dummy & Dummy \tabularnewline
  \text Dummy & Dummy & Dummy \tabularnewline
  \text Dummy & Dummy & Dummy \tabularnewline 
  & & \tabularnewline
  \bottomrule
 \end{tabular} 
 \caption{Dummy}
 \label{fig:CAMeanother}
\end{center}
\end{table}

\end{document

enter image description here

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.