# \usepackage{subfig} giving captionlablelfont errors

While using \usepackage[caption=false]{subfig} I get an error like in the image below

And the chapter 6 where figure is included has the following code.

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

• welcome to tex.se!. in my documents your code snipped work fine! to see, what is going wrong in your document, you had to provide complete but small document beginning with \documentclasss{...} and ending with \end{document}, which gives reported error. Jun 23 '18 at 8:26
• Hi, I have posted complete document beginning with \documentclasss{...} and ending with \end{document}.Please have a look and suggest anything if you may. Jun 23 '18 at 9:29

You are using a document class called thesis. In the old days the caption package assumed that the thesis document class available on CTAN [1] is used, but there are many private document classes called thesis as well. You are using such class, and therefore the caption package tries to use commands from the CTAN thesis class like \cph@font which fails.

I fixed this on 2009/11/15.

What could you do? Either

1) Update your TeX installation. I'm sorry, but I cannot support versions of the caption package which are more than 8 years old. If updating TeX is not an option for you, try:

2) Add \captionsetup{format=plain,labelfont={},textfont={}} right after \usepackage[caption=false]{subfig}. I haven't tested it, but it might work. If not, try:

3) Rename your thesis class, e.g. by renaming thesis.cls to mythesis.cls and changing \documentclass{thesis} to \documentclass{mythesis}.

• Thanks. \captionsetup{labelfont={},textfont={}} right after \usepackage[caption=false]{subfig} worked.Thank You again Jun 23 '18 at 9:44
• @ManaliKedar BTW: You are using Windows 10 but an TeX installation from 2009? Or do you have a local copy of caption.sty and caption3.sty from 2009 in your document folder? If yes, deleting these files will fix your problem, too.
– user2574
Jun 23 '18 at 9:50