Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
\begin{table}[h]
\begin{tabular}{ c c}
\hline
 Hypothesis & Belief & Plausibility \\ \hline
 Null & 0 & 0 \\
 Red & 0.2 & 0.6 \\ 
 Green & 0.15 & 0.6 \\ 
 Blue & 0.15 & 0.55 \\
 Red or Green & 0.45 & 0.85 \\
 Blue or Red & 0.4 & 0.85 \\
 Green or Blue & 0.4 & 0.8 \\
 Red or Green or Blue & 1 & 1 \\ 
 \caption{Belief and Plausibility using mass function}
 \end{tabular}
 \end{table}

I want to create a three columned table but i keep getting following errors

! Misplaced \noalign.\hline ->\noalign{\ifnum 0=`}\fi \penalty \@M
\futurelet \@let@token \LT@@h... \hline

! Misplaced \omit.\multispan ->\omit\@multispan H

! Extra alignment tab has been changed to \cr.<template> \endtemplate
H

! Extra alignment tab has been changed to \cr.<recently read>
\endtemplate Hypothesis & Belief &

! Extra alignment tab has been changed to \cr.<recently read>
\endtemplate Null & 0 &

! Extra alignment tab has been changed to \cr.<recently read>
\endtemplate Red & 0.2 &

! Extra alignment tab has been changed to \cr.<recently read>
\endtemplate Green & 0.15 &

! Extra alignment tab has been changed to \cr.<recently read>
\endtemplate Blue & 0.15 &

! Extra alignment tab has been changed to \cr.<recently read>
\endtemplate Red or Green & 0.45 &

! Extra alignment tab has been changed to \cr.<recently read>
\endtemplate Blue or Red & 0.4 &
share|improve this question
    
You have three columns but only {c c} –  percusse May 3 '13 at 14:00
    
Also use no optional argument or [htp] as [h] makes it highly likely the float will go to the end of the document. –  David Carlisle May 3 '13 at 14:25
add comment

1 Answer 1

You have too few 'c's. Just add one more.

\documentclass{article}
\begin{document}
        \begin{table}
        \begin{tabular}{c c c} % Added one more 'c' to match # of columns
        \hline
         Hypothesis & Belief & Plausibility \\ \hline
         Null & 0 & 0 \\
         Red & 0.2 & 0.6 \\ 
         Green & 0.15 & 0.6 \\ 
         Blue & 0.15 & 0.55 \\
         Red or Green & 0.45 & 0.85 \\
         Blue or Red & 0.4 & 0.85 \\
         Green or Blue & 0.4 & 0.8 \\
         Red or Green or Blue & 1 & 1 
         \end{tabular}
         \caption{Belief and Plausibility using mass function} % Moved caption out from tabular to table
         \end{table}
\end{document}
share|improve this answer
    
Thanks!! Even after changing it to {c c c} i am still getting following errors. ! Misplaced \noalign.\hline ->\noalign{\ifnum 0=`}\fi \penalty \@M \futurelet \@let@token \LT@@h... \hline ! Misplaced \omit.\multispan ->\omit\@multispan H ! Extra alignment tab has been changed to \cr.<template> \endtemplate H –  Pratap Dheeraj May 3 '13 at 14:07
    
@PratapDheeraj I just updated it, try again. It's working on my end. What are the errors that you are getting? –  gekkostate May 3 '13 at 14:08
1  
@gekkostate - One reason for posting a full MWE rather than just a code snippet is that it helps reduce any confusion arising from people posting the code snippet into their files without considering the bigger picture; less confusion if you supply the entire picture yourself... –  Mico May 3 '13 at 14:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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