Export Jupyter notebook or Markdown to PDF using pandoc + typst
Converts Jupyter notebooks or Markdown files to PDF using pandoc and typst.
/plugin marketplace add dakesan/bioinformatics-research-plugins/plugin install dakesan-lab-notebook-plugins-lab-notebook@dakesan/bioinformatics-research-pluginsExport a Jupyter notebook (.ipynb) or Markdown file (.md) to PDF format.
"${CLAUDE_PLUGIN_ROOT}/scripts/notebook_to_pdf.sh" <input.ipynb|input.md> [output.pdf]
| Option | Description |
|---|---|
--keep-md | Keep intermediate markdown file (for .ipynb only) |
--no-input | Exclude code cells from output (for .ipynb only, results only) |
# Export with same basename
notebook_to_pdf.sh notebook/labnote/Exp01_analysis.ipynb
# Export with custom output path
notebook_to_pdf.sh notebook/labnote/Exp01_analysis.ipynb reports/Exp01_report.pdf
# Export markdown directly to PDF
notebook_to_pdf.sh notebook/labnote/Exp01_labnote.md
# Export with custom output path
notebook_to_pdf.sh notebook/labnote/Exp01_labnote.md reports/Exp01_report.pdf
# Clean report without source code
notebook_to_pdf.sh --no-input notebook/labnote/Exp01_analysis.ipynb
The script requires the following tools:
uv pip install nbconvert (only needed for .ipynb files)brew install pandoc (required for all formats)brew install typst (required for all formats)The export uses a custom typst template located at:
assets/templates/notebook.typ
This template provides consistent styling for lab notebook PDFs and works with both notebook and markdown inputs.
After successful export:
STEERING.md to track the PDF.md files, the script skips nbconvert and goes directly to pandoc--keep-md and --no-input options are only applicable to .ipynb files