DRAFT: numbl interactive examples in docs#6
Open
magland wants to merge 3 commits into
Open
Conversation
Turn the MATLAB example snippets throughout the documentation into editable, in-browser-runnable widgets powered by numbl (https://numbl.org). Each example keeps its existing static figure/output and gains an "Edit & run" button that opens a self-contained, editable copy of the script; nothing loads until the reader clicks. - conf.py: load the numbl-embed loader via html_js_files - _static/js/numbl-embed.js: the <numbl-embed> custom element (lazy mode) - _static/css/custom.css: embed styling - surfacefun / surfacemesh / surfaceop and the worked examples: each runnable snippet inlined as a self-contained script
Owner
|
Wow pretty cool! |
Owner
|
I wonder if we could get the RNG to output the same as MATLAB so that the generated data looks the same. Also, for the Hodge decomposition example, the error seems to be much larger in Numbl than MATLAB. |
Author
That would be really hard.
Let's look at this together so I can know how to troubleshoot. |
The mip load line now runs as a numbl-preamble block (shown as "Installing surfacefun...") instead of cluttering the editable example. Renames the script class to numbl-script and syncs the numbl-embed.js loader to the preamble-aware version.
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.
Preview:
https://magland.github.io/surfacefun/surfacemesh.html
The scripts are embedded in the .rst
https://raw.githubusercontent.com/magland/surfacefun/refs/heads/numbl-interactive-examples/docs/surfacemesh.rst