Sha256: f243dbd6dd1fc72b33f16facc1fb4945147dc8f1c87c6436fafb6c671c747b79

Contents?: true

Size: 1.57 KB

Versions: 37

Compression:

Stored size: 1.57 KB

Contents

.. -*- mode: rst -*-

====================
Available formatters
====================

This page lists all builtin formatters.

Common options
==============

All formatters support these options:

`encoding`
    *New in Pygments 0.6.*

    If given, must be an encoding name (such as ``"utf-8"``). This will
    be used to convert the token strings (which are Unicode strings)
    to byte strings in the output (default: ``None``).
    It will also be written in an encoding declaration suitable for the
    document format if the `full` option is given (e.g. a ``meta
    content-type`` directive in HTML or an invocation of the `inputenc`
    package in LaTeX).

    If this is ``""`` or ``None``, Unicode strings will be written
    to the output file, which most file-like objects do not support.
    For example, `pygments.highlight()` will return a Unicode string if
    called with no `outfile` argument and a formatter that has `encoding`
    set to ``None`` because it uses a `StringIO.StringIO` object that
    supports Unicode arguments to `write()`. Using a regular file object
    wouldn't work.

`outencoding`
    *New in Pygments 0.7.*

    When using Pygments from the command line, any `encoding` option given is
    passed to the lexer and the formatter. This is sometimes not desirable,
    for example if you want to set the input encoding to ``"guess"``.
    Therefore, `outencoding` has been introduced which overrides `encoding`
    for the formatter if given.


Formatter classes
=================

All these classes are importable from `pygments.formatters`.

[builtin_formatter_docs]

Version data entries

37 entries across 37 versions & 4 rubygems

Version Path
mortar-pygments.rb-0.5.7 vendor/pygments-main/docs/src/formatters.txt
mortar-pygments.rb-0.5.6 vendor/pygments-main/docs/src/formatters.txt
mortar-pygments.rb-0.5.5 vendor/pygments-main/docs/src/formatters.txt
pygments.rb-jruby-0.5.4.2 vendor/pygments-main/docs/src/formatters.txt
pygments.rb-jruby-0.5.4.1 vendor/pygments-main/docs/src/formatters.txt
pygments.rb-jruby-0.5.4 vendor/pygments-main/docs/src/formatters.txt
gitlab-pygments.rb-0.5.4 vendor/pygments-main/docs/src/formatters.txt
pygments.rb-0.5.4 vendor/pygments-main/docs/src/formatters.txt
pygments.rb-0.5.2 vendor/pygments-main/docs/src/formatters.txt
pygments.rb-0.5.1 vendor/pygments-main/docs/src/formatters.txt
pygments.rb-0.5.0 vendor/pygments-main/docs/src/formatters.txt
gitlab-pygments.rb-0.3.2 vendor/pygments-main/docs/src/formatters.txt
pygments.rb-0.4.2 vendor/pygments-main/docs/src/formatters.txt
pygments.rb-0.4.1 vendor/pygments-main/docs/src/formatters.txt
pygments.rb-0.3.7 vendor/pygments-main/docs/src/formatters.txt
pygments.rb-0.3.6 vendor/pygments-main/docs/src/formatters.txt
pygments.rb-0.3.5 vendor/pygments-main/docs/src/formatters.txt
pygments.rb-0.3.4 vendor/pygments-main/docs/src/formatters.txt
pygments.rb-0.3.3 vendor/pygments-main/docs/src/formatters.txt
pygments.rb-0.3.2 vendor/pygments-main/docs/src/formatters.txt