shiblon / latex-makefile

A Makefile for LaTeX - drop it in, type make, and magic happens.
Other
185 stars 30 forks source link

caption.sty error: labeldelim undefined #129

Closed shiblon closed 8 years ago

shiblon commented 8 years ago

Originally reported on Google Code with ID 116

Latex custom class, provided in http://code.google.com/p/italus/, for academic thesis
production employs the caption.sty package.

Up to latex-makefile-2.2.0-rc6 there was no problem with the caption.sty package. I
am using Linux Ubuntu 10.04 with the standard latex packages (installed through the
apt-get system).

The attached file contains all the class and packages, as well example latex files.
Simply extract and run make to see the problem. Also within this file is the makefile
for the rc6 release (file Makefile_rc6), which reports no problem and builds the final
pdf correctly. It also includes a custom Makefile.ini to work with this example.

Reported by carbrevi on 2011-03-02 19:21:35


shiblon commented 8 years ago
The error is present whether using Makefile rc6 or not.  The bug is in rc6, which was
failing to stop when there was a legitimate error.

So, labeldelim being undefined is still a problem.  Note that when rc6 built your file,
it failed to handle the bibliography correctly or to build a correct document in general.
 That's why the error is reported correctly in more recent revisions of the makefile,
and you'll have to fix it if you want your document to build properly.

You'll note that just running

pdflatex ExemploTeseITA

Causes an error to be given, and compilation cannot proceed.  That is not the fault
of the makefile, but of the document.

The problem is that in ita.cls, the caption package is used with the option

[labeldelim=\ --]

But the caption package does not understand that option (it is deprecated).  So, instead
of using labeldelim, you'll need to edit the .cls file to use a combination of 

\DeclareCaptionLabelFormat{myformat}{#1 --#2}

Then, inside of your figure environment, or wherever you define a caption, you would
use

\captionsetup{myformat}

So, the way to fix the ita.cls file is included in the attached patch, which defines
a "dashlabel" labelformat, which you can use with \captionsetup{dashlabel}.  I hope
it helps.

Reported by shiblon on 2011-03-15 14:29:55