I've got a report that code in this answer of mine stopped working correctly. Two TikZ ornaments are produced, but the second one is clipped, so only a small arc is displayed. I've found that if I don't use the dvisvgm_hashes extension provided by make4ht, both pictures look correctly. The difference is that by default, make4ht runs separate call to dvisvgm for each converted picture, but with dvisvgm_hashes, it lists all pages to be converted at one using the -p option.
The images are stored in a special DVI file, sample.idv. The wrong ornament is on page 4.
When I convert this image separately, using this command, I get a correct result:
$ dvisvgm -n -p 4 --exact -c 1.4,1.4 sample.idv
pre-processing DVI file (format version 2)
processing page 4
graphic size: 123.815633pt x 39.83558pt (43.516218mm x 14.000605mm)
output written to sample-4.svg
1 of 5 pages converted in 0.650288 seconds
But when I specify more pages with the -p option, the result is wrong:
$ dvisvgm -n -p 2,4 --exact -c 1.4,1.4 sample.idv
pre-processing DVI file (format version 2)
processing page 2
graphic size: 81.235535pt x 40.444842pt (28.551025mm x 14.214736mm)
output written to sample-2.svg
processing page 4
graphic size: 160.108705pt x 917.342326pt (56.271774mm x 322.408954mm)
output written to sample-4.svg
2 of 5 pages converted in 0.400443 seconds
You can see that especially the height is completely wrong, but only for the second image, the first image is correct.
Thank you for reporting this issue. The second page gets wrong extents because the transformation matrix is not re-initialized at the beginning of the page. I'll commit the patch shortly.
I've got a report that code in this answer of mine stopped working correctly. Two TikZ ornaments are produced, but the second one is clipped, so only a small arc is displayed. I've found that if I don't use the
dvisvgm_hashes
extension provided bymake4ht
, both pictures look correctly. The difference is that by default,make4ht
runs separate call todvisvgm
for each converted picture, but withdvisvgm_hashes
, it lists all pages to be converted at one using the-p
option.Here is a MWE:
OP wants to add a custom
alt
andclass
attributes, so I've created a following configuration file,config.cfg
:It can be compiled using this command:
And this is the result:
The images are stored in a special DVI file,
sample.idv
. The wrong ornament is on page 4.When I convert this image separately, using this command, I get a correct result:
But when I specify more pages with the
-p
option, the result is wrong:You can see that especially the height is completely wrong, but only for the second image, the first image is correct.