* org-mode and ditaa @ 2015-05-18 21:35 Sam Halliday [not found] ` <8c584112-786d-4011-b64d-d088c9a7149d-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: Sam Halliday @ 2015-05-18 21:35 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1.1: Type: text/plain, Size: 1170 bytes --] Hi all, I'm like to include a ditaa diagram in my org-mode file, which I intend to convert to a presentation with pandoc. e.g. I'd like to include http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ditaa.html but it appears that pandoc does not call the ditaa command line tool when parsing the file, so I have to manually generate the image. Also, pandoc doesn't seem to hide the source code. The behaviour is supposed to be to not output the source code, but to show the rendered link. Is anybody successfully using pandoc to render org-mode ditaa diagrams? Best regards, Sam -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/8c584112-786d-4011-b64d-d088c9a7149d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #1.2: Type: text/html, Size: 1770 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <8c584112-786d-4011-b64d-d088c9a7149d-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: org-mode and ditaa [not found] ` <8c584112-786d-4011-b64d-d088c9a7149d-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2015-05-19 16:53 ` John MacFarlane [not found] ` <20150519165308.GD40922-0VdLhd/A9Pm0ooXD8Eul3dR5epUeo1x3TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> 2015-06-30 21:51 ` Erik Hetzner 1 sibling, 1 reply; 8+ messages in thread From: John MacFarlane @ 2015-05-19 16:53 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw The org reader won't do this (in fact it won't do any IO). But it will parse an org ditaa block into a pandoc structure like this: CodeBlock ("",["ditaa","rundoc-block"],[("rundoc-language","ditaa"),("rundoc-file","images/hello-world.png")]) "+--------------+\n| |\n| Hello World! |\n| |\n+--------------+\n" All you have to do is write a pandoc filter to find such blocks, run their contents through ditaa, and replace them with an image. This would be very similar to the graphviz filter in the pandocfilters examples directory: https://github.com/jgm/pandocfilters/blob/master/examples/graphviz.py See "Scripting with pandoc" on the pandoc website for an introduction to filters. +++ Sam Halliday [May 18 15 14:35 ]: >Hi all, > >I'm like to include a ditaa diagram in my org-mode file, which I intend to >convert to a presentation with pandoc. > >e.g. I'd like to include > > http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ditaa.html > >but it appears that pandoc does not call the ditaa command line tool when >parsing the file, so I have to manually generate the image. > >Also, pandoc doesn't seem to hide the source code. The behaviour is >supposed to be to not output the source code, but to show the rendered link. > >Is anybody successfully using pandoc to render org-mode ditaa diagrams? > >Best regards, >Sam > >-- >You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. >To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/8c584112-786d-4011-b64d-d088c9a7149d%40googlegroups.com. >For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <20150519165308.GD40922-0VdLhd/A9Pm0ooXD8Eul3dR5epUeo1x3TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>]
* Re: org-mode and ditaa [not found] ` <20150519165308.GD40922-0VdLhd/A9Pm0ooXD8Eul3dR5epUeo1x3TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> @ 2015-05-19 16:56 ` Sam Halliday [not found] ` <b713ec31-c6bc-4c81-abb7-7aa67ffc126a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: Sam Halliday @ 2015-05-19 16:56 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1.1: Type: text/plain, Size: 3102 bytes --] Thanks John, What about the ability to hide the src block? In emacs org-mode the "BEGIN_SRC ditaa" block is hidden and only the "RESULTS" are shown. Is there any way to do this without writing a filter? As a workaround, I'm ok using emacs to generate the images from the src blocks, but I'll look into how the filters work for future reference. Best regards, Sam On Tuesday, 19 May 2015 17:53:22 UTC+1, John MacFarlane wrote: > > The org reader won't do this (in fact it won't do any IO). > But it will parse an org ditaa block into a pandoc structure like > this: > > CodeBlock > ("",["ditaa","rundoc-block"],[("rundoc-language","ditaa"),("rundoc-file","images/hello-world.png")]) > "+--------------+\n| |\n| Hello World! |\n| > |\n+--------------+\n" > > All you have to do is write a pandoc filter to find such blocks, run their > contents through ditaa, and replace them with an image. > > This would be very similar to the graphviz filter in the pandocfilters > examples directory: > https://github.com/jgm/pandocfilters/blob/master/examples/graphviz.py > > See "Scripting with pandoc" on the pandoc website for an introduction > to filters. > > +++ Sam Halliday [May 18 15 14:35 ]: > >Hi all, > > > >I'm like to include a ditaa diagram in my org-mode file, which I intend > to > >convert to a presentation with pandoc. > > > >e.g. I'd like to include > > > > http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ditaa.html > > > >but it appears that pandoc does not call the ditaa command line tool when > >parsing the file, so I have to manually generate the image. > > > >Also, pandoc doesn't seem to hide the source code. The behaviour is > >supposed to be to not output the source code, but to show the rendered > link. > > > >Is anybody successfully using pandoc to render org-mode ditaa diagrams? > > > >Best regards, > >Sam > > > >-- > >You received this message because you are subscribed to the Google Groups > "pandoc-discuss" group. > >To unsubscribe from this group and stop receiving emails from it, send an > email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. > >To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > <javascript:>. > >To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/8c584112-786d-4011-b64d-d088c9a7149d%40googlegroups.com. > > >For more options, visit https://groups.google.com/d/optout. > > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/b713ec31-c6bc-4c81-abb7-7aa67ffc126a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #1.2: Type: text/html, Size: 6090 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <b713ec31-c6bc-4c81-abb7-7aa67ffc126a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: org-mode and ditaa [not found] ` <b713ec31-c6bc-4c81-abb7-7aa67ffc126a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2015-05-19 23:58 ` Joost Kremers [not found] ` <87fv6sf7bs.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org> 2015-05-20 5:22 ` John MacFarlane 1 sibling, 1 reply; 8+ messages in thread From: Joost Kremers @ 2015-05-19 23:58 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw On Tue, May 19 2015, Sam Halliday <sam.halliday-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > What about the ability to hide the src block? In emacs org-mode the > "BEGIN_SRC ditaa" block is hidden and only the "RESULTS" are shown. Is > there any way to do this without writing a filter? You mean when you're writing your source Markdown text in Emacs? That would then be something for Emacs to handle, not Pandoc. I would love to add some functionality like this to pandoc-mode, but I don't really have the time right now... -- Joost Kremers Life has its moments ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <87fv6sf7bs.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>]
* Re: org-mode and ditaa [not found] ` <87fv6sf7bs.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org> @ 2015-05-20 6:31 ` Sam Halliday [not found] ` <CALR_T9BL8jgxfR-hB4FFB0yHtMfCvY400PywMAJNFSESuPFEVQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: Sam Halliday @ 2015-05-20 6:31 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 2456 bytes --] On 20 May 2015 00:58, "Joost Kremers" <joostkremers-97jfqw80gc6171pxa8y+qA@public.gmane.org> wrote: > > > On Tue, May 19 2015, Sam Halliday <sam.halliday-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > What about the ability to hide the src block? In emacs org-mode the > > "BEGIN_SRC ditaa" block is hidden and only the "RESULTS" are shown. Is > > there any way to do this without writing a filter? > > You mean when you're writing your source Markdown text in Emacs? That > would then be something for Emacs to handle, not Pandoc. I would love to > add some functionality like this to pandoc-mode, but I don't really have > the time right now... > I am writing org-mode docs in emacs, not markdown. When defining a ditaa source block, I can indeed use Emacs the generate the image from it. But then there are two sections : a SRC block and an OUTPUT. Emacs generating HTML from the org-mode would ignore the src block, but I don't have any way of telling pandoc to ignore it. (I presume the graphviz generator has a similar problem.) There is a way of indicating in org-mode what the SRC/OUTPUT strategy would be, but this is ignored by pandoc. > > > -- > Joost Kremers > Life has its moments > > -- > You received this message because you are subscribed to a topic in the Google Groups "pandoc-discuss" group. > To unsubscribe from this topic, visit https://groups.google.com/d/topic/pandoc-discuss/ZxGOmNutQMY/unsubscribe. > To unsubscribe from this group and all its topics, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/87fv6sf7bs.fsf%40fastmail.fm . > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CALR_T9BL8jgxfR-hB4FFB0yHtMfCvY400PywMAJNFSESuPFEVQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #2: Type: text/html, Size: 3706 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <CALR_T9BL8jgxfR-hB4FFB0yHtMfCvY400PywMAJNFSESuPFEVQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: org-mode and ditaa [not found] ` <CALR_T9BL8jgxfR-hB4FFB0yHtMfCvY400PywMAJNFSESuPFEVQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2015-05-20 10:26 ` Joost Kremers 0 siblings, 0 replies; 8+ messages in thread From: Joost Kremers @ 2015-05-20 10:26 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw On Wed, May 20 2015, Sam Halliday <sam.halliday-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > On 20 May 2015 00:58, "Joost Kremers" <joostkremers-97jfqw80gc6171pxa8y+qA@public.gmane.org> wrote: >> >> >> On Tue, May 19 2015, Sam Halliday <sam.halliday-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > What about the ability to hide the src block? In emacs org-mode the >> > "BEGIN_SRC ditaa" block is hidden and only the "RESULTS" are shown. Is >> > there any way to do this without writing a filter? >> >> You mean when you're writing your source Markdown text in Emacs? That >> would then be something for Emacs to handle, not Pandoc. I would love to >> add some functionality like this to pandoc-mode, but I don't really have >> the time right now... >> > > I am writing org-mode docs in emacs, not markdown. Sorry, I misread your post. Please kindly ignore mine... :-) -- Joost Kremers Life has its moments ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-mode and ditaa [not found] ` <b713ec31-c6bc-4c81-abb7-7aa67ffc126a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2015-05-19 23:58 ` Joost Kremers @ 2015-05-20 5:22 ` John MacFarlane 1 sibling, 0 replies; 8+ messages in thread From: John MacFarlane @ 2015-05-20 5:22 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw +++ Sam Halliday [May 19 15 09:56 ]: >Thanks John, > >What about the ability to hide the src block? In emacs org-mode the >"BEGIN_SRC ditaa" block is hidden and only the "RESULTS" are shown. Is >there any way to do this without writing a filter? For HTML output, you could use CSS to hide the whole pre element. Otherwise, no, you need to use filters. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-mode and ditaa [not found] ` <8c584112-786d-4011-b64d-d088c9a7149d-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2015-05-19 16:53 ` John MacFarlane @ 2015-06-30 21:51 ` Erik Hetzner 1 sibling, 0 replies; 8+ messages in thread From: Erik Hetzner @ 2015-06-30 21:51 UTC (permalink / raw) To: public-pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw-wOFGN7rlS/M9smdsby/KFg Cc: Sam Halliday On Mon, 18 May 2015 14:35:51 -0700, Sam Halliday <sam.halliday-Re5JQEeQqe8AvxtiuMwx3w-XMD5yJDbdMReXY1tMh2IBg@public.gmane.org> wrote: > > Hi all, > > I'm like to include a ditaa diagram in my org-mode file, which I intend to > convert to a presentation with pandoc. > > e.g. I'd like to include > > http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ditaa.html > > but it appears that pandoc does not call the ditaa command line tool when > parsing the file, so I have to manually generate the image. > > Also, pandoc doesn't seem to hide the source code. The behaviour is > supposed to be to not output the source code, but to show the rendered link. > > Is anybody successfully using pandoc to render org-mode ditaa diagrams? Hi Sam, I doubt that pandoc will ever support babel, generally. But you might find success with the path org-mode -> export to org-mode -> pandoc -> html, etc. Have you tried using the ox-pandoc package? This speeds up the process. It is installable via MELPA. This works for me, and does not display the source in the exported HTML: ---------------------------------------------------- * ditaa Hello world #+BEGIN_SRC ditaa :file images/hello-world.png +--------------+ | | | Hello World! | | | +--------------+ #+END_SRC ---------------------------------------------------- Export with ox-pandoc, html5 format `C-c C-e p h` best, Erik ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-06-30 21:51 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-05-18 21:35 org-mode and ditaa Sam Halliday [not found] ` <8c584112-786d-4011-b64d-d088c9a7149d-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2015-05-19 16:53 ` John MacFarlane [not found] ` <20150519165308.GD40922-0VdLhd/A9Pm0ooXD8Eul3dR5epUeo1x3TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> 2015-05-19 16:56 ` Sam Halliday [not found] ` <b713ec31-c6bc-4c81-abb7-7aa67ffc126a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2015-05-19 23:58 ` Joost Kremers [not found] ` <87fv6sf7bs.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org> 2015-05-20 6:31 ` Sam Halliday [not found] ` <CALR_T9BL8jgxfR-hB4FFB0yHtMfCvY400PywMAJNFSESuPFEVQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2015-05-20 10:26 ` Joost Kremers 2015-05-20 5:22 ` John MacFarlane 2015-06-30 21:51 ` Erik Hetzner
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).