Document ClassesCaption Package Problem (Miktek >2.5)

Information and discussion about specific document classes and how to create your own document classes.
kaini
Posts: 7
Joined: Sat May 03, 2008 10:18 pm

Caption Package Problem (Miktek >2.5)

Post by kaini »

Hi,

I recently updated to Miktek 2.7 (from version 2.5) and have run into an issue using the Caption package - when I try and build my document I get the following error.

! Undefined control sequence.
<argument> ...o }{}\caption@clearsubcontentslines
\g@addto@macro \caption@ty...
1.739 ...Document{\caption@checksubcontentslines}}

! Package caption Error : Something's wrong--perhaps a missing \caption in the last figure or table

I get the error even if I just use an almost empty .tex file i.e. I am figuring it is an issue relating to the style file rather than any of the actual tex files.

Anyone seen this? Anyone got any ideas?? I have googled for solutions/clues without success and am hoping someone will be able to offer a few clues.

Like I say, the document still compiles under MikTek 2.5 (colleague just confirmed this on his XP machine) but I am dealing with a Vista32 machine with a virgin install of MikTek (with all the updates run etc).

Cheers!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10319
Joined: Mon Mar 10, 2008 9:44 pm

Re: Caption Package Problem (Miktek >2.5)

Post by Stefan Kottwitz »

Hi kaini,

welcome to the LaTeX Community board!
Verify if you are using an up-to-date version of the caption package, the latest version is 2008/04/01 v3.1h. \caption@clearsubcontentslines is defined inside caption.sty.

Stefan
LaTeX.org admin
kaini
Posts: 7
Joined: Sat May 03, 2008 10:18 pm

Re: Caption Package Problem (Miktek >2.5)

Post by kaini »

Hi,

Thanks for the prompt reply - just checked the date of the package - package is dated 15/04/2008 on the Package browser - looking at the headers in the caption.sty files it is dated 01/04/2008 v3.1h. So, I think I am using the latest.

Any other ideas?

:-)
User avatar
Stefan Kottwitz
Site Admin
Posts: 10319
Joined: Mon Mar 10, 2008 9:44 pm

Re: Caption Package Problem (Miktek >2.5)

Post by Stefan Kottwitz »

Hi kaini,

could you post your logfile as attachment? Perhaps we get an idea by reading it looking for errors, warnings, messages.

Stefan
LaTeX.org admin
kaini
Posts: 7
Joined: Sat May 03, 2008 10:18 pm

Re: Caption Package Problem (Miktek >2.5)

Post by kaini »

Hi again,

Logfile attached as requested (just one note: I have just been trying MikTek 2.6 to see if it was any different from 2.7 - hence the notes in logfile which reference 2.6 - behaviour with 2.7 is identical).

Many thanks
Attachments
logfile.txt.log
(10.51 KiB) Downloaded 383 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10319
Joined: Mon Mar 10, 2008 9:44 pm

Re: Caption Package Problem (Miktek >2.5)

Post by Stefan Kottwitz »

I've read the logfile but it's still enigmatic because that control sequence should be defined. I've seen you use the subfigure package, that package is outdated an not well supported by caption. As the error message concerns commands dealing with subcaptions, it may be worth a try to compile it without loading subfigure.

Stefan
LaTeX.org admin
kaini
Posts: 7
Joined: Sat May 03, 2008 10:18 pm

Re: Caption Package Problem (Miktek >2.5)

Post by kaini »

Hi Stefan,

Thanks for the continued help - have commented out the subfigure package as you suggest and still have the same issue - log file attached again.

Hope you are not running out of ideas; as I have to confess I have ;-)

Cheers
Attachments
log.txt.log
(9.86 KiB) Downloaded 370 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10319
Joined: Mon Mar 10, 2008 9:44 pm

Caption Package Problem (Miktek >2.5)

Post by Stefan Kottwitz »

Could you post a minimal working example (with your preamble) that produces this error and is compilable? I would test it with my LaTeX installation.

Stefan
LaTeX.org admin
kaini
Posts: 7
Joined: Sat May 03, 2008 10:18 pm

Re: Caption Package Problem (Miktek >2.5)

Post by kaini »

Hi,

Have attached essentially an empty tex top level - and associated style file - this combination still causes the issue we have been discussing.

Cheers
Attachments
ISLIthesis-v1.cls
(16.28 KiB) Downloaded 413 times
MWE.tex
(3.35 KiB) Downloaded 394 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10319
Joined: Mon Mar 10, 2008 9:44 pm

Caption Package Problem (Miktek >2.5)

Post by Stefan Kottwitz »

Hi kaini,

I've found the problem. It's caused inside the class file ISLIthesis-v1.cls: line 198/199:

Code: Select all

\AtBeginDocument{
  \RequirePackage[hang]{caption}
caption should be loaded before \begin{document}. Just move this line 199 to the end of the class file or remove it and load caption with \usepackage inside your document.

Stefan
LaTeX.org admin
Post Reply