I have read countless instructions on how to use the subcaption package, and tried several examples. Each time I get two types of errors, which I will post further down. This is my premable:

\documentclass[12pt, a4paper, oneside]{Thesis} % Paper size, default font size and one-    sided paper
\graphicspath{{./Figures/}} % Specifies the directory where pictures are stored
\usepackage[backend=bibtex, natbib, style=authoryear,maxbibnames=9, doi=false,    url=true, isbn=false]{biblatex}
\DefineBibliographyStrings{norsk}{bibliography = {References},}

This is the current caption code:

            \caption{Original Prototype}
            \caption{Second Iteration}
    \caption{Quick Selection}\label{fig:QSelect}

Finally, these are the error messages that I am given.

C:\Program Files (x86)\MiKTeX 2.9\tex\latex\caption\subcaption.sty:48: 
Package subcaption Error: This package can't be used in cooperation [\endinput}{}]

Missing number, treated as zero. [\begin{subfigure}[b]{0.3\textwidth}]

Illegal unit of measure (pt inserted). [\begin{subfigure}[b]{0.3\textwidth}]

Does anyone have any idea of how I can solve this issue? The reason I added the preamble is that most other people have stated that the subcaption package can't be used together with the subfigure package, but as you can see I do not add it to my Thesis.tex

  • 1
    Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – cfr Apr 21 '14 at 22:32
  • I provided an answer below, but I want to confirm my suspicion. Could you please provide a link to the class Thesis.cls (if it's not publicly available, you can uploaded elsewhere and provide the link)? – Gonzalo Medina Apr 21 '14 at 23:56

Seeing the error message, what happens is that your document class Thesis internally loads subfigure and this produces the clash, since subcaption and subfigure cannot be used simultaneously. Search the file Thesis.cls for a line


and comment it out.

  • That was exactly it. Thank you! If only the error messages would reflect where the conflict occured, this would have been so much easier. – Marius Seim Apr 22 '14 at 6:10
  • This totally works. For people who might be visiting here again, I tried this with bmvc2k class for British Machine Vision Conference paper. Worked like a charm. Many thanks! – masad May 4 '16 at 17:08

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.