Math, MathJax, HTML, slate, interactive

35 views
Skip to first unread message

Rob Beezer

unread,
Jun 29, 2022, 1:35:40 PM6/29/22
to prete...@googlegroups.com
Stumbled upon during recent pppyyppuupptteerrr (sp!) work.

Advice for math inside HTML inside a "slate" inside an "interactive" was never
adjusted as part of recent changes for marking what is processed by MathJax and
what is not.

Since "interactive" is still provisional (for reasons like this!) I'm only
announcing this here. And old-style code would just show bare LaTeX so it is
pretty obvious something is off but not badly broken (and nobody has noticed yet!).

Subsection 14.3: SVG
file:///tmp/s/section-interactive-authored.html#svg-interactives

(GeoGebra will grab focus, use ToC to move to "SVG" subsection.)

@Jason S - do I need to do something more as part of marking off math for React?
I recall doing this, but this is a completely different situation than usual.

Rob

Rob Beezer

unread,
Jun 29, 2022, 1:46:49 PM6/29/22
to prete...@googlegroups.com
Jason notes a bad link. This is better:

Subsection 14.3: SVG
https://pretextbook.org/examples/sample-article/html/section-interactive-authored.html#svg-interactives

Also for Jason - sounds like we'll need to patrol at some point the various
forms of "interactive" that use iframes and/or canned scripts (JSXGraph?) or
custom scripts (David Austin, Mark McClure, etc).

Jason Siefken

unread,
Jun 29, 2022, 2:28:32 PM6/29/22
to prete...@googlegroups.com, Rob Beezer
So if I understand correctly, you want the TOC active item to switch when someone clicks/tabs into a Geogebra area?

Rob Beezer

unread,
Jun 29, 2022, 2:34:39 PM6/29/22
to prete...@googlegroups.com
Just the opposite. ;-) On loading that *section* page, the Geogebra widget
just takes over and gets/takes focus. Note that the link I sent is for the
"SVG" *subsection*, and *page content* goes somewhere else (the Geogebra in
Figure 14.23). Why not an earlier Geogebra? Why at all?

Anyway, a bug, not a feature. ;-) And really bad for accessibility. Sleuthing
encouraged.
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com
> <mailto:pretext-dev...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-dev/ebd09fe8-3d01-c8fb-d704-791fad46e7d8%40gmail.com
> <https://groups.google.com/d/msgid/pretext-dev/ebd09fe8-3d01-c8fb-d704-791fad46e7d8%40gmail.com?utm_medium=email&utm_source=footer>.

Rob Beezer

unread,
Jun 29, 2022, 2:39:28 PM6/29/22
to prete...@googlegroups.com
On 6/29/22 11:34, Rob Beezer wrote:
> Why not an earlier Geogebra?

Answering my own posts. Maybe because it is the *last* one on the page.

Alex Jordan

unread,
Jun 29, 2022, 2:45:05 PM6/29/22
to prete...@googlegroups.com
At the June 2019 workshop, Brian diagnosed the cause of GGB applets
sucking focus. Acting on that and fixing it was delayed while planning
out some sort of larger interactive overhaul that never happened.
Maybe Brian remembers the details?
> --
> You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-dev/24d58d56-ad1d-3c4f-d572-e8c98a905e19%40ups.edu.

D. Brian Walton

unread,
Jun 29, 2022, 3:30:09 PM6/29/22
to pretext-dev
Thanks, Alex. I was just looking into my notes on this issue and about to say the same thing. My notes were that there is a step in GeoGebra with a call setPerspective('G') that was pulling the focus. 

See line 6502 of examples/sample-article/sample-article.xml
(That number reminds me of my first attempt to learn assembly code)

If that is set as a parameter instead of a function call, the behavior stops. In particular, if I go into the corresponding generated iframe file and comment out that line and instead change lines 81 and 82 from

width:300,
height:300,

to

width:300,
height:300,
perspective:'G',

then the jumping behavior stops. The GeoGebra flag "preventFocus" does not seem to have any effect here, and I could never find documentation on why these create different behaviors.

- Brian


Reply all
Reply to author
Forward
0 new messages