# Float(s) lost in table

Here is my MWE. I have 4 files here: My analysis00.tex, my preamble.tex (well part of that file anyway), my toc.tex, and my chapter00.tex (well part of that as well). I have left out my chapter01.tex as it is irrelevant for this discussion.

I just edited this to add everything in one document and upon doing so, I still am getting the same error message.

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

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

\usepackage{hyperref}
\hypersetup{
citecolor=black,
filecolor=black,
urlcolor=black


}

\usepackage{tikz}
\usepackage{subfig}
\usetikzlibrary{calc,positioning,shapes.geometric}

\setenumerate[1]{label=(\alph*)}
\setenumerate[2]{label=(\roman*)}

\usepackage[amsmath,framed,thmmarks]{ntheorem}

\usepackage{changes}

\usepackage{tikz}
\usepackage{tikz-cd}
\usepackage{subfig}
\usepackage{float}
\usepackage{titlesec}
\usepackage[Conny]{fncychap}
\pagestyle{fancy}
\setcounter{chapter}{-1}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{#1}{}}
\cfoot{\thepage}

\renewcommand{\thesection}{\arabic{section}}

\titleformat{\section}[frame]
{\normalfont}
{\filcenter
\footnotesize
\enspace SECTION \thesection\enspace}
{8pt}
{\Large\bfseries\filcenter}

\newtheorem{Theorem}{Theorem}

\theoremclass{Theorem}
\theoremstyle{break}
\theoremsymbol{\rule{1ex}{1ex}}
\theoreminframepreskip{0pt}
\theoreminframepostskip{0pt}
\theoremframepreskip{1cm}
\theoremframepostskip{1cm}
\theoremstyle{break}
\def\theoremframecommand{%

\begin{document}

\chapter{Logic, Set Theory, Functions, and Relations.}

\begin{proof}
The proof makes use of the following truth table.
$\,$
\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}


Whenever I compile, I get the error:

Float(s) lost. lnclude{chapter0}


Not sure what to do here. Thanks.

• please fix your examples so that people can reproduce the error, but presumably you have defined proof to be some kind of boxed environment that can not contain a float. Since you refer to the table in the running text as "the following table" it shod not be in a table environment at all, as the only reason for using table is to allow latex to move the content to help with page breaking. Just use tabular directly. – David Carlisle Sep 8 '16 at 15:36
• also don't load etex unless you have an old (pre 2015) latex, and \center should be \centering – David Carlisle Sep 8 '16 at 15:39
• Drop everything unrelated to this problem, even the packages you load - if the problem is replicates without some package, then remove it. Also, try to make it easy for your audience to work on the problem - don't provide separate files when you can contain everything in a single file. Sure, it doesn't represent your setup exactly, but you're here for free help, so play along... – Werner Sep 8 '16 at 15:44
• Sorry please forgive me for sounding stupid or ignorant but I finally (sorry it took so long) deleted the etex, and I took out the table command but now I get the following error: package caption Error: \caption outside float. \caption – Michael Dykes Sep 8 '16 at 15:44
• this is probably just a typo. but in the question you show a file name chapter00 rather than chapter0. if that's really its name, then it wouldn't be found. – barbara beeton Sep 8 '16 at 16:04

I made a more reasonable example document, then commented out the parts you do not want as you apparently do not want a floating table here.

\documentclass[a4paper,12pt,twoside]{book}
\usepackage{amsmath,framed,pstricks}
\usepackage[amsmath,framed,thmmarks]{ntheorem}
\theoremclass{Theorem}
\theoremstyle{break}
\theoremsymbol{\rule{1ex}{1ex}}
\theoreminframepreskip{0pt}
\theoreminframepostskip{0pt}
\theoremframepreskip{1cm}
\theoremframepostskip{1cm}
\theoremstyle{break}
\def\theoremframecommand{%

\begin{document}

\begin{proof}
The proof makes use of the following truth table.
% $\,$ ??? :-)
%      \begin{table}[h!]
%  \centering
\begin{center}
\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}
\end{center}

%\caption
{\emph{Truth Table for $P \Rightarrow Q$, $(\neg Q) \Rightarrow (\neg P),$ and $Q \implies P.$}}

%\end{table}
\end{proof}

\end{document}

• Thanks so much David! I really appreciate it!!! That is just what I wanted. – Michael Dykes Sep 8 '16 at 16:11