[tex4ht] [bug #257] \includegraphics fails with LuaLaTeX backend

Michal Hoftich michal.h21 at gmail.com
Tue Jul 14 22:11:00 CEST 2015


                 Summary: \includegraphics fails with LuaLaTeX backend
                 Project: tex4ht
            Submitted by: michal_h21
            Submitted on: Tue 14 Jul 2015 11:11:00 PM EEST
                Category: None
                Priority: 5 - Normal
                Severity: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any



This is an crosspost from http://tex.stackexchange.com/q/255220/2891. The
problem shows when we try to include some image in format which is not
supported in dvi mode: 



It turns out that graphicx package tries to find the bounding box of the
image. It tries that by reading the image data. But because images are binary,
this cause LuaLaTeX to complain about incorrect utf8 value. It easily exceeds
100 errors and the document fails to compile.

David Carlisle proposed a solution using \DeclareGraphicsRule:


with this code, images aren't parsed for the bounding box, but .xbb files are
used instead. They can be created using 

    ebb -x imagename

This solution fixes also behavior with normal LaTeX, as bounding boxes weren't
loaded with it as well. 

More details are provided in my answer to the question on TeX.sx

Patch for literate sources is attached.


File Attachments:

Date: Tue 14 Jul 2015 11:11:00 PM EEST  Name: graphicx.patch  Size: 412B   By:



Reply to this item at:


  Message sent via/by Puszcza

More information about the tex4ht mailing list