add *.tikz files as possible result files for latex blocks

* lisp/ob-latex.el (org-babel-execute:latex) add a tizk option
  that copies the body of the block into a tikz file
This commit is contained in:
Andreas Leha 2013-07-17 16:45:32 +02:00 committed by Eric Schulte
parent 8d5ad6553f
commit 0b770b125f
1 changed files with 5 additions and 1 deletions

View File

@ -95,7 +95,11 @@ This function is called by `org-babel-execute-src-block'."
((and (string-match "\\.png$" out-file) (not imagemagick))
(org-create-formula-image
body out-file org-format-latex-options in-buffer))
((or (string-match "\\.pdf$" out-file) imagemagick)
((string-match "\\.tikz$" out-file)
(when (file-exists-p out-file) (delete-file out-file))
(with-temp-file out-file
(insert body)))
((or (string-match "\\.pdf$" out-file) imagemagick)
(with-temp-file tex-file
(require 'ox-latex)
(insert