[tex4ht] graphics Images no longer resize in TL 2015 with tex4ht, need help finding why

Nasser M. Abbasi nma at 12000.org
Wed Jul 22 22:49:03 CEST 2015


Update:

I gave up trying to find why the pure svg method does not resize
with tex4ht anymore. So I rewrote a new detailed instructions
based on using eps files to obtain the bounding box as
suggested by CVR in

http://comments.gmane.org/gmane.comp.tex.tex4ht/1030

This method works well and all images are resized and are
still in SVG in the page, so they look good at different
resolution. (the page below was build using this method)

http://12000.org/my_notes/faq/LATEX/layout/index.htm

I kept the old method instruction on the page for
reference, but it does not work on TL 2015.

Using the eps method only requires one to make an eps file
from each pdf file. This is basically the only extra step needed.
But all of this can be automated using makefiles so it
is not a problem.

--Nasser

On 7/22/2015 3:21 AM, Nasser M. Abbasi wrote:
> Spend 6 hrs on this and I gave up. For some reason, the images
> no longer resize in the web pages as before. This
> used to work.
>
> I made earlier a small document that describes this
> resizing method here (layout)
>
> http://12000.org/my_notes/faq/LATEX/layout/index.htm
>
> But when I tried this method now, I found that the images
> do not resize anymore ! Something changed and I can't find
> what. I used to use 32 bit TL 2014 before. Now I am on
> 64 bit Linux and TL 2015.
>
> I show the steps I did below, which is the same as in the layout
> document, and I also put everything in one zip file at :
>
> http://12000.org/tmp/072215/image_do_not_resize.zip
>
> Here is MWE:
> -------------------------------------
> \documentclass[11pt,notitlepage]{article}%
> \usepackage{graphicx}
> \begin{document}
> \includegraphics[width=0.1\paperwidth]{1_pic}
> \includegraphics[width=0.2\paperwidth]{1_pic}
> \includegraphics[width=0.3\paperwidth]{1_pic}
> \includegraphics[width=0.4\paperwidth]{1_pic}
> \end{document}
> --------------------------------------
>
> The folder contains 1_pic.pdf and 1_pic.svg. The SVG image
> was obtained _from_ the pdf file using
>
> pdfcrop --margins 10 --clip 1_pic.pdf 1_pic.pdf
> pdf2svg 1_pic.pdf 1_pic.svg
>
> The command used to compile is:
>
> make4ht -u -c nma.cfg foo.tex "htm,pic-align,notoc*"
> I also tried
> htlatex foo.tex "nma,htm,pic-align,notoc*"
>
> the nma.cfg is :
>
> -----------------
> \Preamble{ext=htm,charset="utf-8",p-width,pic-align}
> \Configure{VERSION}{}
> \Configure{DOCTYPE}{\HCode{<!DOCTYPE html>\Hnewline}}
> \Configure{HTML}{\HCode{<html>\Hnewline}}{\HCode{\Hnewline</html>}}
> \Configure{@HEAD}{}
> \Configure{@HEAD}{\HCode{<meta charset="utf-8"/>\Hnewline}}
> \begin{document}
> \DeclareGraphicsExtensions{.svg,.png}
> \Configure{Picture}{.svg}
> \makeatletter
> % Various helper functions
> % default font size
> \newcommand\emwidth{16}
> \let\emwidth\f at size
> % convert pt to rem
> \newcommand\CalcRem[1]{\strip at pt\dimexpr(#1)/\emwidth}
>     \Configure{graphics*}
>            {svg}
>             {\Picture[pict]{\csname Gin at base\endcsname.svg
>             \space style="width:\CalcRem{\Gin at req@width}em;"
>             }%
>             \special{t4ht+ at File: \csname Gin at base\endcsname.svg}%
>            }
> \makeatother
> \EndPreamble
> ------------------------------
>
> All of the above, is exactly what is described in my layout document.
>
> But the images come out all the same size. Which is not what is supposed
> to happen. I do not want to use natural sizes. I use [width=0.7\paperwidth]{image}
> and such for all the images.
>
> Could someone please try this and see if they get different image sizes?
> Simply unzip the folder, and just type the compile command and see if
> you get different size images.
>
> I am using TL 2015, 64 bit, on Linux mint 7.2, 64 bits.
>
> thank you,
> --Nasser
>
>
>
>
>



More information about the tex4ht mailing list