ipypublish.sphinx.notebook.directives module¶
adapted from nbsphinx
-
class
ipypublish.sphinx.notebook.directives.
NBInputToggle
(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶ Bases:
docutils.parsers.rst.Directive
a toggle button for nbinput cells
-
has_content
= True¶
-
option_spec
= {}¶
-
optional_arguments
= 0¶
-
required_arguments
= 0¶
-
-
class
ipypublish.sphinx.notebook.directives.
NBOutputToggle
(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶ Bases:
ipypublish.sphinx.notebook.directives.NBInputToggle
a toggle button for nboutput cells
-
class
ipypublish.sphinx.notebook.directives.
NbAdmonition
(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶ Bases:
docutils.parsers.rst.Directive
Base class for NbInfo and NbWarning.
-
has_content
= True¶
-
option_spec
= {}¶
-
optional_arguments
= 0¶
-
required_arguments
= 0¶
-
-
class
ipypublish.sphinx.notebook.directives.
NbInfo
(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶ Bases:
ipypublish.sphinx.notebook.directives.NbAdmonition
An information box.
-
class
ipypublish.sphinx.notebook.directives.
NbInput
(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶ Bases:
docutils.parsers.rst.Directive
A notebook input cell with prompt and code area.
-
final_argument_whitespace
= False¶
-
has_content
= True¶
-
option_spec
= {'add-toggle': <function flag>, 'caption': <function unchanged>, 'empty-lines-after': <function nonnegative_int>, 'empty-lines-before': <function nonnegative_int>, 'execution-count': <function positive_int>, 'name': <function unchanged>, 'no-output': <function flag>}¶
-
optional_arguments
= 1¶
-
required_arguments
= 0¶
-
-
class
ipypublish.sphinx.notebook.directives.
NbOutput
(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶ Bases:
docutils.parsers.rst.Directive
A notebook output cell with optional prompt.
-
final_argument_whitespace
= False¶
-
has_content
= True¶
-
option_spec
= {'add-toggle': <function flag>, 'class': <function unchanged>, 'empty-lines-after': <function nonnegative_int>, 'empty-lines-before': <function nonnegative_int>, 'execution-count': <function positive_int>, 'more-to-come': <function flag>}¶
-
optional_arguments
= 1¶
-
required_arguments
= 0¶
-
-
class
ipypublish.sphinx.notebook.directives.
NbWarning
(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶ Bases:
ipypublish.sphinx.notebook.directives.NbAdmonition
A warning box.
-
ipypublish.sphinx.notebook.directives.
container_wrapper
(directive, literal_node, caption, classes)[source]¶ adapted from https://github.com/sphinx-doc/sphinx/blob/master/sphinx/directives/code.py