美文网首页
windows 配置 emacs 使用 plantuml

windows 配置 emacs 使用 plantuml

作者: LeeSpringFly | 来源:发表于2017-05-28 10:49 被阅读0次

    安装 Graphviz

    下载 plantuml.jar

    • plantuml.jar: http://plantuml.com/download
    • 任意位置,例:C:/plantuml.jar
      :: 不要放在类似 .emacs.d/ 这种命名的文件夹下

    plantuml 配置

    ;; active Org-babel languages
    (org-babel-do-load-languages
        'org-babel-load-languages
          '(;; other Babel languages
               (plantuml . t)))
    
    (setq org-plantuml-jar-path
          (expand-file-name "C:/plantuml.jar"))
    
    ;; Enable plantuml-mode for PlantUML files
    (add-to-list 'auto-mode-alist '("\\.plantuml\\'" . plantuml-mode))
    
    ;; Integration with org-mode
    (add-to-list 'org-src-lang-modes '("plantuml" . plantuml))
    

    测试(C-c C-c 生成图片)

    #+BEGIN_SRC plantuml :file ./demo.png
    Bob->Alice : hello
    #+END_SRC
    
    #+RESULTS:
    [[file:./demo.png]]
    
    demo.png

    相关文章

      网友评论

          本文标题:windows 配置 emacs 使用 plantuml

          本文链接:https://www.haomeiwen.com/subject/ynocfxtx.html