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 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...

share|improve this question
    
I had the same problem with Tex Live 2012. The solution proposed by @egreg worked perfectly. –  Felipe Aguirre Aug 29 '12 at 19:47

1 Answer 1

up vote 8 down vote accepted

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.

share|improve this answer
    
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. –  yCalleecharan Oct 17 '11 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 Oct 17 '11 at 13:42

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.