bugtex4ht - Bugs: bug #555, htlatex with \caption[]{}:...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #555: htlatex with \caption[]{}: unwanted content in HTML when using optional argument [BLA]

Submitted by:  Michael Jachan <mjachan>
Submitted on:  Wed Feb 23 08:06:03 2022  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Wed Feb 23 11:58:26 2022, comment #3:

That's good to hear!

One thing I noticed is that when you use uppercase name of the image extension (PNG in your case), normal TeX4ht image handling is not used, and you will get an unnecessary call to Dvipng. It is unrelated to your original problem, but I think you should know about it.

Michal Hoftich <michal_h21>
Project Member
Wed Feb 23 11:04:13 2022, comment #2:

excluding package caption resolves the issue.

For me, the issue is closed.

Thank you:)

Michael Jachan <mjachan>
Wed Feb 23 09:04:51 2022, comment #1:

Hello Michael,

can you please post a full document where this happen? It can be caused by some package. The following MWE works correctly with current TeX4ht:

%%%%%%%%%%%%
\documentclass{article}
\usepackage{graphicx}
% \usepackage{caption}
\begin{document}
\begin{figure}
\includegraphics{FILE.PNG}
\caption[BLA]{real caption}
\end{figure}
\end{document}
%%%%%%%%%%%%

Best,
Michal

Michal Hoftich <michal_h21>
Project Member
Wed Feb 23 08:06:03 2022, original submission:

Hello!

I am setting a figure with caption incl. optional argument, and then, in the HTML, the optional argument is not only placed into the LOF, but BUG: also at the figure itself.

The caption is set in my tex source like:

\begin{figure}
\includegraphics{FILE.PNG}
\caption[BLA]{real caption}
\end{figure}

The figure is set in the HTML like (BUG)

------------
[FILE.PNG]
[BLA]% THE BUG
[real caption]
------------

The raw HTML snippet:

<!--l. 34--><p class="noindent" > <hr class="figure"><div class="figure"

>

<!--l. 34--><p class="noindent" ><img
src="FILE.PNG" alt="PIC"

>

BLA<br /> % HERE IS THE BUG: BLA SHALL NOT BE THERE!
<div class="caption"

Many thanks, Michael :)

Michael Jachan <mjachan>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by michal_h21 (Posted a comment)
  • -unavailable- added by mjachan (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    1 latest change follows.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed Feb 23 11:58:26 2022michal_h21Open/ClosedOpen=>Closed
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray