bug-auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tao Chen] Re: [Bug-AUCTeX] rel-0-9-1; Descriptions after the first


From: David Kastrup
Subject: Re: [Tao Chen] Re: [Bug-AUCTeX] rel-0-9-1; Descriptions after the first figure can't be previewed
Date: Wed, 06 Apr 2005 22:18:19 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Tao Chen <address@hidden> writes:

> David Kastrup wrote:
>
>>Please keep the bug list copied in your replies.  I am forwarding this
>>manually so that the reference remains.
>>
>>With the given document, I fail to get any problem.  So please also
>>post the resulting run log (this is in the buffer you get with C-c
>>C-l).
>>
>>One thing that might be worth noting is that you are using a
>>devastatingly outdated version of AUCTeX that we stopped supporting
>>several years ago.  Whether this is related, I have no idea.  The run
>>log would help in figuring that out, but since it is reasonably easy
>>to upgrade AUCTeX for most Linux distributions (there are ready
>>packages for Debian, Fedora, SuSE and most other systems), I'd
>>recommend doing that, anyway, not just because of preview-latex.  For
>>example, with current versions of AUCTeX, you can use PDFLaTeX easily,
>>even with preview-latex!
>>
> I solved this compilation error for the simple source file finally by
> restarting emacs. It is very strange but it is solved anyway.
>
> However, I am using a class file (IEEEtran.cls) from IEEE (see the
> attachment). If I use that class with the sentence:
> \documentclass[journal]{IEEEtran}
> instead of
> \documentclass[a4paper,11pt]{article}
> , the errors happen again.

Ok, I figured out the problem.  If you remove the
\usepackage{subfigure} in your document, the previews will work fine.
But that is no accident: the log file will (without the subfigure
package) then tell you:

Package preview Warning: Your document class has a bad definition
 of \endfigure, most likely
 address@hidden
 which has now been changed to
 address@hidden
 because otherwise subsequent changes to address@hidden
 (like done by several packages changing float behaviour)
 can't take effect on \endfigure.
 Please complain to your document class author.


Package preview Warning: Your document class has a bad definition
 of \endtable, most likely
 address@hidden
 which has now been changed to
 address@hidden
 because otherwise subsequent changes to address@hidden
 (like done by several packages changing float behaviour)
 can't take effect on \endtable.
 Please complain to your document class author.


Now what happens is that subfigure is _exactly_ such a package that
_does_ such a change.  And that means that subfigure does _not_ work
with IEEEtran.cls which is broken in exactly the way that preview.sty
diagnoses and fixes when you don't load the subfigure package.

Unfortunately, when subfigure changes address@hidden (which fails to
cooperate with the broken float environments of IEEEtran.cls), the
special test that preview.sty does in order to detect and fix such
broken stuff gets fooled, and you don't get the error diagnosis and
applied fix.

I can see no way that preview.sty could patch up, or even reliably
detect the already broken interconnection between subfigure and
IEEEtran.cls at the time that preview.sty gets loaded.

So if you want to have both subfigure.sty and IEEEtran.cls working in
one document, you'll need to perform the patch that preview.sty
proposes in your document manually, like writing
\makeatletter
address@hidden
address@hidden
\makeatother
directly after the \documentclass line.

If you don't do this, subfigure.sty and IEEEtran.cls will _not_ work
properly together, regardless of whether you use preview-latex or not.

Please report this as a bug to the document class maintainers.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum



reply via email to

[Prev in Thread] Current Thread [Next in Thread]