From 5d35599d7fbd3f2fa2cc555030a8e55e8084b4aa Mon Sep 17 00:00:00 2001 From: Andrew Scholer Date: Mon, 18 Aug 2025 14:46:50 -0700 Subject: [PATCH 01/22] Common: add per-element flexibility for design-width --- xsl/pretext-common.xsl | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/xsl/pretext-common.xsl b/xsl/pretext-common.xsl index aae6b530a..b6724fba9 100644 --- a/xsl/pretext-common.xsl +++ b/xsl/pretext-common.xsl @@ -2974,31 +2974,40 @@ Book (with parts), "section" at level 3 - - - - - - + + + + + + + + + + + + + - + - + + + @@ -3010,7 +3019,7 @@ Book (with parts), "section" at level 3 - + From 65b4899c27f2c99e29c7b87f0bef3766f1aa39c4 Mon Sep 17 00:00:00 2001 From: Andrew Scholer Date: Mon, 18 Aug 2025 14:52:15 -0700 Subject: [PATCH 02/22] HTML: new pubvar for design-width --- xsl/publisher-variables.xsl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xsl/publisher-variables.xsl b/xsl/publisher-variables.xsl index 226f83f52..5644ca091 100644 --- a/xsl/publisher-variables.xsl +++ b/xsl/publisher-variables.xsl @@ -1813,6 +1813,19 @@ along with PreTeXt. If not, see . + + + + + + + + + + + + + @@ -3279,6 +3292,7 @@ along with PreTeXt. If not, see . + From 18dd355bacdee91ddf5d163f95bac404cc7a4e5e Mon Sep 17 00:00:00 2001 From: Andrew Scholer Date: Mon, 18 Aug 2025 14:52:44 -0700 Subject: [PATCH 03/22] HTML: use customizable design-width varaible --- xsl/pretext-html.xsl | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/xsl/pretext-html.xsl b/xsl/pretext-html.xsl index be650bf21..3c219734a 100644 --- a/xsl/pretext-html.xsl +++ b/xsl/pretext-html.xsl @@ -169,12 +169,13 @@ along with MathBook XML. If not, see . - - - - - - + + + + + + + From 1a7ee8d9661e084a1b674dc15aa35a41af65145e Mon Sep 17 00:00:00 2001 From: Andrew Scholer Date: Tue, 13 Jan 2026 10:05:53 -0800 Subject: [PATCH 04/22] Guide: add documentation for design-width pub var --- doc/guide/publisher/publication-file.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/guide/publisher/publication-file.xml b/doc/guide/publisher/publication-file.xml index ee8fd11d5..39bd8795e 100644 --- a/doc/guide/publisher/publication-file.xml +++ b/doc/guide/publisher/publication-file.xml @@ -905,6 +905,19 @@
  • yes: show a button in the navigation bar, that when clicked, displays a popup allowing the user to copy an iframe code snippet to paste into their website or LMS.
  • + + + Interactives Options + publisher optionshtml interactives + +

    + The + + /publication/html + + element can have an attribute design-width with an integer value. This will be used as the base value for converting the percentage based widths of an interactive into a pixel values when that is required. The default value is 600 (100% width is 600px). +

    +
    From 43b9f5095edd0493ce8197bd38037dd95eda7dde Mon Sep 17 00:00:00 2001 From: Andrew Scholer Date: Mon, 18 Aug 2025 15:52:44 -0700 Subject: [PATCH 05/22] HTML: expand max width on iframe standalone pages --- xsl/pretext-html.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xsl/pretext-html.xsl b/xsl/pretext-html.xsl index 3c219734a..c604c6b30 100644 --- a/xsl/pretext-html.xsl +++ b/xsl/pretext-html.xsl @@ -6924,7 +6924,7 @@ along with MathBook XML. If not, see . -
    +
    From db301f30800a8fcc5be017f35d9fbca2d8202898 Mon Sep 17 00:00:00 2001 From: Andrew Scholer Date: Mon, 18 Aug 2025 14:55:33 -0700 Subject: [PATCH 06/22] Assembly: generate interactive-platform identifier for all interactives --- xsl/pretext-assembly.xsl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/xsl/pretext-assembly.xsl b/xsl/pretext-assembly.xsl index bb2f9d158..70cc44caf 100644 --- a/xsl/pretext-assembly.xsl +++ b/xsl/pretext-assembly.xsl @@ -1813,6 +1813,28 @@ along with PreTeXt. If not, see . + + + + + + + + + + desmos + geogebra + calcplot3d + circuitjs + iframe + unknown + + + + + + + From 9f0d6cbc863b8f6e2001a0c616c166967d647388 Mon Sep 17 00:00:00 2001 From: Andrew Scholer Date: Mon, 18 Aug 2025 14:57:07 -0700 Subject: [PATCH 07/22] HTML: add resize-behavior pubvars for interactives and varients --- xsl/publisher-variables.xsl | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/xsl/publisher-variables.xsl b/xsl/publisher-variables.xsl index 5644ca091..020556167 100644 --- a/xsl/publisher-variables.xsl +++ b/xsl/publisher-variables.xsl @@ -3344,6 +3344,39 @@ along with PreTeXt. If not, see . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 5ffafe8194e8e8470b8e6c48c590cbec060c062e Mon Sep 17 00:00:00 2001 From: Andrew Scholer Date: Mon, 18 Aug 2025 14:59:17 -0700 Subject: [PATCH 08/22] HTML: add get-resize-behavior templates for interactives --- xsl/pretext-html.xsl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/xsl/pretext-html.xsl b/xsl/pretext-html.xsl index c604c6b30..7e1dd1ee0 100644 --- a/xsl/pretext-html.xsl +++ b/xsl/pretext-html.xsl @@ -10462,6 +10462,33 @@ along with MathBook XML. If not, see . + + + + + + + + + + + + + + + + + + + + + + + + + + + From e888de9470efa7f768156cd21cb1bf44397a2a98 Mon Sep 17 00:00:00 2001 From: Andrew Scholer Date: Mon, 18 Aug 2025 15:57:47 -0700 Subject: [PATCH 09/22] HTML: custom design-width handling for interactives and slates --- xsl/pretext-html.xsl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/xsl/pretext-html.xsl b/xsl/pretext-html.xsl index 7e1dd1ee0..afd1f2525 100644 --- a/xsl/pretext-html.xsl +++ b/xsl/pretext-html.xsl @@ -10462,6 +10462,30 @@ along with MathBook XML. If not, see . + + + + + + + + + + + + + + + + + + + + + + + + From f4d520eadc8a9d7a870cc19af4d38a127b7702e4 Mon Sep 17 00:00:00 2001 From: Andrew Scholer Date: Mon, 18 Aug 2025 16:54:34 -0700 Subject: [PATCH 10/22] HTML: refactor size-pixels-style-attribute --- xsl/pretext-html.xsl | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/xsl/pretext-html.xsl b/xsl/pretext-html.xsl index afd1f2525..ba02ef7fc 100644 --- a/xsl/pretext-html.xsl +++ b/xsl/pretext-html.xsl @@ -10525,24 +10525,27 @@ along with MathBook XML. If not, see . - + + + + + + + - - width: - - px; - height: - - px; - display: block; - box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; - + width: + + px; + height: + + px; + display: block; From 36e21e528d96ed9f20a8182bef10dc5443515023 Mon Sep 17 00:00:00 2001 From: Andrew Scholer Date: Mon, 18 Aug 2025 17:08:09 -0700 Subject: [PATCH 11/22] HTML: interactives and slates use resize-behavior setting --- xsl/pretext-html.xsl | 155 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 136 insertions(+), 19 deletions(-) diff --git a/xsl/pretext-html.xsl b/xsl/pretext-html.xsl index ba02ef7fc..b896c1c1e 100644 --- a/xsl/pretext-html.xsl +++ b/xsl/pretext-html.xsl @@ -9671,8 +9671,8 @@ along with MathBook XML. If not, see . @@ -9751,10 +9751,10 @@ along with MathBook XML. If not, see . - @@ -9788,7 +9788,7 @@ along with MathBook XML. If not, see . @@ -9822,7 +9822,7 @@ along with MathBook XML. If not, see . @@ -9845,7 +9845,7 @@ along with MathBook XML. If not, see . @@ -9854,7 +9854,7 @@ along with MathBook XML. If not, see .