My goal is to:

  1. Generate graph (with math symbols / equations) from org-mode source block.
  2. Display result inside buffer

My best attempt was to use dot and graphviz:

graph without math formula

But I'm unable to add math symbol or equation to the graph. Which is, to the best of my knowledge, impossible with dot. - Please correct me if I'm mistaken.

Whole process inside Emacs looks like this: work process

Any suggestion is appreciated.

  • If you want to use TeX typesetting, draw the whole thing in TeX. – db48x Nov 19 '15 at 2:54
  • How can I draw the whole thing in TeX? – Empty_Mind Nov 19 '15 at 12:05
  • I'm not the right person to answer that question, but perhaps texample.net/tikz/examples/tag/diagrams can get you started. – db48x Nov 19 '15 at 12:38

For me the best half-way point between org and LaTeX is unicode. C-x RET C-\, set the input method to 'tex', and then you can type \in and have it replaced with in the buffer, no processing needed.

  • This is awesome! – Empty_Mind Nov 19 '15 at 13:31

For just a few symbols or equations, you can embed latex code with \codes directly in an org file and then use a latex export backend.

For the ultimate in fine-grained layout control, use dot2texi tool to wrap dot code in latex and then embed that in a latex source code block.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.