From: Ivan Lazar Miljenovic <ivan.miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: How to add raw Markdown in filter?
Date: Mon, 9 Oct 2017 14:54:24 +1100 [thread overview]
Message-ID: <CA+u6gbxcNPyHFVvthSNg_WKTKNJq6tOdkmefB1JYb7zjRWGp6A@mail.gmail.com> (raw)
In-Reply-To: <20171009035026.GF20728-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
On 9 October 2017 at 14:50, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
> If you write the filter in Haskell, you can simply use
> the readMarkdown file from Text.Pandoc to parse the
> Markdown.
Might have to do that, but was hoping to keep it using pandoc-types
only for licensing reasons (maybe just tell end-users to do it?
*shrug*).
> Note that the lua filters functionality in the dev version
> also provides access to the parsers, so you can do this
> in lua also.
>
> In other languages you'd have to shell out to pandoc.
>
> +++ Ivan Lazar Miljenovic [Oct 09 17 12:38 ]:
>>
>> Is there any way using a filter to be able to inject markdown into a
>> document using a filter and have it be parsed/processed when
>> converting? Ideally, I'd like to be able to generate PDF from the
>> result (`pandoc --read=markdown --write=latex --output=foo.pdf
>> --filter=./myFilter input.md`).
>>
>> Using `RawBlock "markdown"` doesn't work as the rest of the document
>> has already been parsed, so the contents of those blocks are then
>> ignored.
>>
>> As such, as far as I'm aware my options are:
>>
>> * Try and write my own mini-parser that handles a subset of Markdown
>> and thus the filter can inject the correct Haskell representation of
>> the intended Markdown
>>
>> * Use a 2-stage process for Pandoc to first apply the filter and write
>> out to Markdown, then pipe the results into Pandoc to convert to PDF
>> (not ideal as this is for a library that should be able to just
>> generate whatever results you want).
>>
>> Is there anything else I can try and do?
>>
>> --
>> Ivan Lazar Miljenovic
>> Ivan.Miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>> http://IvanMiljenovic.wordpress.com
>>
>> --
>> 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/CA%2Bu6gbxdqnG3Ok00OmZiC1V4kW6GyAZKnuS2robnJNq%2Bz_Z2AQ%40mail.gmail.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/20171009035026.GF20728%40Johns-MacBook-Pro.local.
> For more options, visit https://groups.google.com/d/optout.
--
Ivan Lazar Miljenovic
Ivan.Miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
http://IvanMiljenovic.wordpress.com
next prev parent reply other threads:[~2017-10-09 3:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-09 1:38 Ivan Lazar Miljenovic
[not found] ` <CA+u6gbxdqnG3Ok00OmZiC1V4kW6GyAZKnuS2robnJNq+z_Z2AQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-09 3:50 ` John MacFarlane
[not found] ` <20171009035026.GF20728-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
2017-10-09 3:54 ` Ivan Lazar Miljenovic [this message]
2017-10-10 10:52 ` Saivan Hamama
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+u6gbxcNPyHFVvthSNg_WKTKNJq6tOdkmefB1JYb7zjRWGp6A@mail.gmail.com \
--to=ivan.miljenovic-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).