2

My university has a recommended thesis class based on the report class. Unfortunately, it is incompatible with the caption package; for example, when I include the subcaption package, I get the following error: "Package caption warning: Unsupported document class (or package) detected"

After searching around here and elsewhere, I believe the problem might be a \@makecaption command in the class file. I'm not experienced enough to know what it is doing or how to fix it. Can this command be fixed to be compatible with the caption package? Any help is greatly appreciated.

The makecaption command is:

 \long\def\@makecaption#1#2{% Add space only if something is ...
   \par\ifdim\prevdepth>-\p@ \vskip 10\p@\relax \fi % above the caption
   \setbox\@tempboxa\hbox{\vbox to\topskip{}#1: #2\unskip\strut}%
   \ifdim \wd\@tempboxa >\hsize      % IF longer than one line:
   {\ssp#1: #2\unskip\strut\par} %   THEN set as ordinary paragraph.
 \else                           %   ELSE  center.
   \hbox to\hsize{\hfil\unhbox\@tempboxa\hfil}%
   \fi}

The following comment is written before it:

% 15 Nov 93: further changes to support captions BEFORE the figure
% or table.  Changes suggested by Donald Arseneau, installed by Ethan
% Munson.  Detailed reasons are:
%   The \unhbox allows \vadjust material (\vspace) to get out;
%   the \vbox to\topskip{} is for captions at the top of top-floats;
%   the \ifdim is for captions above the figure or table;
%   the strut is for tables below the caption.
7
  • 1
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Can you provide a link to the university class file? Aug 22, 2013 at 6:11
  • Where is this university document class available? We need to be able (or it greatly helps) to set up a minimal working example (MWE) that recreates the problem.
    – Werner
    Aug 22, 2013 at 6:18
  • "Package caption warning: Unsupported document class (or package) detected" is not an error but only a warning.
    – user2574
    Aug 22, 2013 at 7:38
  • The class files are here: math.berkeley.edu/~vojta/ucbthesis/ucbthesis.cls
    – Mike
    Aug 22, 2013 at 13:46
  • It appears that the thesis class file has been updated since the last time I downloaded it. It no longer is based on the 'report' class, but rather the 'memoir' class. Instead, I get the following incompatibility warning: "Class memoir Warning: you are using the caption package with the memoir class. To prepare we will now reset all captioning macros and configurations to kernel defaults, and then let the caption package take over. Please remember to use the caption package interfaces in order to configure your captions."
    – Mike
    Aug 22, 2013 at 14:11

0

Browse other questions tagged .