\usepackage{subfig} 给出 captionlablelfont 错误

\usepackage{subfig} 给出 captionlablelfont 错误

使用 \usepackage[caption=false]{subfig} 时出现如下图所示的错误 在此处输入图片描述

包含图的第 6 章有以下代码。

\begin{figure}[h!] 
        \centering
        \subfloat[a)]{\includegraphics[width=.35\linewidth, scale=0.5]{registered1.png}}\hspace{4mm}
        \subfloat[b)]{\includegraphics[width=.35\linewidth, scale=0.5]{registered2.png}}
        \caption{FCC of MS bands registered to a) SAR Image de-noised by enhanced Lee filter b)SAR Image de-noised by wavelet filtering}
        \label{Registration}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% This is part of "main" file
\documentclass[12pt,openright,twoside]{thesis}  %12pt is larger than 11pt
\usepackage{titlesec}
   \titleformat{\chapter}
      {\normalfont\large}{Chapter \thechapter:}{1em}{}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{mathptmx} 
\usepackage{lmodern}
\usepackage{titlesec}
\usepackage{cite}
\usepackage{lscape}
\usepackage{indentfirst}
\usepackage{latexsym}
\usepackage{multirow}
\usepackage{tabls}
\usepackage{wrapfig}
\usepackage{slashbox}
\usepackage{longtable}
\usepackage{supertabular}
\usepackage{subeqn}
\usepackage[caption=false]{subfig}
\usepackage[inner=3.3cm,outer=2cm]{geometry}
\usepackage{afterpage}
\graphicspath{F:/SY_MTech/Manali/Paper}
\newcommand\blankpage{%
    \null
    \thispagestyle{empty}%
    \addtocounter{page}{-1}%
    \newpage}


\newcommand{\tbsp}{\rule{0pt}{12pt}} %used to get a vertical distance after \hline
%\renewcommand{\baselinestretch}{2}     
\setlength{\textwidth}{5.9in}
\setlength{\textheight}{9in}
\setlength{\topmargin}{-.50in}
%\setlength{\topmargin}{0in}    %use this setting if the printer makes the the top margin 1/2 inch instead of 1 inch
%\setlength{\oddsidemargin}{.3cm}
%\setlength{\evensidemargin}{.1cm}
\setlength{\parindent}{.4in}
\pagestyle{empty}

\newcommand{\sizetwelvefixed}{\fontsize{12}{14.4}\selectfont}

\titleformat{\chapter}[display]% NEW
    {\fontfamily{ptm}\huge\bfseries\centering}{\chaptertitlename\ \thechapter}{5pt}{\huge}% NEW
\titlespacing*{\chapter}{0pt}{30pt}{20pt}% NEW


\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%55

\include{Titlepage} %(must be first, required, non-numbered)
\cleardoublepage
\include{certificate}
\cleardoublepage
\include{Approval}
\cleardoublepage
\include{Abstract} %(must follow Abstract, required, non-numbered)


%Pages from this point start at lower-case Roman number ii)
\pagestyle{plain}
\pagenumbering{roman}
\setcounter{page}{2}

%\include{Preface}  %(if present, start at lower-case Roman number ii)
%\include{Foreword} %(if present, lower-case Roman)
%\include{Dedication} %(if present, lower-case Roman)
\include{Acknowledgments} %(if present, lower-case Roman)

\renewcommand{\baselinestretch}{1.5}
\small\normalsize
\tableofcontents %(required, lower-case Roman)
\newpage
%\listoftables %(if present, lower-case Roman)
%\newpage
\listoffigures %(if present, lower-case Roman)
\newpage
% LIST OF ABBREVIATIONS
\addcontentsline{toc}{chapter}{List of Abbreviations}
\include{Abbreviations}

\newpage
\setlength{\parskip}{0em}
\renewcommand{\baselinestretch}{1.5}
\small\normalsize

%Pages from this point start at Arabic numeral 1
\setcounter{page}{1}
\pagenumbering{arabic}
\include{Chapter1}
\include{Chapter2}
\include{Chapter3}
\include{Chapter4}
\include{Chapter5}
\include{chapter6}
\include{chapter7}
%\include{supertabular}
\titleformat{\chapter}
      {\normalfont\large}{Appendix \thechapter:}{1em}{}
%\include{AppendixA}
%\include{AppendixB}
%\include{AppendixC}
\renewcommand{\baselinestretch}{1.5}
\small\normalsize
%\include{Bibliography}
%When using Bibtex, delete the previous line and use the following
%three lines.  

%\bibliographystyle{unsrt} 
%\bibliography{Galactic,Dottie} %replace "Galactic,Dottie" with the
%                 file name(s) of your bib file(s)

\newpage
\bibliographystyle{ieeetr}
\bibliography{Citations}
\end{document}

\end{figure}

答案1

您正在使用名为 的文档类thesis。以前,该caption包假定thesis使用 CTAN [1] 上可用的文档类,但thesis也有许多私有文档类。您正在使用此类,因此该caption包尝试使用 CTANthesis类中的命令,例如 ,\cph@font但会失败。

我于 2009/11/15 修复了这个问题。

你能做什么?要么

1) 更新您的 TeX 安装。很抱歉,我无法支持caption超过 8 年的旧版本。如果更新 TeX 不适合您,请尝试:

2)\captionsetup{format=plain,labelfont={},textfont={}}在 后添加\usepackage[caption=false]{subfig}。我还没有测试过,但它可能会起作用。如果不行,请尝试:

3)重命名您的thesis班级,例如重命名thesis.clsmythesis.cls或更改\documentclass{thesis}\documentclass{mythesis}

[1]https://ctan.org/pkg/thesis

相关内容