bugtex4ht - Bugs: bug #514, tex4ht gives error on code that...

 
 
Show feedback again

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

bug #514: tex4ht gives error on code that compiles OK with lualatex

Submitted by:  Nasser M. Abbasi <nma123>
Submitted on:  Sun Jun 13 02:44:08 2021  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Sun Jun 13 13:15:38 2021, comment #1:

I've posted my answer on TeX.sx and fixed this issue in TeX4ht sources. The issue is that some commands cause errors when used in \caption and \section commands, so you can either use \protect, or \fixmathjaxtoc macro.

Michal Hoftich <michal_h21>
Project Member
Sun Jun 13 02:44:08 2021, original submission:

reference and images

https://tex.stackexchange.com/questions/601030/tex4ht-in-tl-2021-gives-error-on-code-that-compiles-ok-with-lualatex

Here is a MWE to reproduce it

============================
\documentclass[12pt]{article}
\usepackage{graphicx}
\begin{document}
The following is plot of solution

\begin{figure}[h]
\centering
\includegraphics[scale=0.45]{example-image}
\caption{$\displaystyle {y \left(x \right) = -\frac{\left(\left(\left\{\begin{array}{cc}
{\mathrm e}^{-2 x} & x \le 1
\\
{\mathrm e}^{-2} & 1<x
\end{array}\right.\right)-7\right) {\mathrm e}^{2 x}}{2}}$
}
\end{figure}
\end{document}
=================

The above compiles OK with lualatex

The same file in tex4ht gives this error in TL 2021

(/usr/local/texlive/2021/texmf-dist/tex/generic/tex4ht/html4-math.4ht)
(/usr/local/texlive/2021/texmf-dist/tex/generic/tex4ht/html5.4ht)) (./foo3.aux)
[1] [2]
l.16 --- TeX4ht warning --- File `"example-image.xbb"' not found ---
l.16 --- TeX4ht warning --- Cannot determine size of graphic in "example-image.
xbb" (no BoundingBox) ---
! Argument of \im:g has an extra }.
<inserted text>
\par
l.22 }

?

This is on Linux.

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):

     

     

    2 latest changes follow.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed Jun 30 13:09:03 2021michal_h21Open/ClosedOpen=>Closed
    Wed Jun 30 11:34:35 2021michal_h21StatusNone=>Fixed
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray