When I generate LaTeX/Beamer PDFs from Org mode, I get 1. directory "svg-inkscape" containing one PDF file for each SVG I link in the Org file (SVG from either EasyDraw or other SVGs)
2. directory "ltximg" containing one SVG file for each formula I write in the Org file. Indeed, I had to add "--shell-escape" and had installed Inkscape for other reasons anyway. My related settings: #+OPTIONS: tex:dvisvgm #+LATEX_HEADER: \usepackage{svg} #+LATEX_HEADER: \svgsetup{inkscapelatex=false, inkscapearea=page} I use Emacs 28.2 (Org mode 9.5.5). You might want to see more details of my Org mode configuration at: https://web222.webclient5.de/doc/swdev/emacs/orgmode/latex https://web222.webclient5.de/doc/swdev/emacs/orgmode/beamer I am happy with the results and the process is not brittle in my case. Regards "rsvg-convert": I had installed rsvg-convert to resolve an issue using SVG with /pandoc/ to generate DOCX. But that is unrelated to the built-in Org mode exporter. See: https://web222.webclient5.de/doc/swdev/emacs/orgmode/pandoc rsvg-convert generates PNG. IMHO this defeats starting with SVG in the first place. Best regards Thomas Am 02.05.2025 um 18:49 schrieb Emin Martinian:
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 <http://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