4
$\begingroup$

Jupyter notebook provide a way to render html in its markdown language cells. I know Jupyter is browser based so clearly could be just using the browser's html renderer. But does Mathematica's notebook has similar rendering engine for html. Since anything to be rendered in the notebook it needs to be translated in the Box language so my question is there a function that takes html code as a string and renders it in the frontend using its Box language?

$\endgroup$
  • 3
    $\begingroup$ Mathematica can't render html directly but you can try Import/ImportString to see how much can be automatically translated to WL. P.s. Wolfram Cloud FE can use html directly with EmbeddedHTML wrapper. $\endgroup$ – Kuba Jul 1 '19 at 13:39
  • $\begingroup$ I seem to remember Wolfram stating that it can’t be done “yet”... in the non-online version implying that it will sometime in the future. $\endgroup$ – Michael McCain Jul 2 '19 at 0:20
  • $\begingroup$ The issue here is that there isn’t a unique mapping from HTML to Box. I’ve written various forms of this at various points in time but never anything that can deal with the full complexity of HTML. $\endgroup$ – b3m2a1 Jul 2 '19 at 1:27
  • $\begingroup$ If it's just a matter of rendering, then WebExecute["CapturePage"] fits the bill, but if it's a matter of rendering with interactivity, then that's on a whole other level. Mathematica would then need to include a web browser. $\endgroup$ – C. E. Jul 2 '19 at 2:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.