QR codes for interactive programs#2676
QR codes for interactive programs#2676ascholerChemeketa wants to merge 6 commits intoPreTeXtBook:masterfrom
Conversation
|
BTW - I hate that the url needs to go in a p and thus gets indented. Not sure how to avoid that though. |
|
Draft while working on: |
6e07cf3 to
478723b
Compare
|
Updated based on results of Content since last review:
I kept the I believe |
Agreed. No great suggestion at the moment. Might look at a #stack full of #p. We did something about indentation, iirc. Maybe we added it. ;-) Possible it is not present on paragraph 1. Now, I really don't like #assemblage. ;-) How about just a plain #sidebyside? A #title might be the rub. Not sure what we could put into the left panel that would have a #title and not a lot of other stuff. #paragraphs (no indentation on paragraph 1!), but I don't think it makes sense as a panel, it is more of a division |
478723b to
b38138c
Compare
|
Force pushed to rebase. Here is a: A I think this is going to be impossible to make pretty in assembly given the current tools. |
|
Suppose we had Would be not so ugly? |
|
Yes, not indenting those paragraphs would help. I like some kind of indication that the title text is a label/title and not plain text. But if there is |
|
What do you say to getting this in with the suggest side-by-side, and then you (EPUB CSS?) and I (LaTeX) work to get the un-indentation going after this is in? |
b38138c to
bcb0b82
Compare
|
Sounds good. Force pushed that structure with |
|
Working on this one. I'm leery of the import of I've got more to look at, so do not add anything here right now, might be a day or two... |
|
I've spent a lot of time on this one, trying to solve the problem of doing HTML stuff (chunking) for static stuff (LaTeX), including a very long comment that I just pulled up short on. This will be needed for making links to |
…TeXtBook#2676) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Lots of new work, motivated by this PR, now over at #2826.
What do you think of a "standalone" page for each interactive Thanks for your patience on this one. The whole notion of considering HTML chunking while doing static representations has been eating at me for long time. Your work here was helpful in getting that sorted out. |
|
Roger. Not so sure about the standalone page. It would break programs that use other elements on the page as data files of code to include. And assigned exercises already end up on an out of context page. For purposes of the QR destination, I personally would want people to end up on the relevant book page, not in a one-off for that program. Both on principle and because the standalone pages don't currently make it easy to get back to in-context - we expect someone navigates to them from the book, not starts there. |
|
I believe due to this PR, the cli is throwing errors when it tries to build html that contains interactive elements. Is it true that the html build now requires QR codes to be generated? Of course the CLI builds QR codes for static formats, but until now we haven't done so for html. Anyway, adding qrcodes to the list of assets to build for HTML seems to fix the issue. So I'm happy to add that, but wanted to make sure this was the intended behavior. Also, do I need to check the source for |
|
The |
|
That's what I've done, so no rush on this. |
|
I had noticed that requirement. It is not directly related to QR codes. The requirement comes from reading url's for I had meant to bring it up. It would be nice not to have HTML depend on those sidecars. If you are in a tight edit loop with something like Codechat or nodemon doing partial rebuilds and you add an audio/video/interactive, you now have to break out of your normal rebuild and go trigger a qr code extration. |
This adds QR code generation for interactive programs (activecode/codelens).
Because programs already may have width issues in print, I don't want to do the link side by side with the program itself. So instead, an assemblage with a link/qr is added after the program. I think it is good to have that block visually separated as a "here is something not part of the core text". But I feel no real ownership of that layout.
I figure you will want to do your own test of generation, so no commit with the updated QR codes.
First commit fixes a breaking bug if version 8+ of qrcode is installed:
https://pypi.org/project/qrcode/
If the rest of this ends up languishing, it might be worth breaking that commit out.