I have a LaTeX file with packages


and I use the subfigure environment:





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


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

  • 3
    What document class are you using? Note also that hyperref should be loaded later than all those packages and that epsf should not be loaded.
    – egreg
    Sep 13 '14 at 17:42
  • 1
    to add to egreg's comment, since graphicx loads graphics, the latter is also unnecessary. Sep 13 '14 at 21:02
  • tikz loads an enhanced version of color so color is not needed either.
    – cfr
    Sep 13 '14 at 23:08

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

\usepackage{lipsum}% Just for this example

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

    \includegraphics[width=.7\linewidth,height=75pt]{example-image-a} \\[\abovecaptionskip]
    \small (a) An image


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

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



or you can try:

  • So weird that this works, but \usepackage{subfig} doesn't. Oh well.
    – axolotl
    Oct 7 '20 at 2:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.