[Tex/LaTex] “Environment subfigure undefined” on journal submission

floatssubfloatssv-classes

I have a LaTeX file with packages

\usepackage{amsmath,amssymb}
\usepackage{graphicx}
\usepackage[colorlinks=true,citecolor=black,linkcolor=black,urlcolor=blue]{hyperref}
\usepackage{tikz,graphics,color,fullpage,float,epsf,caption,subcaption}

and I use the subfigure environment:

\begin{figure}
\begin{subfigure}{1\textwidth}
...
\end{subfigure}

\vspace{5mm}

\begin{subfigure}{1\textwidth}
...
\end{subfigure}

\end{figure}

This compiles perfectly fine on my machine. However, when I submit the LaTeX file to a journal and looks at the PDF output, it shows an error

! LaTeX Error: Environment subfigure undefined.

I'm really lost on how to fix this, since as I said, it works fine on my machine. What should I do?

EDIT: I'm using the document class

\documentclass[smallextended]{svjour3}

This site seems to have some information on the document class if necessary: http://www.e-publications.org/springer/support/spr-chicago.html

Best Answer

I would suggest a work-around, if all else fails, as it is difficult to test this without going through the submission process yourself. In that regard, avoid using the subfigure environment altogether, and default to using a tabular structure for arranging your subfigures. While this comes with manual numbering of subfigures, it's not that difficult to maintain references manually.

Here's a minimal example that should show you the implementation:

enter image description here

\documentclass[smallextended]{svjour3}
\usepackage{lipsum}% Just for this example
\usepackage{graphicx}
\begin{document}

See Figure~\ref{fig:myfig}(a) or~(b). \lipsum[1]

\begin{figure}
  \centering
  \begin{tabular}{@{}c@{}}
    \includegraphics[width=.7\linewidth,height=75pt]{example-image-a} \\[\abovecaptionskip]
    \small (a) An image
  \end{tabular}

  \vspace{\floatsep}

  \begin{tabular}{@{}c@{}}
    \includegraphics[width=.6\linewidth,height=100pt]{example-image-b} \\[\abovecaptionskip]
    \small (b) Another image
  \end{tabular}

  \caption{This is a figure caption}\label{fig:myfig}
\end{figure}

\lipsum[2]

\end{document}