blob: f1b703ff0205b274541076f42dc39ffc451c84a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
GeoGebra Offline Instructions
=============================
Files created:
- geogebra-offline.html : Your original export modified to load a LOCAL deployggb.js
- geogebra-embed.html : A tiny wrapper that iframes geogebra-offline.html (handy for Jupyter or LMSes)
- README_offline_geogebra.txt : This file
What you still need:
--------------------
1) Download GeoGebra's loader script *once* and place it next to these HTML files as `deployggb.js`.
Example commands (run in the same folder as the HTML files):
curl -L -o deployggb.js https://www.geogebra.org/apps/deployggb.js
or
wget -O deployggb.js https://www.geogebra.org/apps/deployggb.js
2) (Optional but recommended for FULLY offline use):
The loader (deployggb.js) normally fetches additional runtime assets from geogebra.org.
For truly offline usage (no internet at all), you must also mirror/host the GeoGebra Web app
files it requests (the "apps" runtime) and change the internal base URL used by the loader.
The exact files and paths can change by version; a common approach is to:
- Inspect the network requests in your browser dev tools when the app loads online.
- Mirror those directories (often under something like /apps/ or /html5/).
- Serve them locally (same directory or a local web server) and adjust paths in the loader
or via a local web server rewrite to point to your mirrored copies.
If 'deployggb.js' provides a configuration option for a base path, set it to your local copy.
Otherwise, you can host the mirrored assets on a local web server and keep the paths consistent.
How to view locally:
--------------------
- Double-click geogebra-embed.html (or open in a browser). Some browsers restrict file:// + JS;
using a local web server avoids this. For example:
python3 -m http.server 8000
Then open: http://localhost:8000/geogebra-embed.html
Using inside Jupyter:
---------------------
Place the HTML files in the notebook's working directory (or a subfolder) and in a cell run:
from IPython.display import IFrame
IFrame("geogebra-embed.html", width=920, height=660)
Or inline the applet HTML directly (the contents of geogebra-offline.html) with:
from IPython.display import HTML
HTML(open("geogebra-offline.html", "r", encoding="utf-8").read())
Notes:
------
- If your Jupyter notebook is not "trusted", JavaScript may be blocked. Use "Trust Notebook".
- PDF export of notebooks won't preserve interactivity. Use HTML for sharing interactive content.
- If you restructure paths, keep the iframe 'src' updated accordingly.
|