Re: [tex4ht] Problems generating svg when tikz is involved with tex4ht

2023-10-24 Thread Nasser M. Abbasi

On 10/24/2023 6:06 AM, Michal Hoftich wrote:


I cannot reproduce these issues, both at work and at home, but I don't
think it is caused by Dvisvgm. Two things that you can try is to
remove the "htm" option, because it seems to produce strange image
filenames, and also the up-to-date driver from here:
https://github.com/michal-h21/dvisvgm4ht

Best,
Michal


Thanks for checking. some update: using your new driver


pwd

/mnt/g/public_html/styles/texmf/tex/generic/dvisvgm4ht

ls -lrt

total 28
-rwxrwxrwx 1 me autologin  2857 Oct 24 15:28 README.md
-rwxrwxrwx 1 me autologin  2569 Oct 24 15:28 pgfsys-dvisvgm4ht.def
-rwxrwxrwx 1 me autologin 17762 Oct 24 15:28 pgfsys-tex4ht-updated.def




Now the HTML shows the tikz shapes. But all the text is missing.
i.e. for this MWE

---
\documentclass[12pt]{article}
\ifdefined\HCode
  \def\pgfsysdriver{pgfsys-tex4ht-updated.def}
\fi
\usepackage{amsmath}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
\node at (0,0) [circle, fill=yellow, inner sep=1pt] { some text};
\end{tikzpicture}

after tikz
\end{document}
---

Compiled using

make4ht --shell-escape -ulm default -a debug foo3.tex 'mathjax,htm'

The generated html shows now the yellow circle. But "some text" is missing.

Ofcourse the pdf show the text in the tikz picture.

I tried with htm and without and tried with mathjax and without.
All math and text are missing from the tikzpicture in the .svg file generated.


which make4ht

/usr/local/texlive/2023/bin/x86_64-linux/make4ht

make4ht --version

make4ht version v0.3m

I've put a new zip file that includes all the above MWE with
all files generated in this folder

https://12000.org/tmp/oct_23_2023/

The zip file is

   tikz_problem_with_tex4ht_v2.zip

So some progress is made by using make4ht updated driver. But the
question now is why no labels and no text show up for me.

But if all else fails, I can generate images for the tikzpics
and includes this as graphics for HTML.

Thanks
--Nasser



Re: [tex4ht] Problems generating svg when tikz is involved with tex4ht

2023-10-24 Thread Michal Hoftich
Hi Nasser,


> Fyi;
> I do not know if this is dvisvgm issue or not. But on TL 2023 it says
>
> >which dvisvgm
> /usr/local/texlive/2023/bin/x86_64-linux/dvisvgm
> >dvisvgm --version
> dvisvgm 3.0.3
>
> But current version is supposed to be
>
> https://dvisvgm.de/Downloads/
>
> 3.1.2  and on my Linux Manjaro, I could if I want install dvisvgm 3.1.1.1
> according to the packag manager. But I have not done so yet, so still
> using the one that comes with TL 2023.
>
> I could try to install 3.1.1.1 and see if this makes any difference
> or not.


I cannot reproduce these issues, both at work and at home, but I don't
think it is caused by Dvisvgm. Two things that you can try is to
remove the "htm" option, because it seems to produce strange image
filenames, and also the up-to-date driver from here:
https://github.com/michal-h21/dvisvgm4ht

Best,
Michal


Re: [tex4ht] Problems generating svg when tikz is involved with tex4ht

2023-10-24 Thread Nasser M. Abbasi

Fyi;
I do not know if this is dvisvgm issue or not. But on TL 2023 it says


which dvisvgm

/usr/local/texlive/2023/bin/x86_64-linux/dvisvgm

dvisvgm --version

dvisvgm 3.0.3

But current version is supposed to be

https://dvisvgm.de/Downloads/

3.1.2  and on my Linux Manjaro, I could if I want install dvisvgm 3.1.1.1
according to the packag manager. But I have not done so yet, so still
using the one that comes with TL 2023.

I could try to install 3.1.1.1 and see if this makes any difference
or not.

--Nasser

On 10/24/2023 12:51 AM, Nasser M. Abbasi wrote:

I've been having problems with TL 2023 using tex4ht when
tikz is involved.

The svg images generated are bad according to the browsers.

Here is a MWE taken from 4 years old answer

https://tex.stackexchange.com/questions/488733/what-is-current-status-of-using-tikz-with-tex4ht

When compiling the above code using the command

   make4ht --shell-escape -ulm default -a debug foo3.tex 'mathjax,htm'

The output is all mangled and does not display right.

I've put a zip file with everything in it in this folder

https://12000.org/tmp/oct_23_2023/

The zip file is called tikz_problem_with_tex4ht.zip

The tex file is exactly the same from the answer above and
is inside the zip file. Here it is again:

-
\documentclass[12pt]{article}
% it makes no difference to comment or not
%\ifdefined\HCode
%   \def\pgfsysdriver{pgfsys-dvisvgm4ht.def}
%\fi

\usepackage{tikz}
\usepackage{amsmath}
\begin{document}

\begin{tikzpicture}
\coordinate[label =above:$0$,   label =below:{$u=0$}] (A) at (0,0);
\coordinate[label =above:$\pi$, label =below:{$u_x=0$}] (B) at (4,0);

\draw (A) -- node[above] {$u_t = k u_{xx} $}  node[below] {$f(x)$} ++ (B);

\node at (A)[circle,fill,inner sep=1pt]{};
\node at (B)[circle,fill,inner sep=1pt]{};

\end{tikzpicture}
\end{document}
---

Could someone please try to compile it and see if they get same
problem? May be there is a problem on my Linux?

Also when I open one svg image generated it says at the top

--
The old, written in PostScript, PDF interpreter has been removed entirely.
You should cease using -dNEWDPF as it has no effect n
-

And when I click on the image the browser says

--
This page contains the following errors:
error on line 1 at column 1: Document is empty
Below is a rendering of the page up to the first error.
--

I am on Linux, on Virtual box. Using TL 2023 updated 2 days ago.

I've asked what I think is related to this problem here



With same bad display from bad svg images. Because the indent lines in
the above package uses tikz.

But Michal is not able to reproduce it on his computer.

Any suggestion what else to try?

Thanks
--Nasser