-
Notifications
You must be signed in to change notification settings - Fork 10
pandoc
Aditya Mahajan edited this page Jan 19, 2015
·
5 revisions
Use pandoc to convert a variety of formats to ConTeXt.
\usemodule[filter]
\defineexternalfilter
[pandoc]
[
filter={pandoc --no-wrap
-f \externalfilterparameter{format} -t context
-o \externalfilteroutputfile},
format=markdown,
directory=output,
]
-
The temporary files are stored in
output
directory. Hence, that directory must exist. -
The environment
\startpandoc ... \stoppandoc
parses its content as markdown.
-
The command
\processpandocfile{...}
parses the file specified by its arguments as a markdown file.
-
To change the input format from markdown to, say rst, use
\setupexternalfilter[pandoc][format=rst]
-
To change the input format locally, use:
\startpandoc[format=rst] .... \stoppandoc
or
\processpandocfile[format=rst]{...}