Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ipython notebook: how to toggle header invisible by default

I want to save some space for my 14 inch screen. What should I write in e.g. ipython_notebook_config.py to trigger this?

like image 784
eric.li Avatar asked May 08 '14 11:05

eric.li


People also ask

How do you toggle code in Jupyter Notebook?

To hide Markdown, use the {toggle} directive. To hide or remove code cells or their outputs, use notebook cell tags.

How do I unhide the menu bar in Jupyter Notebook?

It can be shown/hidden with the "View/Toggle Toolbar" menu. Save this answer. Show activity on this post. Save this answer.

Why does * appear in Jupyter Notebook?

When a cell is displayed with an asterisk it means it's busy. It might mean that: 1) The cell is now executing; 2)or it will execute when it's turn arrives. 3)or it is not executing because the kernel was restarted or interrupted.


1 Answers

  1. If it doesn't already exist, create a file named custom.js in /Users/YOURUSERNAME/.ipython/profile_default/static/custom/
    (You may have to run ipython profile create, if you have never run this command.)

  2. In custom.js, put the following lines of JavaScript

    $([IPython.events]).on("app_initialized.NotebookApp", function () {
        $('div#header').hide();
    });
    
  3. If you would like to also hide the toolbar by default, use these lines of JavaScript instead

    $([IPython.events]).on("app_initialized.NotebookApp", function () {
        $('div#header').hide();
        $('div#maintoolbar').hide();
    });
    
like image 155
ehontz Avatar answered Nov 01 '22 17:11

ehontz