Output Formats

Listing formats

Pweave supports output in several formats. See the example gallery <examples/index.html>__ for examples.

You can list the supported formats using:

from pweave import PwebFormats
PwebFormats.listformats()
Pweave supported output formats:

* html:
   HTML with pygments highlighting
* leanpub:
   Leanpub markdown
* markdown:
   Pandoc markdown, same as format pandoc
* md2html:
   Markdown to HTML using Python-Markdown
* pandoc:
   Pandoc markdown
* pandoc2html:
   Markdown to HTML using Pandoc, requires Pandoc in path
* pandoc2latex:
   Markdown to Latex using Pandoc, requires Pandoc in path
* rst:
   reStructuredText
* softcover:
   SoftCover markdown
* sphinx:
   reStructuredText for Sphinx
* tex:
   Latex with verbatim for code and results
* texminted:
   Latex with predefined minted environment for codeblocks
* texpweave:
   Latex output with user defined formatting using named environments
(in latex header)
* texpygments:
   Latex output with pygments highlighted output

More info: http://mpastell.com/pweave/formats.html

Format descriptions

rst

reStructuredText .

tex

Standard LaTeX. Code, results and terminal blocks are written using verbatim environment.

texminted

LaTeX with preset minted formatting for code and results.

texpweave

LaTeX where code is written using pweavecode, results using pweaveout and terminals using pweaveterm environment. The user can (and needs to) define the formatting for these environment in preamble. This can done e.g. with the \newminted command with minted-package.

pandoc

Pandoc markdown.

sphinx

reStructuredText for Sphinx .

html

HTML with pygments highlighting for code. You’ll need to add css yourself, here’s one option pygments.css .