mgieseki / dvisvgm

A fast DVI, EPS, and PDF to SVG converter
https://dvisvgm.de
GNU General Public License v3.0
305 stars 33 forks source link

color gradient missing in svg file #263

Closed quoala0 closed 4 months ago

quoala0 commented 7 months ago

Running "latex gradtest.tex" twice and then "dvisvgm --keep --font-format=WOFF2 --grad-overlap --output=gradtest.svg gradtest.dvi" the color gradients in the tex file are missing when displaying the svg file in firefox. When processing the tex file with "pdflatex gradtest.tex" and viewing the pdf file everything looks fine. I would like to have the gradient colors in the svg file too. gradtest.pdf gradtest gradtest.txt

muzimuzhi commented 7 months ago

Add class option dvisvgm then it works.

\documentclass[a2paper, landscape, dvisvgm]{scrartcl}

Alternative ways:

mgieseki commented 7 months ago

dvisvgm doesn't support PostScript shading patterns as used in your example file. Only a subset of shading fills (PS operator shfill) are processed. As @muzimuzhi recommended, you could use the dvisvgm backend driver instead of the dvips one.

quoala0 commented 7 months ago

Hi Martin,

thank you very much for your quick answer.

I'll try your recommendation.

Will it be possible to use hyperref via pdf that way as well?

I found that hytertex via pdf to svg does not work at all:

And in my application I would like to have both features - hyperref and gradient fills!

 

Thanx in advance

     lisa

   

Gesendet: Donnerstag, 22. Februar 2024 um 16:56 Uhr Von: "Martin Gieseking" @.> An: "mgieseki/dvisvgm" @.> Cc: "quoala0" @.>, "Author" @.> Betreff: Re: [mgieseki/dvisvgm] color gradient missing in svg file (Issue #263)

 

dvisvgm doesn't support PostScript shading patterns as used in your example file. Only a subset of shading fills (PS operator shfill) are processed. As @muzimuzhi recommended, you could use the dvisvgm backend driver instead of the dvips one.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

muzimuzhi commented 7 months ago

Will it be possible to use hyperref via pdf that way as well?

I found that hytertex via pdf to svg does not work at all:

Sounds like a new question. Open a new issue with a new example?