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
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:
* 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


reStructuredText .


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


LaTeX with preset minted formatting for code and results.


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 markdown.


reStructuredText for Sphinx .


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