Skip to content

Publication schema: add interactive sizing options#2796

Open
ascholerChemeketa wants to merge 1 commit intoPreTeXtBook:masterfrom
ascholerChemeketa:interactive-responsive-pub-docs
Open

Publication schema: add interactive sizing options#2796
ascholerChemeketa wants to merge 1 commit intoPreTeXtBook:masterfrom
ascholerChemeketa:interactive-responsive-pub-docs

Conversation

@ascholerChemeketa
Copy link
Contributor

Adds publication schema items for new options in #2590

Heads up for @oscarlevin

@rbeezer rbeezer requested a review from oscarlevin February 20, 2026 20:38
Interactives =
element interactives {
attribute resize-behavior { "fixed-height" | "responsive" }?,
element InteractiveTypes {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is correct (or at least, I've not seen named elements used this way, so would rather not introduce a new pattern).

Maybe what you want is to just insert a named element InteractiveElements? and then define that to be

InteractiveElements =
  element geogebra {
    InteractiveAttributes
  } &
  element desmos {
    InteractiveAttributes
  } &
...

Where InteractiveAttributes = attribute resize-behavior { "fixed-height" | "responsive" }

Check out the section of common options.

@ascholerChemeketa ascholerChemeketa force-pushed the interactive-responsive-pub-docs branch from 044a1f9 to 7e39199 Compare February 21, 2026 00:06
@ascholerChemeketa
Copy link
Contributor Author

OK, found something that seems to be valid and avoids the repetition that was driving me nuts.

Could also be condensed down to just

            Interactives =
                element interactives {
                    attribute resize-behavior { "fixed-height" | "responsive" }?,
                    element (
                        geogebra |
                        desmos |
                        calcplot3d |
                        circuitjs |
                        d3 |
                        doenetml |
                        iframe |
                        javascript |
                        jsxgraph |
                        sage
                    ) {
                        attribute resize-behavior { "fixed-height" | "responsive" }?
                    }*
                }

But that feels a little harder to read.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants