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

nbconvert export omits markdown cells #2017

Closed
janr85 opened this issue Jul 6, 2023 · 7 comments · Fixed by #2152
Closed

nbconvert export omits markdown cells #2017

janr85 opened this issue Jul 6, 2023 · 7 comments · Fixed by #2152
Labels
format:AsciiDoc pertains to exporting to the AsciiDoc format

Comments

@janr85
Copy link

janr85 commented Jul 6, 2023

I have noticed that newer base and minimal docker images on dockerhub do not export markdown cells to asciidoc format. It seems that this problem has been introduced at some point of version 7.5.0.

For further details, please have a look at this stackoverflow question.

@janpfeifer
Copy link

janpfeifer commented Sep 17, 2023

Similar here, when running jupyter nbconvert --execute -to asciidoc some_notebook.ipynb and the notebook outputs even the most trivial text/markdown MIME data (just a simple "hello world" message), nbconvert will output empty instead.

Curiously this is part of a test for GoNB, a Go Kernel, and it used to work just a few weeks ago. But since then I did some updates to Jupyter and related packages so versions have changed (but I wouldn't know which).

Currently I have:

JupyterLab version: 4.0.6
jupyter nbconvert --version: 7.8.0
jupyter server --version: 2.7.3

@janpfeifer
Copy link

I should also mention that if using nbconvert --to=html it works just fine, it will convert the output of markdown. It's an issue only with --to=asciidoc.

janpfeifer added a commit to janpfeifer/gonb that referenced this issue Sep 17, 2023
…; Refactored jpyexec package, to clean up communication between user's program and GoNB.
@t-makaro t-makaro added the format:AsciiDoc pertains to exporting to the AsciiDoc format label Sep 17, 2023
@saf-dmitry
Copy link

saf-dmitry commented Feb 22, 2024

By converting to Asciidoc nbconvert outputs following error messages for each Markdown cell:

Unknown option --atx-headers.
Try pandoc --help for more information.

It seems, the problem is that nbconvert uses obsolete pandoc option --atx-headers instead of recent --markdown-headings=atx.

See markdown2asciidoc function definition.

@thomasjm
Copy link
Contributor

Hello, would someone like to try the fix here? #2152

@janpfeifer
Copy link

Hello, would someone like to try the fix here? #2152

Many thanks for the fix!!

I'd be happy to try it for GoNB test. Is it part of a pip package already ?

thomasjm added a commit to codedownio/nixpkgs that referenced this issue May 31, 2024
@thomasjm
Copy link
Contributor

No, I'm not a maintainer here. You'll have to use my branch.

I've tested it myself now and it seems to work.

If you happen to use Nix, you can build a working nbconvert with this patch: codedownio/nixpkgs@7968f56

@jeffmelville
Copy link

I'm having this issue as well. I haven't tried the fix verbatim, but modifying the pandoc arguments to --markdown-headings=atx is working as a temporary workaround. +1 for getting this fix in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format:AsciiDoc pertains to exporting to the AsciiDoc format
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants