[tex4ht] why can't this one line in pgfsys-tex4ht.def be corrected after so many years?

Nasser M. Abbasi nma at 12000.org
Sun Apr 1 00:27:50 CEST 2018

On 3/31/2018 11:14 AM, Michal Hoftich wrote:
> Hi Nasser,
>> THis issue is known since June 2014.
>> Is there any technical reason why this one line can't be changed after
>> almost 4 years?
> This file is distributed with TikZ, we cannot fix it ourselves. Maybe
> the issue in their issue tracker is too old and the new messages here
> aren't visible. So you can try to post a new issue on TikZ tracker.
> Btw., I personally think that it is much better to use externalization
> [1] or Dvisvgm driver for TikZ [2], the quality of results is much
> higher.
> Best regards,
> Michal
> [1] https://tex.stackexchange.com/a/158921/2891
> [2] https://tex.stackexchange.com/a/386775/2891

I read your post before, many times, but I do not understand
it. I do not understand how to use it and where and to replace
what with it. I am taking about the second part of your
post under "Edit 2017/11/11.". i.e. where you show
the file pgfsys-tex4ht.def. But what is one supposed to
do with this file? What do I need to change in
my current setup to use it?

First, I do not use tikz at all. But I tell tex4ht to
use svg for math instead of png.  To do this, I use in
my config file, what you suggested before

\newcommand\CalcRem[1]{\strip at pt\dimexpr(#1)/\emwidth}
              {\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}

Then in main.mk4, I use also what you supplied

Make:add("dvisvgm","dvisvgm -n --exact -c 1.285,1.285 -p 1- ${input}.idv")
Make:htlatex {packages = "\\RequirePackage[dvipdfmx]{graphicx}"}

Then compile using

make4ht -u -c my.cfg -e main.mk4 index.tex "htm,pic-align,notoc*"

The above works for me now. This is what I've been using
for years now.

So is your post above doing something different than what
I am now using? Would it do better math than the above?

If so, can you please explain the big picture on how to
use what you suggested under "Edit 2017/11/11."? It might
all be clear to you, since you are an expert, but for us
normal users, things needs to be spelled out.

Just saying use this file and that file can be confusing
to users. Since it does not tell one what to change and where
in their current set up to do so.

If you can provide a complete setup document, including
what main.mk4 is needed, what .cfg file is needed, where
to put which files where, etc.. what make4ht compile
options to use with it, that will be very helpfull.

So For now, I will continue to use the setup I have, as
I describe it


Since that works.  If there is better setup, I will change
to it. But I need to see the big picture to understand it
first.   I also tried the command

    make4ht foo.tex "svg"

And produced bad looking math, which I remember you said
it works for you well. So there are other parts to the
story in making this command works which I am missing.


More information about the tex4ht mailing list