Open haraldschilly opened 6 years ago
ping
See how far you can get with a command-line like the following (suitably adjusted)
xsltproc --stringparam chunk.level 2 mathbook/xsl/mathbook-jupyter.xsl aata.xml
Varying the "chunking level" will make bigger or smaller files, so less or more likely to be valid JSON. I've not touched this converter for a while, and it is very brittle, so post with success or failure, and questions. Locate image files in an "images" subdirectory.
There is a sagews
converter but I have no idea at all if it will work right now, I've mostly been concentrating on Jupyter output.
Ok, I spent a while trying to figure out what's going on with the AATA book. I was able to compile it to jupyter notebooks "manually" and copied over the files into our repository for the cocalc library. Attached is a screenshot.
Besides that, it's not "pretty". The included css formatting doesn't work on cocalc (it has its own jupyter notebook format), the html tags do not specify spacings and hence text runs together, and there are parsing errors with dollar signs (which are erroneously interpreted as being formulas. Hence I see this as a proof of concept and at some point we might want to improve this in all these aspects.
Thanks, Harald. The makefile isn't really a traditional makefile, and there is a small file there that can be used to override the default hard-coded paths. I'm glad you made some progress manually anyway. Sorry the Jupyter conversion is not more mature yet.
Do you know if stock-Jupyter and CoCalc-Jupyter use different MathJax configurations?
If so it is a bug. We revamped math rendering recently, and probably did introduce a bug. What is a minimal example?
I'll look closer tomorrow. Super-productive coding today, but now knackered. ;-)
there is a small file there that can be used to override
Yes exactly, I figured out to create my own Makefile.paths
file. Once I got that, everything fell into place for AATA.
... use different MathJax configurations?
I'll create issues for CoCalc. The main problem seems to be that CoCalc's parser for the markdown/html code doesn't understand any html. It treats all strings equally. So, that aspect is fine from the perspective of the AATA book.
However, what's a bit more problematic are these html tags without spacing. e.g. in the end there is <span>Section 1.2.3</span><span>Title</span>
which ends up to look like Section 1.2.3Title
.
I understand that the output is a one line string with XML encoding, but it should be possible to discard trimming in order to end up with <span>Section 1.2.3 </span><span>Title</span>
→ Section 1.2.3 Title
.
Screenshot:
I added AATA from the Library to one of my (internet-enabled) projects.
They are only available in source files, with maybe hardcoded paths (or no setup at all).
The goal here is to write a small script to render sagews and ipynb files and add them here to this repository. Maybe I'll need @rbeezer's help :-)