Carsten Dominik <carsten.domi...@gmail.com> writes: > On May 27, 2009, at 9:09 PM, Russell Adams wrote: > >> I updated org-exp-block.el to support other Graphviz output types (ie: >> neato, fdp, twopi, and circo.), and created a test document to >> demonstrate each type. >> >> Attached is a tar file containing the demo, diff, and updated >> org-exp-block.el. It could use some tuning before being permanently >> applied, see the comments within. >> >> I considered posting this to Worg, but was concerned that it would >> bomb without the updated block support. After its added to core, I'd >> be happy to post this into Worg. >>
Hi Russel, Thanks for the update, and for the clear exposition in the org demo file. I think that rather than changing the specification of the dot block (which will break existing org files) we should create new block files. Either create a single graphviz file, which will accept an argument indicating which command to use, or create a new block type for each command. I'm not sure which of these approaches would be preferred... They should both require only small changes to your existing code. If we were starting from scratch my preference would be a single graphviz block type, however in order to maintain functionality for existing org-mode documents, in this case I would lean towards generating a block type for each command. I suppose we could support both options. any suggestions? I certainly agree that a change along these lines should be added to the version of org-exp-block.el distributed with org mode. Also, sorry about the delayed reply, I was waiting until I found the time to actually look over your attached files. >> >> >> My next question relates to using Graphviz between HTML and Latex >> export. When I do HTML I don't mind using PNG, however with Latex it >> is better to export to EPS. That way you export to a vector format >> that looks superb in the final PDF. This requires a postprocessing >> step that I'm not sure how to integrate. >> >> From one of my Makefiles, I use this line to fix the EPS so that Latex >> can import it: >> >> sed -i -e 's/PS-Adobe-2.0/PS-Adobe-2.0 EPSF-1.2/1' $@ > > Maybe this needs a bug report to the Graphviz people??? > +1 > > I guess the best solution would actually be to allow a lisp > function to do the formatting, and it should return the > link to be used. then you can implement whatever is needed. > > Eric, would that make sense? > Yes, Although I'm not sure how best to automatically associate a lisp (or shell) function as a post processing step, and to then pass the file path used in this block to said function... Possibly a something along the lines of a #+postprocessing: line immediately preceding the block. However that would be a general solution. If our goal is just to allow post processing in this instance, I believe that using defadvice would be the easiest hack. Make sure that the last statement in `org-export-blocks-format-dot' returns the file path, and then try something like the following... --8<---------------cut here---------------start------------->8--- (defadvice org-export-blocks-format-dot (around fix-eps-org-export-blocks-format-dot activate) "Fix graphviz eps output." (let ((file ad-do-it)) (shell-command (format "sed -i -e 's/PS-Adobe-2.0/PS-Adobe-2.0 EPSF-1.2/1' %s" file)))) --8<---------------cut here---------------end--------------->8--- Cheers -- Eric > > - Carsten _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode