Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bergey/org-babel-diagrams
embed haskell diagrams in emacs org-mode files
https://github.com/bergey/org-babel-diagrams
Last synced: 1 day ago
JSON representation
embed haskell diagrams in emacs org-mode files
- Host: GitHub
- URL: https://github.com/bergey/org-babel-diagrams
- Owner: bergey
- License: bsd-3-clause
- Created: 2013-03-27T22:28:32.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2016-04-07T12:40:56.000Z (almost 9 years ago)
- Last Synced: 2024-12-04T04:05:16.884Z (about 2 months ago)
- Language: Emacs Lisp
- Size: 5.86 KB
- Stars: 10
- Watchers: 5
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
I am not maintaining this project. If you would like to adopt it, please drop me a line, and I'll hand it over.
Install
=======* Put ob-diagrams.el somewhere on your load-path
* Add ``(require 'ob-diagrams)`` to your .emacs.el
* At the command-line, run ``cabal install diagrams-builder -fcairo``Examples
=====
Enter the following into an org-mode file:::
#+BEGIN_SRC diagrams :file circle.svg :width 400
dia = circle 1 # fc cyan
#+END_SRCInline Viewing
--------------With point inside the source block, type ``C-c C-v e`` (or ``M-x org-babel-execute-maybe``). The result should look like this:
::
#+RESULTS:
[[file:circle.svg]]Except that org-mode will remove the square brackets and linkify the file link. Put point over the link and type ``C-c C-o`` (or ``M-x org-open-at-point``). to see the image. Or use ``M-x org-display-inline-images`` to see the result inline, in place of the link.
Header Arguments
----------------For each source block, a filename must be specified. diagrams-builder-cairo takes the file format from the file extension. diagrams-builder-cairo will render whatever is specified as dia in each block. org-babel-diagrams defaults to width 300 if it is not specified at the start of the source block.
LaTeX Export
------------For export to LaTeX, set all filename extensions to .ps (for oldschool latex -> dvips route) or .pdf (for pdflatex).
Configuration
=============
If you do not have ``diagrams-builder-cairo`` installed on your path, customize ``org-diagrams-executable``.Contributing
============
Holler if you use this code, and want particular features. Of course, patches and pull requests are always welcome.