Very short question: How to put table inside of the ntheorem environment?
Simple first try
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{ntheorem}
\usepackage{amsmath}
\usepackage{thmtools}
\usepackage[dvipsnames]{xcolor}
\definecolor{defbckgcolor}{RGB}{200,220,240}
\theoremstyle{break}
\declaretheorem[
name=Definition,
shaded={margin=0.5em, bgcolor=defbckgcolor},
%thmbox=M,
numberwithin=section]
{definition}
%opening
\title{Table in ntheorem}
\author{John Doe}
\begin{document}
\maketitle
\section{Example}
intro
\begin{definition}
Some text
\begin{table}[htbp]
\begin{tabular}{lll}
\hline
1 & 2 & 3\\
4 & 5 & 6\\
7 & 8 & 9\\
\hline
\end{tabular}
\caption{Example}
\end{table}
more text.
\end{definition}
conclusion
\end{document}
gives an error:
Overfull \hbox (6.0pt too wide) in paragraph at lines 40--40
[][]
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
! LaTeX Error: Float(s) lost.
Didn't yet try, but how about figures? Same issue?
\begin{table}[htbp]
instead. By default theh
(here about) is not included.\begin{table}[htbp]
. But, it's not working withntheorem
.\captionof
from thecaption
package in order to a a caption to a non-float. An be careful that other floats does not float past the theorem and mess up the numbering.