ditaa org-mode

emacs ditaa 配置

ditaa 工具能够帮我们把ASCII图转成漂亮的图片,结合emacs in org-mode,用artist-mode,可以方便画出 漂亮的流程图。官方主页:ditaa –DIagrams Through Ascii Art

1 下载安装

http://ditaa.sourceforge.net/#download

unzip ditaa_xx.zip cp ditaa_xx.jar ~/.emacs.d/plugins/ditaa

2 emacs 配置

参考: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)

3 didtaa 使用

  • artist-mode :: 具体使用请查看 http://www.cinsk.org/emacs/emacs-artist.html
  • ditaa org-mode file :: 相关快捷键 C-c c 编译 C-c C-x C-v 可以查看图片

由于中文支持不太好,要配置ditaa编码,建议使用UTF-8,org-mode #+LANGUAGE 设置成: #+LANGUAGE: zh_cn

  • ———–+
  • —-+——+
cBLU
你好
——
  cPNK
  世界
  • 效果 ::
  • ———–+
  • —-+——+
cBLU
你好
——
  cPNK
  世界
  • Tips :: 结合org-mode TeX 或 Tex beamer 可以写各种漂亮的slide和文档了

你可能感兴趣的:(emacs)