18.4 subfigure.sty

Defines a command ‘\externaldocument’ for importing exterla aux files from foreugn sources. Should be called after \Preamble, and before \begin{document}.

<..subfigure.4ht..>
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % subfigure.4ht                        2014-07-12-22:36 %
 % Copyright (C) 1997--2009      Eitan M. Gurari         %
 <.TeX4ht copyright.>
 \ifx\subfig@oldlabel\relax
    <.2002 subfigure.>
 \else
    <.pre 2002 subfigure.>
 \fi
 <.fix subfigure.>
 <.subfigure.sty shared config.>
 \Hinput{subfigure}
 \endinput
 -_-_-

<..pre 2002 subfigure..>
 \def\:tempc{%
   \begingroup   \gHAdvance\TitleCount 1
     \let\begingroup=\empty
     \let\:tempa=\xdef
     \def\xdef{\let\xdef=\:tempa
        \def\protect{\string}\xdef}\o:@subcaption:}
 \HLet\@subcaption=\:tempc
 -_-_-

<..2002 subfigure????..>
 \def\:tempc{\gHAdvance\TitleCount 1 \o:@subcaption:}
 \HLet\@subcaption=\:tempc
 -_-_-

The above breaks the following example.

\documentclass{book} 
 \usepackage{subfigure} 
\begin{document} 
  \tableofcontents 
  \listoffigures 
\chapter{Beginning.} 
\section{Introduction} 
 
\begin{figure}[H] 
   \subfigure{yyyyyyyyy} 
   \caption{cccccccccccc} 
\end{figure} 
 
\section{Next try} 
\chapter{Next one.} 
\section{Next Section} 
\section{Another section} 
 
\end{document} 

<..pre 2002 subfigure..>+
 \def\:tempc#1[#2]#3{\a:subfigure
       \o:@subfloat:{#1}[#2]{\cur:lbl{}#3}\b:subfigure}
 \HLet\@subfloat=\:tempc
 -_-_-

<..2002 subfigure..>
 \def\:tempc#1[#2][#3]#4{\a:subfigure \cur:lbl{}%
    \o:@subfloat:{#1}[#2][#3]{#4}\b:subfigure}
 \HLet\@subfloat=\:tempc
 -_-_-

Had to remove ‘\Link{}{\cur:th \:currentlabel}\EndLink’ above after ‘#3’ to avoide duplicate <a id=...> elements:

\documentclass{article} 
\usepackage{subfigure} 
\usepackage{graphicx} 
\begin{document} 
\begin{figure} 
\subfigure[curve]{\includegraphics{cube.eps}} 
\end{figure} 
\end{document} 

<..fix subfigure..>
 \NewConfigure{subfigure}{2}
 \def\:tempc#1#2{\o:@makesubfigurecaption:{%
    \pend:def\thesubfigure{\a:subfigurecaption}%
    \append:def\thesubfigure{\b:subfigurecaption}%
    \pend:def\thesubtable{\a:subfigurecaption}%
    \append:def\thesubtable{\b:subfigurecaption}%
    #1}{\c:subfigurecaption#2\d:subfigurecaption}}
 \HLet\@makesubfigurecaption=\:tempc
 \NewConfigure{subfigurecaption}{4}
 -_-_-

<..fix subfigure..>+
 \def\:tempc{\gHAdvance\TitleCount 1 \o:subfig@oldcaption:}
 \HLet\subfig@oldcaption\:tempc
 -_-_-

Was

\def\:tempc{\gHAdvance\TitleCount 1 \o:@caption:} 
\HLet\@caption\:tempc 

which failed on

\documentclass{article} 
\usepackage{makeidx} 
% try to comment out this ... 
\usepackage{subfigure} 
 
% ... and this. 
\makeindex 
 
\begin{document} 
 
% try placing the \index-statement outside of the caption. 
\begin{figure} 
Foo 
\caption{Bar\index{ka!boom} 
} 
\end{figure} 
\printindex 
\end{document}