Add dot2tex org config
This commit is contained in:
parent
6438188729
commit
86ff665990
@ -200,7 +200,25 @@
|
||||
'((emacs-lisp . t)
|
||||
(dot . t)
|
||||
(python . t)))
|
||||
|
||||
(add-to-list 'org-src-lang-modes '("dot" . graphviz-dot))
|
||||
(add-to-list 'org-src-lang-modes '("dot2tex" . graphviz-dot))
|
||||
|
||||
(defvar org-babel-default-header-args:dot2tex
|
||||
'((:results . "latex") (:exports . "results"))
|
||||
"Default arguments to use when evaluating a dot2tex source block.")
|
||||
(defun org-babel-execute:dot2tex (body params)
|
||||
"Execute a block of Dot code via dot2tex with org-babel.
|
||||
This function is called by `org-babel-execute-src-block'."
|
||||
(let* ((cmdline (concat (cdr (assoc :cmdline params))
|
||||
" --figonly"))
|
||||
(cmd (or (cdr (assq :cmd params)) "dot2tex")))
|
||||
(org-babel-eval (concat cmd " " cmdline)
|
||||
(org-babel-expand-body:dot body params))))
|
||||
(defun org-babel-prep-session:dot2tex (session params)
|
||||
"Return an error because dot2tex does not support sessions."
|
||||
(error "dot2tex does not support sessions"))
|
||||
|
||||
(defun org-insert-homework-header ()
|
||||
""
|
||||
(interactive)
|
||||
|
Loading…
Reference in New Issue
Block a user