Skip to content

Tabs do not work in the pdf version #304

Open

Description

@rantahar

The materials include code sections with tabs. These are rendeder statically in the pdf version (https://coderefinery.github.io/documentation/lesson.pdf).

  • Including imgmath in pdf generation causes the tabs to expand, but without any formatting. This is a bug.

How should the tabs be rendered? Would we want all of them one after another, or separate pdfs for each tabgroup name?
Do we want

  • lesson_C.pdf
  • lesson_R.pdf
  • lesson_julia.pdf
  • ...

Or do we want a single pdf with all the examples?

Activity

  1. self-assigned this
    on Jun 26, 2025
  2. rantahar commented on Jun 26, 2025

    @rantahar
    ContributorAuthor

    We can use pyppeteer or simplepdf, depending on which is easier to fix. Simplepdf fixed the ToC issue #273.

  3. rkdarst commented on Jun 26, 2025

    @rkdarst
    Member

    This implies jupyter-book uses playwright - it seems in jupyter-book/jupyter-book#2327 (24 Feb 2025) it changed from pyppeteer to playwright, so maybe we should try that too:
    https://jupyterbook.org/en/stable/advanced/pdf.html

    (my philosophy has been "try to do what jupyter-book does", we get most extensions from them anyway). If jupyterbook uses playwright, I would try to move towards that by default.

  4. rkdarst commented on Jun 26, 2025

    @rkdarst
    Member

    It seems that jupyter-book doesn't use a playwright builder but some manual html to pdf conversion:
    https://github.com/jupyter-book/jupyter-book/blob/main/jupyter_book/pdf.py
    (it has a function that takes the path of a html file and output path of a pdf file.)

  5. rantahar commented on Jun 27, 2025

    @rantahar
    ContributorAuthor

    I made some fixes to pyppeteer, but playwright is worth checking out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions