Another chemcompounds package related question. Also maybe related to my first question relative to chemcompound and subfloat comportement here
So my question is how to avoid chemcompounds to scan from the beginning of the document that is the listoffigures ? Because I guess it is the case :
an example
If I have a compound that appears in position 3 in the tex normaly but that is refered in the listoffigures because present in the caption before than it will appear as in firts position ... An example is allways better (here with Axel Sommerfeldt patch for subcaption corretc numbering)
\documentclass{article}
\usepackage{graphics}
\usepackage{subfig}
\usepackage{caption}
\usepackage{chemcompounds}
% Patch: Make \compound work inside (figure & table) captions
% Not neccessary for caption package version >= 3.2, but will not make any harm
\makeatletter
\let\caption@prepareslc@ORI\caption@prepareslc
\renewcommand\caption@prepareslc{%
\let\caption@g@stepcounter\stepcounter
\caption@prepareslc@ORI
\let\compound@ORI\compound
\def\compound{\let\stepcounter\caption@g@stepcounter\compound@ORI}%
}
\makeatother
\begin{document}
\listoffigures
\begin{figure}[!ht]
\captionsetup[subfigure]{labelformat=empty}
\centering
\subfloat[\compound{wikoA}]{\rule{3cm}{2cm}}\quad
\subfloat[\compound{wikoB}]{\rule{3cm}{2cm}}
\caption{Wiko A and B}
\label{wikoAandB}
\end{figure}
Here are Wiko A \compound{wikoA} and B \compound{wikoB} see fig.\ref{wikoAandB}
Of course Wiko C and D are present \compound{wikoC,wikoD}
As well as Wiko E and F \compound{wikoE,wikoF} that you can see below. See fig. \ref{wikoEandF}
\begin{figure}[!ht]
\captionsetup[subfigure]{labelformat=empty}
\centering
\subfloat[\compound{wikoE}]{\rule{3cm}{2cm}}\quad
\subfloat[\compound{wikoF}]{\rule{3cm}{2cm}}
\caption{Wiko E (\compound{wikoE}) and F (\compound{wikoF})}
\label{wikoEandF}
\end{figure}
\end{document}