Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I've been just reading through this Latex wikibook and I spotted they advocate use of \subfloat in figures. I've always used \subfigure.
What is the difference?

share|improve this question

2 Answers 2

up vote 20 down vote accepted

\subfigure belongs to the obsolete package with the name subfigure. It's still supported in the newer subfig package because of backward compatibility. I recommend to use \subfloat.

subfig should be preferref to subfigure, that's why the command \subfigure is not needed. Though it's available if you load the configuration altsf.cfg. It defines simply

\@ifundefined{c@subfigure}{\newsubfloat{figure}}{}
\def\subfigure{\subfloat}
\@ifundefined{c@subtable}{\newsubfloat{table}}{}
\def\subtable{\subfloat}

and further options for captions.

share|improve this answer
    
I remember seeing some discussion about subfigure not being obsolete and subfig no maintainer. Anyone has further details on this? –  Leo Liu Aug 18 '10 at 18:17
    
Vafa Khalighi is the new mainainer of subfig. –  Stefan Kottwitz Aug 18 '10 at 18:52
    
@Leo: From the abstract of the subfig documentation: "The subfig package ... replaces the older subfigure package." –  TH. Feb 28 '11 at 18:18

Note that you might prefer subfig to subfloat if wanting to use tocloft (*) to configure your TOC, LOF and LOT look and feel.

In which case, for example,

\@ifpackageloaded{subfig}
  {\usepackage[subfigure,...]{tocloft}}
  {\usepackage[...]{tocloft}}
\renewcommand{\cftchappresnum}{...}
...
\@ifpackageloaded{subfig}{\renewcommand{\cftsubfigpresnum}{...}}{}
...
\renewcommand{\cftchappagefont}{...}
...
\@ifpackageloaded{subfig}{\renewcommand{\cftsubfigpagefont}{...}}{}

(*) I'm sure tocloft's Current Maintainer could provide the canonicals should anyone want to ask.

share|improve this answer
    
Err, just because I'm the maintainer doesn't mean I always know stuff like this :) I took over the package for continuity, not because I know its internals inside out! –  Will Robertson Aug 20 '10 at 15:41
    
Ha ha, Will, I know you're cleverer by far! :)) –  Geoffrey Jones Aug 20 '10 at 21:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.