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
then nbconvert the notebook to html (!jupyter nbconvert testhtml2.ipynb --no-input): it helps with visualizing the problem.
The resulting HTML (and inspecting elements):
Problem:
Notice the big vertical whitespace sandwiched between the "Before" Markdown text and "S1" heading, caused by the 4 empty divs.
Three of these divs are caused by Holoviews loading the bokeh backend, and the last is caused by having to display the HTML used to inject CSS style. I've marked these two offending lines in the minimal example code above.
Is there any way to avoid these whitespaces in the rendered HTML? I tried to use IPython.utils.capture.capture_output to wrap around the offending lines, but it didn't quite work (CSS didn't load).
Essentially, is there a display-like function that "renders" the HTML but not output it to the frontend?
(I recognize that the "holoviews loading bokeh" part might not be able to fixed from IPython's side, but is there at least a solution for loading CSS / arbitrary HTML code that has no output / results in a 0 height div in the output?)
Thanks.
The text was updated successfully, but these errors were encountered:
I have a
Report()
class that generates a report programmatically via IPython'sHTML
,Markdown
, anddisplay
classes/functions.A minimal example (run this in a single notebook cell):
then nbconvert the notebook to html (
!jupyter nbconvert testhtml2.ipynb --no-input
): it helps with visualizing the problem.The resulting HTML (and inspecting elements):
Problem:
Notice the big vertical whitespace sandwiched between the "Before" Markdown text and "S1" heading, caused by the 4 empty divs.
Three of these divs are caused by Holoviews loading the bokeh backend, and the last is caused by having to
display
theHTML
used to inject CSS style. I've marked these two offending lines in the minimal example code above.Is there any way to avoid these whitespaces in the rendered HTML? I tried to use
IPython.utils.capture.capture_output
to wrap around the offending lines, but it didn't quite work (CSS didn't load).Essentially, is there a
display
-like function that "renders" the HTML but not output it to the frontend?(I recognize that the "holoviews loading bokeh" part might not be able to fixed from IPython's side, but is there at least a solution for loading CSS / arbitrary HTML code that has no output / results in a 0 height div in the output?)
Thanks.
The text was updated successfully, but these errors were encountered: