Re: Best way to include METAPOST in ConTeXt exporter

2021-10-13 Thread Ihor Radchenko
Jason Ross writes: >> Or you can use "raw" results by default and format everything as you >> wish in your Org Babel module programatically. > > I'm not sure I understand this yet. Would this emit METAPOST code to the > Org buffer? Ideally, I'd like to emit METAPOST code if the backend is >

Re: Best way to include METAPOST in ConTeXt exporter

2021-10-13 Thread Ihor Radchenko
Jason Ross writes: > Here's a hook that modifies the source blocks to wrap their > output in #+BEGIN/END_METAPOST tags if the ConTeXt backend is used, > before Org Babel gets to them, but otherwise leaves them alone. > > I wonder if anyone has any better ideas of how to do this. I'm > modifying

Re: Best way to include METAPOST in ConTeXt exporter

2021-10-05 Thread Jason Ross
Here's a hook that modifies the source blocks to wrap their output in #+BEGIN/END_METAPOST tags if the ConTeXt backend is used, before Org Babel gets to them, but otherwise leaves them alone. I wonder if anyone has any better ideas of how to do this. I'm modifying the Org source with the hook

Re: Best way to include METAPOST in ConTeXt exporter

2021-10-05 Thread Jason Ross
(Apologies to Ihor who I already replied to without cc'ing the list) === > If you are in control of the export backend, you can directly process > the metapost source blocks during export and ignore/filter their output > as needed. This is

Re: Best way to include METAPOST in ConTeXt exporter

2021-10-04 Thread Ihor Radchenko
Jason Ross writes: > I had considered using special blocks; they match my mental model the best. > However, they don't provide any support for syntax highlighting or opening > the block in a new major mode buffer. I'm not sure if it's worth giving up > language features in order to use the block

Re: Best way to include METAPOST in ConTeXt exporter

2021-10-04 Thread Jason Ross
I had considered using special blocks; they match my mental model the best. However, they don't provide any support for syntax highlighting or opening the block in a new major mode buffer. I'm not sure if it's worth giving up language features in order to use the block that's most intuitive to

Re: Best way to include METAPOST in ConTeXt exporter

2021-10-04 Thread Ihor Radchenko
Jason Ross writes: > Hello, > > I'd like to include METAPOST figures in the ConTeXt exporter backend I'm > developing. However, I don't know of an idiomatic way to add captions and > references for the figures. You can use affiliated keywords: (defconst org-element-affiliated-keywords