probcomp / probcomp-stack

MIT Probabilistic Computing Project software stack
4 stars 5 forks source link

Header logo display changed from `Image()` to `<img>` and breaks on export to HTML #39

Closed versar closed 7 years ago

versar commented 7 years ago

The logo images at the top of our tutorial notebooks used to be displayed with this code cell:

from IPython.display import Image
Image(filename="resources/header.png")

and the display has been changed for our latest version of the stack to use this Markdown cell:

<img src="resources/header.png"/>

The reason we had first included the Python code is that Jupyter sanitizes out <img> tags for printing to HTML. So, the image would appear as a broken link if users print their notebook to HTML. The rationale for including the Python cell rather than a Markdown cell is that people typically share notebooks with colleagues by exporting them to HTML, and it is good for our project branding to be retained in the notebooks when they are shared in typical format.

To achieve this, we either need to go back to the original Python cell, or otherwise to use the Markdown cell and somehow instruct Jupyter to not sanitize out HTML <img> tags.

fsaad commented 7 years ago

Ticket belongs in https://github.com/probcomp/workshop-materials for more localized tracking, so I'll move it there.