Geogebra interactive needs toolbar

52 views
Skip to first unread message

Teresa “Terri” Magnus

unread,
Sep 11, 2023, 4:16:55 PM9/11/23
to PreTeXt support
I'm happy to report that my first attempt to add a geogebra interactive was partially successful. Unfortunately, the toolbar doesn't appear and is needed to use the app. Clicking on the url, https://www.geogebra.org/classic/bnayhujg
does show the toolbar, but the embedded interactive does not. 

I have the following:

            <figure xml:id="geogebra-app-for-tri-sum">
                <caption>
                    An interactive Geogebra applet for Triangle Sum Exploration.
                </caption>
           
            <interactive geogebra="bnayhujg"/>
        </figure>
Suggestions appreciated!
Terri

Rob Beezer

unread,
Sep 12, 2023, 11:42:39 AM9/12/23
to pretext...@googlegroups.com
Dear Terri,

Congratulations! ;-)

I don't use GeoGebra, so doing the best I can to help. I think Alex is our
expert - maybe he can pile on.

Find the following in the source of the sample article:

Figure 13.19
https://pretextbook.org/examples/sample-article/html/section-interactive-authored.html#figure-43

It has "extra" Geogebra commands to influence the material. Perhaps there is a
command to turn on the toolbar?

Rob
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com
> <mailto:pretext-suppo...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/f8966256-b0ca-4614-b639-5a48f3bc1263n%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/f8966256-b0ca-4614-b639-5a48f3bc1263n%40googlegroups.com?utm_medium=email&utm_source=footer>.

D. Brian Walton

unread,
Sep 12, 2023, 1:01:39 PM9/12/23
to pretext...@googlegroups.com
The current implementation for GeoGebra interactives that are implemented through simple linking of GeoGebra material ids hard-codes those attributes.
[For reference, this is in xsl/pretext-html.xsl lines 9894-9901]

If instead of using an interactive with a geogebra tag, you will use a platform tag set to "geogebra" with a geogebra slate inside referencing the same material id, it looks like it will work. This method allows for script customization, although the current example doesn't seem to need any to accomplish what you asked.

<interactive platform="geogebra" >
<slate surface="geogebra" material="bnayhujg"/>
</interactive>

I did notice that the space utilization seems larger this way.

Brian


--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/f8966256-b0ca-4614-b639-5a48f3bc1263n%40googlegroups.com.

Teresa “Terri” Magnus

unread,
Sep 12, 2023, 1:04:13 PM9/12/23
to PreTeXt support
The examples in that document do not include the toolbar either so this may be something that I need to build a work-around in geogebra itself. Another thing for me to learn!

Teresa “Terri” Magnus

unread,
Sep 12, 2023, 1:25:13 PM9/12/23
to PreTeXt support
material="bnayhujg" generates the problem "attribute not allowed here" and now my interactive doesn't appear. Do I need to have something else set up to make that work?

Thanks,
Terri

D. Brian Walton

unread,
Sep 12, 2023, 1:27:37 PM9/12/23
to pretext...@googlegroups.com
This is what I tried in a sample document and I thought it was working. Did you change the interactive element to use platform and also add a slate?

<figure xml:id="geogebra-app-for-tri-sum-2">
<caption>Attempt 2</caption>
<interactive platform="geogebra" >
<slate surface="geogebra" material="bnayhujg"/>
</interactive>
</figure>

D. Brian Walton

unread,
Sep 12, 2023, 1:29:17 PM9/12/23
to pretext...@googlegroups.com
My equal signs look like they didn't paste. I think there is something weird with the color scheme on pasting

       <figure xml:id="geogebra-app-for-tri-sum-2">
          <caption>Attempt 2</caption>
          <interactive platform="geogebra" >
              <slate surface="geogebra" material="bnayhujg"/>
          </interactive>
      </figure>

Teresa Magnus

unread,
Sep 12, 2023, 4:36:44 PM9/12/23
to pretext...@googlegroups.com
I did. The only things I didn't copy were the id and caption changes. I plan to include a lot of interactives in this textbook, not all of which will be in geogebra, so I hope to figure this out. There is a Polypad by Mathigon interactive that I tried to put in to my introduction with Rob's help in June (in Mobile), but that one doesn't work either. 

Terri

--
You received this message because you are subscribed to a topic in the Google Groups "PreTeXt support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pretext-support/eq4sSwTqeKw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pretext-suppo...@googlegroups.com.

To view this discussion on the web visit

Teresa Magnus

unread,
Sep 12, 2023, 4:41:51 PM9/12/23
to pretext...@googlegroups.com
Happy Day! Changing the id seemed to make it rethink and now it works. There are tools and they work. Thank you for your assistance.--Terri

D. Brian Walton

unread,
Sep 12, 2023, 4:45:33 PM9/12/23
to pretext...@googlegroups.com
I will be working on getting the other method you first tried to accept an extra attribute that would turn it the toolbar on. It shouldn't be necessary to use this work-around method involving the slate when using pre-existing material on Geogebra.

I assume the Polypad issue you mentioned is something outside of Geogebra.

- Brian

Rob Beezer

unread,
Sep 13, 2023, 11:40:49 AM9/13/23
to pretext...@googlegroups.com
On 9/12/23 13:45, D. Brian Walton wrote:
> I assume the Polypad issue you mentioned is something outside of Geogebra.

When I helped Terri with this in-person I think she gave me a URL (for
embedding, pointing to an iFrame?), and I put it into interactive/@iframe. Voila.

Teresa Magnus

unread,
Sep 13, 2023, 1:30:49 PM9/13/23
to pretext...@googlegroups.com
Thanks again! Yes, my polygon activity is through a different site and app. In case you are interested in viewing it, I'll paste my current script below. It sits within the statement of a task of an exploration. This first task is pretty simple. Students are asked to make copies of the L-tetromino and tile the square provided. 

          <image source="magnus-ltetromino" width="50%">
            <description>
              An L-shape and square.The L is three-fourths as high
              and half as wide as the square.
            </description>
          </image>
          <p>
            This task may be completed with pen and paper or using an
            interactive tool.
         
          <url href="mathigon.org/polypad/OqM1coKhvKsMuw">  
            Interactive tool on Polypad by Mathigon
          </url>
            </p>

Terri

Teresa “Terri” Magnus

unread,
Sep 22, 2023, 5:32:32 PM9/22/23
to PreTeXt support
Just reread Rob's response. Actually, the code

<interactive xml:id="which-fill-square"
preview="preview/whichtetromino.png" width=95% aspect="15:10"/>

produces a sad face and says that mathigon.org refused to connect. At first I thought the problem was with permissions within mathigon.org. Exploring further,  I see the following on the FAQ page on their webpage, https://mathigon.org/faqs so this should be possible:

How do I embed Polypad on other websites?

If you have saved a Polypad canvas, you can embed it on other websites using iFrames – and even customise which tiles and toolbar options you want to show. Watch this video to learn more!


So I watched the video and copied this code for my interactive, <iframe width="720" height="540" src="https://mathigon.org/polypad/embed/deIUjqp9tTSpaQ" frameborder="0" allowfullscreen></iframe>.  When I put this in, I got errors and nothing.
Then I changed iframe to interactive in both locations. It really thought about working before giving the following error:

Checking for update for required playwright chromium browser.
using playwright package to create previews for interactives from C:\Users\three\Desktop\PreTeXt-and-VS\Pretext\Geom-public-sandbox\source\main.ptx for placement in C:\Users\three\Desktop\PreTeXt-and-VS\Pretext\Geom-public-sandbox\generated-assets\preview
XSL conversion of C:\Users\three\Desktop\PreTeXt-and-VS\Pretext\Geom-public-sandbox\source\main.ptx by C:\Users\three\.ptx\xsl\extract-interactive.xsl
comprehensive messages, warnings, and errors:
successful application of C:\Users\three\.ptx\xsl\extract-interactive.xsl
discovering source file's directory name: C:\Users\three\Desktop\PreTeXt-and-VS\Pretext\Geom-public-sandbox\source
verifying and expanding input directory: C:\Users\three\Desktop\PreTeXt-and-VS\Pretext\Geom-public-sandbox\source\../generated-assets
input directory expanded to absolute path: C:\Users\three\Desktop\PreTeXt-and-VS\Pretext\Geom-public-sandbox\generated-assets
verifying and expanding input directory: C:\Users\three\Desktop\PreTeXt-and-VS\Pretext\Geom-public-sandbox\source\../assets
input directory expanded to absolute path: C:\Users\three\Desktop\PreTeXt-and-VS\Pretext\Geom-public-sandbox\assets
Opening subprocess http.server with port=8888
automatic screenshot of interactive with identifier "which-fill-square" on page http://localhost:8888\which-fill-square.html to file which-fill-square-preview.png
Closing http.server subprocess
manufacturing QR codes from C:\Users\three\Desktop\PreTeXt-and-VS\Pretext\Geom-public-sandbox\source\main.ptx for placement in C:\Users\three\Desktop\PreTeXt-and-VS\Pretext\Geom-public-sandbox\generated-assets\qrcode
XSL conversion of C:\Users\three\Desktop\PreTeXt-and-VS\Pretext\Geom-public-sandbox\source\main.ptx by C:\Users\three\.ptx\xsl\extract-qrcode.xsl
comprehensive messages, warnings, and errors:
successful application of C:\Users\three\.ptx\xsl\extract-qrcode.xsl
creating URL with content "which-fill-square.html" as C:\Users\three\Desktop\PreTeXt-and-VS\Pretext\Geom-public-sandbox\generated-assets\qrcode\which-fill-square.png...
QR code creation complete
Removing temporary directory C:\Users\three\AppData\Local\Temp\tmpn84simqg
critical: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\three\\AppData\\Local\\Temp\\tmpn84simqg'
------------------------
Failed to build.  Exiting...
While running pretext, the following errors occurred:

[31mcritical: [0m[WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\three\\AppData\\Local\\Temp\\tmpn84simqg'

----------------------------------------------------
----------------------------------------------------
...PreTeXt command finished.

Suggestions appreciated! I was trying this with VSCode locally if that matters.
Terri

Rob Beezer

unread,
Sep 23, 2023, 3:45:17 PM9/23/23
to pretext...@googlegroups.com
Of course, I know almost nothing about PolyPad.

But just shoving that URL in a browser brings up an error message for me, when I
would think that URS should "just work" somehow.

Do you have other, similar URLS that *do* behave in a browser?

Rob

On 9/22/23 14:32, 'Teresa “Terri” Magnus' via PreTeXt support wrote:
> Just reread Rob's response. Actually, the code
>
> <interactive xml:id="which-fill-square"
> iframe="https://www.mathigon.org/polypad/deIUjqp9tTSpa"
> preview="preview/whichtetromino.png" width=95% aspect="15:10"/>
>
> produces a sad face and says that mathigon.org refused to connect. At first I
> thought the problem was with permissions within mathigon.org. Exploring
> further,  I see the following on the FAQ page on their webpage,
> https://mathigon.org/faqs so this should be possible:
>
> How do I embed Polypad on other websites?
>
> If you have saved a Polypad canvas, you can embed it on other websites using
> iFrames – and even customise which tiles and toolbar options you want to show.
> Watch this video
> <https://mathigon.org/task/embedding-polypads-in-google-sites> to learn more!
> <http://mathigon.org/polypad/OqM1coKhvKsMuw>">
> https://groups.google.com/d/msgid/pretext-support/f8966256-b0ca-4614-b639-5a48f3bc1263n%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/f8966256-b0ca-4614-b639-5a48f3bc1263n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to pretext-suppo...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/88f6112a-d9c8-4333-8173-53e68e295976n%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/88f6112a-d9c8-4333-8173-53e68e295976n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "PreTeXt support" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/pretext-support/eq4sSwTqeKw/unsubscribe <https://groups.google.com/d/topic/pretext-support/eq4sSwTqeKw/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to
> pretext-suppo...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/CAH7VRoLnpgj4rr83jk%3DH3R_U3MyuRHgqPEKRO57g6Le2%3DrHpYA%40mail.gmail.com <https://groups.google.com/d/msgid/pretext-support/CAH7VRoLnpgj4rr83jk%3DH3R_U3MyuRHgqPEKRO57g6Le2%3DrHpYA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> --
> You received this message because you are subscribed to the Google
> Groups "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pretext-suppo...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/1757723078.593698.1694551308959%40mail.yahoo.com <https://groups.google.com/d/msgid/pretext-support/1757723078.593698.1694551308959%40mail.yahoo.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "PreTeXt support" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/pretext-support/eq4sSwTqeKw/unsubscribe
> <https://groups.google.com/d/topic/pretext-support/eq4sSwTqeKw/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to
> pretext-suppo...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/CAH7VRoLA1yrA3RiaRRGkbrAXCSCdmg-chuLbWAgf3GzN61MieQ%40mail.gmail.com <https://groups.google.com/d/msgid/pretext-support/CAH7VRoLA1yrA3RiaRRGkbrAXCSCdmg-chuLbWAgf3GzN61MieQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com
> <mailto:pretext-suppo...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/e292684e-59e8-4e13-8c60-48fcecd3f95fn%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/e292684e-59e8-4e13-8c60-48fcecd3f95fn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Teresa “Terri” Magnus

unread,
Sep 24, 2023, 4:56:16 PM9/24/23
to PreTeXt support
The last part of my message might have been cut off. Here is what Mathigon suggests I use:
<iframe width="720" height="540" src="https://mathigon.org/polypad/embed/deIUjqp9tTSpaQ" frameborder="0" allowfullscreen></iframe>
so "embed" gets added to the url. I'm still not quite there, but the build tried on Friday when I replaced iframe with interactive. I'll try again tomorrow.

Terri

Teresa “Terri” Magnus

unread,
Sep 24, 2023, 10:51:19 PM9/24/23
to PreTeXt support
Solved! 
          <interactive xml:id="which-fill-square"
          preview="whichtetromino" width="95%" aspect="15:10"/>

Rob Beezer

unread,
Sep 25, 2023, 10:21:48 AM9/25/23
to pretext...@googlegroups.com
On 9/24/23 19:51, 'Teresa “Terri” Magnus' via PreTeXt support wrote:
> Solved!

Yahoo! I was going to suggest exactly that this morning. Sorry to be a bit slow.

Rob
Reply all
Reply to author
Forward
0 new messages