包标题警告:不支持的文档类

包标题警告:不支持的文档类

当我在(中包含subfigureswith时subcaptionsIEEE conferenceIGARSS会议) 并在前一个 tex 文件中导入它们\usepackage{subcaption},我收到以下警告: Package caption Warning: Unsupported document class (or package) detected, (caption) usage of the caption package is not recommended.

我已经在这里尝试过这个技巧:latex 标题警告但警告仍然存在。

答案1

spconf.sty包使用了已弃用的和过时的构造,因此它与不兼容也就不足为奇了caption

不过,您可以使用subfig。当然,模板文件会做一些荒谬的事情,比如加载epsfig和使用\def愚蠢的替换文本。请修复它们。

\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}

在此处输入图片描述

答案2

很多情况下,尽管有警告,但问题并不大。
由于 subfig.sty 比 captions.sty 旧,因此使用 caption.sty 是个不错的选择。

如果你想了解为什么会出现这个警告,请参阅“5 文档类和 Babel 支持”和“A.3 警告”部分caption.sty 的 README.pdf将会有所帮助。

当您的文档没有\@makecaption命令的定义时会出现此警告。

也许,你的article.sty已经旧了。(你正在使用\documentclass{article},对吗?)

您可以通过在文档类中添加定义来避免警告\@makecaption(例如article.sty),或者在您自己的样式文件中写入它的定义并包含它。

例如,创建support-caption.sty并编写以下定义:

\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}

并将其包含support-caption.sty在你的序言中。

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

确保你的补丁已包含在内caption.sty

答案3

这真是一个烦人的警告。我尝试了多种方法来摆脱这个错误。以下是大多数情况下最有效的方法。只需转到您的caption.sty文件并按如下方式注释警告消息即可。

\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}%
}

希望这可以帮助:)

相关内容