Repository navigation
Conversation
|
Thanks for this, @hajdukste. It's a clear piece of work, and the caret-travels-through-the-equation model is the part I most want to keep. Direction. The editing here is built on storytold#55's Why equaSHion. It is one equation engine shared by WordCraft (storytold/wordcraft#801) and DeckCraft (storytold#192), so equations behave the same in both apps and the editing work (OMML/MathML/LaTeX, the structured editor, the galleries) is done once instead of per app. storytold#192 is also based on current Why a new PR instead of continuing storytold#55. Moving storytold#55 to equaSHion would replace its What I took from your commit. equaSHion
All three are opt-in; existing callers behave as before. The What is still deckcraft-side and not done in storytold#192 yet, all from your commit:
storytold#192 doesn't use the new equaSHion revision yet; its pin is still the one before these changes. If you're happy to port the pieces above against storytold#192 once it's bumped, that would be very welcome, with your authorship kept. If you'd rather not, I'll carry them over myself and credit this PR. Either way I'd rather say so here than leave it ambiguous. Your note that full CI stops at the Rust 1.95 Clippy diagnostics in |
|
Thanks for explaining the direction and for carrying the caret-navigation ideas into equaSHion. While #192 was still a draft, I put together a combined proposal in storytold#778. It builds on the version of your equaSHion integration available at the time, preserves your commits and authorship, and adds my inline insertion/navigation, formatting and document-history integration, and regression tests. It also now supports equation font selection, including Latin Modern Math. I see that you’ve since updated #192 further, so #778 doesn’t yet include those latest changes. Before doing another port, could you take a look at #778 as a possible combined basis? That would help us decide which PR to carry forward and avoid duplicating the integration work. And please feel free to port, adapt, or reuse any of my work however you think best! I’m completely fine with you carrying it into #192 or taking another approach. I’m open to whatever works best for the project, and I’m happy to coordinate. |
Problem and behavior
Follow-up to storytold/deckcraft#55, based on its current
equation-editorhead (b40a893). This PR targets that branch so the diff contains only the additional interaction work.Insert → Equation now creates an active field directly on the slide: at the current text caret, or in a new text box. The field shows Type equation here until typing begins. For example, typing
\alphaleaves the command visible; Space converts it to α. Fractions, roots and scripts continue to use the existing structured editor.Integration
This reuses storytold#55's
deckcraft-math::Editor, OMMLRunKind::Math, layout and PPTX support. It does not add the separate equation-run format from storytold/deckcraft#771. That PR is being retained as a draft interaction prototype, not a competing implementation.The engine owns the math caret and edits; text layout exposes the placed math geometry used by pointer hit testing and UI overlays. Empty fields are empty native equations; the prompt and shading are editor-only. Existing populated
insert.equationcalls keep their behavior; an empty parameter object starts the new editing flow. Original storytold#55 commits and authorship remain intact.Validation
On macOS with Rust 1.95.0:
Full
cargo xtask cistops at existing Rust 1.95 Clippy diagnostics inmath,matroska,isobmffandxtask; baseline and final logs were checked against unchanged source at those diagnostics. The subsequent test, asset, layering and wasm checks were run separately.Remaining scope
This depends on storytold#55 and does not resolve its current conflicts with upstream main. Equation ribbon controls, full LaTeX coverage, math-font refinements and validation in native PowerPoint remain separate work. No PowerPoint assets or documents are included.