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

Nasser M. Abbasi nma at 12000.org
Mon Jul 27 02:11:46 CEST 2015


On 7/26/2015 1:46 PM, Michal Hoftich wrote:
> Hi all,
>
> I am back from vacation :)
>

Welcome back. Please do not take long vacations, We need you here :)

>
> The problem is in the .cfg file, I am not sure why it showed only in
> current TL.

I do not know. I was copying using magic code for this part
of the .cfg as you showed it from

http://tex.stackexchange.com/questions/195410/setting-image-size-using-em-units-instead-of-pt
and
http://tex.stackexchange.com/questions/255826/htlatex-and-subfigures

>If you look at generated html, you can see for instance
> this:
>
> style="width:6.14333.95em;"
>
> The issue with division in \CalcRem:
>
> \newcommand\CalcRem[1]{\strip at pt\dimexpr(#1)/\emwidth}
>
> \emwidth is being set to \f at size, which is in this case 10.95pt. 10 is
> used in division and .95 is appended to the result, which leads to
> incorrect numbers such as 6.14333.95. While it may be possible to
> involve some macro to round the \emwidth, it is easier to define it
> directly with desired value:
>
> \newcommand\emwidth{11}
>

I am still little confused. So you want just me to replace

\newcommand\emwidth{16} ----> this line
   \let\emwidth\f at size
   % convert pt to rem
   \newcommand\CalcRem[1]{\strip at pt\dimexpr(#1)/\emwidth}


With

\newcommand\emwidth{11} ----> to this line?
\let\emwidth\f at size
% convert pt to rem
\newcommand\CalcRem[1]{\strip at pt\dimexpr(#1)/\emwidth}

? Will this works for any document size also? 11 pt. 10 pt, 12 pt?
or is it not related.

Ok, I will go ahead now and try it and see how it works out and
this will can resizing to work.

>> I know the earlier setup used to work. (else my whole document was
>> wrong) But the new setup works, and I verified it.
>> one just needs to make .eps file in addition.
>
> it seems little bit overcomplicated to me :)
>

If I can avoid making .eps, that will be better ofocurse, less disk
space for starter. If the above fix works, will update my cheat cheat
again.

Thanks for your help Michal.

--Nasser


More information about the tex4ht mailing list