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 indeed nbprint itself started as 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 advances to the @media print CSS directive spearheaded by the lovely folks at pagedjs, 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, which makes designing and generating reports a breeze, even without knowledge of Python. Documents are modular and can be easily composed via hydra.