I'd like a simple way to hide all the cell tags in my notebook, that is, things of the form In[..]
and Out[..]
.
The reason being that they up a lot of the margin and are not useful to me (also they make the git history messy)!
Of course, I would like to keep line numbering within each code cell, so I have set 'lineNumbers':true
in my config:
Is there another field I can use to set this, like 'in_out_prompts':false
? Perhaps from some other extension? It would be great to at the very least remove the numbers inside the In and Out tag brackets.
Related:
in Jupyter - Home-running- stop your file, after that go to the explorer- click right bottom on your_file. ipynb open with notebook(just like . txt) - scroll down, find raw with "celltoolbar": "None", and delete this and save file, after run file in jupyter.
Hide cell inputs If you add the tag hide-input to a cell, then Jupyter Book will hide the cell but display the outputs. Note how we only see the output by default.
The Jupyter Notebook ships with a cell tag editor by default. This lets you add cell tags to each cell quickly. To enable the cell tag editor, click View -> Cell Toolbar -> Tags . This will enable the tags UI.
You can change the cell type of any cell in Jupyter Notebook using the Toolbar. The default cell type is Code. To use the Keyboard Shortcuts, hit the esc key. After that, you can change a cell to Markdown by hitting the m key, or you can change a cell to Code by hitting the y key.
Jupyter lab doesn't follow the custom css that IPython/Jupyter used to. So the previous approaches may not work. But you can still customize the themes.
Based on how and where you install jupyter there will be themes folder
So in my case it was at below path
~/.virtualenvs/jlab/share/jupyter/lab/themes/@jupyterlab/theme-dark-extension/fonts.css
in this file I just added
.jp-InputArea-prompt {
display: none;
}
And got the desired result
Edit-1: 11 Apr 2018
As per feedback from OP, doing this disables drag and drop. This is because the drag is controlled by the margin that we have hidden. So to fix the same we need few things
For the same you can use below css
.jp-InputArea-prompt {
flex: none;
width: 10px;
text-indent: 100%;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With