.. -*- mode: rst -*- ==================== Available formatters ==================== This page lists all builtin formatters. Common options ============== The `HtmlFormatter` and `LatexFormatter` classes support these options: `style` The style to use, can be a string or a Style subclass (default: ``'default'``). `full` Tells the formatter to output a "full" document, i.e. a complete self-contained document (default: ``False``). `title` If `full` is true, the title that should be used to caption the document (default: ``''``). `linenos` If set to ``True``, output line numbers (default: ``False``). `linenostart` The line number for the first line (default: ``1``). `linenostep` If set to a number n > 1, only every nth line number is printed. Formatter classes ================= All these classes are importable from `pygments.formatters`. `HtmlFormatter` --------------- Formats tokens as HTML 4 ```` tags within a ``
`` tag, wrapped
    in a ``
`` tag. The ``
``'s CSS class can be set by the `cssclass` option. If the `linenos` option is given and true, the ``
`` is additionally
    wrapped inside a ```` which has one row and two cells: one
    containing the line numbers and one containing the code. Example:

    .. sourcecode:: html

        
1
            2
def foo(bar):
              pass
            
(whitespace added to improve clarity). Wrapping can be disabled using the `nowrap` option. With the `full` option, a complete HTML 4 document is output, including the style definitions inside a ``