Hi Juan,
Thanks for your answeer. Indeed, the generated tex files are different whether you use the png or svg extension. It seems that for svg, a distinct build system is used from the usual one for other image types (png, jpg). This build system seems based on tex4ht, given the latex file preamble. I tried to compile manually this temporary latex file (the one for svg) with "pdflatex" which fails. Then, I tried with "htlatex" and guess what ... it works ! A svg file is created, which unfortunately does not contain everything, but this was only manual compiling, probably some missing options. I think at first there may be a bug in my own configuration of the variable "org-latex-pdf-process" which should be passed the correct build system. Regards Juan Manuel Macías <maciasch...@posteo.net> writes: > Hi Edouard, > > Edouard Debry writes: > >> I would like to find a way to generate svg images from latex src blocks >> (using tikz) which works and is compatible with default orgmode settings >> for latex export (at least does not break it) >> >> Did you experience such issues ? do you have some workings settings and >> examples ? I googled several times "org latex block tikz svg", but it is >> difficult to guess how relevant are the elements found, some of them >> seems quiet outdated. Hence my question on this mailing list > > I've done some quick tests with your example block. I don't know if I'm > wrong, but I think the problem is on line 27 of `org-babel-execute:latex': > > ((string= "svg" extension) > > I don't know if this should be considered an Org bug, but it's clear > that if the svg extension is detected in :file, the ':imagemagick yes' > option is ignored, and a type of preamble is generated that fails in > pgfsysdriver when compiling the temp tex document: > > \documentclass[preview]{standalone} > \def\pgfsysdriver{pgfsys-tex4ht.def} > > If I replace the above line with this conditional: > > ((and (string= "svg" extension) (not imagemagick)) > > then the imagemagick option is taken into account: it creates correctly > the pdf and then converts it to svg with 'convert' imagemagick program. > I did have to remove this line though: > > #+HEADER: :imoutoptions -geometry 400 :iminoptions -density 600 > > otherwise, the conversion produced a dark image. > > Best regards, > > Juan Manuel