module sphinxext.sphinx_latex_builder
¶
Short summary¶
module pyquickhelper.sphinxext.sphinx_latex_builder
Overwrites latex writer as Sphinx’s version is bugged in version 1.8.0.
Classes¶
class |
truncated documentation |
---|---|
Customized FileOutput class for Sphinx. |
|
Dummy theme for sphinx. |
|
Overwrites LaTeXBuilder. |
|
Overwrites LaTeXTranslator and modifies … |
|
Overwrites LatexWriter. |
Functions¶
function |
truncated documentation |
---|---|
Initializes builder |
Properties¶
property |
truncated documentation |
---|---|
|
Get current table. |
Methods¶
method |
truncated documentation |
---|---|
Constructor, add a logger. |
|
|
|
|
|
|
|
|
|
|
|
Overwrites get_target_uri to control file names. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Documentation¶
Overwrites latex writer as Sphinx’s version is bugged in version 1.8.0.
- class pyquickhelper.sphinxext.sphinx_latex_builder.CustomizedSphinxFileOutput(**kwargs)[source]¶
Bases:
SphinxFileOutput
Customized FileOutput class for Sphinx.
- Parameters:
destination: either a file-like object (which is written directly) or None (which implies sys.stdout if no destination_path given).
destination_path: a path to a file, which is opened and then written.
encoding: the text encoding of the output file.
error_handler: the encoding error handler to use.
autoclose: close automatically after write (except when sys.stdout or sys.stderr is the destination).
handle_io_errors: ignored, deprecated, will be removed.
mode: how the file is to be opened (see standard function open). The default is ‘w’, providing universal newline support for text files.
- __init__(**kwargs)[source]¶
- Parameters:
destination: either a file-like object (which is written directly) or None (which implies sys.stdout if no destination_path given).
destination_path: a path to a file, which is opened and then written.
encoding: the text encoding of the output file.
error_handler: the encoding error handler to use.
autoclose: close automatically after write (except when sys.stdout or sys.stderr is the destination).
handle_io_errors: ignored, deprecated, will be removed.
mode: how the file is to be opened (see standard function open). The default is ‘w’, providing universal newline support for text files.
- write(data)[source]¶
Write data to a single file, also return it.
data can be a str or bytes instance. If writing bytes fails, an attempt is made to write to the low-level interface
self.destination.buffer
.If data is a str instance and self.encoding and self.destination.encoding are set to different values, data is encoded to a bytes instance using self.encoding.
Provisional: future versions may raise an error if self.encoding and self.destination.encoding are set to different values.
- class pyquickhelper.sphinxext.sphinx_latex_builder.DummySphinxTheme[source]¶
Bases:
object
Dummy theme for sphinx.
- class pyquickhelper.sphinxext.sphinx_latex_builder.EnhancedLaTeXBuilder(*args, **kwargs)[source]¶
Bases:
LaTeXBuilder
Overwrites LaTeXBuilder.
Constructor, add a logger.
- default_translator_class[source]¶
alias of
EnhancedLaTeXTranslator
- epilog = "The EnhancedTexinfo files are in %(outdir)s.\nRun 'make' in that directory to run these through makeinfo\n(use 'make info' here to do that automatically)."[source]¶
The message emitted upon successful build completion. This can be a printf-style template string with the following keys:
outdir
,project
- class pyquickhelper.sphinxext.sphinx_latex_builder.EnhancedLaTeXTranslator(document, builder, theme=None)[source]¶
Bases:
LaTeXTranslator
Overwrites LaTeXTranslator and modifies a few functions.
- class pyquickhelper.sphinxext.sphinx_latex_builder.EnhancedLaTeXWriter(builder)[source]¶
Bases:
LaTeXWriter
Overwrites LatexWriter.
- translate()[source]¶
Do final translation of self.document into self.output. Called from write. Override in subclasses.
Usually done with a docutils.nodes.NodeVisitor subclass, in combination with a call to docutils.nodes.Node.walk() or docutils.nodes.Node.walkabout(). The
NodeVisitor
subclass must support all standard elements (listed in docutils.nodes.node_class_names) and possibly non-standard elements used by the current Reader as well.
- translator_class[source]¶
alias of
EnhancedLaTeXTranslator
- pyquickhelper.sphinxext.sphinx_latex_builder.setup(app)[source]¶
Initializes builder
EnhancedLaTeXBuilder
.