My table is choosing not to stay in the example environment I created for it, however the text I placed in there are included. I notice that when I remove the table environment and let tabular remain, then I see my diagrams within the example environment, however they are together with the words. I need to use the table so I can have labels. I have also tried figure as well and it does not work.
\documentclass[14pt,oneside,reqno]{amsart}
\usepackage{amsmath,amssymb,amsthm}
\usepackage[table]{xcolor}
%----- let figure stay in position --------
\usepackage{float}
%usepackage{caption}
% to design diagram
\usepackage{tikz}
\usetikzlibrary{automata,positioning}
\renewcommand{\baselinestretch}{1.5}
\renewcommand{\qedsymbol}{$\blacksquare$}
\newcommand{\quotes}[1]{``#1''}
\theoremstyle{definition}
\newtheorem{definition}{Definition}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}{Corollary}[theorem]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{exmp}{Example}[section]
% END PREAMBLE
% BEGIN DOCUMENT
\begin{document}
\begin{exmp}
industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
%begin table------------------------->
\begin{table}
\begin{tabular}{ |c|c|c|c|c|c|c|c|c|}
\hline
a & b & a & a & b & \cellcolor{green!25}x & . & . & . \\
\hline
\end{tabular}
\caption{S}
\label{P1}
\end{table}
%end table------------------------->
%begin table------------------------->
\begin{table}
\begin{tabular}{ |c|c|c|c|c|c|c|c|c| c| }
\hline
a & b & a & a & b & \cellcolor{green!25}a & & & \\
\hline
\end{tabular}
\caption{P2}
\label{P2}
\end{table}
%end table------------------------->
%begin table------------------------->
\begin{table}
\begin{tabular}{ |c|c|c|c|c|c|c|c|c|c| }
\hline
a & b & \cellcolor{blue!25}a & \cellcolor{blue!25}a & \cellcolor{blue!25}b & \cellcolor{blue!25}a & & & \\
\hline
\end{tabular}
\caption{P3}
\label{P3}
\end{table}
%\end table--------------------------->
industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
\end{exmp}
\end{document}
floatpackage, so just useHas the position specifier (\begin{table}[H]). You can also combine thetabulars into a singletableenvironment if they're meant to stay together. – Paul Gessler Apr 04 '16 at 00:33