In [2]:
from IPython.display import HTML

TOC = open("ipython_toc.js").read()
INAV = open("img_nav.js").read()
style = open("ipynb.css").read()

HTML("""
<style>{2}</style>
<div id="toc"></div>
<script type="text/javascript">
{0}
</script>
<div id="img_nav"></div>
<script type="text/javascript">
{1}
</script>""".format(TOC,INAV,style))


Out[2]:

Usage example.

  1. The scripts loaded in the previous cell make two gray boxes at the sides of the page
  2. As you hover over them, the corresponding menu is shown
  3. At the left, the TOC, at the right, the thumbnails
  4. Both lists are reloaded every 30s
  5. Have fun

Title 1

Section 1

Section 2

Subsection 3

A very long section title that nobody should write but sometimes happens to find


In [4]:
from IPython.display import Image
Image(url="https://upload.wikimedia.org/wikipedia/en/thumb/8/80/Wikipedia-logo-v2.svg/1122px-Wikipedia-logo-v2.svg.png")


Out[4]:

In [ ]: