-
Notifications
You must be signed in to change notification settings - Fork 396
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
1.14.4: Tags are not saved in MyST format #1024
Comments
I've encountered the same problem. When I author my notebooks as |
Well, my expectation is that tags are supported in all the main formats. I will soon add a test to make sure this is the case. Locally the test pass, so maybe this might indicate that you are not using the latest implementation of the MyST format? What versions of |
Hi @mwouts. I have created a repository with a minimal reproducible example for you: You can see that all I do is pip install the latest version of jupytext, and use it convert a minimal ipynb file (which has a tagged cell) to MyST markdown. As I'm sure you can confirm by running the same, the output has no tags. |
To answer your question about dependency versions, you can see from the
If more recent versions are needed for tags to function, perhaps jupytext's declared dependencies need to be updated? Above are what come from a plain Using Python 3.10, FWIW. |
Oh thank you @maxbane for taking the time to create the example repository! Well, what happens in your example is that you have This is the reason why you don't get any cell metadata in the text representation! |
Aha, thank you @mwouts for spotting that! Removing that does indeed solve the problem. So now I've been wracking my brain trying to figure out where that It turns out, it's from the jupyter-book starter template! Probably like many other people using MyST notebooks, I'm using I simply followed the "getting started" directions here: https://jupyterbook.org/en/stable/start/create.html... Create a new virtual environment, and
There it is! That's where it came from. Why in the HECK is the Thanks for identifying the problem here. You can probably close this issue. @davidvandebunte, is it the same for you? |
It is! My workflow was the same as yours, i.e. copying/pasting headings from one file to another starting from the |
Great news! Thank you also for opening the linked PR on the Jupyter book project! |
Add example tags to a MyST
.md
cell with a plain text editor as described here:For example:
When I then open the
.md
file with Jupytext, make changes, and save, the tags are removed. It seems like this is an obvious issue, but can anyone else reproduce? I'm having trouble guessing what I'm doing wrong.Saving the tags to a cell within Jupyter to start also doesn't get them written (just ignored on save).
The text was updated successfully, but these errors were encountered: