Open VladimirAlexiev opened 5 months ago
I agree, svg should be the default format.
(update: #23 is closed, ROBOT for sparql works. I'm currently looking at #23 how to invoke ROBOT, including for running sparql queries on ontology files. The challenge is to make something that feels natural to use. sparql-mode is made for querying endpoints -- it doesn't support calling ROBOT, ARQ, or other programs to query files. Maybe we could do something to add that functionality. If that can be made to work, then ELOT users will only need to install ROBOT and rdfpuml for a very powerful set of ontology tools. (What does work is to use a #+call
in the org buffer that invokes sparql with robot, but I think it's not very elegant.))
As a note for later: with recent Emacs versions SVGs are rendered inline, while PDFs are not. Here is how to ensure SVG files work in LaTeX exports. With the svg
package for LaTeX, it's possible to get SVG files converted automatically.
Add to the org file,
#+latex_header: \usepackage[inkscapelatex=false]{svg}
With this, svg files are included in org's LaTeX output with \includesvg
instead of the normal \includegraphics
command.
Use M-x to customize-variable
the variable org-latex-pdf-process
: add -shell-escape
into the listed command(s). (This customization may be difficult to automate properly as an ELOT default, since users are likely to have different, specialised commands for running LaTeX.)
Example:
Install Inkscape, which is the default SVG to PDF converter for LaTeX.
Add Inkscape to the PATH: on Windows, typically C:\Program Files\Inkscape\bin
After 1--4, the PDF produced by exporting from org to PDF will include the SVG images.
Note. The text in SVGs converted with Inkscape uses the Verdana font, which doesn't look as good as the Helvetica default from plantuml. Find out how to fix this; maybe try out options mentioned in Inkscape forum --pdf-font-strategy=keep
and --pdf-font-strategy=substitute
.
(setq org-startup-with-inline-images t)
Actually, I'm puzzled by this (have seen it before).
SVG images display in org-mode buffers with no problem, and this has already been in place at least for a couple of sub-versions. With 29.2 it was OK, with 29.3 it's OK. Resizing of SVG embedded images isn't possible without some extra effort, but I think that's not really crucial.
A minor change in ELOT should now ensure that images are displayed after they are generated.
Currently
rdfpuml
is used to make images in PDF format for easier use bypdflatex
. Then SVG is extracted usingdvisvgm
for use in HTML.I think it's better to "first" produce SVG, i.e. to have a command to evaluate a single Org block (SPARQL query or Turtle piece), process it with
rdfpuml
and render it in the Org document (org-toggle-inline-images, org-redisplay-inline-images
). Note: I have tried this with PNG, not SVG. Here are the keybindings I use:Google search
svg to pdf -online
finds several relevant matches: