Using \newfloat, new float environments can be created and as exemplified in this post, I created a new float called suppfig but I want to add subfigures in it. When I simply add subfigures inside it I get the message:
No counter
subsuppfigdefined.
When I add a counter called subsuppfig with \newcounter{subsuppfig} then I get
Illegal unit of measure (pt inserted).
How do I define a new subfloat environment?
Code:
\documentclass{article}
\usepackage{float,subcaption,graphicx}
\begin{document}
\newfloat{suppfig}{tbh}{supp}
\floatname{suppfig}{Supplementary Figure}
\begin{suppfig}[H]
\centering
\begin{subfigure}{\textwidth}
\centering
\caption{ }
\includegraphics[width=\textwidth]{example-image-a}
\end{subfigure}
\begin{subfigure}{\textwidth}
\centering
\caption{ }
\includegraphics[width=\textwidth]{example-image-b}
\end{subfigure}
\caption{...figurecaptions...}
\end{suppfig}
\end{document}

draftpackage option forgraphicxor use some of the images provided by themwepackage. – Werner May 01 '15 at 18:42captionnecessary forsubcaption? I always believed so. – WYSIWYG May 01 '15 at 19:02subcaptionloadscaption. If you look at thesubcaptioncode you'll see a call to\RequirePackage{caption}[..]. – Werner May 01 '15 at 19:06