GeoGebra elements not showing

248 views
Skip to first unread message

Juan Carlos Bustamante

unread,
Jun 9, 2021, 1:51:34 PM6/9/21
to PreTeXt support

Hi all,

I just rebuilt sample-article (I pulled mathbook this morning), and the GeoGebra applets that rely on some local .ggb file are not showing correctly. In fact upon running

    xsltproc ../../xsl/pretext-html.xsl sample-article.xml

I do get the .html document, but the output is not the one I expect (I attach a screen capture below). The command actually throws results in the warnings below (that I do not understand), and running the command takes quite long (abut a minute).

I'm running Unbuntu 18.04, but the same happens on another machine running Ubuntu 20.04.

Any advise?


Kind regards,


JC



PTX:WARNING:   lookup for a "custom" element with @name set to "plural-animal" has failed, while consulting the customization file "".  Output will contain "[MISSING CUSTOM CONTENT HERE]" instead
             located within: "Customizing Phrases" (title)
PTX:WARNING:   lookup for a "custom" element with @name set to "an-emotional-style" has failed, while consulting the customization file "".  Output will contain "[MISSING CUSTOM CONTENT HERE]" instead
             located within: "Customizing Phrases" (title)
PTX:WARNING:   lookup for a "custom" element with @name set to "color-list" has failed, while consulting the customization file "".  Output will contain "[MISSING CUSTOM CONTENT HERE]" instead
             located within: "Customizing Phrases" (title)
PTX:WARNING:   lookup for a "custom" element with @name set to "xref-to-result" has failed, while consulting the customization file "".  Output will contain "[MISSING CUSTOM CONTENT HERE]" instead
             located within: "Customizing Phrases" (title)
PTX:WARNING:   lookup for a "custom" element with @name set to "a-URL" has failed, while consulting the customization file "".  Output will contain "[MISSING CUSTOM CONTENT HERE]" instead
             located within: "Customizing Phrases" (title)




Rob Beezer

unread,
Jun 9, 2021, 2:03:09 PM6/9/21
to pretext...@googlegroups.com
On 6/9/21 10:51 AM, Juan Carlos Bustamante wrote:
> I do get the .html document, but the output is not the one I expect (I attach a
> screen capture below).

The sample article online renders these just fine, so it is hard to say what is
up. And nothing about these has changed in the past few days (since the online
version was posted). Can you share your HTML as a live example? If necessary use:

Section 5.12: Testing HTML Output Globally
https://pretextbook.org/doc/guide/html/processing-testing-html-globally.html#processing-testing-html-globally

> The command actually throws results in the warnings below
> (that I do not understand)

You need to use indicate the provided publisher file to specify a file of custom
replacments. It is irrelevant to your Geogebra items.

> and running the command takes quite long (abut a
> minute).

That is normal. Fast even.

Rob

Juan Carlos Bustamante

unread,
Jun 9, 2021, 2:27:58 PM6/9/21
to pretext...@googlegroups.com
Hello Robert,

I tried the netlify thing, but that did not work (I did not try that
hard, I do not have a domain...)

However here is a link to a Dropbox folder

https://www.dropbox.com/s/xok1kd2kpqilsud/sample-article-JCB.zip?dl=0

It contains the sample-article folder that I compiled a few minutes ago.

Kind regards,

JC


Le 21-06-09 à 14 h 02, Rob Beezer a écrit :

Rob Beezer

unread,
Jun 9, 2021, 2:38:15 PM6/9/21
to pretext...@googlegroups.com
On 6/9/21 11:27 AM, Juan Carlos Bustamante wrote:
> However here is a link to a Dropbox folder
>
> https://www.dropbox.com/s/xok1kd2kpqilsud/sample-article-JCB.zip?dl=0

That does not render at all.

JC Bustamante

unread,
Jun 9, 2021, 3:17:23 PM6/9/21
to pretext...@googlegroups.com
Hello again,

Something quite strange is going on:

I managed to put the folder on netlify, that one works nicely :

https://stoic-lamarr-e631f9.netlify.app/section-interactive-authored.html#subsection-54

However when I open the zipped folder that I shared with you a few
minutes ago, I got the same error as before.

JC

David Farmer

unread,
Jun 9, 2021, 3:32:34 PM6/9/21
to pretext...@googlegroups.com

When I build the sample article, at the bottom of that
GeoGrbra (bleow the screen shot) is a message:

Sorry, the file could not be loaded. Contact sup...@geogebra.org
> --
> 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/2292f655-dc68-d49a-ab3c-3a14fd97134b%40ups.edu.
>

David Farmer

unread,
Jun 9, 2021, 3:37:17 PM6/9/21
to pretext...@googlegroups.com

I should have added: viewed locally on my laptop.
(Some things work differently when properly posted online).
> https://groups.google.com/d/msgid/pretext-support/alpine.LRH.2.21.2106091500050.15969%40li375-150.members.linode.com.
>

Juan Carlos Bustamante

unread,
Jun 9, 2021, 3:40:54 PM6/9/21
to pretext...@googlegroups.com
Same for me, but the .ggb file is there... isn't it? At first I was a
bit confused by the "base-64 encoded string"... stuff.

JC

Le 21-06-09 à 15 h 32, David Farmer a écrit :

Juan Carlos Bustamante

unread,
Jun 9, 2021, 7:57:46 PM6/9/21
to pretext...@googlegroups.com

I got it,

When testing with CoCalc, everything works. I suggest a mention to this in the documentation. It's pretty weird that, as you point out

    "Some things work differently when properly posted online".


Kind regards,

JC

Le 21-06-09 à 15 h 37, David Farmer a écrit :

Alex Jordan

unread,
Jun 9, 2021, 8:52:59 PM6/9/21
to pretext...@googlegroups.com
This is essentially question 1 in the FAQ:
https://pretextbook.org/doc/guide/html/author-faq.html

But I think it should be worded differently. It reads as if it is
knowl- or sage-specific. But it can be about any "fancy" thing the
page uses, including GeoGebra embeddings.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/680ce095-b281-eb48-216c-ef32a8ee2b9a%40gmail.com.

Alex Jordan

unread,
Jun 9, 2021, 8:53:37 PM6/9/21
to pretext...@googlegroups.com
BTW, I just volunteered myself to reword it. I'll do that this evening.

Juan Carlos Bustamante

unread,
Jun 9, 2021, 9:39:39 PM6/9/21
to pretext...@googlegroups.com

Thanks,

Perhaps mention this in section 15 of sample-article, where the GeoGebra interactive stuff is described.

Back to my original problem (I did not ask explicitly about this, though) : I want to include some GeoGebra material, not passing through GeoGebraTube, so I am doing

<figure>
   <caption>GeoGebra: mon fichier <c>.ggb</c></caption>
   <interactive xml:id="geogebra-plan-cone" platform="geogebra" width="100%" aspect="1:1">
    <slate xml:id="plan-cone" surface="geogebra" source="GeoGebra/Cone-plan-param.ggb" aspect="1:1">
    </slate>
    </interactive>
</figure>

Of course, I have a GeoGebra directory, at the same level that my source file, and inside it a Cone-plan-param.ggb file.

I also did

python -m SimpleHTTPServer,

that solved the problem I was having with the knowls, but the GeoGebra stuff is not working properly.

Thanks again,


JC


Le 21-06-09 à 20 h 53, Alex Jordan a écrit :

Alex Jordan

unread,
Jun 9, 2021, 10:25:09 PM6/9/21
to pretext...@googlegroups.com
> but the GeoGebra stuff is not working properly.

It's helpful that you posted some PTX source here. I don't see
anything suspect about it.

Also it will be difficult to diagnose the issue without a link to the
HTML up at a public web server.

On Wed, Jun 9, 2021 at 6:39 PM Juan Carlos Bustamante
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/7cfebaa5-3b43-318f-6549-0510fa91731d%40gmail.com.

JC Bustamante

unread,
Jun 10, 2021, 10:15:09 AM6/10/21
to pretext...@googlegroups.com
Hello Alex,

I put everything here

https://60c217f88b805e45496cce96--jolly-lamarr-240b7a.netlify.app/sec-courbes

The problem is with "Exemple 1.6.8".

Thanks!

JC

D. Brian Walton

unread,
Jun 10, 2021, 10:40:17 AM6/10/21
to pretext-support
Theory of a fix.

Change your lines:

    <slate xml:id="plan-cone" surface="geogebra" source="GeoGebra/Cone-plan-param.ggb" aspect="1:1">
    </slate>

to:

    <slate xml:id="plan-cone" surface="geogebra" source="GeoGebra/Cone-plan-param.ggb" aspect="1:1" />

Let us know if this fixes the issue. I'm wondering if it has to do with having an empty customization script. The sample article examples all include some modifications added after the file is loaded.

- Brian


JC Bustamante

unread,
Jun 10, 2021, 10:48:22 AM6/10/21
to pretext...@googlegroups.com

Alex Jordan

unread,
Jun 10, 2021, 11:55:33 AM6/10/21
to pretext...@googlegroups.com
With the live example, I can see a javascript console error:
Uncaught SyntaxError: missing name after . operator

And looking at the page source, yes as Brian says, it is trying to do
something with the empty content of the slate. Well, the slate is not
quite empty, it has a line break and whitespace characters in it.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/c1d74eec-4190-ecde-909b-46a0b74e1a1a%40gmail.com.

Rob Beezer

unread,
Jun 10, 2021, 1:14:53 PM6/10/21
to pretext...@googlegroups.com
On 6/10/21 8:55 AM, Alex Jordan wrote:
> And looking at the page source, yes as Brian says, it is trying to do
> something with the empty content of the slate. Well, the slate is not
> quite empty, it has a line break and whitespace characters in it.

Which is being matched by a naked "text()" that probably needs to be tested for
emptieness, or should follow action for options like @source, etc. rather than
preceding them.

Should be an easy fix.

Nice catch, Brian - thanks.

Rob




Alex Jordan

unread,
Jun 11, 2021, 11:00:51 AM6/11/21
to pretext...@googlegroups.com
I opened:
https://github.com/rbeezer/mathbook/pull/1497/

that fixes what happened here. If the "slate" is pseudo-empty (has
line breaks, white space, but no "real" text content) then things will
work following the commit there.
> --
> 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/60ab6cca-41fb-bf5b-4e3c-a25677947a6b%40ups.edu.

Alex Jordan

unread,
Jun 11, 2021, 11:01:37 AM6/11/21
to pretext...@googlegroups.com
> BTW, I just volunteered myself to reword it. I'll do that this evening.

https://github.com/rbeezer/mathbook/pull/1496

Rob Beezer

unread,
Jun 11, 2021, 2:23:59 PM6/11/21
to pretext...@googlegroups.com
Fix is in at

https://github.com/rbeezer/mathbook/pull/1497

Thanks, JC, for alerting us to this one, and to Brian and Alex for debugging and
fixing.

Rob

Rob Beezer

unread,
Jun 11, 2021, 6:10:04 PM6/11/21
to pretext...@googlegroups.com
On 6/11/21 8:01 AM, Alex Jordan wrote:
>> BTW, I just volunteered myself to reword it. I'll do that this evening.
>
> https://github.com/rbeezer/mathbook/pull/1496

And result is first item at:

https://pretextbook.org/doc/guide/html/author-faq.html

Thanks, Alex, that is a great improvement.
Reply all
Reply to author
Forward
0 new messages