-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Orgdown code blocks aren't exported as code blocks to Jupyter #8236
Comments
Pandoc doesn't if the code should be part of the text cell or should be treated as a separate code cell. Currently all code blocks with class function CodeBlock (cb)
if cb.classes[1] == 'jupyter-python' then
cb.classes:insert 'code'
return cb
end
end We could make this the default if there is any agreed-upon way to mark code cells in orgmode. |
Thanks for the tip. Indeed it would be great to make this default. Actually, the standard way of adding code blocks in org-mode is to start with |
I guess my question is if there's a standard way of telling apart src blocks that are code cells and src blocks that are part of a text cell. Your example uses |
In my example So what Pandoc should understand is that everything below a line starting with So none of the content starting with Which explanation are you looking for that is not already mentioned in the link from my previous comment? |
I found the answer to my questions: it appears that you are using the emacs-ipython package. The use of In essence, we should treat src blocks that use a language with a Side note: The emacs-ipython and ob-ipython packages appear to enjoy a similar level of popularity, but their interfaces are different. It might make sense to support the latter as well. |
Glad you found the information you were looking for, I'm sorry I wasn't able to properly understand your question. Indeed I'm using emacs-jupyter package. Never tried ob-ipython, but it doesn't seem to be maintained (last update was 5 years ago). |
I just tested |
Great news, thank you! |
I'm using Pandoc 2.19.1 on Emacs 28.1 through Pandoc-mode 2.31. OS is Ubuntu 20.04.
When converting a notebook from an org file to an ipynb file the notebook is converted into a single markdown cell instead of multiple cells containing markdown and code.
For example the following org file :
Will be converted into a single markdown cell in ipynb, instead of 1 markdown cell for the text part and 1 code cell for the code part.
The text was updated successfully, but these errors were encountered: