public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* How to add raw Markdown in filter?
@ 2017-10-09  1:38 Ivan Lazar Miljenovic
       [not found] ` <CA+u6gbxdqnG3Ok00OmZiC1V4kW6GyAZKnuS2robnJNq+z_Z2AQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Ivan Lazar Miljenovic @ 2017-10-09  1:38 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-10 10:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-09  1:38 How to add raw Markdown in filter? 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
2017-10-10 10:52   ` Saivan Hamama

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).