Jupyter notebook from Worksheet?

9 views
Skip to first unread message

Juan Carlos Bustamante

unread,
Oct 24, 2025, 8:43:04 AM (14 days ago) Oct 24
to PreTeXt support
Hello,

I went to the documentation looking for a way to obtain a jupyter notebook out of a portion of a pretext document. However the documentation here : https://pretextbook.org/doc/guide/html/jupyter-notebook.html is actually empty. 

Any advice? 

Kind regards,

JC

Sean Fitzpatrick

unread,
Oct 24, 2025, 11:32:34 PM (13 days ago) Oct 24
to pretext...@googlegroups.com
Jupyter conversion is not really working at the moment, I think. 
You still need xsltproc, I think. 

I'm not at a computer now, but I can track down the command I used if you want it. 

What I can tell you: 

- I think a change to other parts of PreTeXt was a breaking change for Jupyter a year or two ago

- Before that, things were still very delicate, because the nested nature of XML isn't compatible with the flat structure of Jupyter.

In particular, environments like theorem, example, etc needed to be fully contained in one markdown cell. 
(And the markdown was really PreTeXt HTML.)

That meant you had to be very careful about where you inserted a Sage cell. These get converted to code cells in Jupyter, but they have to be a sibling of <p> at the top level. A code cell inside an example of exercise will break the notebook and return invalid JSON. 

It's something I'd like to get working again, but I have neither the time nor the ability, especially since I think it needs to be redone from scratch.

--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/bb6ba71a-9f8d-4ebc-9b1d-e6cde5914b7dn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages