Then mimic the examples that follow, using GeoGebra API commands documented at Geogebra API Manual, but do not include the ggbApplet. or applet. used in examples to prefix the functionsthat part of the code will be provided automatically by .
+
There are some optional control elements that Geogebra provides, such as the presence of the toolbar and the reset button. These can be controlled by adding the following additional attributes to the slate and are automatically included in the initialization for the Geogebra applet.
+
+
toolbar="yes": add the Geogebra toolbar above the material
+
algebra-input="yes": add an entry box below the material to add graphical objects using algebra formulas or Geogebra graphical commands
+
reset-icon="yes": enable the reset icon
+
shift-drag-zoom="yes": enable ability to drag and zoom the viewing context
+
zoom-buttons="yes": enable buttons that control zoom
+
+
+
Jack Green created an applet on the Classroom Resources site with ID D4s2v4ft, which you may view at . Suppose you would like to use this in your project, but change something about it. We will change something trivial, making the y-axis ticks be separated 5 apart instead of 10 apart. We also decide we want a different aspect ratio and overall width. One gotcha: the original applet is loaded and then uses width and aspect attributes to resize the viewing window using the top left corner as an anchor. This does not rescale axes and that may leave you with important elements missing from the viewing window. So here we reset the viewing window to return to values that are in the original. Lastly, we disable zooming, which is not helpful for this applet. To do each of these things, we rely on the GeoGebra API manual at Geogebra API Manual. It is important to use one command per line.
@@ -8577,7 +8587,7 @@ along with MathBook XML. If not, see .
Once you find a material that looks instructive, it will be at a URL such ashttps://www.geogebra.org/m/KGn2d4Qd and you want to pick off the identifier on the end, in this case KGn2d4Qd. Then author<interactive geogebra="KGn2d4Qd" /> At this writing (2018-02-04) you will want to place this inside a figure, with a caption, as we do right now with material KGn2d4Qd.
-
The shape of the material will be fixed, so guess (or measure with an on-screen ruler), the aspect ratio and use that in the interactive element. If the width of the original material is anything other than 800 pixels, you should add material-width with the actual material width (units are pixels).
+
The shape of the material will be fixed, so determine the dimensions (measure with an on-screen ruler or inspect the underlying definition). Use material-width and material-height with the actual material width and height (units are pixels). These are treated by Geogebra as internal coordinate dimensions and are separate from the physical layout dimensions that appear in your text. In the absence of these attributes, default values are 800 pixels for the width and a height based on the provied aspect ratio.
Right Triangle Paradox
@@ -8590,6 +8600,7 @@ along with MathBook XML. If not, see .
algebra-input="yes": add an entry box below the material to add graphical objects using algebra formulas or Geogebra graphical commands
reset-icon="yes": enable the reset icon
shift-drag-zoom="yes": enable ability to drag and zoom the viewing context
+
zoom-buttons="yes": enable buttons that control zoom