[x3d-public] Fwd: IPython and X3DOM for scientific publication

vmarchetti at kshell.com vmarchetti at kshell.com
Fri Apr 13 13:18:39 PDT 2018




-----Original Message----- From: Paul Masson
Sent: Wednesday, April 11, 2018 4:03 PM
To: x3d-public at web3d.org
Subject: Re: [x3d-public] IPython and X3DOM for scientific publication

Vince:

Since the output of a Jupyter notebook cell is just HTML, one way to do this is with an external file in an iframe, for example

%%html
<iframe src="https://examples.x3dom.org/example/x3dom_helloWorld.html" style="width: 5in; height: 6in"></iframe>

or equivalently

display( HTML( <iframe src="https://examples.x3dom.org/example/x3dom_helloWorld.html" style="width: 5in; height: 6in"></iframe> ) )

If you don't want to use an external file, then the HTML for the entire document can be included in the srcdoc attribute of the iframe directly, but then you need to escape double quotes in the HTML with the " entity.

Cheers!

Paul Masson 




More information about the x3d-public mailing list