anansi-pandoc-0.1.3: Looms which use Pandoc to parse and produce a variety of formats.

Safe HaskellNone

Anansi.Pandoc

Synopsis

Documentation

loomPandocSource

Arguments

:: [(String, ParserState -> String -> Pandoc)]

Readers

-> [(String, WriterOptions -> Pandoc -> String)]

Writers

-> Loom 

A loom which uses Pandoc to parse and produce a variety of formats.

Documents using this loom should set the options anansi-pandoc.reader and anansi-pandoc.writer, to control how the markup is parsed, and what output format is produced. Both settings default to "html".

 :# mydocument.anansi
 :option anansi-pandoc.reader=markdown
 :option anansi-pandoc.writer=latex

 My Document
 ===========
 ...

The readers and writers parameters allow the user to define a custom set of Pandoc formats.

To work around a limitation in Pandoc, the name specified for anansi‑pandoc.reader must also be present in anansi‑pandoc.writer. That is, if anansi‑pandoc.reader=foo, then there must be both a reader and writer named "foo".

looms :: Map Text LoomSource

Looms which use Pandoc to parse and produce a variety of formats.

Use this with defaultMain:

 #!/usr/bin/env runhaskell
 import Anansi
 import Anansi.Pandoc
 import Data.Map

 main = defaultMain (unions [Anansi.looms, Anansi.Pandoc.looms])