From 0760952cdfc6f7b7fc34948df07d112f8cabe5df Mon Sep 17 00:00:00 2001 From: Carlos Wang <31461411+wangxiaoxiang5599@users.noreply.github.com> Date: Wed, 7 Oct 2026 11:46:41 +1300 Subject: [PATCH 1/4] Add practical Jupyter PDF export instructions --- source/jupyter.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/source/jupyter.md b/source/jupyter.md index 928e18a3..2464a850 100755 --- a/source/jupyter.md +++ b/source/jupyter.md @@ -472,6 +472,20 @@ even if the Jupyter notebook included references to image files. Unfortunately, the default settings will result in a document that visually looks quite different from what the Jupyter notebook looked like. The font, page margins, and other details will appear different in the `.pdf` output. +For command-line export, `nbconvert` can create either a LaTeX-based PDF or a browser-rendered PDF. The LaTeX route is: + +```bash +jupyter nbconvert --to pdf notebook.ipynb +``` + +It requires a LaTeX distribution, including XeLaTeX. If you do not have LaTeX installed, the `webpdf` exporter uses headless Chromium instead: + +```bash +pip install "nbconvert[webpdf]" +jupyter nbconvert --to webpdf --allow-chromium-download notebook.ipynb +``` + +The first `webpdf` run may download Chromium and requires an internet connection. Both commands use outputs saved in the notebook; run the cells you need and save the notebook first if you want current results in the PDF. See the [nbconvert usage guide](https://nbconvert.readthedocs.io/en/latest/usage.html) for more options. For a comparison of GUI and command-line workflows, see this [Jupyter notebook to PDF guide](https://ipynbtopdf.xyz/how-to-convert-jupyter-notebook-to-pdf). ## Creating a new Jupyter notebook From e3dd1ef1b41c5ad9d869208f0ebc71d4c264a652 Mon Sep 17 00:00:00 2001 From: Carlos Wang <31461411+wangxiaoxiang5599@users.noreply.github.com> Date: Wed, 7 Oct 2026 11:47:26 +1300 Subject: [PATCH 2/4] Format Jupyter PDF export guidance --- source/jupyter.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/source/jupyter.md b/source/jupyter.md index 2464a850..6e60c954 100755 --- a/source/jupyter.md +++ b/source/jupyter.md @@ -472,20 +472,26 @@ even if the Jupyter notebook included references to image files. Unfortunately, the default settings will result in a document that visually looks quite different from what the Jupyter notebook looked like. The font, page margins, and other details will appear different in the `.pdf` output. -For command-line export, `nbconvert` can create either a LaTeX-based PDF or a browser-rendered PDF. The LaTeX route is: +For command-line export, `nbconvert` offers two routes. The LaTeX route is: ```bash jupyter nbconvert --to pdf notebook.ipynb ``` -It requires a LaTeX distribution, including XeLaTeX. If you do not have LaTeX installed, the `webpdf` exporter uses headless Chromium instead: +This requires a LaTeX installation, including XeLaTeX. If LaTeX is not installed, +the `webpdf` exporter renders the notebook with headless Chromium: ```bash pip install "nbconvert[webpdf]" jupyter nbconvert --to webpdf --allow-chromium-download notebook.ipynb ``` -The first `webpdf` run may download Chromium and requires an internet connection. Both commands use outputs saved in the notebook; run the cells you need and save the notebook first if you want current results in the PDF. See the [nbconvert usage guide](https://nbconvert.readthedocs.io/en/latest/usage.html) for more options. For a comparison of GUI and command-line workflows, see this [Jupyter notebook to PDF guide](https://ipynbtopdf.xyz/how-to-convert-jupyter-notebook-to-pdf). +The first `webpdf` run may download Chromium and requires an internet connection. +Both commands use outputs already saved in the notebook, so run the cells you need +and save the notebook first if you want current results in the PDF. See the +[nbconvert usage guide](https://nbconvert.readthedocs.io/en/latest/usage.html) +for more options. For a comparison of GUI and command-line workflows, see this +[Jupyter notebook to PDF guide](https://ipynbtopdf.xyz/how-to-convert-jupyter-notebook-to-pdf). ## Creating a new Jupyter notebook From de201516835966d03b3d5201841e3af451b13012 Mon Sep 17 00:00:00 2001 From: Carlos Wang <31461411+wangxiaoxiang5599@users.noreply.github.com> Date: Wed, 7 Oct 2026 11:47:50 +1300 Subject: [PATCH 3/4] Separate PDF export guidance paragraph --- source/jupyter.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/jupyter.md b/source/jupyter.md index 6e60c954..6a15c052 100755 --- a/source/jupyter.md +++ b/source/jupyter.md @@ -471,7 +471,8 @@ more. The benefit of exporting to PDF is that it is a standalone document, even if the Jupyter notebook included references to image files. Unfortunately, the default settings will result in a document that visually looks quite different from what the Jupyter notebook looked -like. The font, page margins, and other details will appear different in the `.pdf` output. +like. The font, page margins, and other details will appear different in the `.pdf` output. + For command-line export, `nbconvert` offers two routes. The LaTeX route is: ```bash From ff474469682e37c758488ae444da7f4e08dffefd Mon Sep 17 00:00:00 2001 From: Carlos Wang <31461411+wangxiaoxiang5599@users.noreply.github.com> Date: Wed, 7 Oct 2026 11:48:15 +1300 Subject: [PATCH 4/4] Normalize paragraph line endings --- source/jupyter.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/jupyter.md b/source/jupyter.md index 6a15c052..92215080 100755 --- a/source/jupyter.md +++ b/source/jupyter.md @@ -471,8 +471,8 @@ more. The benefit of exporting to PDF is that it is a standalone document, even if the Jupyter notebook included references to image files. Unfortunately, the default settings will result in a document that visually looks quite different from what the Jupyter notebook looked -like. The font, page margins, and other details will appear different in the `.pdf` output. - +like. The font, page margins, and other details will appear different in the `.pdf` output. + For command-line export, `nbconvert` offers two routes. The LaTeX route is: ```bash