Ipython Markdown Display Widget doesn't render in Jupyter-book
See original GitHub issueThe ipython display widget doesn’t render in my jupyter book HTML output. It does in my sphinx material.
To Reproduce
Steps to reproduce the behavior:
Create a markdown table and try to display it with the ipython widget.
from jinja2 import Environment, BaseLoader
rendered_report_header_table="""# Report
## Sample-1
---
| | | | |
| --- | --- | --- | --- |
| **Patient Name:** | Smith, Todd | **Ordered By:** | Dr. Who |
| **Date of Birth:** | 12/11/1977 | **Sample Collection Date:** | 12/9/2020 |
| **Gender**: | Male | **Sample Accession Date:** | 12/9/2020 |
| **Sample Type:** | blood | **Report Data:** | 12/9/2020 |
| **Sample ID/MRN:** | 1234567 | | |
| **Test Accession:** | BRCA122345 | | |
| **Test Ordered:** | BRCA2 sequencing & Deletion/Duplication analysis | | |
| **Test Code:** | ABCD | | |
| **Test Indictation** | Patient has family history of breast cancer. | | |
---
## Result: Postitive
---
| Gene | Variant | Zygosity | Variant Classification |
|:-------|:----------|:-------------|:-------------------------|
| BRCA2 | c.10G>T | Heterozygous | Likely Pathogenic |
| BRCA2 | c.-172A>G | Heterozygous | Unknown |
"""
# This doesn't work in the jupyterhub output
from IPython.display import display, Markdown, Latex, HTML
display(Markdown(rendered_report_header_table))
Expected behavior
I expect the Markdown widget to display. It does display correctly when using sphinx + nbsphinx +the sphinx-material theme. It also displays correctly in the jupyter notebook itself.
A link to your documentation repository.
Github Repo Link to Docs in Sphinx
$ jupyter-book build mybook
ERROR ...
Environment
- Python Version [e.g. 3.7.1]:
- Package versions or output of
jupyter-book --version
: - Operating System:
OS: Linux
Python 3.7.5
Jupyter Book: 0.8.3
MyST-NB: 0.10.1
Sphinx Book Theme: 0.0.39
MyST-Parser: 0.12.10
Jupyter-Cache: 0.4.1
NbClient: 0.5.1
Additional context
Nothing else really.
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (5 by maintainers)
Top Results From Across the Web
Formatting code outputs - Jupyter Book
The formatting of code outputs is highly configurable. ... Click to show ... from IPython.display import display, Markdown display(Markdown('**_some_ ...
Read more >Module: display — IPython 8.7.0 documentation
Create an audio object. When this object is returned by an input cell or passed to the display function, it will result in...
Read more >How to embed HTML into IPython output? - Stack Overflow
from IPython.core.display import display, HTML display(HTML('<h1>Hello, world! ... The Jupyter IFrame function does not take a data or srcdoc attribute.
Read more >Jupyter notebook tutorial in Python - Plotly
Jupyter has a beautiful notebook that lets you write and execute code, ... Jupyter Notebook (previously referred to as IPython Notebook) allows you...
Read more >JupyterLab - Quarto
Quarto can render Jupyter notebooks represented as plain text (.qmd) or as a ... Note that if you are authoring a book or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Note that
background-color: transparent
has already been removed in a previous request@dirkroorda have you tried using sphinx and nbsphinx? That’s what I’m using for my project that requires displaying the markdown widgets. I’m sure jupyter-book will be able to display IPython display widgets.
@chrisjsewell , I’m not sure if this is an option (or just a stupid suggestion 😉 ) but is it possible to use nbsphinx for the ipynb notebooks and the myst-parser for markdown files? Then my markdown widgets would display correctly in the notebooks, and I would get the nice markdown syntax!