[tex4ht] How to make tex4ht process .png files with scale option for \includegraphics?
Radhakrishnan CV
cvr at river-valley.org
Fri Mar 22 09:05:34 CET 2013
On Fri, Mar 22, 2013 at 1:31 PM, Nasser M. Abbasi <nma at 12000.org> wrote:
>
> Is there a way to make tex4ht use .png files and not having
> to covert all the images to .eps?
>
> I am trying to build large latex document with hundreds of
> lines like this:
>
> \documentclass{article}
> \usepackage{graphicx}
> \begin{document}
> ....
> \includegraphics[scale=0.7]{**image_1.png}
> \includegraphics[scale=1]{**image_2.png}
> ...
> \end{document}
>
Need to provide the following either in your custom *.cfg or after
\begin{document} of your document source:
\Configure{graphics*}
{eps}
{\Picture[pict]{\csname Gin at base\endcsname.png
width="\expandafter\the\csname
Gin at req@width\endcsname"
height="\expandafter\the\csname
Gin at req@height\endcsname"
}%
}
You still need to keep *.eps versions of your *.png's since TeX cannot read
*.png files and .eps is meant to find the bounding boxes alone so that your
\includegraphics options work correctly. This way, you can make TeX4ht to
use .png files in your output.
Attached is a small archive, nasser.zip, which contains a test file and
output.
Best
--
Radhakrishnan
River Valley<https://maps.google.com/maps?q=River%20Valley,%20Thiruvananthapuram%20Neyyardam%20Road,%20Kerala,%20India&vector=1>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex4ht/attachments/20130322/70483554/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nasser.zip
Type: application/zip
Size: 48921 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex4ht/attachments/20130322/70483554/attachment-0001.zip>
More information about the tex4ht
mailing list