Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

subcaption and compatibility

2,692 views
Skip to first unread message

Rudra Banerjee

unread,
Oct 22, 2013, 3:08:37 PM10/22/13
to
Hi friends,
Please check the pasted "minimal" latex file. its bit big, because I
have included "all" packages I use.
The problem is:
1) while compiling, it is giving error:
Package caption Warning: \caption will not be redefined since it's
already
(caption) redefined by a document class or package which
is
(caption) unknown to the caption package.
See the caption package documentation for explanation.


! Package caption Error: The `subcaption' package does not work
correctly
(caption) in compatibility mode.

See the caption package documentation for explanation.
Type H <return> for immediate help.
...

l.67 \begin{document}

?

I can get rid of that error by putting

\captionsetup{compatibility=false}

But then, I am getting an warning:

Package caption Warning: Forced redefinition of \caption since the
(caption) unsupported(!) package option
`compatibility=false'
(caption) was given.
See the caption package documentation for explanation.

Any idea?

\documentclass[10pt,a4paper,xcolor=dvipsnames,xcolor=table]{beamer}
\pdfpageattr{/Group <</S /Transparency /I true /CS /DeviceRGB>>}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PACKAGES
\usepackage{
mathrsfs, amsmath, amsfonts, amssymb, makeidx,
graphics, textpos, color, everysel, amsthm,
epigraph, enumerate, mathrsfs, bm, amssymb,
amsbsy, mathtools, graphicx, sidecap, color,
tikz, pgf, xxcolor, subcaption
}
\usepackage[square,authoryear]{natbib}
\usepackage[scaled]{helvet}
\usepackage[T1]{fontenc}
\usepackage[customcolors,shade]{hf-tikz}
\usetikzlibrary{arrows,shadows,petri,decorations.markings,shapes}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% COLORS
\definecolor{pms286}{RGB}{4,52,177}
\definecolor{pms279}{RGB}{91,146,230}
\definecolor{pms200}{RGB}{199,20,68}
\definecolor{pms382}{RGB}{185,231,0}
\definecolor{pmsGreen}{RGB}{0,156,121}
\definecolor{pmsCyan}{RGB}{0,171,236}
\definecolor{pmsPurple}{RGB}{157,61,151}
\usecolortheme[RGB={4,52,177}]{structure}
\setbeamercolor{title}{fg=white,bg=pms286}
\setbeamercolor{author}{fg=white,bg=pms286!90!white}
\setbeamercolor{institute}{fg=white,bg=pms286!80!white}
\setbeamercolor{frametitle}{fg=white}
\mode<presentation>
{
\usetheme{Darmstadt}
\usetheme{Warsaw}
\setbeamercovered{transparent}
}
\setbeamercolor*{palette primary}{use=structure,fg=white,bg=pms286}
\setbeamercolor*{palette quaternary}{bg=pms279}
\setbeamercolor{normal text}{fg=pms286}
\setbeamercolor{text}{fg=red!50!black}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CUSTOMAIZATION
\newcommand{\figref}[1]{\figurename~\ref{#1}}
\newcommand{\eqnref}[1]{eqn.~\eqref{#1}}
\newcommand{\crefrangeconjunction}{--}
\newcommand{\ul}{\underline}

%\setbeamercolor{math text}{pms286!80}
\setbeamercolor{math text displayed}{fg=pms286!80}
\everymath{\color{pms286!80}}
%\everydisplay{\relax \ifx \\\@eqncr \else \color{pmsGreen}\fi }
\DeclareMathOperator{\Tr}{Tr}
\DeclareMathOperator{\im}{Im}

\AtBeginSection[]
{
\begin{frame}
\frametitle{Outline}
\tableofcontents[currentsection]
\end{frame}
}
\begin{document}
\begin{frame}
\frametitle{HI}
Try
\end{frame}
\end{document}

Rudra Banerjee

unread,
Oct 23, 2013, 5:21:38 AM10/23/13
to
Any help please?

Dan Luecking

unread,
Oct 24, 2013, 2:06:41 PM10/24/13
to
On Wed, 23 Oct 2013 10:21:38 +0100, Rudra Banerjee
<bnrj....@gmail.com> wrote:

>Any help please?
>
>On Tue, 2013-10-22 at 20:08 +0100, Rudra Banerjee wrote:
>> Hi friends,
>> Please check the pasted "minimal" latex file. its bit big, because I
>> have included "all" packages I use.

Don't do this. Provide a minimal example by removing one package at a
time (as well as preamble commands) keeping only what contributes to
the problem.

>> The problem is:
>> 1) while compiling, it is giving error:
>> Package caption Warning: \caption will not be redefined since it's
>> already
>> (caption) redefined by a document class or package which
>> is
>> (caption) unknown to the caption package.
>> See the caption package documentation for explanation.

The beamer class redefines \caption. Including just the 'subcaption'
package invokes this error. You should probably try to do without
'subcaption'.


Some errors I noticed:

>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>> % PACKAGES
>> \usepackage{
>> mathrsfs, amsmath, amsfonts, amssymb, makeidx,
>> graphics, textpos, color, everysel, amsthm,
>> epigraph, enumerate, mathrsfs, bm, amssymb,
>> amsbsy, mathtools, graphicx, sidecap, color,
>> tikz, pgf, xxcolor, subcaption
>> }

You have listed the packages 'mathrsfs', 'amssymb', and 'color'
twice each in this \usepackage command. Also you do not need
both 'graphics' and 'graphicx', the latter will input the former.

The 'color' package probably shouldn't be used used at all
when 'xxcolor' loads the 'xcolor' package, which is an alternative
to the 'color' package.

None of the packages you loade here (or later), except 'subcaption',
are needed to invoke the error you are concerned with.

Here is a truly minimal example:
%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{beamer}
\usepackage{subcaption}
\begin{document}
\begin{frame}
\frametitle{HI}
Try
\end{frame}
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%

It appears that 'subcaption' and 'caption' are incompatible with
beamer. I don't know what you can do except try to get whatever
effect you want for captions without using 'subcaption'.


Dan
To reply by email, change LookInSig to luecking
0 new messages