Dear Brian,
In order, and perhaps a bit terse.
Minor Issue. The scrollbars are a perpetual annoyance. I thought we got rid of
them at some point (as David has observed). Should not slow anybody down, we'll
get it sorted out eventually.
Question 1. Source markup looks great. Could a slate with Jessie code and a
slate with pure-JSXGraph "talk" to each other? Be "wired up together"? That is
part of the motivation of slates.
Question 2. The "xinclude" mechanism allows a @parse attribute that can have
value "text". I think it is demo'ed in the sample book, and is documented in
The Guide. The beauty of this is that the "<" and "&" will not need any special
protection. Unclear what will happen if you need/want some HTML in that code.
So at the moment, I'd say a @source attribute might not be necessary?
2b: Here's where my ignorance shows, since I'm not sure I understand the
question. So perhaps theis means the answer is "no"?
As David has said, "iframe" are part of this discussion (generally). The
motivation there, born of hard-earned personal experience from early work with
JSXGraph, is to sandbox one interactive from another.
Your rendered example looks great, though I did not look at the underlying HTML.
Do you think you will be able to contribute a PR for this? Put that example
into the sample article for regular testing?
Rob
On 5/25/21 7:46 AM, D. Brian Walton wrote:
> As I'm reactivating my PreTeXt skills, I was revisiting some preliminary work I
> had started in 2019 about incorporating JessieCode as a mode to create
> interactive elements.
>
> *Background:*
> JSXGraph is a javascript-based tool for interactive graphics, in my mind a lot
> like what GeoGebra does, just without requiring a separate server. JessieCode is
> a simple scripting language supported by JSXGraph to implement a significant
> subset of the power of JSXGraph without requiring full javascript mucking around.
>
> Link to JessieCode documentation:
>
https://jsxgraph.uni-bayreuth.de/wp/docs_jessiecode/
> <
https://jsxgraph.uni-bayreuth.de/wp/docs_jessiecode/>
>
> JessieCode scripts are plain text and are likely to include < and > because
> property objects are encoded with << ... >> patterns. Also, there are
> conditionals allowed so inequalities and boolean expressions like && might appear.
>
> *Observation*: I discovered that JSXGraph has recently been updated to version
> 1.00 from 0.99.
>
> *New Development Idea:*
> I have implemented the XSL necessary to inject JessieCode to create an
> interactive using a 'JSXGraph' interactive and a slate whose surface is declared
> as 'jessiecode', such as the following example XML fragment:
>
> <figure xml:id="jessie-demo-fig">
> <caption>Will this work?</caption>
> <interactive xml:id="jessie-1" platform="jsxgraph" width="75%">
> <slate xml:id="jessie-1-slate" surface="jessiecode">
> A = point(2,1);
> C1 = circle(A,2);
> B = point(-1,2);
> B.glide(C1);
> P = point(0,0);
> C2 = circle(B,P);
> </slate>
> <instructions>
> <p>Move the points to change the circles.</p>
> </instructions>
> </interactive>
> </figure>
>
> See this live in Example 1.1.1:
>
http://educ.jmu.edu/~waltondb/DEMO/section-sample.html
> <
http://educ.jmu.edu/~waltondb/DEMO/section-sample.html>
>
> *Minor Issue*: Something is up with the size of the interactive so that scroll
> bars are added around the iframe.
>
> *Question 1*: Does this structure make sense?
>
> *Question 2*: (2-part) For more complex figures, the JessieCode program might be
> better as a separate text file (maybe using a .jc suffix).
>
> Q 2a) Would it make sense for the slate element to have an attribute for the source?
>
> Q 2b) Because this isn't JavaScript, the browser won't automatically load the
> source like it does for other script files. Has anyone already implemented
> loading and a separate text file using a URL? I think I know what is needed, but
> would follow precedent if it is already implemented.
>
> Thanks,
> - Brian
>
> --
> 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>.
> <
https://groups.google.com/d/msgid/pretext-dev/CAH7VRoJDdoh5hXJCfwj4Wuqsh%2BhGjSsVUm%2B%2BduMnCW-qf-qJiQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.