asciidoc/asciidoc — pull request #4 by sm0svx (2014-01-29 19:39:16+00:00)
Title: Filter latex svg

I wanted better looking and scalable Latex math so I hacked the Latex filter a bit. I have tried the different options for getting math formulas into documents and the filter approach seem to be the most portable one if one wants to generate multiple document formats (e.g. pdf and html).

The generated PNG images does not scale well when zooming in on a web page for example. This is why I have now added support for generating SVG images, which are scalable. The dvisvgm utility is used to do that. Generating PNG images is still the default unless the "imgfmt" attribute is set to "svg". I also added a "latex-imgfmt" attribute that do the same thing. The thought was that the former (the shorter one) can be used to change the format of one image while the latter (the longer one) can be set globally. I don't know if this is the right thing to do. Please tell me if there is a better way of doing it.

Usage may look like this:

```AsciiDoc
:latex-imgfmt: svg

[latex]
--
\begin{equation*}
X(\omega) &= \sum_{-\infty}^\infty x(n) e^{-j \omega n}
\end{equation*}
--
```