emacs ditaa 配置
ditaa 工具能够帮我们把ASCII图转成漂亮的图片,结合emacs in org-mode,用artist-mode,可以方便画出 漂亮的流程图。官方主页:ditaa –DIagrams Through Ascii Art
http://ditaa.sourceforge.net/#download
unzip ditaa_xx.zip cp ditaa_xx.jar ~/.emacs.d/plugins/ditaa
参考:http://doc.norang.ca/org-mode.html#sec-13-1
(setq org-ditaa-jar-path “~/.emacs.d/plugins/ditaa/ditaa0_9.jar”) ;(setq org-plantuml-jar-path “~/java/plantuml.jar”)
(add-hook ‘org-babel-after-execute-hook ‘org-display-inline-images ‘append)
(org-babel-do-load-languages (quote org-babel-load-languages) (quote ((emacs-lisp . t) (dot . t) (ditaa . t) (R . t) (python . t) (ruby . t) (gnuplot . t) (clojure . t) (sh . t) (ledger . t) (org . t) (plantuml . t) (latex . t))))
; Do not prompt to confirm evaluation ; ; This may be dangerous - make sure you understand the consequences ; ; of setting this – see the docstring for details (setq org-confirm-babel-evaluate nil)
由于中文支持不太好,要配置ditaa编码,建议使用UTF-8,org-mode #+LANGUAGE
设置成: #+LANGUAGE: zh_cn
cBLU | |
你好 | |
cPNK | |
世界 |
cBLU | |
你好 | |
cPNK | |
世界 |