module sphinxext.sphinx_image_extension

Inheritance diagram of pyquickhelper.sphinxext.sphinx_image_extension

Short summary

module pyquickhelper.sphinxext.sphinx_image_extension

Defines a sphinx extension to add button to share a page

source on GitHub

Classes

class

truncated documentation

simpleimage_node

Defines image node.

SimpleImageDirective

Adds an image to a page. It can be done by adding

Functions

function

truncated documentation

_clean_value

depart_simpleimage_node_html

What to do when leaving a node image the function should have different behaviour, depending on the format, or …

depart_simpleimage_node_latex

What to do when leaving a node image the function should have different behaviour, depending on the format, or …

depart_simpleimage_node_md

What to do when leaving a node image the function should have different behaviour, depending on the format, or …

depart_simpleimage_node_rst

What to do when leaving a node image the function should have different behaviour, depending on the format, or …

depart_simpleimage_node_text

What to do when leaving a node image the function should have different behaviour, depending on the format, or …

initialize_simpleimages_directive

Initializes the image directives.

setup

setup for image (sphinx)

visit_simpleimage_node

Visits a image node. Copies the image.

Methods

method

truncated documentation

run

Runs the directive.

Documentation

Defines a sphinx extension to add button to share a page

source on GitHub

class pyquickhelper.sphinxext.sphinx_image_extension.SimpleImageDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source][source]

Bases: docutils.parsers.rst.Directive

Adds an image to a page. It can be done by adding:

.. simpleimage:: filename.png
    :width: 400
    :height: 600

Available options:

  • :width:, :height:, :scale:: resize the image

  • :target:: for HTML, clickable image

  • :alt:: for HTML

  • :download: if the image is a url, it downloads the image.

  • :convert: convert the image into a new format

source on GitHub

node_class[source]

alias of simpleimage_node

run()[source][source]

Runs the directive.

Returns

a list of nodes

source on GitHub

pyquickhelper.sphinxext.sphinx_image_extension._clean_value(val)[source][source]
pyquickhelper.sphinxext.sphinx_image_extension.depart_simpleimage_node_html(self, node)[source][source]

What to do when leaving a node image the function should have different behaviour, depending on the format, or the setup should specify a different function for each.

source on GitHub

pyquickhelper.sphinxext.sphinx_image_extension.depart_simpleimage_node_latex(self, node)[source][source]

What to do when leaving a node image the function should have different behaviour, depending on the format, or the setup should specify a different function for each.

source on GitHub

pyquickhelper.sphinxext.sphinx_image_extension.depart_simpleimage_node_md(self, node)[source][source]

What to do when leaving a node image the function should have different behaviour, depending on the format, or the setup should specify a different function for each.

source on GitHub

pyquickhelper.sphinxext.sphinx_image_extension.depart_simpleimage_node_rst(self, node)[source][source]

What to do when leaving a node image the function should have different behaviour, depending on the format, or the setup should specify a different function for each.

source on GitHub

pyquickhelper.sphinxext.sphinx_image_extension.depart_simpleimage_node_text(self, node)[source][source]

What to do when leaving a node image the function should have different behaviour, depending on the format, or the setup should specify a different function for each.

source on GitHub

pyquickhelper.sphinxext.sphinx_image_extension.initialize_simpleimages_directive(app)[source][source]

Initializes the image directives.

source on GitHub

pyquickhelper.sphinxext.sphinx_image_extension.setup(app)[source][source]

setup for image (sphinx)

source on GitHub

class pyquickhelper.sphinxext.sphinx_image_extension.simpleimage_node(rawsource='', *children, **attributes)[source][source]

Bases: docutils.nodes.General, docutils.nodes.Element

Defines image node.

source on GitHub

pyquickhelper.sphinxext.sphinx_image_extension.visit_simpleimage_node(self, node)[source][source]

Visits a image node. Copies the image.

source on GitHub