You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable Scrolling for Outputs not Maintained in HTML Export
The Scrolling Output can be used to nest a docstring, allowing it to be viewed in a notebook without taking the main focus of the notebook. When a notebook is converted to HTML, this scrollbar is not maintained and the docstring is displayed using a normal output and therefore takes the main focus of the notebook:
Reproduce
Create a new notebook file and input in cell 1:
help(str)
And input in cell 2:
help(str)
This will create a long docstring. Right click the output of cell 1 and select, enable scrolling for outputs:
The output for cell 1 is scrollable and the output for cell 2 is not scrollable:
If the following is used:
jupyter-nbconvert --to html --template lab notebook.ipynb
Both outputs are not scrollable and the scrollable setting for each cell output is ignored:
If the notebook.ipynb is renamed to notebook.json:
Then the problem is the metadata provided is ignored when exporting to HTML:
This metadata should be applied to the HTML file and cells with scrolled true should display as scrolling outputs.
The nbconvert configuration options mention the metadata but only in the context of removing it and not applying it to the way a cell is displayed in HTML.
This is also related to JupyterLab when nbconvert is used via the GUI when using File -> Save and Export Notebook as -> HTML JupyterLab #15903.
Expected behavior
In the HTML file the output of cell 1 should be scrollable and the output of cell 2 should not be scrollable.
Context
Operating System and version: Windows 11 23H2
Browser and version: Version 122.0.6261.70 (Official Build) (64-bit)
JupyterLab version: 4.1.2
Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here, if applicable.
The text was updated successfully, but these errors were encountered:
Enable Scrolling for Outputs not Maintained in HTML Export
The Scrolling Output can be used to nest a docstring, allowing it to be viewed in a notebook without taking the main focus of the notebook. When a notebook is converted to HTML, this scrollbar is not maintained and the docstring is displayed using a normal output and therefore takes the main focus of the notebook:
Reproduce
Create a new notebook file and input in cell 1:
And input in cell 2:
This will create a long docstring. Right click the output of cell 1 and select, enable scrolling for outputs:
The output for cell 1 is scrollable and the output for cell 2 is not scrollable:
If the following is used:
Both outputs are not scrollable and the scrollable setting for each cell output is ignored:
If the notebook.ipynb is renamed to notebook.json:
Then the problem is the metadata provided is ignored when exporting to HTML:
This metadata should be applied to the HTML file and cells with
scrolled true
should display as scrolling outputs.The nbconvert configuration options mention the metadata but only in the context of removing it and not applying it to the way a cell is displayed in HTML.
This is also related to JupyterLab when nbconvert is used via the GUI when using File -> Save and Export Notebook as -> HTML JupyterLab #15903.
Expected behavior
In the HTML file the output of cell 1 should be scrollable and the output of cell 2 should not be scrollable.
Context
Troubleshoot Output
Command Line Output
Browser Output
The text was updated successfully, but these errors were encountered: