I am currently writing a conversion from org-mode headline deadlines/schedules to pgf-gantt charts. Ideally I would like to create a custom dynamic block that contains the result of my parsing, and then have a custom exporter for that dynamic block that creates the pgf-gantt code, so that I can later add exporters for other formats.

Q1: So, is there a mechanism similar to org-dblock-write: only for exporting dblocks? I cannot find any documentation on this.

Q2: If there is no such mechanism, what would be the best way of storing that pgf source code so that it gets integrated into latex export, but doesn't interfere with other exporters?

  • Did you make any progress on your questions? Providing some code examples would be helpful. Example of dynamic block with corresponding pgf source code so we have a clear idea what inputs and output you want. – Melioratus Oct 1 '15 at 3:39
  • 1
    I don't think there currently is an possibility to do this. I asked the same question on the org mode mailing list, to no avail. The emacs package can be found at github.com/HeyFlash/emacs-stuff/tree/master/experiments (The no-hashes branch should be a version that works currently). See the manual for examples. I currently create the pdf code directly - so there is no possibility of adding other export options later. – Flash Oct 2 '15 at 8:04
  • Very cool! After reading through code on your GitHub repo, I think I understand what you want. Just to clarify, Question 1: you want to dynamically fill in contents between #+BEGIN: org-gantt-chart and #+END: correct? Question 2: Because your elisp code looks for these dynamic blocks at export and transforms the key value pairs into LaTEX which is rendered as gantt charts in PDF files, correct? – Melioratus Oct 3 '15 at 3:49
  • 1
    Question 1: That is what I currently do, that is not a problem. The problem is that I cannot write code that transforms these blocks at export time. Question 2:: Yes, but I currently do the creation of latex code at dynamic block update time, which means that it will only export correctly to pdf. I want to save my a custom representation at dynamic block update time and create latex code at latex export time. – Flash Oct 6 '15 at 5:37
  • Would detecting when a export happens help? The header values of regular code blocks can be set using elisp code, e.g. :var data=(if (eq org-export-current-backend nil) "not exporting" org-export-current-backend ) but I'm not sure if this works for dynamic blocks. – Melioratus Oct 10 '15 at 22:47

Your Answer

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

Browse other questions tagged or ask your own question.