Background¶
Jupyter Notebooks are widely used for reports via nbconvert. Most efforts focus on building web reports / websites from notebooks, including Voilà and Jupyter Book.
Despite being the primary goal of early notebook conversion efforts, in recent years much less focus has been spent on print media - PDFs for reports, academic papers, newspapers, etc. There are many examples of nbconvert templates for academic papers, as well as projects like ipypublish. Most of these efforts focus on \(\\LaTeX\), and nbprint itself started as a convenience framework for formatting charts and tables similarly between html and pdf outputs.
However, with recent releases to nbconvert, which now supports webpdf (printing as pdf from within a headless web browser), and with the work pagedjs has done on paged media in CSS, it is now much easier to build publication ready print-oriented media on the web.
This is the goal of nbprint. Using pagedjs, nbprint provides templates and utilities for building web reports targeting print media. Beyond that, it provides infrastructure for parameterizing and configuring documents via pydantic, so reports can be designed and generated without writing Python. Documents are modular and can be composed via hydra. The gallery shows rendered examples.