Home > Archive > Tex > June 2007 > Option clash with package caption
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Option clash with package caption
|
|
|
| Hi all,
I am having some difficulty identifying which package is clashing with
the caption package. I can compile my document with just using
\usepackage[caption], but when I try and change any options of the
caption class I get an option clash, eg \usepackage[margin=10pt]
{caption}, results in "Dissertation.tex:23:Option clash for package
caption"
I have checked the caption documentation and it does not list any of
the packages I am using in the incompatibility section.
I am still learning LaTex, so there are probably many more elegant
ways to set up my document, but at the moment, the completion of my
thesis is taking priority! I would appreciate any help anybody could
offer,
Cheers
Rob
P.S My university does not supply a tex style - only M$ Word
templates!
---------------------------------------------------------------------------------------------
\documentclass[a4paper,twoside,12pt]{rep
ort}
% Times font for both maths and text, and graphics package
\usepackage{mathptmx}
\usepackage{graphicx} % Graphic inclusion
% Set bibliography
\usepackage[sort&compress,numbers]{natbib}
% Page size and linespacing 1.5 options
\usepackage[hmargin=30mm,vmargin=30mm,pd
ftex,headsep=0mm]{geometry}
\usepackage{setspace} \onehalfspacing %1.5 line spacing
% Change the title format and spacing to University specifications
\usepackage{titlesec}
\titleformat{\chapter}{\large\bfseries\f
ilcenter}
{\MakeUppercase{\chaptertitlename} \thechapter \space}{0mm}{}
\titleformat{\section}{\normalsize\bfser
ies}{\thesection}{3ex}{}
\titleformat{\subsection}{\normalsize\bf
series}{\thesubsection}{3ex}{}
\titleformat{\subsubsection}{\normalsize
\bfseries}{\thesubsubsection}
{3ex}{}
\titlespacing{\chapter}{0pt}{0pt}{12pt}
\titlespacing{\section}{0pt}{6pt}{3pt}
\titlespacing{\subsection}{0pt}{6pt}{3pt
}
\titlespacing{\subsubsection}{0pt}{6pt}{
3pt}
\setlength{\parindent}{0pt} % no indent on first paragraph
% Enable a glossary
\usepackage[number=none,toc=true,acronym
=true]{glossary}
\setlength{\descriptionwidth}{0.8\linewidth}
\makeglossary
% Non page setup macros
\usepackage{amsmath, amssymb,amsfonts} % Maths typesetting
\usepackage{multirow, array, hhline} % Fancy tables
\usepackage{calc}
\usepackage{nicefrac}
\usepackage{lscape}
\usepackage[pdftex,colorlinks,linkcolor=
black,citecolor=black,bookmarksnumbered,
plainpages=false,pdfpagelabels]
{hyperref}
\usepackage{subfig}
\usepackage{caption}
\newcommand{\degC}[1]{\ensuremath{#1\,^{
\circ}\mathrm{C}}} % Usage
\degF{100}
\newcommand{\degF}[1]{\ensuremath{#1\,^{
\circ}\mathrm{F}}} % Usage
\degC{30}
\newcommand{\degs}{\ensuremath{^{\circ}}
}
\newcommand{\newPar}{\par \vspace*{6pt}}
\newcommand{\Z}{ kg/m\ensuremath{^3}}
\newcommand{\KB}{Kingery and Bulmash}
\newcolumntype{M}{>{\centering\arraybackslash}p{15mm}}
\newcolumntype{N}{>{\centering\arraybackslash}p{25mm}}
\newenvironment{eqComment}%
{\begin{center}\begin{minipage}[t]{0.9\linewidth}}%
{\end{minipage} \end{center} \vspace*{6pt}
}
\newenvironment{spreadlines}[1]%
{\setlength{\jot}{#1} \ignorespaces}%
{\ignorespacesafterend}
\renewcommand{\multirowsetup}{\centering
}
\newlength\LL
\newlength\RR
\begin{document} ...
| |
| Ulrike Fischer 2007-06-28, 7:18 pm |
| Am Thu, 28 Jun 2007 06:34:04 -0700 schrieb robT:
> Hi all,
>
> I am having some difficulty identifying which package is clashing with
> the caption package. I can compile my document with just using
> \usepackage[caption], but when I try and change any options of the
> caption class I get an option clash, eg \usepackage[margin=10pt]
> {caption}, results in "Dissertation.tex:23:Option clash for package
> caption"
This means that another package has already loaded caption but with
other options that you are trying now. You can look in the log-file
to find out who is loading another package.
In your case I think it is subfig. And as far as I remember subfig
has an interface to change option of caption. Look in the
documentation of subfig.
--
Ulrike Fischer
| |
|
| On 28 Jun, 14:42, Ulrike Fischer <n...@nililand.de> wrote:
> Am Thu, 28 Jun 2007 06:34:04 -0700 schrieb robT:
>
>
>
> This means that another package has already loaded caption but with
> other options that you are trying now. You can look in the log-file
> to find out who is loading another package.
>
> In your case I think it is subfig. And as far as I remember subfig
> has an interface to change option of caption. Look in the
> documentation of subfig.
>
> --
> Ulrike Fischer
Thank you for your response. Your recommendation prompted me to read a
bit deeper into TLC2 and I discovered that I had misread completely -
you specify the caption options when loading the subfig package, so my
issue is now resolved.
Thanks heaps for your advice and prompt response.
Cheers
robT
| |
| Axel Sommerfeldt 2007-06-28, 7:18 pm |
| robT <robteasdale@yahoo.com.au> wrote:
> you specify the caption options when loading the subfig package
Yes and no.
\usepackage[<options>]{caption}
is equivalent to
\usepackage{caption}
\captionsetup{<options>}
but
\usepackage[<options>]{subfig}
is equivalent to
\usepackage{caption,subfig}
\captionsetup[subfloat]{<options>}
So in fact the <options> for the subfig package are options for subfloats
only, not for the main captions.
The best is loading the caption package before the subfig package, so you
can specify options on both using \usepackage.
HTH,
Axel
|
|
|
|
|