I tried to update Python to 3.7 and I'm still running into a similar problem to the one described in issue #26.
I don't understand how to read the table of conflicting dependencies.
Is that right? I don't think so, because my jupyterlab is 0.32.1, which is newer than all of the requirements listed in the table.
So, I'm confused and don't understand how to read this or how to debug it any further.
jupyter labextension install --debug @jupyterlab/toc
jupyter labextension install --debug @jupyterlab/toc
Searching ['/PHShome/ks38', '/PHShome/ks38/.jupyter', '/data/srlab/slowikow/src/miniconda2/envs/py37/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
Looking for jupyter_config in /etc/jupyter
Looking for jupyter_config in /usr/local/etc/jupyter
Looking for jupyter_config in /data/srlab/slowikow/src/miniconda2/envs/py37/etc/jupyter
Looking for jupyter_config in /PHShome/ks38/.jupyter
Looking for jupyter_config in /PHShome/ks38
> /data/srlab/slowikow/src/miniconda2/envs/py37/bin/npm pack @jupyterlab/toc
npm notice
npm notice ๐ฆ @jupyterlab/[email protected]
npm notice === Tarball Contents ===
npm notice 2.1kB package.json
npm notice 1.5kB LICENSE
npm notice 1.2kB README.md
npm notice 304B lib/extension.d.ts
npm notice 3.2kB lib/extension.js
npm notice 1.6kB lib/generators.d.ts
npm notice 12.4kB lib/generators.js
npm notice 81B lib/index.d.ts
npm notice 373B lib/index.js
npm notice 2.1kB lib/registry.d.ts
npm notice 1.3kB lib/registry.js
npm notice 3.2kB lib/toc.d.ts
npm notice 4.9kB lib/toc.js
npm notice 1.4kB style/index.css
npm notice === Tarball Details ===
npm notice name: @jupyterlab/toc
npm notice version: 0.3.1
npm notice filename: jupyterlab-toc-0.3.1.tgz
npm notice package size: 9.5 kB
npm notice unpacked size: 35.5 kB
npm notice shasum: 0e46f30a3f99174b3e460448968ecc2bc6501496
npm notice integrity: sha512-nWhBFajzgK5UM[...]EXQK0f7bwxxng==
npm notice total files: 14
npm notice
jupyterlab-toc-0.3.1.tgz
Fetching URL: https://registry.npmjs.org/@jupyterlab%2Ftoc
Fetching URL: https://registry.npmjs.org/@jupyterlab%2Ftoc
Traceback (most recent call last):
File "/data/srlab/slowikow/src/miniconda2/envs/py37/lib/python3.7/site-packages/jupyterlab/labextensions.py", line 71, in start
ans = self.run_task()
File "/data/srlab/slowikow/src/miniconda2/envs/py37/lib/python3.7/site-packages/jupyterlab/labextensions.py", line 100, in run_task
for arg in self.extra_args
File "/data/srlab/slowikow/src/miniconda2/envs/py37/lib/python3.7/site-packages/jupyterlab/labextensions.py", line 100, in <listcomp>
for arg in self.extra_args
File "/data/srlab/slowikow/src/miniconda2/envs/py37/lib/python3.7/site-packages/jupyterlab/commands.py", line 227, in install_extension
return handler.install_extension(extension)
File "/data/srlab/slowikow/src/miniconda2/envs/py37/lib/python3.7/site-packages/jupyterlab/commands.py", line 366, in install_extension
info = self._install_extension(extension, tempdir)
File "/data/srlab/slowikow/src/miniconda2/envs/py37/lib/python3.7/site-packages/jupyterlab/commands.py", line 1157, in _install_extension
raise ValueError(msg)
ValueError: No version of @jupyterlab/toc could be found that is compatible with the current version of JupyterLab. However, it seems to support a new version of JupyterLab. Consider upgrading JupyterLab.
Conflicting Dependencies:
JupyterLab Extension Package
>=0.16.3 <0.17.0 >=0.17.0 <0.18.0 @jupyterlab/application
>=0.16.4 <0.17.0 >=0.17.0 <0.18.0 @jupyterlab/apputils
>=1.1.3 <2.0.0 >=2.0.0 <3.0.0 @jupyterlab/coreutils
>=0.16.3 <0.17.0 >=0.17.0 <0.18.0 @jupyterlab/docmanager
>=0.16.3 <0.17.0 >=0.17.0 <0.18.0 @jupyterlab/fileeditor
>=0.16.3 <0.17.0 >=0.17.0 <0.18.0 @jupyterlab/notebook
>=0.16.3 <0.17.0 >=0.17.0 <0.18.0 @jupyterlab/rendermime
Errored, use --debug for full output:
ValueError: No version of @jupyterlab/toc could be found that is compatible with the current version of JupyterLab. However, it seems to support a new version of JupyterLab. Consider upgrading JupyterLab.
Conflicting Dependencies:
JupyterLab Extension Package
>=0.16.3 <0.17.0 >=0.17.0 <0.18.0 @jupyterlab/application
>=0.16.4 <0.17.0 >=0.17.0 <0.18.0 @jupyterlab/apputils
>=1.1.3 <2.0.0 >=2.0.0 <3.0.0 @jupyterlab/coreutils
>=0.16.3 <0.17.0 >=0.17.0 <0.18.0 @jupyterlab/docmanager
>=0.16.3 <0.17.0 >=0.17.0 <0.18.0 @jupyterlab/fileeditor
>=0.16.3 <0.17.0 >=0.17.0 <0.18.0 @jupyterlab/notebook
>=0.16.3 <0.17.0 >=0.17.0 <0.18.0 @jupyterlab/rendermime
[JupyterLab 0.35.4]
When defining headings in Markdown cells, Jupyter Notebook and Jupyter Lab do not provide the same behaviour. Jupyter Notebook correctly provides visual anchor elements for each heading and subheading, whereas Jupyter Lab only shows the anchor for a particular subheading.
Please see example notebook.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Some Title\n",
"## Sub Title\n",
"***"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Contents"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"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.7.1"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Upon further inspection, the anchor tag isn't being generated for some of the headings. If I run headerAnchors
on the root html node which contains the markdown, all anchors are correctly generated.
This is the relevant HTML generated for the first cell:
<div class="p-Widget jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown"><h1 id="Some-Title">Some Title</h1>
<h2 id="Sub-Title">Sub Title<a target="_self" href="#Sub-Title" class="jp-InternalAnchorLink">ยถ</a></h2>
<hr>
</div>
This is the line of code which runs the anchor generation routine: https://github.com/jupyterlab/jupyterlab/blob/63090ad07a78574b1aea6ba82e1fe3ab08f9c89b/packages/rendermime/src/renderers.ts#L344
First off, thank you for a great extension! Very useful to help organize long documents. One area that this doesn't touch, however, is if one code-block outputs a lot of figures, tables, etc, and we would like to break it up into chunks. This can be done with IPython.display.Markdown
(as seen in this link), but the toc extension is not currently capturing these headings.
So, a feature request: Capture Headings displayed with IPython.display.Markdown
as well, so you can quickly jump to a particular part of a code-block's output.
Thanks again!
Thanks again for the update you made in #15 -- I regularly add to my TOC by displaying markdown snippets in my output cells.
However, I have recently come across the pandas-profiling module, which allows for the creating of a neat pd.DataFrame summary report (via pandas_profiling.ProfileReport(df)
). This, however, creates a lot of top-level headings that end up getting captured by the TOC plugin.
So, for this feature request -- could we have any way to turn off the capturing of headings in certain output cells? Perhaps a right-click on the cell in question, with a menu item saying "ignore output in TOC", or something like that.
Alternatively, if the Headings in TOC themselves can be collapsed (a little different from #12, as this isn't collapsing the cell contents, but the TOC entry itself), this would probably be sufficient. Perhaps allow the highest level TOC entry to collapse to a "..." to conserve space, but still notify the user that there is something there, if they care to expand it.
And, once again, thank you for this great plugin!
Hi,
I'm not sure this is the right place for such a feature, but I would find it usefull to have a search bar at the top of the toc tab, that allows one to find text inside the document that is being edited. The extension could then highlight the headers that contains such text.
Cheers
I had to uninstall this for a minute since the most recent Conda packages clashed with toc's requirements a couple of weeks ago. I updated conda again today and thought I'd check to see if the dependencies had worked themselves out, but got this error message, instead.
The storing of ToC view-state in cell metadata seems like an unnecessary editing of the user's notebook to me. We should see if we can store that in the statedb instead.
This extension is great! Just wanted to suggest a feature: instead of going blank when editing a Python file, it could show a skeleton of the code with the class/method lines.
Hi,
As of today, it seems to me that simple-clicking and double-clicking have the same effect in the toc extension.
When trying the new expand/collapse header sections, I expected to be able to collapse/expand the header section when doublie-clicking - which today only takes me to that header.
Would it be possible to implement this double-click behavior ? It'd feel very intuitive IMO.
I know it is possible to collapse/expand sections when clicking the arrow, which is a nice feature, but I think double-clicking the header would be more convenient.
Hope this is clear !
- Select a tag.
- Press "Filter". The cells without that tag are removed.
- Press "Filter" again. Nothing happens.
- Unselect the tag. Nothing happens.
I found this behavior confusing. I think it makes more sense to have filter be a toggle-able item. I'm not sure how to describe the current behavior.
Desired behavior: jupyterlab-toc installs and is usable.
Actual behavior: install fails both from labextension install
and from source.
Environment: Ubuntu 18.04 x64.
jupyter lab --version: 0.35.3
node --version: v8.10.0
npm --version: 3.5.2
Steps to reproduce:
Try to install jupyterlab-toc on Ubuntu 18.04. node and npm installed from Ubuntu repo (needed aptitude to install npm, since apt would complain about node-gyp).
Then:
$ jupyter labextension install @jupyterlab/toc
Node v8.10.0
> /usr/bin/npm pack @jupyterlab/toc
jupyterlab-toc-0.6.0.tgz
Node v8.10.0
> node /home/dani/anaconda3/envs/numerical_methods/lib/python3.7/site-packages/jupyterlab/staging/yarn.js install
yarn install v1.9.4
info No lockfile found.
[1/5] Validating package.json...
[2/5] Resolving packages...
error Received malformed response from registry for undefined. The registry may be down.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[I 09:29:09.526 LabApp] Saving file at /section-01.ipynb
info There appears to be trouble with your network connection. Retrying...
Error: Received malformed response from registry for undefined. The registry may be down.
at MessageError.ExtendableBuiltin (/home/dani/anaconda3/envs/numerical_methods/share/jupyter/lab/staging/yarn.js:243:66)
at new MessageError (/home/dani/anaconda3/envs/numerical_methods/share/jupyter/lab/staging/yarn.js:272:123)
at Function.<anonymous> (/home/dani/anaconda3/envs/numerical_methods/share/jupyter/lab/staging/yarn.js:51226:15)
...
Then, tried from source:
$ jlpm install
-everything seems fine-
$ jlpm run build
-everything seems fine-
$ jupyter labextension install .
jupyter labextension install .
Node v8.10.0
> /usr/bin/npm pack /home/dani/repos/numerical_methods/jupyterlab-toc
jupyterlab-toc-0.6.0.tgz
Node v8.10.0
> /usr/bin/npm pack /home/dani/repos/numerical_methods/jupyterlab-toc
jupyterlab-toc-0.6.0.tgz
> node /home/dani/anaconda3/envs/numerical_methods/lib/python3.7/site-packages/jupyterlab/staging/yarn.js install
yarn install v1.9.4
info No lockfile found.
[1/5] Validating package.json...
[2/5] Resolving packages...
error Received malformed response from registry for undefined. The registry may be down.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: Received malformed response from registry for undefined. The registry may be down.
at MessageError.ExtendableBuiltin (/home/dani/anaconda3/envs/numerical_methods/share/jupyter/lab/staging/yarn.js:243:66)
...
My connection is fine, is the registry actually down???
I successfully installed and use jupyterlab-toc:
jupyter labextension list
JupyterLab v0.32.1
Known labextensions:
app dir: /data/srlab/slowikow/src/miniconda2/envs/py3/share/jupyter/lab
jupyterlab-toc
jupyterlab-toc v0.2.1 enabled OK
Today, I decided to try to upgrade to v0.3.1, but I get an error:
jupyter labextension install @jupyterlab/toc
> /data/srlab/slowikow/src/miniconda2/envs/py3/bin/npm pack @jupyterlab/toc
jupyterlab-toc-0.3.1.tgz
Errored, use --debug for full output:
TypeError: the JSON object must be str, not 'bytes'
It seems like an easy bug to fix, but I don't know which file has the buggy code.
I hope you can help!
Thanks for the great extension ๐
Here are more details:
jupyter labextension install --debug @jupyterlab/toc
jupyter labextension install --debug @jupyterlab/toc
Searching ['/PHShome/ks38', '/PHShome/ks38/.jupyter', '/data/srlab/slowikow/src/miniconda2/envs/py3/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
Looking for jupyter_config in /etc/jupyter
Looking for jupyter_config in /usr/local/etc/jupyter
Looking for jupyter_config in /data/srlab/slowikow/src/miniconda2/envs/py3/etc/jupyter
Looking for jupyter_config in /PHShome/ks38/.jupyter
Looking for jupyter_config in /PHShome/ks38
> /data/srlab/slowikow/src/miniconda2/envs/py3/bin/npm pack @jupyterlab/toc
jupyterlab-toc-0.3.1.tgz
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ Update available 5.6.0 โ 6.2.0 โ
โ Run npm i -g npm to update โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Fetching URL: https://registry.npmjs.org/@jupyterlab%2Ftoc
Traceback (most recent call last):
File "/data/srlab/slowikow/src/miniconda2/envs/py3/lib/python3.5/site-packages/jupyterlab/labextensions.py", line 71, in start
ans = self.run_task()
File "/data/srlab/slowikow/src/miniconda2/envs/py3/lib/python3.5/site-packages/jupyterlab/labextensions.py", line 100, in run_task
for arg in self.extra_args
File "/data/srlab/slowikow/src/miniconda2/envs/py3/lib/python3.5/site-packages/jupyterlab/labextensions.py", line 100, in
for arg in self.extra_args
File "/data/srlab/slowikow/src/miniconda2/envs/py3/lib/python3.5/site-packages/jupyterlab/commands.py", line 227, in install_extension
return handler.install_extension(extension)
File "/data/srlab/slowikow/src/miniconda2/envs/py3/lib/python3.5/site-packages/jupyterlab/commands.py", line 366, in install_extension
info = self._install_extension(extension, tempdir)
File "/data/srlab/slowikow/src/miniconda2/envs/py3/lib/python3.5/site-packages/jupyterlab/commands.py", line 1138, in _install_extension
version = self._latest_compatible_package_version(name)
File "/data/srlab/slowikow/src/miniconda2/envs/py3/lib/python3.5/site-packages/jupyterlab/commands.py", line 1202, in _latest_compatible_package_version
metadata = _fetch_package_metadata(self.registry, name, self.logger)
File "/data/srlab/slowikow/src/miniconda2/envs/py3/lib/python3.5/site-packages/jupyterlab/commands.py", line 1588, in _fetch_package_metadata
return json.load(response)
File "/data/srlab/slowikow/src/miniconda2/envs/py3/lib/python3.5/json/__init__.py", line 268, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/data/srlab/slowikow/src/miniconda2/envs/py3/lib/python3.5/json/__init__.py", line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
Errored, use --debug for full output:
TypeError: the JSON object must be str, not 'bytes'
Here is a debug output
sudo jupyter labextension install @jupyterlab/toc --debug
Searching ['/home/malte', '/root/.jupyter', '/usr/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
Looking for jupyter_config in /etc/jupyter
Looking for jupyter_config in /usr/local/etc/jupyter
Looking for jupyter_config in /usr/etc/jupyter
Looking for jupyter_config in /root/.jupyter
Looking for jupyter_config in /home/malte
Node v11.8.0
> /usr/bin/npm pack @jupyterlab/toc
npm notice
npm notice ๐ฆ @jupyterlab/[email protected]
npm notice === Tarball Contents ===
npm notice 2.1kB package.json
npm notice 1.5kB LICENSE
npm notice 1.2kB README.md
npm notice 304B lib/extension.d.ts
npm notice 3.3kB lib/extension.js
npm notice 111B lib/generators/index.d.ts
npm notice 403B lib/generators/index.js
npm notice 474B lib/generators/latexgenerator.d.ts
npm notice 2.4kB lib/generators/latexgenerator.js
npm notice 1.0kB lib/generators/markdowndocgenerator/index.d.ts
npm notice 8.1kB lib/generators/markdowndocgenerator/index.js
npm notice 280B lib/generators/markdowndocgenerator/itemrenderer.d.ts
npm notice 1.0kB lib/generators/markdowndocgenerator/itemrenderer.js
npm notice 549B lib/generators/markdowndocgenerator/optionsmanager.d.ts
npm notice 930B lib/generators/markdowndocgenerator/optionsmanager.js
npm notice 1.1kB lib/generators/markdowndocgenerator/toolbargenerator.d.ts
npm notice 1.7kB lib/generators/markdowndocgenerator/toolbargenerator.js
npm notice 546B lib/generators/notebookgenerator/codemirror.d.ts
npm notice 938B lib/generators/notebookgenerator/codemirror.js
npm notice 300B lib/generators/notebookgenerator/heading.d.ts
npm notice 180B lib/generators/notebookgenerator/heading.js
npm notice 549B lib/generators/notebookgenerator/index.d.ts
npm notice 21.9kB lib/generators/notebookgenerator/index.js
npm notice 278B lib/generators/notebookgenerator/itemrenderer.d.ts
npm notice 5.0kB lib/generators/notebookgenerator/itemrenderer.js
npm notice 1.0kB lib/generators/notebookgenerator/optionsmanager.d.ts
npm notice 2.6kB lib/generators/notebookgenerator/optionsmanager.js
npm notice 941B lib/generators/notebookgenerator/tagstool/index.d.ts
npm notice 4.7kB lib/generators/notebookgenerator/tagstool/index.js
npm notice 348B lib/generators/notebookgenerator/tagstool/tag.d.ts
npm notice 632B lib/generators/notebookgenerator/tagstool/tag.js
npm notice 574B lib/generators/notebookgenerator/tagstool/tagslist.d.ts
npm notice 2.1kB lib/generators/notebookgenerator/tagstool/tagslist.js
npm notice 1.6kB lib/generators/notebookgenerator/toolbargenerator.d.ts
npm notice 7.4kB lib/generators/notebookgenerator/toolbargenerator.js
npm notice 1.1kB lib/generators/shared.d.ts
npm notice 2.6kB lib/generators/shared.js
npm notice 81B lib/index.d.ts
npm notice 373B lib/index.js
npm notice 2.8kB lib/registry.d.ts
npm notice 1.8kB lib/registry.js
npm notice 3.6kB lib/toc.d.ts
npm notice 5.5kB lib/toc.js
npm notice 559B style/img/autonumbering_darktheme.svg
npm notice 343B style/img/autonumbering.svg
npm notice 264B style/img/check.svg
npm notice 320B style/img/code_darktheme.svg
npm notice 305B style/img/code.svg
npm notice 669B style/img/eyeball_hidden.svg
npm notice 619B style/img/eyeball_hover.svg
npm notice 617B style/img/eyeball_view.svg
npm notice 357B style/img/markdown_darktheme.svg
npm notice 363B style/img/markdown.svg
npm notice 264B style/img/menu_arrow.svg
npm notice 523B style/img/numbering.svg
npm notice 762B style/img/tag_darktheme.svg
npm notice 1.2kB style/img/tag.svg
npm notice 202B style/img/toggle_down_darktheme.svg
npm notice 181B style/img/toggle_down.svg
npm notice 189B style/img/toggle_right_darktheme.svg
npm notice 187B style/img/toggle_right.svg
npm notice 9.0kB style/index.css
npm notice 625B style/list-dark.svg
npm notice 625B style/list-light.svg
npm notice === Tarball Details ===
npm notice name: @jupyterlab/toc
npm notice version: 0.6.0
npm notice filename: jupyterlab-toc-0.6.0.tgz
npm notice package size: 24.5 kB
npm notice unpacked size: 114.2 kB
npm notice shasum: 393fe861404fa351ece7c4e326a4ddbd2076a39d
npm notice integrity: sha512-ATlfAY3MhtUvM[...]Sy+NpN6U+RRWw==
npm notice total files: 64
npm notice
jupyterlab-toc-0.6.0.tgz
Node v11.8.0
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/jupyterlab/labextensions.py", line 81, in start
logger=self.log, command=command)
File "/usr/lib/python3.7/site-packages/jupyterlab/commands.py", line 274, in build
command=command, clean_staging=clean_staging)
File "/usr/lib/python3.7/site-packages/jupyterlab/commands.py", line 446, in build
clean=clean_staging
File "/usr/lib/python3.7/site-packages/jupyterlab/commands.py", line 871, in _populate_staging
shutil.copy(pjoin(HERE, 'staging', fname), target)
File "/usr/lib/python3.7/shutil.py", line 245, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib/python3.7/shutil.py", line 104, in copyfile
raise SameFileError("{!r} and {!r} are the same file".format(src, dst))
shutil.SameFileError: '/usr/lib/python3.7/site-packages/jupyterlab/staging/index.js' and '/usr/lib/python3.7/site-packages/jupyterlab/staging/index.js' are the same file
Errored, use --debug for full output:
shutil.SameFileError: '/usr/lib/python3.7/site-packages/jupyterlab/staging/index.js' and '/usr/lib/python3.7/site-packages/jupyterlab/staging/index.js' are the same file
I guess it has something to do with the way I installed jupyter lab, because I use the pacman package manager of arch linux instead of pip. Thats also why I try to install the extension system wide.
Is there any way of getting around this by, e.g. forcing the installer to ignore this?
I mean from what I understand of the message, the installation is failing because a file that it needs is already there, so why is this failing anyways?
First of all, thanks for your work in creating this extension! I very much would like to switch to JupyterLab, but I'm feeling somewhat held back by many of the extensions from https://github.com/ipython-contrib/jupyter_contrib_nbextensions not being ported yet.
This plugin goes a long way in re-creating the functionality of the "TOC2" plugin for the traditional notebook, and the core functionality already looks very solid. The one feature I really miss is the color highlights that TOC2 has to indicate "sections with selected elements", and "sections with running cells". Is there any chance to implement this in jupyterlab-toc
?
I really wish I could help on this with a pull-request, but sadly I don't really know anything about frontend development (anything js), so this may be a bit out of my reach.
Click the corresponding menu to enter the editing state, click the jump event after the start of automatic editing cells?
Click the menu - > to jump to the specified content - > edit cell ?
There is a high probability that the process is this, which should be a bug because the process is so unreasonable.
I just want to jump to the specified content, not edit the header cells.
"[email protected]" is not compatible with the current JupyterLab
Conflicting Dependencies:
JupyterLab Extension Package
>=0.17.2 <0.18.0 >=0.16.0 <0.17.0 @jupyterlab/application
>=0.17.2 <0.18.0 >=0.16.2 <0.17.0 @jupyterlab/apputils
>=2.0.2 <3.0.0 >=1.0.0 <2.0.0 @jupyterlab/coreutils
>=0.17.2 <0.18.0 >=0.16.0 <0.17.0 @jupyterlab/docmanager
>=0.17.2 <0.18.0 >=0.16.0 <0.17.0 @jupyterlab/fileeditor
>=0.17.2 <0.18.0 >=0.16.0 <0.17.0 @jupyterlab/notebook
>=0.17.2 <0.18.0 >=0.16.0 <0.17.0 @jupyterlab/rendermime
While playing around with a markdown file, I noticed the following text in my md file:
renders in the toc as :
I'm guessing a parsing bug ?
This bug only manifests for the very first heading in any given cell, and only if the very first text in the cell is the heading in question. It does not matter what level of heading it is (so it could be sub-sub-sub heading and still yield the same problem). For example, the heading ## [Visit Google](https://www.google.com/)
would appear as if it were a regular heading without a link, and would not be clickable โ but only if it were the very first text to appear in the cell, regardless of where in the cell it appears.
(Tested on jupyterlab 0.35.4, Windows 10.)
#34 added several new usages of this functionality. We should make sure that the sanitizer is used where appropriate.
A nice feature to add, if it's not too much work to implement, would be a command (so it can be bound to a keyboard shortcut) to pull up a search menu where you can type in the name of a section you're looking for. It could have a list of sections below it that match what you've typed thus far, and you could, e.g., use the arrow keys to go down to the one you want or press tab to use fill the menu with the top item in the list. Then press enter to jump to that section. Basically, I'd be glad for a way to use the TOC right from my keyboard so I don't have to move to the mouse (and to find sections by name so I don't have to remember what order they're in when I'm scrolling through the list).
When installing jupyterlab-toc
, the process is stuck "resolving packages". As of this writing, I have been waiting roughly 15 minutes and I haven't aborted the process yet. My juputerlab notebook server is running at the time of install.
jupyter labextension install jupyterlab-toc
> /usr/local/bin/npm pack jupyterlab-toc
npm notice
npm notice ๐ฆ [email protected]
npm notice === Tarball Contents ===
npm notice 1.6kB package.json
npm notice 863B README.md
npm notice 1.5kB LICENSE
npm notice 2.9kB lib/extension.js
npm notice 11.3kB lib/generators.js
npm notice 373B lib/index.js
npm notice 1.5kB lib/registry.js
npm notice 6.5kB lib/toc.js
npm notice 304B lib/extension.d.ts
npm notice 1.1kB lib/generators.d.ts
npm notice 81B lib/index.d.ts
npm notice 2.1kB lib/registry.d.ts
npm notice 3.2kB lib/toc.d.ts
npm notice 2.1kB style/index.css
npm notice === Tarball Details ===
npm notice name: jupyterlab-toc
npm notice version: 0.2.1
npm notice filename: jupyterlab-toc-0.2.1.tgz
npm notice package size: 9.5 kB
npm notice unpacked size: 35.5 kB
npm notice shasum: edd570ba1a523e3e2bf5811b9995f9a99e0c4fe4
npm notice integrity: sha512-toWEuuN9zi3NM[...]qkQRGoDWupk+g==
npm notice total files: 14
npm notice
jupyterlab-toc-0.2.1.tgz
> node /usr/local/anaconda3/lib/python3.6/site-packages/jupyterlab/staging/yarn.js install
yarn install v1.5.1
(node:2376) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
info No lockfile found.
[1/4] ๐ Resolving packages...
โ jupyterlab-toc@file:../extensions/jupyterlab-toc-0.2.1.tgz
I am new to jupyter and jupyterlab so please bear with me.
I have installed jupyterlab via conda install -c conda-forge jupyterlab
and I have the current version of conda
installed since earlier.
I started the jupyterlab notebook at a specific directory:
jupyter lab --NotebookApp.notebook_dir=/Users/me/blah/Jupyter/JupyterLab/Notebooks
The new functionality in @jupyterlab/toc
is awesome, but some if it is kind of hard to maintain and understand. In particular, the notebook generator is over 500 lines long with many branches. We should try to modularize and simplify this.
@markellekelly, do you have any cycles to devote to this, and you able to have a video chat at some point to come up with a strategy?
Thanks for the great progress with this extension! I am loving the new features!
Perhaps this is already on the roadmap, but I noticed folding TOC entries in Markdown files (or their previews) is not currently implemented. This would be a great addition/ extension of the awesome work you guys have done with TOC entry folding for notebooks!
Having taught Anaconda python over a couple years, this version seems persistently out of sync with Anaconda. Given that Anaconda is the most popular version of jupyterlab by an order of magnitude, it seems entirely unreasonable that there is no clear instructions on how to roll this amazing feature in.
I've tried reverting to previous versions and their dependencies are either too new or too old. It is very frustrating as teaching with jupyterlab is a very important use case. Simplified instructions would also be of great help to students. That being said, I understand the need for advanced development features, but I am surprised that this program constantly needs bleeding edge features that upgrade it outside of the major python market.
This is what I see with jupyterlab 0.35.4, jupyterlab-toc 0.6.0, and Chrome 68.0.3440.75 (64bit Linux):
Please let me know if you need any more info to reproduce.
Hi, as one of the authors and maintainers of the toc2 nbextension, I really appreciate this port to jupyterlab!
I would like to share some thoughts and experience on this
- automatic section numbering is a very useful feature. In toc2 we have a parameter to enable it and fix the depth of numbering. In an early version we had a link in the toc header to toggle on/off numbering; (the depth of sections to show in the toc is also a parameter).
- though it might seem redundant, lot of users like the possibility to insert a "toc cell" at the beginning of the notebook
- the toc2 cooperates with the collapsible headings nbextension. (Un)Collapsing a section in the toc/notebook (un)collapses it the notebook/toc. We simply have an event triggered and processed by the other nbextension.
- it is very useful to have the toc exported when exporting to html. Currently we add the toc2 javascript logic as a script into the exported html document. This is done via a dedicated exporter. In principle this could survive to the lab transition (?).
- some users like to have the sections with cells currently executed to be be highlighted in the toc, to follow the processing of their notebook
- it is useful to have a mark displayed in the toc pointing the current section while scrolling into the notebook.
Thanks for your work on that!
I don't know (yet) typescript and haven't digged into the source to understand the new API, so unfortunately I can't really help for now...
Hi there,
This extension is looking awesome - thanks for the hard work!
I just wanted to report a very minor bug. It seems that when a markdown cell with a section header is in edit mode (not rendered as markdown), that section has a folding triangle next to it in the left area, even when it doesn't have children to display. Clicking the triangle toggles the icon, but has no other effect.
Demonstrated in Section 2. in the following screenshot.
When the cell is re-rendered, the triangle disappears, but only after selecting another cell.
Similarly, when the cell is un-rendered, the triangle reappears, but only after selecting another cell.
Again, very minor, but thought it would be good to point out in case it comes up again later.
Thanks!
Oliver
Hi
Not sure:
can i install this extension for jupyterlab 0.33 and python 2.7 ?
That s only work for python3.6, isn t it
regards
Fabien
Though I haven't tested it in real life, from what I see in the source, I suspect that the headings are detected from the lines beginning by #. In such case, only the first line in
will be used in the toc, despite the orther forms should. Perhaps use the jquery .find(:header)
for rendered cells to get the info.
Hi,
When inserting a block of code in a md file, it seems that the content of this code block can generate headings.
For example, in any section of my md file, if I add the following code-block:
it will generate a level-1 heading "test" in the TOC.
Hi,
I noticed that if I have multiple markdown headings in the same cell, all the headings are indeed in the toc, but they all take me to the top of that cell.
Maybe if multiple headings are in the same cell, the links in the toc should bring you to that heading, and not to the top of the cell of that heading ?
Recommend Projects
-
-
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
An Open Source Machine Learning Framework for Everyone
-
The Web framework for perfectionists with deadlines.
-
A PHP framework for web artisans
-
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
Some thing interesting about web. New door for the world.
-
A server is a program made to process requests and deliver data to clients.
-
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Some thing interesting about visualization, use data art
-
Some thing interesting about game, make everyone happy.
-
Recommend Org
-
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Open source projects and samples from Microsoft.
-
Google โค๏ธ Open Source for everyone.
-
Alibaba Open Source for everyone
-
Data-Driven Documents codes.
-
China tencent open source team.
-
Jobs
Jooble