# [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 10:21:44 CEST 2015

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>}}
\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
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8626953959465027, "perplexity": 9624.723568006668}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-33/segments/1659882571232.43/warc/CC-MAIN-20220811012302-20220811042302-00376.warc.gz"}