-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linking to a cell by cell ID #518
Comments
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗 |
@rowanc1 would you be open to a pull request? |
Just checking back here 👀 |
Thanks @krassowski, always happy for a PR we can also look to your implementation in executablebooks/MyST-NB#519. The IDs are also involved in how we identify and replace outputs in thebe, and our default htmlIds do not currently allow |
JupyterLab and nbconvert allow users to link to a specific cell by it's ID by using hash fragment like
#cell-id=my-cell-id
wheremy-cell-id
is an example cell ID. JupyterBook nor MyST-NB does not support it yet (executablebooks/MyST-NB#310) although a pull request is open (executablebooks/MyST-NB#519).Given that there is a new notebook parser in this repository, I wonder if it could facilitate implementation of such a feature.
Proposal
Adopt the same hash fragment scheme for HTML output as other projects.
Additional notes
It appears that support for a kind of cell IDs was implemented in #361 but using a different scheme:
nb-cell-0-code
(andnb-cell-0-output
for output). It appears that cell index was used there instead of cell ID which would not be a stable identifier when user moves cells around. For that I would propose using#cell-index=0
format where 0 represents first cell (whether 0- or 1-based). Also, please note that in Jupyter notebooks any single cell may have multiple outputs, so cell ID cannot identify output (but barely a list of outputs).The text was updated successfully, but these errors were encountered: