Skip to content
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

sphinx-gallery scripts containing rst #1169

Open
maxnoe opened this issue Nov 24, 2023 · 0 comments
Open

sphinx-gallery scripts containing rst #1169

maxnoe opened this issue Nov 24, 2023 · 0 comments

Comments

@maxnoe
Copy link

maxnoe commented Nov 24, 2023

The documentation of sphinx-gallery mentions jupytext and the other way around and makes some mention of converting rst to markdown when converting the scripts to notebooks.

However, there doesn't seem to be the possibility to open the text notebooks using jupytext keeping the rst syntax intact and correctly rendered.

I tried configuring:

preferred_jupytext_formats_read = "py:sphinx"
sphinx_convert_rst2md = false

but opening the scripts in the notebook interface does not render the rst content correctly and then saving them results in broken syntax, e.g. because jupytext inserts empty strings

""

as new cell markers instead of

# %%

It would be really great if jupytext could be used to edit the sphinx-gallery scripts in the notebook interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant