From: Ivan Lazar Miljenovic <ivan.miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: How to add raw Markdown in filter?
Date: Mon, 9 Oct 2017 12:38:15 +1100 [thread overview]
Message-ID: <CA+u6gbxdqnG3Ok00OmZiC1V4kW6GyAZKnuS2robnJNq+z_Z2AQ@mail.gmail.com> (raw)
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
next reply other threads:[~2017-10-09 1:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-09 1:38 Ivan Lazar Miljenovic [this message]
[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
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+u6gbxdqnG3Ok00OmZiC1V4kW6GyAZKnuS2robnJNq+z_Z2AQ@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).