# undefined control sequence in a table

\documentclass[a4paper,12pt,twoside]{book}
\usepackage{etex}

\usepackage[left=2.50cm,right=2.50cm,top=2.50cm,bottom=2.75cm]{geometry}
\usepackage{amsmath,amssymb,amscd,amsbsy,array,color,epsfig}
\usepackage{fancyhdr,framed,latexsym,multicol,pstricks,slashed,xcolor}
\usepackage{picture}
\usepackage{indentfirst}
\usepackage{enumitem}

\begin{document}

\begin{proof}
\begin{table}[!ht]
\centering
\begin{tabular}{|c|c||c|c|c||c|c|}
\hline
$P$ & $Q$ & $P \Rightarrow Q$ & $\neg P$ & $\neg Q$ & $(\neg Q) \Rightarrow (\neg P)$ & $Q \Rightarrow P$ \\
\hline
$T$ & $T$ & $T$ & $F$ & $F$ & $T$ & $T$ \\
\hline
$T$ & $F$ & $F$ & $F$ & $T$ & $F$ & $T$ \\
\hline
$F$ & $T$ & $T$ & $T$ & $F$& $T$ & $F$ \\
\hline
$F$ & $F$ & $T$ & $T$ & $T$ & $T$ & $T$ \\
\hline
\end{tabular}
\caption{\emph{Truth Table for $P \Rightarrow Q$, $(\neg Q) \Rightarrow (\neg P),$ and $Q \Rightarrow P.$}}
\end{table}
\end{proof}

\end{document}


Hopefully I have given enough information in the MWE, because in my original I have a preamble, a table of contents, a chapter 0 (from which the table comes), and an analysis file which has the previous as inputs. So, I might have left something out that is needed from the MWE for it to compile.

But when I compile I get the following error at the beginning of the table:

Not in outer par mode \begin{table}[!ht]
Undefined control sequence \begin{table}[!ht]
Missing number, treated as zero \begin{table}[!ht]


Thanks.

• $\imp$ is my shorthand for $\Rightarrow$ and the table is within a \begin{proof} and \end{proof} environment. I did not know how to edit my post. Sorry. – Michael Dykes Sep 8 '16 at 13:41
• Never mind for some reason I did not see the "edit" button earlier. – Michael Dykes Sep 8 '16 at 13:44
• \usepackage{amsthm} is missing if proof is used (or alternatively \usepackage{mathtools}. I don't think that your really need the etex package nowadays any longer. Also don't use the outdated epsfig package – user31729 Sep 8 '16 at 13:49
• I am using ntheorem. Sorry I knew I failed to include something. OK thanks! – Michael Dykes Sep 8 '16 at 13:56
• unrelated to the question but etex and epsfig packages shouldn't be used in current documents (not since 1994 in the case of epsfig) – David Carlisle Sep 8 '16 at 14:24

An attempt:

\documentclass[a4paper,12pt,twoside]{book}
\usepackage{etex}

\usepackage[left=2.50cm,right=2.50cm,top=2.50cm,bottom=2.75cm]{geometry}
\usepackage{amsmath,amssymb,amscd,amsbsy,array,color,epsfig}
\usepackage{fancyhdr,framed,latexsym,multicol,pstricks,slashed,xcolor}
\usepackage{picture}
\usepackage{indentfirst}
\usepackage{enumitem}

\usepackage{amsthm}% PS

\begin{document}

\begin{proof}
$\,$ %PS (some text [invisible])
%    \begin{table}[!ht]
\begin{table}[h!]
\centering
\begin{tabular}{|c|c||c|c|c||c|c|}
\hline
$P$ & $Q$ & $P \Rightarrow Q$ & $\neg P$ & $\neg Q$ & $(\neg Q) \Rightarrow (\neg P)$ & $Q \Rightarrow P$ \\
\hline
$T$ & $T$ & $T$ & $F$ & $F$ & $T$ & $T$ \\
\hline
$T$ & $F$ & $F$ & $F$ & $T$ & $F$ & $T$ \\
\hline
$F$ & $T$ & $T$ & $T$ & $F$& $T$ & $F$ \\
\hline
$F$ & $F$ & $T$ & $T$ & $T$ & $T$ & $T$ \\
\hline
\end{tabular}
\caption{\emph{Truth Table for $P \Rightarrow Q$, $(\neg Q) \Rightarrow (\neg P),$ and $Q \Rightarrow P.$}}
\end{table}

\end{proof}

\end{document} Some suggestions:

1. Do you really need float table in the proof? An unnumbered version (only tabular) is less problematic.

1. If you use array insted of tabular, all your dollars inside it are unneeded.

• @MichaelDykes Probably yes, in your larger document. It would be very strange with the word proof and the table at top of the page, before proof. But h as here gives no choice. (And of course you should compile twice, to overwrite your *.aux files. – Przemysław Scherwentke Sep 8 '16 at 14:44