Questions tagged [nbconvert]

nbconvert is a tool for Jupyter Notebook conversions.

nbconvert is a tool for Jupyter Notebook conversions.

The nbconvert tool, jupyter nbconvert, converts notebooks to various other formats via Jinja templates. The nbconvert tool allows you to convert an .ipynb notebook file into various static formats including:

Github: https://github.com/jupyter/nbconvert

Docs: https://nbconvert.readthedocs.io/en/latest/

298 questions
11
votes
2 answers

Remove cells from Jupyter Notebook with nbconvert

Recommendations mentioned in How to hide one specific cell (input or output) in IPython Notebook? don't work. On Windows I do the following jupyter nbconvert a.ipynb --TagRemovePreprocessor.remove_cell_tags="{'remove_cell'}" but get an…
user764640
  • 181
  • 2
  • 5
11
votes
0 answers

Add newcommand to jupyter which works as markdown AND nbconvert

There are hacks for defining \newcommand in a jupyter markdown cell (just include $\newcommand\whatever$ inside a markdown cell. This doesn't render the code but the new command is active throughout the notebook.) OR when using nbconvert (just…
weymouth
  • 521
  • 6
  • 17
11
votes
3 answers

execute jupyter notebook and keep attached to existing kernel

I know about nbconvert and use it to generate static html or ipynb files with the results output. However, I want to be able to generate a notebook that stays attached to a kernel that I already have running, so that I can do further data…
unsorted
  • 3,114
  • 3
  • 29
  • 39
10
votes
1 answer

Output widget appears outside tab widget when using nbconvert on jupyter notebook with ipywidgets

I created a notebook which should display plots in a tab widget. As far as I understand, to include something like plots in the tab widget, I need to wrap it in the output widget. In the notebook itself it works but when I convert it to html via…
Benedikt
  • 105
  • 8
10
votes
3 answers

Plotly graph does not show when jupyter notebook is converted to slides

I have a jupyter notebook with interractive plotly plots. I am converting that notebook into slides using nbconvert. When I do so the plotly plots do not show up in the slides. I get the following tornado warnings as well $ jupyter nbconvert…
deltap
  • 4,176
  • 7
  • 26
  • 35
10
votes
2 answers

Jupyter notebook matplotlib figures missing in exported pdf

When generating a pdf in jupyter notebook, everything works great, but I would like to keep the inline figures inside the pdf, as well as the notebook. Here is my code: %matplotlib notebook import matplotlib.pyplot as plt import numpy as np from…
areth
  • 113
  • 1
  • 2
  • 6
9
votes
0 answers

Unable to use exporters from jupyter nbcontrib_extensions

Using this Dockerfile: FROM python:3.7 FROM jupyter/minimal-notebook WORKDIR $HOME RUN python -m pip install --upgrade pip COPY requirements.txt ./requirements.txt RUN python -m pip install -r requirements.txt RUN python -m pip install --upgrade…
scc
  • 10,342
  • 10
  • 51
  • 65
9
votes
2 answers

Error: Importing notebooks requires Jupyter nbconvert to be installed

I am trying to import an ipynb file in a Jupyter Notebook in VS Code. However I am getting the following error everytime: Error 2021-01-02 00:31:20: Export failed [Error: Importing notebooks requires Jupyter nbconvert to be installed. at…
Daremitsu
  • 545
  • 2
  • 8
  • 24
9
votes
1 answer

How to Convert a Jupyter Notebook to an Academic Paper Format?

I have a Jupyter notebook containing all of the content I would like to put in an academic paper (text, equations, and plots), together with code which I would like hidden. Does there exist a way to programmatically convert the notebook into a form…
jsaporta
  • 1,149
  • 2
  • 12
  • 15
8
votes
0 answers

How to configure working directory in nbconvert library

I am programmatically executing notebooks using nbconvert.preprocessors.ExecutePreprocessor. My notebooks depend on resources specified by relative file name, and I cannot get the kernel to run with a specified directory as the working directory. …
Dan Morris
  • 138
  • 1
  • 7
8
votes
3 answers

Trying to convert Jupyter Notebook to PDF slides

I'm trying to convert a Jupyter notebook that is using RISE to visualize the slides as a slideshow in the browser into a PDF file. The PDF file should have all pages in landscape mode and resemble the view in the browser. Of course, animations are…
Hendrik Wiese
  • 2,010
  • 3
  • 22
  • 49
8
votes
1 answer

nbconvert: exporting to another directory?

I'm wondering if it's possible to export a Jupyter notebook to a different directory than the same directory as the notebook itself? I'm using this to build HTML versions of the notebooks, and I'd like them to reside under docs/ in my GitHub repo…
ericmjl
  • 13,541
  • 12
  • 51
  • 80
7
votes
1 answer

How to save of the current state of a notebook in JupyterLab

I would like to export a JupyterLab notebook (not Jupyter Notebook) to HTML. I am using the following code inside of the notebook itself, that correctly exports the notebook: os.popen('jupyter nbconvert current_notebook.ipynb --to…
Alex Blasco
  • 793
  • 11
  • 22
7
votes
0 answers

Scrolling issues in reveal.js slides created by Jupyter nbconvert

I have an issue with Jupyter slides: when I create a presentation which exceeds the screen height, for example: %matplotlib inline import matplotlib.pyplot as plt plt.subplots(3,1,figsize=(5,10)) And then serve it with jupyter nbconvert…
John Smith
  • 1,059
  • 1
  • 13
  • 35
7
votes
1 answer

How to increase the page width in ipython notebook (jupyter) slides

In an ipython notebook (jupyter) slideshow created with ipython nbconvert presentation.ipynb --to slides --post serve images are of poor quality because they seem to be scaled down to the page width. How can I increase the page width / display…
Valentas
  • 2,014
  • 20
  • 24
1
2
3
19 20