I'm using the newtheorem macro in amsthm for example environments. Is there a way for a sub-example? I don't need anything fancy like indenting, just a new counter level would do. So that within say Example 4, a few sub-examples would be numbered as Example 4.1, Example 4.2, etc. Maybe I could just do something with the counter in that area of the document?
\documentclass[12pt]{article}
\usepackage{amsthm}
\newtheorem{example}{Example}
\begin{document}
\begin{example} first example
\end{example}
\begin{example} second example. Here are situations where this occurs.
\end{example}
%\begin{subexample} first sub-example of second example
%\end{subexample}
%\begin{subexample} second sub-example of second example
%\end{subexample}
\begin{example} third example
\end{example}
\end{document}
