I recently suggested a pull request to el-easydraw
<https://github.com/misohena/el-easydraw/pull/37> to improve latex export
of SVG files since the current SVG handling seems clunky. The maintainer of
that project suggested I contact someone at Org-mode to see if it makes
more sense to make that contribution to Org-mode instead.

Briefly speaking, the current latex export of SVG files does not work out
of the box and requires adding --shell-escape to the latex args and also
installing inkscape. Even with those, I found the process brittle. If we
are going to require inkscape for SVG handling, it seems cleaner to me to
just use inkscape to convert SVG to PDF and then use \includegraphics
instead of relying on something like \includesvg
<https://github.com/bzg/org-mode/blob/b6dbf8881076191e1351d7cd15e26547a2531fea/lisp/ox-latex.el#L2879>.
Also, if we go with the path of converting SVG to PDF, we can allow/support
other conversion programs like rsvg-convert. Finally, if other backend
exporters want to support SVG, converting SVG to PDF (or other formats) can
support that in a similar way.

If latex experts and/or maintainers of org-mode are broadly in agreement
with the above, I would be happy to try and take the pull request to
el-easydraw <https://github.com/misohena/el-easydraw/pull/37> and
incorporate something like that into a PR for Org-mode. I think the way to
go would be to modify the (when (equal filetype "svg")
<https://github.com/bzg/org-mode/blob/b6dbf8881076191e1351d7cd15e26547a2531fea/lisp/ox-latex.el#L2877>
portion of ox-latex.org to call something like the
edraw-org-export-latex-link
<https://github.com/misohena/el-easydraw/pull/37/files#diff-d74d9626acb8016adf39b497068745979fef8789a108264c79e45c003a364997R57>
function in my original PR (renamed/modified to not be specific to edraw).

What do you think?

Thanks,
-Emin

Reply via email to