Giter VIP home page Giter VIP logo

Comments (5)

firasm avatar firasm commented on May 11, 2024 1

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 ?

from notebook-as-pdf.

betatim avatar betatim commented on May 11, 2024 1

Level 2 headings are now included (see aaa8565).

from notebook-as-pdf.

firasm avatar firasm commented on May 11, 2024

RE above, I've also opened an issue in the jupyterbook repo about possibly integrating this export method there.

Use-case

Below are two PDF exports from an example jupyter book that is not mine (ThreatHunter Playbook):

  1. Standard Jupyterbook PDF export

  2. Using notebook as PDF extension to export

from notebook-as-pdf.

betatim avatar betatim commented on May 11, 2024

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.

from notebook-as-pdf.

firasm avatar firasm commented on May 11, 2024

Amazing! Nice work!

from notebook-as-pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.