python: render <svg> via _repr_html_
Work around a recent decision in Jupyter Lab and Notebook to render <svg> is inline <img>, breaking tooltips or text selection. (Rerendering all notebooks was painful.) * NEWS: Mention the change. * python/spot/__init__.py: Add a _repr_html_ method to all classes that had a _repr_svg_. It seems Jupyter will use _repr_html_ by default. * python/spot/jupyter.py: SVG replace the _repr_svg_ method by a _repr_html. * tests/python/_altscc.ipynb, tests/python/_autparserr.ipynb, tests/python/_aux.ipynb, tests/python/_mealy.ipynb, tests/python/_partitioned_relabel.ipynb, tests/python/_product_susp.ipynb, tests/python/_product_weak.ipynb, tests/python/_synthesis.ipynb, tests/python/aliases.ipynb, tests/python/alternation.ipynb, tests/python/atva16-fig2a.ipynb, tests/python/atva16-fig2b.ipynb, tests/python/automata-io.ipynb, tests/python/automata.ipynb, tests/python/cav22-figs.ipynb, tests/python/contains.ipynb, tests/python/decompose.ipynb, tests/python/formulas.ipynb, tests/python/games.ipynb, tests/python/gen.ipynb, tests/python/highlighting.ipynb, tests/python/ltsmin-dve.ipynb, tests/python/ltsmin-pml.ipynb, tests/python/parity.ipynb, tests/python/product.ipynb, tests/python/randaut.ipynb, tests/python/satmin.ipynb, tests/python/stutter-inv.ipynb, tests/python/synthesis.ipynb, tests/python/testingaut.ipynb, tests/python/twagraph-internals.ipynb, tests/python/word.ipynb, tests/python/zlktree.ipynb: Update all notebooks.
This commit is contained in:
parent
4cf7503fff
commit
3034e8fcc3
36 changed files with 43249 additions and 8585 deletions
|
|
@ -326,7 +326,7 @@
|
|||
"$\\mathsf{cycle}\\{a; \\lnot a\\}$"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_word; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_word > *' at 0x7f7c7c425630> >"
|
||||
"<spot.twa_word; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_word > *' at 0x7f05002c3c90> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 16,
|
||||
|
|
@ -379,43 +379,43 @@
|
|||
"<div style='vertical-align:text-top;display:inline-block;'><?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
||||
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
||||
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
||||
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
|
||||
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
||||
" -->\n",
|
||||
"<!-- Pages: 1 -->\n",
|
||||
"<svg width=\"82pt\" height=\"161pt\"\n",
|
||||
" viewBox=\"0.00 0.00 82.00 161.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
||||
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 157)\">\n",
|
||||
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-157 78,-157 78,4 -4,4\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"16\" y=\"-138.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Inf(</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"38\" y=\"-138.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"54\" y=\"-138.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"14\" y=\"-124.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
|
||||
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1.0 1.0) rotate(0) translate(4 157)\">\n",
|
||||
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-157 78,-157 78,4 -4,4\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"16.5\" y=\"-138.8\" font-family=\"Lato\" font-size=\"14.00\">Inf(</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"37.5\" y=\"-138.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"53.5\" y=\"-138.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"15.5\" y=\"-124.8\" font-family=\"Lato\" font-size=\"14.00\">[Büchi]</text>\n",
|
||||
"<!-- I -->\n",
|
||||
"<!-- 0 -->\n",
|
||||
"<g id=\"node2\" class=\"node\">\n",
|
||||
"<title>0</title>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"56\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"56\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"56\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"56\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- I->0 -->\n",
|
||||
"<g id=\"edge1\" class=\"edge\">\n",
|
||||
"<title>I->0</title>\n",
|
||||
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.1233,-18C4.178,-18 17.9448,-18 30.9241,-18\"/>\n",
|
||||
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-18 30.9808,-21.1501 34.4807,-18 30.9807,-18.0001 30.9807,-18.0001 30.9807,-18.0001 34.4807,-18 30.9807,-14.8501 37.9807,-18 37.9807,-18\"/>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-18C2.79,-18 17.15,-18 30.63,-18\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-18 30.94,-21.15 34.44,-18 30.94,-18 30.94,-18 30.94,-18 34.44,-18 30.94,-14.85 37.94,-18 37.94,-18\"/>\n",
|
||||
"</g>\n",
|
||||
"<!-- 0->0 -->\n",
|
||||
"<g id=\"edge2\" class=\"edge\">\n",
|
||||
"<title>0->0</title>\n",
|
||||
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M52.7643,-35.7817C52.2144,-45.3149 53.293,-54 56,-54 57.988,-54 59.0977,-49.3161 59.3292,-43.0521\"/>\n",
|
||||
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"59.2357,-35.7817 62.4756,-42.7406 59.7808,-39.275 59.8258,-42.7747 59.3258,-42.7812 58.8259,-42.7876 58.7808,-39.2879 56.1761,-42.8217 59.2357,-35.7817 59.2357,-35.7817\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"50.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a</text>\n",
|
||||
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M52.76,-35.78C52.21,-45.31 53.29,-54 56,-54 57.99,-54 59.1,-49.32 59.33,-43.05\"/>\n",
|
||||
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"59.24,-35.78 62.48,-42.74 59.78,-39.28 59.83,-42.77 59.33,-42.78 58.83,-42.79 58.78,-39.29 56.18,-42.82 59.24,-35.78 59.24,-35.78\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"50.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 0->0 -->\n",
|
||||
"<g id=\"edge3\" class=\"edge\">\n",
|
||||
"<title>0->0</title>\n",
|
||||
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M50.6841,-35.4203C47.6538,-52.791 49.4258,-72 56,-72 61.7011,-72 63.7908,-57.5545 62.2691,-42.3894\"/>\n",
|
||||
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"61.3159,-35.4203 65.3856,-41.9288 62.2856,-38.8202 62.76,-42.2879 62.2646,-42.3557 61.7692,-42.4235 61.2949,-38.9558 59.1437,-42.7826 61.3159,-35.4203 61.3159,-35.4203\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"52.5\" y=\"-90.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a</text>\n",
|
||||
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M50.68,-35.42C47.65,-52.79 49.43,-72 56,-72 61.7,-72 63.79,-57.55 62.27,-42.39\"/>\n",
|
||||
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"61.32,-35.42 65.39,-41.93 62.29,-38.82 62.76,-42.29 62.26,-42.36 61.77,-42.42 61.29,-38.96 59.14,-42.78 61.32,-35.42 61.32,-35.42\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"52.5\" y=\"-90.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"48\" y=\"-75.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
||||
"</g>\n",
|
||||
"</g>\n",
|
||||
|
|
@ -423,54 +423,54 @@
|
|||
"</div><div style='vertical-align:text-top;display:inline-block;'><?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
||||
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
||||
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
||||
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
|
||||
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
||||
" -->\n",
|
||||
"<!-- Pages: 1 -->\n",
|
||||
"<svg width=\"169pt\" height=\"125pt\"\n",
|
||||
" viewBox=\"0.00 0.00 169.00 124.80\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
||||
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 120.8)\">\n",
|
||||
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-120.8 165,-120.8 165,4 -4,4\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"57.5\" y=\"-86.6\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
|
||||
"<svg width=\"169pt\" height=\"108pt\"\n",
|
||||
" viewBox=\"0.00 0.00 169.00 108.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
||||
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1.0 1.0) rotate(0) translate(4 104)\">\n",
|
||||
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-104 165,-104 165,4 -4,4\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"59\" y=\"-84.8\" font-family=\"Lato\" font-size=\"14.00\">[Büchi]</text>\n",
|
||||
"<!-- I -->\n",
|
||||
"<!-- 0 -->\n",
|
||||
"<g id=\"node2\" class=\"node\">\n",
|
||||
"<title>0</title>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"56\" cy=\"-22\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"56\" y=\"-18.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"56\" cy=\"-22\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"56\" y=\"-18.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- I->0 -->\n",
|
||||
"<g id=\"edge1\" class=\"edge\">\n",
|
||||
"<title>I->0</title>\n",
|
||||
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.1233,-22C4.178,-22 17.9448,-22 30.9241,-22\"/>\n",
|
||||
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-22 30.9808,-25.1501 34.4807,-22 30.9807,-22.0001 30.9807,-22.0001 30.9807,-22.0001 34.4807,-22 30.9807,-18.8501 37.9807,-22 37.9807,-22\"/>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-22C2.79,-22 17.15,-22 30.63,-22\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-22 30.94,-25.15 34.44,-22 30.94,-22 30.94,-22 30.94,-22 34.44,-22 30.94,-18.85 37.94,-22 37.94,-22\"/>\n",
|
||||
"</g>\n",
|
||||
"<!-- 0->0 -->\n",
|
||||
"<g id=\"edge2\" class=\"edge\">\n",
|
||||
"<title>0->0</title>\n",
|
||||
"<path fill=\"none\" stroke=\"#000000\" d=\"M49.6208,-39.0373C48.3189,-48.8579 50.4453,-58 56,-58 60.166,-58 62.4036,-52.8576 62.7128,-46.1433\"/>\n",
|
||||
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"62.3792,-39.0373 65.8541,-45.8818 62.5434,-42.5335 62.7076,-46.0296 62.7076,-46.0296 62.7076,-46.0296 62.5434,-42.5335 59.561,-46.1774 62.3792,-39.0373 62.3792,-39.0373\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"51.5\" y=\"-61.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M49.62,-39.04C48.32,-48.86 50.45,-58 56,-58 60.17,-58 62.4,-52.86 62.71,-46.14\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"62.38,-39.04 65.85,-45.88 62.54,-42.53 62.71,-46.03 62.71,-46.03 62.71,-46.03 62.54,-42.53 59.56,-46.18 62.38,-39.04 62.38,-39.04\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"51.5\" y=\"-61.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 1 -->\n",
|
||||
"<g id=\"node3\" class=\"node\">\n",
|
||||
"<title>1</title>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"139\" cy=\"-22\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"139\" cy=\"-22\" rx=\"22\" ry=\"22\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"134.5\" y=\"-18.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"139\" cy=\"-22\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<ellipse fill=\"none\" stroke=\"black\" cx=\"139\" cy=\"-22\" rx=\"22\" ry=\"22\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"134.5\" y=\"-18.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 0->1 -->\n",
|
||||
"<g id=\"edge3\" class=\"edge\">\n",
|
||||
"<title>0->1</title>\n",
|
||||
"<path fill=\"none\" stroke=\"#000000\" d=\"M74.0098,-22C84.4333,-22 97.8048,-22 109.7062,-22\"/>\n",
|
||||
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"116.887,-22 109.887,-25.1501 113.387,-22 109.887,-22.0001 109.887,-22.0001 109.887,-22.0001 113.387,-22 109.8869,-18.8501 116.887,-22 116.887,-22\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"92\" y=\"-25.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a</text>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M74.18,-22C84.48,-22 97.85,-22 109.68,-22\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"116.81,-22 109.81,-25.15 113.31,-22 109.81,-22 109.81,-22 109.81,-22 113.31,-22 109.81,-18.85 116.81,-22 116.81,-22\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"92\" y=\"-25.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 1->1 -->\n",
|
||||
"<g id=\"edge4\" class=\"edge\">\n",
|
||||
"<title>1->1</title>\n",
|
||||
"<path fill=\"none\" stroke=\"#000000\" d=\"M131.3173,-42.9908C130.3688,-53.0872 132.9297,-62 139,-62 143.5527,-62 146.1314,-56.9866 146.7361,-50.2204\"/>\n",
|
||||
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"146.6827,-42.9908 149.8844,-49.9673 146.7086,-46.4907 146.7345,-49.9906 146.7345,-49.9906 146.7345,-49.9906 146.7086,-46.4907 143.5846,-50.0139 146.6827,-42.9908 146.6827,-42.9908\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"135.5\" y=\"-65.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a</text>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M131.32,-42.99C130.37,-53.09 132.93,-62 139,-62 143.55,-62 146.13,-56.99 146.74,-50.22\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"146.68,-42.99 149.88,-49.97 146.71,-46.49 146.73,-49.99 146.73,-49.99 146.73,-49.99 146.71,-46.49 143.58,-50.01 146.68,-42.99 146.68,-42.99\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"135.5\" y=\"-65.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
|
||||
"</g>\n",
|
||||
"</g>\n",
|
||||
"</svg>\n",
|
||||
|
|
@ -491,7 +491,7 @@
|
|||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
|
|
@ -505,7 +505,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.7.3"
|
||||
"version": "3.11.7"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue