Text.Pandoc.Writers

pandoc-3.7.0.2: Conversion between markup formats

Copyright | Copyright (C) 2006-2024 John MacFarlane
License | GNU GPL, version 2 or above
Maintainer | John MacFarlane <jgm@berkeley.edu>
Stability | alpha
Portability | portable
Safe Haskell | None
Language | Haskell2010

Text.Pandoc.Writers

Contents

- Writers: converting from Pandoc format

Description

This helper module exports all writers functions.

Synopsis

- data Writer (m :: Type -> Type)
  - = TextWriter (WriterOptions -> Pandoc -> m Text)
  - | ByteStringWriter (WriterOptions -> Pandoc -> m ByteString)
- writers :: forall (m :: Type -> Type). PandocMonad m => [(Text, Writer m)]
- writeANSI :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeAsciiDoc :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeAsciiDocLegacy :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeAsciiDoctor :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeBeamer :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeBibTeX :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeBibLaTeX :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeChunkedHTML :: PandocMonad m => WriterOptions -> Pandoc -> m ByteString
- writeCommonMark :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeConTeXt :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeCslJson :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeDZSlides :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeDjot :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeDocBook4 :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeDocBook5 :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeDocx :: PandocMonad m => WriterOptions -> Pandoc -> m ByteString
- writeDokuWiki :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeEPUB2 :: PandocMonad m => WriterOptions -> Pandoc -> m ByteString
- writeEPUB3 :: PandocMonad m => WriterOptions -> Pandoc -> m ByteString
- writeFB2 :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeIpynb :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeHaddock :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeHtml4 :: PandocMonad m => WriterOptions -> Pandoc -> m Html
- writeHtml4String :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeHtml5 :: PandocMonad m => WriterOptions -> Pandoc -> m Html
- writeHtml5String :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeICML :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeJATS :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeJatsArchiving :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeJatsArticleAuthoring :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeJatsPublishing :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeJSON :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeJira :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeLaTeX :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeMan :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeMarkdown :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeMarkua :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeMediaWiki :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeMs :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeMuse :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeNative :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeODT :: PandocMonad m => WriterOptions -> Pandoc -> m ByteString
- writeOPML :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeOpenDocument :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeOrg :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writePlain :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writePowerpoint :: PandocMonad m => WriterOptions -> Pandoc -> m ByteString
- writeRST :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeRTF :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeRevealJs :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeS5 :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeSlideous :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeSlidy :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeTEI :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeTexinfo :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeTextile :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeTypst :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeXWiki :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- writeZimWiki :: PandocMonad m => WriterOptions -> Pandoc -> m Text
- getWriter :: PandocMonad m => FlavoredFormat -> m (Writer m, Extensions)

# Writers: converting from Pandoc format

data Writer (m :: Type -> Type) #

Constructors

TextWriter (WriterOptions -> Pandoc -> m Text) |
ByteStringWriter (WriterOptions -> Pandoc -> m ByteString) |

writers :: forall (m :: Type -> Type). PandocMonad m => [(Text, Writer m)] #

Association list of formats and writers.

writeANSI :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to ANSI

writeAsciiDoc :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to AsciiDoc.

writeAsciiDocLegacy :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to legacy AsciiDoc.

writeAsciiDoctor :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Deprecated: Use writeAsciiDoc instead

Deprecated synonym of `writeAsciiDoc`.

writeBeamer :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to LaTeX Beamer.

writeBibTeX :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Write BibTeX based on the references metadata from a Pandoc document.

writeBibLaTeX :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Write BibLaTeX based on the references metadata from a Pandoc document.

writeChunkedHTML :: PandocMonad m => WriterOptions -> Pandoc -> m ByteString #

Splits document into HTML chunks, dividing them by section, and returns a zip archive of a folder of files.

writeCommonMark :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to Commonmark.

writeConTeXt :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to ConTeXt.

writeCslJson :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

writeDZSlides :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc document to DZSlides HTML slide show.

writeDjot :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to Djot.

writeDocBook4 :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

writeDocBook5 :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

writeDocx #

Arguments

:: PandocMonad m |
=> WriterOptions | Writer options
-> Pandoc | Document to convert
-> m ByteString |

writeDokuWiki :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to DokuWiki.

writeEPUB2 #

Arguments

:: PandocMonad m |
=> WriterOptions | Writer options
-> Pandoc | Document to convert
-> m ByteString |

Produce an EPUB2 file from a Pandoc document.

writeEPUB3 #

Arguments

:: PandocMonad m |
=> WriterOptions | Writer options
-> Pandoc | Document to convert
-> m ByteString |

Produce an EPUB3 file from a Pandoc document.

writeFB2 #

Arguments

:: PandocMonad m |
=> WriterOptions | conversion options
-> Pandoc | document to convert
-> m Text | FictionBook2 document (not encoded yet)

Produce an FB2 document from a `Pandoc` document.

writeIpynb :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

writeHaddock :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to Haddock.

writeHtml4 :: PandocMonad m => WriterOptions -> Pandoc -> m Html #

Convert Pandoc document to Html 4 structure.

writeHtml4String :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc document to Html 4 string.

writeHtml5 :: PandocMonad m => WriterOptions -> Pandoc -> m Html #

Convert Pandoc document to Html 5 structure.

writeHtml5String :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc document to Html 5 string.

writeICML :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc document to string in ICML format.

writeJATS :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Deprecated: Use writeJatsArchiving instead

Alias for ``writeJatsArchiving``. This function exists for backwards compatibility, but will be deprecated in the future. Use ``writeJatsArchiving`` instead.

writeJatsArchiving :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert a ``Pandoc`` document to JATS (Archiving and Interchange Tag Set.)

writeJatsArticleAuthoring :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert a ``Pandoc`` document to JATS (Archiving and Interchange Tag Set.)

writeJatsPublishing :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert a ``Pandoc`` document to JATS (Journal Publishing Tag Set.)

writeJSON :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

writeJira :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to Jira.

writeLaTeX :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to LaTeX.

writeMan :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to Man.

writeMarkdown :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to Markdown.

writeMarkua :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to Markua.

writeMediaWiki :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to MediaWiki.

writeMs :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to Ms.

writeMuse :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to Muse.

writeNative :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Prettyprint Pandoc document.

writeODT #

Arguments

:: PandocMonad m |
=> WriterOptions | Writer options
-> Pandoc | Document to convert
-> m ByteString |

Produce an ODT file from a Pandoc document.

writeOPML :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc document to string in OPML format.

writeOpenDocument :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc document to string in OpenDocument format.

writeOrg :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to Org.

writePlain :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to plain text (like markdown, but without links, pictures, or inline formatting).

writePowerpoint #

Arguments

:: PandocMonad m |
=> WriterOptions | Writer options
-> Pandoc | Document to convert
-> m ByteString |

writeRST :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to RST.

writeRTF :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to a string in rich text format.

writeRevealJs :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc document to Reveal JS HTML slide show.

writeS5 :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc document to S5 HTML slide show.

writeSlideous :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc document to Slideous HTML slide show.

writeSlidy :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc document to Slidy HTML slide show.

writeTEI :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc document to string in TEI XML format.

writeTexinfo :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to Texinfo.

writeTextile :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to Textile.

writeTypst :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to Typst.

writeXWiki :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to XWiki.

writeZimWiki :: PandocMonad m => WriterOptions -> Pandoc -> m Text #

Convert Pandoc to ZimWiki.

getWriter :: PandocMonad m => FlavoredFormat -> m (Writer m, Extensions) #

Retrieve writer, extensions based on formatSpec (format+extensions).