[tex4ht] Question on using .cfg and \DeclareGraphicsExtensions

Nasser M. Abbasi nma at 12000.org
Wed Oct 10 21:01:29 CEST 2018


Hello;

In my tex4ht .cfg file, which I use for all the builds, it
has the following

--------------------
\RequirePackage{mathjax-latex-4ht}
\Preamble{xhtml}
\DeclareGraphicsExtensions{.svg,.png}
\Configure{Picture}{.svg}
etc....
---------------------

The use of \DeclareGraphicsExtensions{.svg,.png} is needed
to allow the code below it to work.

The above works well, as long as I make sure to
add

\usepackage{graphicx}

in each Latex file which is being compiled by make4ht,
otherwise will get an error

! Undefined control sequence.
l.4 \DeclareGraphicsExtensions

So in all my latex files, I include the graphics package
even though it might not be used, just to avoid this error.

Is there a way around this? I can't include the graphics
package itself in the .cfg, and I need to use the
command \DeclareGraphicsExtensions in .cfg file.

If you like to see the full .cfg I am using
and the full commands, they are listed here

https://www.12000.org/my_notes/faq/LATEX/htch4.htm#x5-680004.1

Thanks
--Nasser




More information about the tex4ht mailing list