11

When I include subfigures with subcaptions in an IEEE conference (IGARSS conference) and import them with \usepackage{subcaption} in the previous tex file, I get the following warning: Package caption Warning: Unsupported document class (or package) detected, (caption) usage of the caption package is not recommended.

I already tried the trick here: latex caption warning but the warning is still there.

3 Answers 3

9

The spconf.sty package uses deprecated and obsolete constructions, so it's not very surprising it is not compatible with caption.

You can use subfig, though. Of course, the template file does ridiculous things, like loading epsfig and using \def with silly replacement texts. Please, fix them.

\documentclass{article}
\usepackage{spconf,amsmath,graphicx}
\usepackage[caption=false]{subfig}

\newcommand\x{\mathbf{x}} % the original is ridiculous
\newcommand\cL{\mathcal{L}} % the original is ridiculous

\title{AUTHOR GUIDELINES FOR IGARSS 2016 MANUSCRIPTS}
\name{Author(s) Name(s)\thanks{Thanks to XYZ agency for funding.}}
\address{Author Affiliation(s)}
\begin{document}

\maketitle

\begin{abstract}
The abstract should appear at the top of the left-hand column of text, about
0.5 inch (12 mm) below the title area and no more than 3.125 inches (80 mm) in
length.  Leave a 0.5 inch (12 mm) space between the end of the abstract and the
beginning of the main text.  The abstract should contain about 100 to 150
words, and should be identical to the abstract text submitted electronically
along with the paper cover sheet.  All manuscripts must be in English, printed
in black ink.
\end{abstract}

\begin{keywords}
One, two, three, four, five
\end{keywords}

\section{Introduction}
\label{sec:intro}

These guidelines include complete descriptions of the fonts, spacing, and
related information for producing your proceedings manuscripts. Please follow
them and if you have any questions, direct them to Conference Management
Services, Inc.: Phone +1-979-846-6800 or Fax +1-979-846-6900 or email
to \[email protected]+.

\section{Formatting your paper}
\label{sec:format}

All printed material, including text, illustrations, and charts, must be kept
within a print area of 7 inches (178 mm) wide by 9 inches (229 mm) high. Do
not write or print anything outside the print area. The top margin must be 1
inch (25 mm), except for the title page, and the left margin must be 0.75 inch
(19 mm).  All {\it text} must be in a two-column format. Columns are to be 3.39
inches (86 mm) wide, with a 0.24 inch (6 mm) space between them. Text must be
fully justified.

\section{PAGE TITLE SECTION}
\label{sec:pagestyle}

The paper title (on the first page) should begin 1.38 inches (35 mm) from the
top edge of the page, centered, completely capitalized, and in Times 14-point,
boldface type.  The authors' name(s) and affiliation(s) appear below the title
in capital and lower case letters.  Papers with multiple authors and
affiliations may require two or more lines for this information.

The paper title (on the first page) should begin 1.38 inches (35 mm) from the
top edge of the page, centered, completely capitalized, and in Times 14-point,
boldface type.  The authors' name(s) and affiliation(s) appear below the title
in capital and lower case letters.  Papers with multiple authors and
affiliations may require two or more lines for this information.

\begin{figure}[htp]
\centering

\subfloat[]{\includegraphics[width=3cm]{example-image}}\quad
\subfloat[]{\includegraphics[width=3cm]{example-image}}

\caption{A figure}
\end{figure}

The paper title (on the first page) should begin 1.38 inches (35 mm) from the
top edge of the page, centered, completely capitalized, and in Times 14-point,
boldface type.  The authors' name(s) and affiliation(s) appear below the title
in capital and lower case letters.  Papers with multiple authors and
affiliations may require two or more lines for this information.

The paper title (on the first page) should begin 1.38 inches (35 mm) from the
top edge of the page, centered, completely capitalized, and in Times 14-point,
boldface type.  The authors' name(s) and affiliation(s) appear below the title
in capital and lower case letters.  Papers with multiple authors and
affiliations may require two or more lines for this information.

The paper title (on the first page) should begin 1.38 inches (35 mm) from the
top edge of the page, centered, completely capitalized, and in Times 14-point,
boldface type.  The authors' name(s) and affiliation(s) appear below the title
in capital and lower case letters.  Papers with multiple authors and
affiliations may require two or more lines for this information.

The paper title (on the first page) should begin 1.38 inches (35 mm) from the
top edge of the page, centered, completely capitalized, and in Times 14-point,
boldface type.  The authors' name(s) and affiliation(s) appear below the title
in capital and lower case letters.  Papers with multiple authors and
affiliations may require two or more lines for this information.


\end{document}

enter image description here

4
  • May I ask what are the 'deprecated and obsolete constructions' stuffs, for instance?
    – Adam
    Commented Oct 10, 2017 at 16:22
  • 1
    @adam \def\@makefnmark{\hbox{$^{\@thefnmark}$\hss}}, \def\title#1{\gdef\@title{\uppercase{#1}}}, \em, \bf are just a few.
    – egreg
    Commented Oct 10, 2017 at 16:53
  • Oh, yeah, I see ...If I'd like to make contributions, where can I submit to? I don't see a github repo for like 'spconf.sty'.
    – Adam
    Commented Oct 11, 2017 at 2:06
  • How can you caption subfloats like the ones here?
    – ex1led
    Commented Dec 2, 2020 at 14:35
11

In many cases, there are no problems in spite of the warning.
Since subfig.sty is older then captions.sty, using caption.sty is not bad choice.

If you want to understand why you get the warning, "5 Document classes & Babel support" and "A.3 Warnings" sections of README.pdf of caption.sty will be helpful.

This warning appears when your document does not have definition of \@makecaption command.

Perhaps, your article.sty is old.(you are using \documentclass{article}, right?)

You can avoid the warning by adding definition of \@makecaption in your documentclass (ex. article.sty), or write the definition of it in your own style file and include it.

For example, create support-caption.sty and write the following definition:

\setlength\abovecaptionskip{\f@size\p@}
\setlength\belowcaptionskip{0\p@}
\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \sbox\@tempboxa{#1: #2}%
  \ifdim \wd\@tempboxa >\hsize
    #1: #2\par
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}

and, include the support-caption.sty in your preamble.

\usepackage{support-caption}
\usepackage{subcaption}

Be sure your patch is included before the caption.sty.

0
0

This is really an annoying warning. I tried multiple ways to get rid of this error. The following is the most efficient one at the most of the time. Just go to your caption.sty file and comment the warning messages as following.

\caption@ifbool{documentclass}{}{%
% \caption@WarningNoLine{%
% Unsupported document class (or package) detected,\MessageBreak
% usage of the caption package is not recommended}%
\caption@InfoNoLine{\string\@makecaption\space=\space\meaning\@makecaption}%
}

Hope this helps:)

3
  • 1
    You should not be rewriting the style file. Commented Apr 22, 2018 at 15:10
  • 1
    Yes, you are right. The solution is only applied on whom just want to silence the warning (I usually don't like warnings...). The silence package is insensitive to this caption error regarding document class, which I'm not sure why..
    – Esparami
    Commented Apr 23, 2018 at 15:24
  • I went with this solution in the end. Except I simply changed WarningNoLine to InfoNoLine, instead of the change proposed. Commented Nov 25, 2021 at 19:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .