You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would perhaps be useful to create the functionality of render outside of Jupyter in the form of a function decorator:
fromhandcalcsimporthandrender# or something@handrenderdefmy_calcs(a, b, c, ...):
d=a+bf=d**c+a*breturnlocals()
The decorator would inspect the source of my_calcs() and pass the source and returned locals dict to the handcalcs.latex() function and would return a tuple of the rendered Latex code, as a str, along with the last calculated variable of the function (i.e. the "result" value), which would be the last entry to the dictionary.
This would allow the rendered Latex code to be used in any other python application that can render Latex in the browser or otherwise (e.g. Streamlit)
The text was updated successfully, but these errors were encountered:
It would perhaps be useful to create the functionality of render outside of Jupyter in the form of a function decorator:
The decorator would
inspect
the source ofmy_calcs
() and pass the source and returned locals dict to the handcalcs.latex() function and would return a tuple of the rendered Latex code, as a str, along with the last calculated variable of the function (i.e. the "result" value), which would be the last entry to the dictionary.This would allow the rendered Latex code to be used in any other python application that can render Latex in the browser or otherwise (e.g. Streamlit)
The text was updated successfully, but these errors were encountered: