connorferster / handcalcs

Python library for converting Python calculations into rendered latex.
Apache License 2.0
5.67k stars 434 forks source link

Handcalcs Doesn't Seem to Render in Google Colaboratory #190

Open Saptadeep opened 12 months ago

Saptadeep commented 12 months ago

I noticed this issue only on Google Colaboratory (Colab). Handcalcs stops at Latex and doesn't display the rendered text from Latex when used in Google Colab.

Emmanuel-AECforward commented 2 months ago

The reason it doesn't work ; https://www.youtube.com/watch?v=E4Pg-Drj2HU

connorferster commented 2 months ago

Thanks for posting that video. I will investigate this further. The %%render cell magic gets installed when handcalcs is installed. If Google Colab had a hard-coded list (internally) of cell magics it allows (and actively blocks any others), then that might be the reason it does not work. However, if it displays the Latex string (but does not render it), then it likely has to do with the MathJax or Katex environment in colab.

Emmanuel-AECforward commented 2 months ago

Thanks. If you could get the exact latex string, it should be possible to display it in colab with another package