logotip esquerre

PANDOC MANUAL

logotip de la pàgina

[<][<=][=>]Pandoc User's Guide

Synopsis
Description
    Using pandoc
    Creating a PDF
    hsmarkdown
Options
    General options
    Reader options
    General writer options
    Options affecting specific writers
    Citations
    Math rendering in HTML
    Options for wrapper scripts
Templates
Pandoc’s markdown
    Philosophy
    Paragraphs
    Headers
        Setext-style headers
        Atx-style headers
        Header identifiers in HTML, LaTeX, and ConTeXt
    Block quotations
    Verbatim (code) blocks
        Indented code blocks
        Delimited code blocks
    Lists
        Bullet lists
        The four-space rule
        Ordered lists
        Definition lists
        Numbered example lists
        Compact and loose lists
        Ending a list
    Horizontal rules
    Tables
    Title block
    Backslash escapes
    Smart punctuation
    Inline formatting
        Emphasis
        Strikeout
        Superscripts and subscripts
        Verbatim
    Math
    Raw HTML
    Raw TeX
        Macros
    Links
        Automatic links
        Inline links
        Reference links
        Internal links
    Images
        Pictures with captions
    Footnotes
    Citations
Producing slide shows with Pandoc
    Structuring the slide show
    Incremental lists
    Styling the slides
Literate Haskell support
Authors

[<][<=][=>][*]


W adorn

Literate Haskell support

If you append +lhs to an appropriate input or output format (markdown, rst, or latex for input or output; beamer, html or html5 for output only), pandoc will treat the document as literate Haskell source. This means that

  • In markdown input, “bird track” sections will be parsed as Haskell code rather than block quotations. Text between \begin{code} and \end{code} will also be treated as Haskell code.

  • In markdown output, code blocks with classes haskell and literate will be rendered using bird tracks, and block quotations will be indented one space, so they will not be treated as Haskell code. In addition, headers will be rendered setext-style (with underlines) rather than atx-style (with ‘#’ characters). (This is because ghc treats ‘#’ characters in column 1 as introducing line numbers.)

  • In restructured text input, “bird track” sections will be parsed as Haskell code.

  • In restructured text output, code blocks with class haskell will be rendered using bird tracks.

  • In LaTeX input, text in code environments will be parsed as Haskell code.

  • In LaTeX output, code blocks with class haskell will be rendered inside code environments.

  • In HTML output, code blocks with class haskell will be rendered with class literatehaskell and bird tracks.

Examples:

pandoc -f markdown+lhs -t html

reads literate Haskell source formatted with markdown conventions and writes ordinary HTML (without bird tracks).

pandoc -f markdown+lhs -t html+lhs

writes HTML with the Haskell code in bird tracks, so it can be copied and pasted as literate Haskell source.

tornar

© Servei d'Informática, Universitat de Valencia. email SIUV Mod: 23 febrero 2021 20:25  documentació wiki traça de la pàgina Modificar