jupyterlab-toc
jupyterlab-toc copied to clipboard
How to use tags?
Is there a user guide where I can learn about how to use tags?
You need to install https://github.com/jupyterlab/jupyterlab-celltags and use it to add tags to your cells. Then you can filter by tag in the table of content extension.
Since jupyterlab:2.0.0 it is part of jupyterlab, You can create tags with the 'property inspector' in the toolbar on the left.
@TristanK27 do you mean to edit the Metadata for a certain cell?
{
"tags": [
"parameters"
]
}
Do you know other ways how to create tags? Like in Jupyter Notebook, with a certain GUI style, just add a tag for each cells we wanted?

@Biaggio74 Yes there is a GUI option to do so, here you can define your own tags with the 'add tag' button and toggle them on/off for the cells where you need them:
@TristanK27 my apologies for the late reply, ...how do you bring up this GUI you mentioned?
The GUI to add cell tags is in View...Show right sidebar
All, the tag hide-output is not working for me in Lab 2.2.6 . Hiding the big, pink box would go a long way towards un-freaking out students. I need the JSON input to remain inside a code cell, instead of markdown, to preserve the indentation formatting.
system: Windows 10 + Firefox 90.0.2 64-bit
Here's the notebook metadata.
{ "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.5" } }
@graphedge You can collapse the output and save the notebook. The collapse state will be saved (using cell metadata not tags): https://youtu.be/WgiX3ZRaTiY
@fcollonval True, but the error comes back when the student accidentally runs the cell, and that doesn't help them notice actual Python (in our case) errors.
Any idea what is preventing the hide-output tag from working ?
As far as I remember the trouble is linked to the the tag being non standard. And I don't recall a work-around.
In your specific case, you could use python to output the data in a nice format instead of using non-valid cell. Something like:
import json
json.dumps({"codeCellConfig": {"lineNumbers": True, "codeFolding": True}}, indent=4)
Here's another solution. Use a markdown cell with backticks to embed "code style" formatting. markdown notes