<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Dvisvgm on Solarized Sublime Sekai</title>
    <link>https://vincenttam.gitlab.io/tags/dvisvgm/</link>
    <description>Recent content in Dvisvgm on Solarized Sublime Sekai</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Tue, 21 Jun 2022 01:38:27 +0200</lastBuildDate>
    <atom:link href="https://vincenttam.gitlab.io/tags/dvisvgm/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>dvisvgm Guide for TikZ Pictures with Pattern Filling</title>
      <link>https://vincenttam.gitlab.io/post/2022-06-21-dvisvgm-guide-for-tikz-pictures-with-pattern-filling/</link>
      <pubDate>Tue, 21 Jun 2022 00:31:09 +0200</pubDate>
      <guid>https://vincenttam.gitlab.io/post/2022-06-21-dvisvgm-guide-for-tikz-pictures-with-pattern-filling/</guid>
      <description>&lt;h3 id=&#34;problem&#34;&gt;Problem&lt;/h3&gt;&#xA;&lt;p&gt;I had issues in getting a SVG from a TikZ picture containing a pattern filling:&#xA;&lt;a href=&#34;https://github.com/mgieseki/dvisvgm/issues/158&#34;&gt;https://github.com/mgieseki/dvisvgm/issues/158&lt;/a&gt;.  The reported issue was&#xA;created last year, and it&amp;rsquo;s marked as fixed.  Nonetheless, I had this issue even&#xA;though my MikTeX was up-to-date.&lt;/p&gt;&#xA;&lt;h3 id=&#34;discussion&#34;&gt;Discussion&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I wanted to confirm whether my &lt;code&gt;dvisvgm.exe&lt;/code&gt;, which had been shipped with&#xA;MikTeX, was latest.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I first asked at &lt;a href=&#34;https://github.com/mgieseki/dvisvgm/issues/184&#34;&gt;https://github.com/mgieseki/dvisvgm/issues/184&lt;/a&gt;, but I&#xA;was referred to MikTeX&amp;rsquo;s GitHub repository since it&amp;rsquo;s about the&#xA;MikTeX-packaged version of this tool.&lt;/li&gt;&#xA;&lt;li&gt;I am not sure about the technical explanation from the owner of dvisvgm at&#xA;&lt;a href=&#34;https://github.com/MiKTeX/miktex/issues/1112&#34;&gt;https://github.com/MiKTeX/miktex/issues/1112&lt;/a&gt;.  It seemed that I was&#xA;already using the latest stable version of this tool.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;I gave a MWE illustrating the problem with the graph of &lt;em&gt;y&lt;/em&gt; = (&lt;em&gt;x&lt;/em&gt; + 1)² with&#xA;region under the curve filled with a pattern in the above issue.  I knew that&amp;rsquo;s&#xA;probably off-topic, but the package owner might have some insights about the&#xA;problem.  It turned out that PDF → SVG was partly supported by dvisvgm.  Using&#xA;DVI → SVG, I managed to get the filling pattern, but I lost the beautiful&#xA;Computer Modern Roman fonts—that&amp;rsquo;s another issue.&lt;/li&gt;&#xA;&lt;li&gt;Hoping for a response from the owner for the previous problem, I started&#xA;&lt;a href=&#34;https://github.com/mgieseki/dvisvgm/issues/186&#34;&gt;https://github.com/mgieseki/dvisvgm/issues/186&lt;/a&gt;.  He suggested the use of&#xA;&lt;code&gt;--no-fonts&lt;/code&gt; or &lt;code&gt;--font-format=woff&lt;/code&gt;.  I observed no difference in the local&#xA;filesystem.  I uploaded everything I got through GitHub so that he could see&#xA;what my &lt;code&gt;dvisvgm.exe&lt;/code&gt; had output.  I didn&amp;rsquo;t expected that the Computer Modern&#xA;Roman fonts disappeared on GitHub side.  If I hadn&amp;rsquo;t asked there, I would have&#xA;never known that it&amp;rsquo;s the web browser&amp;rsquo;s security measure not to load the&#xA;embedded font data in a SVG loaded from a server.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3 id=&#34;skills-learned&#34;&gt;Skills learned&lt;/h3&gt;&#xA;&lt;p&gt;Meaning of some commonly used parameters of dvisvgm:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Dvisvgm&#39;s Issue With Fill Pattern</title>
      <link>https://vincenttam.gitlab.io/post/2022-06-04-dvisvgm-s-issue-with-fill-pattern/</link>
      <pubDate>Sat, 04 Jun 2022 20:56:57 +0200</pubDate>
      <guid>https://vincenttam.gitlab.io/post/2022-06-04-dvisvgm-s-issue-with-fill-pattern/</guid>
      <description>&lt;h3 id=&#34;goal&#34;&gt;Goal&lt;/h3&gt;&#xA;&lt;p&gt;Generate SVG file for TikZ graphics.&lt;/p&gt;&#xA;&lt;h3 id=&#34;method&#34;&gt;Method&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;TeX → PDF with PDFLaTeX&lt;/li&gt;&#xA;&lt;li&gt;PDF → SVG with &lt;code&gt;dvisvgm -P filename&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Example: I generated a PGF plot from the source code on&#xA;&lt;a href=&#34;https://vincenttam.gitlab.io/page/tikz-templates/&#34;&gt;my personal template&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;XPN8M.png&#34; alt=&#34;working SVG&#34;&gt;&lt;br&gt;&#xA;&lt;img src=&#34;iekQN.png&#34; alt=&#34;working PDF&#34;&gt;&lt;br&gt;&#xA;&lt;img src=&#34;PjQhe.png&#34; alt=&#34;Git Bash for PDF&#34;&gt;&lt;br&gt;&#xA;&lt;img src=&#34;H3F3b.png&#34; alt=&#34;Git Bash for SVG&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;problem&#34;&gt;Problem&lt;/h3&gt;&#xA;&lt;p&gt;When I applied this method to the following TeX code in my previous post,&#xA;&lt;code&gt;dvisvgm -P&lt;/code&gt; returns a blank SVG.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-tex&#34; data-lang=&#34;tex&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;\documentclass&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;[tikz,border=2pt]&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;standalone&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;\usepackage&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;pgfplots&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;\pgfplotsset&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;compat=1.6&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;\usetikzlibrary&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;patterns&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;\begin&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;document&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;\begin&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;tikzpicture&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;\begin&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;axis&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;[axis lines=center,legend style=&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;at=&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;(0.7,0.7)&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;,anchor=south west&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;\addplot&lt;/span&gt; [domain=-3:3, thick, smooth, yellow] &lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt; 1/sqrt(2*pi)*exp(-x&lt;span class=&#34;nb&#34;&gt;^&lt;/span&gt;2/2) &lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;\addlegendentry&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;y &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;\frac&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;}{&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;\sqrt&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;\pi&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;}} e^{&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;x^&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;\addplot&lt;/span&gt; [dashed, yellow] coordinates &lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;(1.5,0) (1.5,0.14)&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;\addlegendentry&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;99th percentile&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;\addplot&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;[domain=-3:1.5, pattern=north east lines,draw=none, fill opacity=0.3]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt; 1/sqrt(2*pi)*exp(-x&lt;span class=&#34;nb&#34;&gt;^&lt;/span&gt;2/2) &lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;\closedcycle&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;\end&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;axis&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;\end&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;tikzpicture&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;\end&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;document&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This code passes the compiler.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
