-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
8,994 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,287 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# How to Embed Geogebra" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import IPython.display as display" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"\n", | ||
"<iframe width=\"800\" height=\"600\" src=\"https://www.geogebra.org/classic/mcfuhcne\" style=\"border: 1px solid black\"></iframe>\n" | ||
], | ||
"text/plain": [ | ||
"<IPython.core.display.HTML object>" | ||
] | ||
}, | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"fig01 = \"\"\"\n", | ||
"<iframe width=\"800\" height=\"600\" src=\"https://www.geogebra.org/classic/mcfuhcne\" style=\"border: 1px solid black\"></iframe>\n", | ||
"\"\"\"\n", | ||
"display.HTML(fig01)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 6, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"\n", | ||
" <iframe\n", | ||
" width=\"800\"\n", | ||
" height=\"600\"\n", | ||
" src=\"https://www.geogebra.org/classic/mcfuhcne?style=border%3A+1px+solid+black\"\n", | ||
" frameborder=\"0\"\n", | ||
" allowfullscreen\n", | ||
" ></iframe>\n", | ||
" " | ||
], | ||
"text/plain": [ | ||
"<IPython.lib.display.IFrame at 0x168af69c108>" | ||
] | ||
}, | ||
"execution_count": 6, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"from IPython.display import IFrame\n", | ||
"IFrame('https://www.geogebra.org/classic/mcfuhcne', width=800, height=600, style=\"border: 1px solid black\")" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Easiest solution seems to be to IFrame the simple geogebra link and resize with the width and height. \n", | ||
"Drawbacks and questions: \n", | ||
" - might make the object quite large.\n", | ||
" - how turn off the command palette?\n", | ||
" \n", | ||
" The other solution is to get the long embed from geogebra" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 25, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"\n", | ||
" <iframe\n", | ||
" width=\"600\"\n", | ||
" height=\"700\"\n", | ||
" src=\"https://www.geogebra.org/classic/fe2qwgef\"\n", | ||
" frameborder=\"0\"\n", | ||
" allowfullscreen\n", | ||
" ></iframe>\n", | ||
" " | ||
], | ||
"text/plain": [ | ||
"<IPython.lib.display.IFrame at 0x168af72d088>" | ||
] | ||
}, | ||
"execution_count": 25, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"IFrame(\"https://www.geogebra.org/classic/fe2qwgef\", width=600, height=700)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 16, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"\n", | ||
" <iframe\n", | ||
" width=\"800\"\n", | ||
" height=\"600\"\n", | ||
" src=\"https://www.geogebra.org/material/iframe/id/23587/width/1600/height/715/border/888888/rc/false/ai/false/sdz/false/smb/false/stb/false/stbh/true/ld/false/sri/false\"\n", | ||
" frameborder=\"0\"\n", | ||
" allowfullscreen\n", | ||
" ></iframe>\n", | ||
" " | ||
], | ||
"text/plain": [ | ||
"<IPython.lib.display.IFrame at 0x168af731e08>" | ||
] | ||
}, | ||
"execution_count": 16, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"IFrame(\"https://www.geogebra.org/material/iframe/id/23587/width/1600/height/715/border/888888/rc/false/ai/false/sdz/false/smb/false/stb/false/stbh/true/ld/false/sri/false\", width=800, height=600)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Geogebra documentation on [IFrame embedding](https://wiki.geogebra.org/en/Reference:Material_Embedding_(Iframe))\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 41, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<iframe scrolling=\"no\"\n", | ||
"src=\"https://www.geogebra.org/material/iframe/id/23587/width/700/height/700/border/888888/rc/false/ai/true/sdz/false/smb/false/stb/false/stbh/true/ld/false/sri/false\"\n", | ||
"width=\"400x\"\n", | ||
"height=\"400px\"\n", | ||
"style=\"border:0px;\" allowfullscreen>\n", | ||
"</iframe>\n" | ||
], | ||
"text/plain": [ | ||
"<IPython.core.display.HTML object>" | ||
] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
} | ||
], | ||
"source": [ | ||
"%%html\n", | ||
"<iframe scrolling=\"no\"\n", | ||
"src=\"https://www.geogebra.org/material/iframe/id/23587/width/700/height/700/border/888888/rc/false/ai/true/sdz/false/smb/false/stb/false/stbh/true/ld/false/sri/false\"\n", | ||
"width=\"400x\"\n", | ||
"height=\"400px\"\n", | ||
"style=\"border:0px;\" allowfullscreen>\n", | ||
"</iframe>" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Below I reduce the embedded height in the URL to 415 down from 715" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 30, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<iframe scrolling=\"yes\"\n", | ||
"src=\"http://www.geogebra.org/material/iframe/id/23587/width/1100/height/415/border/888888/rc/false/ai/false/sdz/false/smb/false/stb/false/stbh/true/ld/false/sri/false/at/preferhtml5\"\n", | ||
"width=\"1600px\"\n", | ||
"height=\"715px\"\n", | ||
"style=\"border:0px;\">\n", | ||
"</iframe>\n" | ||
], | ||
"text/plain": [ | ||
"<IPython.core.display.HTML object>" | ||
] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
} | ||
], | ||
"source": [ | ||
"%%html\n", | ||
"<iframe scrolling=\"yes\"\n", | ||
"src=\"http://www.geogebra.org/material/iframe/id/23587/width/1100/height/415/border/888888/rc/false/ai/false/sdz/false/smb/false/stb/false/stbh/true/ld/false/sri/false/at/preferhtml5\"\n", | ||
"width=\"1600px\"\n", | ||
"height=\"715px\"\n", | ||
"style=\"border:0px;\">\n", | ||
"</iframe>" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 49, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<iframe scrolling=\"yes\"\n", | ||
"src=\"https://www.geogebra.org/material/iframe/id/gpfbwb6n/\"\n", | ||
"width=\"1200px\"\n", | ||
"height=\"700px\"\n", | ||
"style=\"border:0px;\">\n", | ||
"</iframe>\n" | ||
], | ||
"text/plain": [ | ||
"<IPython.core.display.HTML object>" | ||
] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
} | ||
], | ||
"source": [ | ||
"%%html\n", | ||
"<iframe scrolling=\"yes\"\n", | ||
"src=\"https://www.geogebra.org/material/iframe/id/gpfbwb6n/\"\n", | ||
"width=\"1200px\"\n", | ||
"height=\"700px\"\n", | ||
"style=\"border:0px;\">\n", | ||
"</iframe>\n" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.7.9" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
Oops, something went wrong.