Geogebra Support?

92 views
Skip to first unread message

Justin Dunmyre

unread,
Sep 9, 2017, 5:52:04 PM9/9/17
to PreTeXt support
In the sample-article.xml, it suggests that PreTeXt might enjoy expanded Geogebra support if it's requested.  I use geogebra a lot, so I put a weak hack into my .xsl file.  This is likely to be super sloppy, I put it in my second day of using PreTeXt, and I still don't totally know what I'm doing : )  I'm particularly interested in the notion of not relying on geogebra-tube!

Thanks!

Justin

Code from .xsl file:
<xsl:template match="ggb">
   
<xsl:param name="width" select="@width"/>
   
<xsl:param name="height" select="@height" />
   
<xsl:param name="title"  />


   
<xsl:variable name="int-id">
       
<xsl:apply-templates select="." mode="internal-id" />
   
</xsl:variable>
   
<xsl:variable name="source-url" select="@source-url" />




 
<iframe id="{$int-id}"
           
title="{$title}"
           
width="{$width}"
           
height="{$height}"
           
style="border:0px"
 
scrolling="no"
           
src="{$source-url}"/>
</xsl:template>


Example usage in .xml file:

Rob Beezer

unread,
Sep 9, 2017, 11:28:18 PM9/9/17
to pretext...@googlegroups.com
Dear Justin,

Thanks for posting here, and for the request. It'll move it up my list of
priorities. (The old mathbook-xml-support list is dead, pretext-support is the
best place to discuss this.)

Look at two neglected and related pull requests:

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

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

I forget what stalled me on those, usually those are highest priority (right
after bug fixes). I'll take another look.

Good job on the XSLT! Try getting rid of $source-url and see if you can just
use @source-url in the "attribute value template" (AVT, the curly brace
construction) instead? And similar for a few others. Ideally you could do a
"match" on "ggb" and have no "xsl:param" at all.

I'll see what I can do to speed this one up, but I've got a lot on my plate
right now. Almost all PTX-related, though!

Rob

On 09/09/2017 02:52 PM, Justin Dunmyre wrote:
> In the sample-article.xml, it suggests that PreTeXt might enjoy expanded
> Geogebra support if it's requested. I use geogebra a lot, so I put a weak hack
> into my .xsl file. This is likely to be super sloppy, I put it in my second day
> of using PreTeXt, and I still don't totally know what I'm doing : ) I'm
> particularly interested in the notion of not relying on geogebra-tube!
>
> Thanks!
>
> Justin
>
> Code from .xsl file:
> |
> |<xsl:templatematch="ggb">
> <xsl:paramname="width"select="@width"/>
> <xsl:paramname="height"select="@height"/>
> <xsl:paramname="title" />
>
>
> <xsl:variablename="int-id">
> <xsl:apply-templatesselect="."mode="internal-id"/>
> </xsl:variable>
> <xsl:variablename="source-url"select="@source-url"/>
>
>
>
>
> <iframeid="{$int-id}"
> --
> 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 post to this group, send email to pretext...@googlegroups.com
> <mailto:pretext...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/ac1060ff-4c5b-4ee0-9e01-034aa5406867%40googlegroups.com
> <https://groups.google.com/d/msgid/pretext-support/ac1060ff-4c5b-4ee0-9e01-034aa5406867%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Justin Dunmyre

unread,
Sep 10, 2017, 6:48:19 AM9/10/17
to PreTeXt support
Thanks for the update!  I think I recall one of the discussion points I saw as I was browsing for GeoGebra support, is that there's an open-ish question about what to do with print / PDF materials.  A thumbnail with an option to put a QR code (and short url) in the margin that links to GeoGebra-tube is a fine choice.  I think it's a good choice for Geogebra because GeoGebra-tube files run surprisingly well on mobile devices.  

Thanks!

Alex Jordan

unread,
Sep 10, 2017, 1:09:08 PM9/10/17
to pretext...@googlegroups.com
I haven't looked at it again, but iirc the hangup on my PR was about width as percentages.
Mine was for the thumbnails for static versions like print or HTML previews,
Jahrme's was for embedding the active HTML.

It's on my list to make the widths conform to PTX standards.
Can't say when, so anyone can feel free to pick up where I left off if there is a rush.

--
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-support+unsubscribe@googlegroups.com.
To post to this group, send email to pretext-support@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/381c4c75-2f88-484f-8e01-e90e1cc15160%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages