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

Bullet list not getting properly generated in PDF #917

Open
zHaytam opened this issue Nov 18, 2018 · 5 comments · May be fixed by #2177
Open

Bullet list not getting properly generated in PDF #917

zHaytam opened this issue Nov 18, 2018 · 5 comments · May be fixed by #2177
Labels
bug format:PDF pertains to exporting to the PDF format workaround known Bug with a known way to get around it

Comments

@zHaytam
Copy link

zHaytam commented Nov 18, 2018

Hello,

My jupyter notebook contains a markdown with a bullet list:

Some text here:
 - Item 1.
 - Item 2.
 - Item 3.

When I generate the PDF using jupyter-nbconvert jn.ipynb --to pdf, the result is:

Some text here: - Item 1. - Item 2. - Item 3.

Is there are way for nbconvert to correctly generate a nice bullet list?
Thank you!

@t-makaro
Copy link
Contributor

Trying adding an empty line before the list like:

Some text here:

 - Item 1.
 - Item 2.
 - Item 3.

@t-makaro t-makaro added workaround known Bug with a known way to get around it bug format:PDF pertains to exporting to the PDF format labels Jun 10, 2019
@ert485
Copy link

ert485 commented Feb 4, 2020

I experienced this as well. Adding the empty line made it format better.

It also affects the > in markdown, and even with this fix: now it's on its own line, but is the same as any paragraph (markdown has a grey bar on the indent).

Its possible that's an inherent difference in normal markdown and latex's style, but any difference in the appearance (vs directly dowload as html->print to pdf) is undesirable to some degree

@t-vi
Copy link

t-vi commented Mar 8, 2021

This isn't PDF-specific. I'm using nbsphinx and it seems like the conversion to HTML (though rst?) has the same effect. Similarly it seems that the Python markdown package doesn't like lists starting without an empty line before. So it seems that there is a discrepancy between "Jupyter Markdown" and expectations of other tools.

@kraktus
Copy link

kraktus commented Sep 14, 2023

Note that this is an issue with pandoc, created an issue: jgm/pandoc#9079

@douglas-raillard-arm
Copy link

douglas-raillard-arm commented Sep 5, 2024

I also experienced that on HTML output. It seems that pandoc has a setting to recognize bullet lists without a preceding blank line, maybe nbconvert should make use of it ?
jgm/pandoc#9079 (comment)

EDIT: Tested with that extension and it fixes the issue, I'll spin a PR next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug format:PDF pertains to exporting to the PDF format workaround known Bug with a known way to get around it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants