ipypublish.preprocessors.latex_doc_html module

class ipypublish.preprocessors.latex_doc_html.LatexDocHTML(*args, **kwargs)[source]

Bases: nbconvert.preprocessors.base.Preprocessor

processing of ipub metatags, specific to html

  • import embedded html files
  • add refmap key to references for {label:reference name} lookup e.g. {“fig:test”:”fig. 1”}
  • add caption_prefix tag for floats with correct numbering/name e.g. cell.metadata.ipub.figure.caption_prefix = “Figure 1: “
embed_html(cell, path)[source]

a new cell, based on embedded html file


A trait for unicode strings.


A trait for unicode strings.

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.

  • nb (NotebookNode) – Notebook being converted
  • resources (dictionary) – Additional resources used in the conversion process. Allows preprocessors to pass variables into the Jinja engine.
resolve_path(fpath, filepath)[source]

resolve a relative path, w.r.t. another filepath


A trait for unicode strings.