When eps files are provided, htlatex from tex4ht automatically converts to png files so that graphic files can be shown in the final html output. However, I use most of the time the pdf graphic file format with pdflatex. Is there any easy way to make htlatex work for pdf graphic files?
|
|
|||
|
|
Try this configuration file:
save it as
|
|||||||||||||||
|
|
Based on michal.h21's answer I have derived a solution that accepts (almost) all image types also accepted by default PDFs are converted to PNG files with a density of 300 dpi. (I couldn't get SVG to work properly with LibreOffice, perhaps Enhanced Metafile or Windows Metafile could work, too, if Microsoft Word is your final target platform.) PNGs and JPEGs are used as they are, for the latter the extension is always The process requires the following configuration file, let's call it
For some reason two runs of
For consistent dimensioning of other
(starting with
If LibreOffice/OpenOffice is your target you need to manually resize each figure to 32% (for 300 dpi pictures). I haven't found an automatic way to do this, a modification of Of course, for this to work on Windows you need to substitute The complete code is at GitHub, however you still might have to use your own copy of tex4ht.env unless you run Ubuntu 12.10 (or later) with a default installation or TeXlive. I have found a very similar GIF support is left as exercise for the reader. |
|||
|
|