summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/src/formatters.txt24
-rw-r--r--pygments/formatters/bbcode.py4
-rw-r--r--pygments/formatters/html.py25
-rw-r--r--pygments/formatters/latex.py22
-rw-r--r--pygments/formatters/rtf.py4
5 files changed, 53 insertions, 26 deletions
diff --git a/docs/src/formatters.txt b/docs/src/formatters.txt
index 8079a93a..7a590648 100644
--- a/docs/src/formatters.txt
+++ b/docs/src/formatters.txt
@@ -40,30 +40,6 @@ All formatters support these options:
for the formatter if given.
-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
=================
diff --git a/pygments/formatters/bbcode.py b/pygments/formatters/bbcode.py
index 0496b463..676bd2ea 100644
--- a/pygments/formatters/bbcode.py
+++ b/pygments/formatters/bbcode.py
@@ -33,6 +33,10 @@ class BBCodeFormatter(Formatter):
Additional options accepted:
+ `style`
+ The style to use, can be a string or a Style subclass (default:
+ ``'default'``).
+
`codetag`
If set to true, put the output into ``[code]`` tags (default:
``false``)
diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py
index 8697ff29..beaf087c 100644
--- a/pygments/formatters/html.py
+++ b/pygments/formatters/html.py
@@ -144,8 +144,8 @@ class HtmlFormatter(Formatter):
td .code .cm { color: #999999 }
...
- If you have pygments 0.6 or higher you can also pass a list of tuple to the
- `get_style_defs` method to request multiple prefixes for the tokens:
+ If you have Pygments 0.6 or higher, you can also pass a list or tuple to the
+ `get_style_defs()` method to request multiple prefixes for the tokens:
.. sourcecode:: python
@@ -167,6 +167,18 @@ class HtmlFormatter(Formatter):
If set to ``True``, don't wrap the tokens at all, not even inside a ``<pre>``
tag. This disables all other options (default: ``False``).
+ `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: ``''``).
+
+ `style`
+ The style to use, can be a string or a Style subclass (default:
+ ``'default'``).
+
`noclasses`
If set to true, token ``<span>`` tags will not use CSS classes, but
inline styles. This is not recommended for larger pieces of code since
@@ -194,6 +206,15 @@ class HtmlFormatter(Formatter):
file's path, if the latter can be found. The stylesheet is then written
to this file instead of the HTML file. *New in Pygments 0.6.*
+ `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.
+
`linenospecial`
If set to a number n > 0, every nth line number is given the CSS
class ``"special"`` (default: ``0``).
diff --git a/pygments/formatters/latex.py b/pygments/formatters/latex.py
index bc40cf1b..a851997e 100644
--- a/pygments/formatters/latex.py
+++ b/pygments/formatters/latex.py
@@ -73,6 +73,19 @@ class LatexFormatter(Formatter):
Additional options accepted:
+
+ `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: ``''``).
+
`docclass`
If the `full` option is enabled, this is the document class to use
(default: ``'article'``).
@@ -81,6 +94,15 @@ class LatexFormatter(Formatter):
If the `full` option is enabled, this can be further preamble commands,
e.g. ``\usepackage`` (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.
+
`verboptions`
Additional options given to the Verbatim environment (see the *fancyvrb*
docs for possible values) (default: ``''``).
diff --git a/pygments/formatters/rtf.py b/pygments/formatters/rtf.py
index 74538d0a..d0a17ac5 100644
--- a/pygments/formatters/rtf.py
+++ b/pygments/formatters/rtf.py
@@ -25,6 +25,10 @@ class RtfFormatter(Formatter):
Additional options accepted:
+ `style`
+ The style to use, can be a string or a Style subclass (default:
+ ``'default'``).
+
`fontface`
The used font famliy, for example ``Bitstream Vera Sans``. Defaults to
some generic font which is supposed to have fixed width.