ipypublish.preprocessors.latex_doc_captions module

class ipypublish.preprocessors.latex_doc_captions.LatexCaptions(**kw)[source]

Bases: nbconvert.preprocessors.base.Preprocessor

a preprocessor to 1. find cells with a ipub.caption meta-tag,

extract the caption and label to a dict and remove the cell
  1. find cells with the found labels and replace their captions
add_prefix

A boolean (True, False) trait.

preprocess(nb, resources)[source]

Preprocessing to apply on each notebook.

Must return modified nb, resources.

If you wish to apply your preprocessing to each cell, you might want to override preprocess_cell method instead.

Parameters:
  • nb (NotebookNode) – Notebook being converted
  • resources (dictionary) – Additional resources used in the conversion process. Allows preprocessors to pass variables into the Jinja engine.