bugtex4ht - Bugs: bug #587, tex4ht fails on including image...

 
 
Show feedback again

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

bug #587: tex4ht fails on including image with math in caption after loading hyperref package

Submitted by:  Nasser M. Abbasi <nma123>
Submitted on:  Sun Dec 25 03:16:52 2022  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Mon Dec 26 10:39:04 2022, comment #1:

Hi Nasser, thanks for the report. I've fixed this in TeX4ht sources, and posted an explanation to TeX.sx. In short, the problem was that \begin and \end as redefined were not robust commands. This should be fixed now.

Michal Hoftich <michal_h21>
Project Member
Sun Dec 25 03:16:52 2022, original submission:

reference

https://tex.stackexchange.com/questions/669581/tex4ht-fails-on-including-image-with-math-in-caption-after-loading-hyperref-pack

his MWE compiles OK with lualatex but fails in tex4ht once hyperref is added.

-------------------------------------------
\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{hyperref}

\begin{document}

\begin{figure}
\includegraphics[width=0.5\textwidth]{example-image-a}
\caption{Phase plot $y^{\prime \prime}\left(t \right)+9 y \left(t \right)-\left(\left\{\begin{array}{cc}
8 \sin \left(t \right) & 0<t <\pi
\\

  1. & \pi <t

\end{array}\right.\right) = 0$}
\end{figure}

\end{document}
----------------------------

And now

make4ht -ulm default -a debug foo.tex "mathjax,htm"
gives

/usr/local/texlive/2022/texmf-dist/tex/generic/tex4ht/html5.4ht))
(/usr/local/texlive/2022/texmf-dist/tex/latex/l3backend/l3backend-dvips.def)
(./foo.aux) (/usr/local/texlive/2022/texmf-dist/tex/latex/base/ts1cmr.fd)
[1] [2]
l.9 --- TeX4ht warning --- File `"example-image-a.xbb"' not found ---
l.9 --- TeX4ht warning --- Cannot determine size of graphic in "example-image-a
.xbb" (no BoundingBox) ---
! Undefined control sequence.
<argument> \EndPicture

l.14 \end{array}\right.\right) = 0$}

?

Removing hyperref it compiles clean. (ps. I used test image above so it can compile as is).

Is there a workaround for this?

TL 2022 on Linux

Thank you,
--Nasser

Nasser M. Abbasi <nma123>

 

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 nma123 (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
    Tue Jan 10 15:09:33 2023michal_h21Open/ClosedOpen=>Closed
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray