Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
pip._vendor.pygments.formatters.latex.LatexFormatter Class Reference
Inheritance diagram for pip._vendor.pygments.formatters.latex.LatexFormatter:
Inheritance graph
[legend]
Collaboration diagram for pip._vendor.pygments.formatters.latex.LatexFormatter:
Collaboration graph
[legend]

Public Member Functions

 __init__ (self, **options)
 
 get_style_defs (self, arg='')
 
 format_unencoded (self, tokensource, outfile)
 
- Public Member Functions inherited from pip._vendor.pygments.formatter.Formatter
 format (self, tokensource, outfile)
 

Public Attributes

 nowrap
 
 docclass
 
 preamble
 
 linenos
 
 linenostart
 
 linenostep
 
 verboptions
 
 nobackground
 
 commandprefix
 
 texcomments
 
 mathescape
 
 escapeinside
 
 left
 
 right
 
 envname
 
- Public Attributes inherited from pip._vendor.pygments.formatter.Formatter
 style
 
 full
 
 title
 
 encoding
 
 options
 

Static Public Attributes

str name = 'LaTeX'
 
list aliases = ['latex', 'tex']
 
list filenames = ['*.tex']
 
- Static Public Attributes inherited from pip._vendor.pygments.formatter.Formatter
 name = None
 
list aliases = []
 
list filenames = []
 
bool unicodeoutput = True
 

Protected Member Functions

 _create_stylesheet (self)
 

Detailed Description

Format tokens as LaTeX code. This needs the `fancyvrb` and `color`
standard packages.

Without the `full` option, code is formatted as one ``Verbatim``
environment, like this:

.. sourcecode:: latex

    \begin{Verbatim}[commandchars=\\\{\}]
    \PY{k}{def }\PY{n+nf}{foo}(\PY{n}{bar}):
        \PY{k}{pass}
    \end{Verbatim}

Wrapping can be disabled using the `nowrap` option.

The special command used here (``\PY``) and all the other macros it needs
are output by the `get_style_defs` method.

With the `full` option, a complete LaTeX document is output, including
the command definitions in the preamble.

The `get_style_defs()` method of a `LatexFormatter` returns a string
containing ``\def`` commands defining the macros needed inside the
``Verbatim`` environments.

Additional options accepted:

`nowrap`
    If set to ``True``, don't wrap the tokens at all, not even inside a
    ``\begin{Verbatim}`` environment. This disables most other options
    (default: ``False``).

`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'``).

`preamble`
    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: ``''``).

`commandprefix`
    The LaTeX commands used to produce colored output are constructed
    using this prefix and some letters (default: ``'PY'``).

    .. versionadded:: 0.7
    .. versionchanged:: 0.10
       The default is now ``'PY'`` instead of ``'C'``.

`texcomments`
    If set to ``True``, enables LaTeX comment lines.  That is, LaTex markup
    in comment tokens is not escaped so that LaTeX can render it (default:
    ``False``).

    .. versionadded:: 1.2

`mathescape`
    If set to ``True``, enables LaTeX math mode escape in comments. That
    is, ``'$...$'`` inside a comment will trigger math mode (default:
    ``False``).

    .. versionadded:: 1.2

`escapeinside`
    If set to a string of length 2, enables escaping to LaTeX. Text
    delimited by these 2 characters is read as LaTeX code and
    typeset accordingly. It has no effect in string literals. It has
    no effect in comments if `texcomments` or `mathescape` is
    set. (default: ``''``).

    .. versionadded:: 2.0

`envname`
    Allows you to pick an alternative environment name replacing Verbatim.
    The alternate environment still has to support Verbatim's option syntax.
    (default: ``'Verbatim'``).

    .. versionadded:: 2.0

Constructor & Destructor Documentation

◆ __init__()

pip._vendor.pygments.formatters.latex.LatexFormatter.__init__ (   self,
**  options 
)
As with lexers, this constructor takes arbitrary optional arguments,
and if you override it, you should first process your own options, then
call the base class implementation.

Reimplemented from pip._vendor.pygments.formatter.Formatter.

Member Function Documentation

◆ get_style_defs()

pip._vendor.pygments.formatters.latex.LatexFormatter.get_style_defs (   self,
  arg = '' 
)
Return the command sequences needed to define the commands
used to format text in the verbatim environment. ``arg`` is ignored.

Reimplemented from pip._vendor.pygments.formatter.Formatter.


The documentation for this class was generated from the following file: