7

I am a long user of TeXLive on Windows. I recently moved to TL2011 from TL2010 without any problems with the iso file from CTAN. A couple of days ago I updated the TL2011 with the latest updates on CTAN.

I find that subref does not work well with TL2011. If I have the command e.g.

Fig.~\subref*{fig:subfig:P2jeffcott} 

in order to get it as Fig. 1(a) and not Fig 1a, well TL2011 complains. I get an error message:

No file test.aux.
<newjeffcott.eps> <newjeffcott.eps>
! Argument of \@caption has an extra }.
<inserted text> 
            \par 
l.18 ...~\subref*{fig:subfig:P2jeffcott} is cool.}

? 

Process has been terminated ...

I am putting the testfile test.tex and the figure newjeffcott.eps here:

http://petitlien.fr/myfiles

(This will expand to a GMX shared folder)

Note: I do not have any problems with with TL2010 nor TL2008 and nor with the version of TL2011 that came with the iso file on CTAN. The problem arose after I updated my whole TL2011 from CTAN three days back.

Thanks a lot...

1
  • I had the same problem with Tex Live 2012. The solution proposed by @egreg worked perfectly. Commented Aug 29, 2012 at 19:47

1 Answer 1

9

It hasn't to do with the subfig package, but rather with caption. I didn't check the details why this happens, but it's clearly a "fragility" problem.

\protect\subref*{fig:subfig:P2jeffcott}

will do, if the \subref command is used in a moving argument such as a caption. The \protect is not needed in normal text.

2
  • Thanks. It works. Rather strange though that I am getting this behaviour with the updated TL2011. Something must have changed in the process. 1 vote up. Commented Oct 17, 2011 at 13:28
  • I tried with TeX Live 2009 and 2010 and indeed the command works. It must be something introduced with version 3.2 of caption, as subfig is the same in TeX Live 2009, 2010 and 2011 .
    – egreg
    Commented Oct 17, 2011 at 13:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .