dvisvgm: only for math?

44 views
Skip to first unread message

Denis Bitouzé

unread,
Dec 22, 2020, 5:19:44 PM12/22/20
to sphinx...@googlegroups.com
Hi,

I'm trying to use Sphinx for a LaTeX FAQ (in French).

It would be nice for LaTeX snippets to be able to be rendered as images,
preferably as SVG ones.

I'm aware of the sphinx.ext.imgmath extension that renders math via
LaTeX and dvisvgm into SVG images.

But could this be extended to other content than (exclusively) math,
just as dvisvgm can do, as shown by:

--8<---------------cut here---------------start------------->8---
pdflatex <<< "\documentclass{article}
\usepackage{lmodern}
\begin{document}
\section{Test}
This a \emph{test} for \textsf{dvisvgm}!
\end{document}" && dvisvgm --pdf texput.pdf && xdg-open test.svg
--8<---------------cut here---------------end--------------->8---

Thanks for any help on this subject.
--
Denis

Denis Bitouzé

unread,
Dec 23, 2020, 2:33:47 AM12/23/20
to Denis Bitouzé, sphinx...@googlegroups.com
Le 22/12/20 à 23h19, Denis Bitouzé a écrit :

> I'm trying to use Sphinx for a LaTeX FAQ (in French).
>
> It would be nice for LaTeX snippets to be able to be rendered as images,
> preferably as SVG ones.

I forgot to say, but it's pretty obvious, what I've in mind here is an
HTML output.
--
Denis

Komiya Takeshi

unread,
Dec 23, 2020, 8:42:02 AM12/23/20
to sphinx...@googlegroups.com
Hi,

Of course, you can do it with writing your own extension. As you said,
imgmath is good example to make it.

Thanks,
Takeshi KOMIYA

2020年12月23日(水) 7:19 Denis Bitouzé <denis....@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/87zh25pjpi.fsf%40example.com.

Denis Bitouzé

unread,
Dec 23, 2020, 10:21:24 AM12/23/20
to Komiya Takeshi, sphinx...@googlegroups.com
Le 23/12/20 à 22h41, Komiya Takeshi a écrit :

> Hi,

Hi,

> Of course,

Nice! :)

> you can do it with writing your own extension.

Outch! Unfortunately beyond my scope, I guess :$

> As you said, imgmath is good example to make it.

Well, I'm afraid I'm not sufficiently expert in Python to extend it
properly. Maybe I'll ask Hong Xu (he's the only contributor specifically
credited for imgmath) but if others here are interested, they would be
warmly welcome! :)

Thanks.
--
Denis
Reply all
Reply to author
Forward
0 new messages