Closed firasm closed 3 years ago
RE above, I've also opened an issue in the jupyterbook repo about possibly integrating this export method there.
Below are two PDF exports from an example jupyter book that is not mine (ThreatHunter Playbook):
What do you think of including (only) h1
and h2
tags?
The reason i am hesitant to add "all headings" is that I don't enjoy the pdf table-of-contents UX when you have lots of levels of "folding". It makes it super hard to see things and read the titles without making the TOC part of the UI wider.
Another option I just thought of is to not use the "nesting" feature of a PDF TOC but instead prefix the headings with something like ` (nothing) for
h1, · for
h2, ·· for
h3`, etc. So an ASCII character to indicate "nesting" level.
You're right - it gets unwieldy past a certain depth.
It's probably a lot more effort, but I like how sphinx handles this by having a maxdepth
parameter. So in this case, it could be an optional argument, with the default set at a reasonable H2 or H3 ?
Level 2 headings are now included (see aaa8565044c8673305af801a2160802132407a95).
Amazing! Nice work!
Hello! Thanks for a fantastic extension, it really works quite well and is very seamless.
As you mention in your blog post, lower level headings might be coming soon to this extension:
I thought I'd open an issue requesting this feature as it would be super useful for me. I use jupyter notebooks for teaching and having a nice non-paginated PDF export of a notebook would be really handy!