ipypublish.postprocessors.pdfexport module

a module for exporting latex file to pdf TODO could this be refactored as nbconvert postprocessor

class ipypublish.postprocessors.pdfexport.PDFExport(*args, **kwargs)[source]

Bases: ipypublish.postprocessors.base.IPyPostProcessor

a post processor to convert tex to pdf using latexmk

property allowed_mimetypes

override in subclasses

return a list of allowed mime types if None, then all are allowed

Text based mime-types include: text/plain, text/latex, text/restructuredtext, text/html, text/x-python, application/json, text/markdown, text/asciidoc, text/yaml


A boolean (True, False) trait.


A boolean (True, False) trait.


A trait for unicode strings.

property logger_name

override in subclass


A boolean (True, False) trait.

property requires_path

override in subclasses

whether the prostprocessor requires the supplied filepath to have an existing parent directory

if True and filepath is None, will raise an IOError, otherwise, will try to make the directory if it doesn’t exist

run_postprocess(stream, mimetype, filepath, resources)[source]

should not be called directly

  • stream (str) – the main file contents

  • filepath (None or pathlib.Path) – the path to the output file


  • stream (str)

  • filepath (None or pathlib.Path)

class ipypublish.postprocessors.pdfexport.change_dir(new_path)[source]

Bases: object

Context manager for changing the current working directory