QR codes for interactive programs v2#2831
Open
ascholerChemeketa wants to merge 7 commits intoPreTeXtBook:masterfrom
Open
QR codes for interactive programs v2#2831ascholerChemeketa wants to merge 7 commits intoPreTeXtBook:masterfrom
ascholerChemeketa wants to merge 7 commits intoPreTeXtBook:masterfrom
Conversation
Collaborator
|
I need to spend more time with this one, but here are some initial thoughts.
The latter is a problem, since a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update based on #2676 and recent changes
This pull request enhances support for interactive
programelements (activecodeandcodelens) in static output formats, especially regarding QR code generation and linking to interactive versions. It introduces publisher configuration for QR code inclusion, improves documentation, and ensures consistent treatment of interactive programs across the pipeline. The most important changes are summarized below.Improvements to QR code generation and static output for interactive programs:
QR codes and in-context links for static program listings:
Static representations of interactive programs (
activecodeandcodelens) can now include a QR code and "In Context" link to the interactive HTML version, if a base URL is configured. This is controlled via the publisher variablecommon/program/@static-qrcodes, which defaults to "yes" but can be set to "no" to disable QR code generation. [1] [2] [3] [4] [5]Consistent sidecar file and URL handling:
The extraction and assembly XSLT and Python scripts are updated so that interactive programs do not get standalone URLs in their sidecar files; instead, the in-context page URL is used for QR code generation. This prevents broken links and ensures QR codes point to the correct location. [1] [2] [3] [4] [5]
Documentation updates:
The documentation now explains the new QR code and link behavior for static program listings, describes how to configure or disable these features, and clarifies fallback behavior when interactive output is not supported. [1] [2]
Pipeline and template adjustments:
The XSLT pipeline now routes
programelements through therepresentationsmode, ensuring static builds treat them like other interactive objects and can attach QR codes and links as needed. This also affects howprogramelements are handled inside problem statements. [1] [2]These changes collectively improve the usability and configurability of interactive code examples in static outputs, making it easier for readers to access interactive versions via QR codes and links.