From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: markdown module vs pandoc
Date: Fri, 15 Feb 2019 12:34:33 -0500 (EST) [thread overview]
Message-ID: <nycvar.YAK.7.76.44.1902151228470.31543@ervasbepr.pvz.zptvyy.pn> (raw)
In-Reply-To: <q46qi1$44p2$4@blaine.gmane.org>
On Fri, 15 Feb 2019, Gour wrote:
> On Fri, 15 Feb 2019 06:11:32 -0500 (EST)
> Aditya Mahajan <adityam@umich.edu> wrote:
>
>> For obvious reasons, the built in markdown module is faster than
>> calling pandoc but I prefer using pandoc rather than the markdown
>> module for two reasons. First, pandoc provides many extensions to the
>> basic markdown syntax which I use frequently and second pandoc has
>> better documentation.
>
> Thank you.
>
>> Markdown is a loosely specified standard and sometimes it can be tricky to
>> figure out how to get a particular behavior.
>
> That's correct - I was using reST in the past, but lack of support for e.g.
> nested inline markup leads to strange and ugly workarounds. Then I was
> considering AsciiDoc(tor), but consider that for simpler stuff (Pnadoc)
> markdown could be enough, but for larger bodies of text ConTeXt is without
> comparison.
>
>> So, if you are planning to use markdown for simple documents then go
>> with the markdown module but if you have more complicated document
>> structure, use pandoc.
>
> Do I inderstand you correctly: for more complicated documents you use Pandoc'
> markdown and then do Pandoc --> ConTeXt conversion to typeset with the
> ConTeXt at the end?
For simple documents, I use something like this (untested):
\usemodule[filter]
\defineexternalfilter
[markdown]
[filter={pandoc -t context -o \externalfilteroutput},
output=\externalfilterbasefile.tex,
cache=yes,
directory=output, %make sure a sub-dir output exists
readcommand=\ReadFile]
\starttext
\startmarkdown
This is a *test* in **markdown**.
\stopmarkdown
\stoptext
For more complicated documents (where I need both TeX and HTML output), I
pre-process the input:
https://adityam.github.io/context-blog/post/markdown-with-gpp/
Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2019-02-15 17:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-14 22:00 Gour
2019-02-15 11:11 ` Aditya Mahajan
2019-02-15 16:49 ` Gour
2019-02-15 17:34 ` Aditya Mahajan [this message]
2019-02-17 7:08 ` Gour
2019-02-18 18:37 ` Aditya Mahajan
2019-02-18 16:08 ` Pablo Rodriguez
2019-02-18 17:33 ` Gour
2019-02-19 13:22 ` Gour
2019-02-21 17:50 ` Pablo Rodriguez
2019-02-21 20:59 ` Gour
2019-02-22 19:22 ` Pablo Rodriguez
2019-02-24 11:17 ` Saša Janiška
2019-02-18 16:40 ` Mojca Miklavec
2019-02-18 17:47 ` Gour
2019-02-18 21:57 ` Alan Braslau
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=nycvar.YAK.7.76.44.1902151228470.31543@ervasbepr.pvz.zptvyy.pn \
--to=adityam@umich.edu \
--cc=ntg-context@ntg.nl \
/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).