When outputting Web page versions, it is possible to embed a variety of dynamic interactive elements. In a LaTeX/PDF version, these will necessarily need to be replaced by some static substitute, such as a screenshot. See Section 3 for the specifics of embedding instances of the Sage Cell Server, which is more elaborate, and not entirely similar.
(2018-06-22) Almost everything in this section is under active development and not stable yet. Feel free to experiment and make suggestions and requests. This page takes a while to completely load, so be patient.
A Geogebra material is something you might use in a class. It could also be called an interactive demonstration. Go browsing at www.geogebra.org/materials and find something appropriate for your project. Or make an account and create your own.
Note that materials hosted at geogebra.org have a non-standard, non-commercial license you must agree to before you can download them as source code. Perhaps you must forfeit your copyright when you upload a material? We have not investigated this thoroughly.
Desmos provides interactive graphing applications. The following example was created by Ann Cary and made available via the βShareβ function of Desmos. You can make your own Desmos graph, choose the βShareβ icon, and the βEmbedβ option, to get a URL such as
The static image employed in the LaTeX version of this article was obtained by viewing the graph at the Desmos site (i.e., not the embedded version in the PreTeXt HTML version), and using the Share button to export a PNG image. In this case, we used a βMedium Rectangleβ and βThickβ lines.
CalcPlot3D is a Javascript application for creating, visualizing, and understanding plots of 3D surfaces. So it would be an ideal companion to a book on multivariate calculus, but should be useful in other courses of study.
Create a plot and adjust the image to a viewpoint and scale you like. Then, click the menu icon in the upper-left and choose File. From here you can save a PNG image for the static version, but you also want to select Encode View in URL. Now your browser address bar is filled with a query string (all the stuff after the question-mark) that has all the information necessary to reproduce your plot (and view). Copy everything after the first question-mark to the interactive/code element. Be sure to replace any ampersands by & (see the Author's Guide for more about certain characters in URLs). Examine the source for the examples below to see how they are authored.
In Figure 15.3 grab the image with your mouse and rotate it in various directions. Then while the image has focus, press the 3 key (short for β3-Dβ), to get a 3D view, which will require some red-blue 3D glasses to fully appreciate. Press the key again to return to a regular view.
You can embed interactive demonstrations created in Wolfram's Computable Document Format so that they will be played with the Wolfram CDF Playerβ’. Once you create and save a demonstration, you want to determine the UUID that is the identifier of your demonstration. For example, Figure 15.7 is identified by 9fa2acff-c809-4b7f-a73b-c59ace36affc. This identifier is enough to create the PreTeXt to embed the demonstration. See https://reference.wolfram.com/language/howto/DeployInteractiveContentInTheWolframCloud.html for information about creating your demonstration.