Render mathjax library in Streamlit

How could I render the mathjax library in Streamlit?
I would like to display the lambda function on the x-axis of the plotly plot but this is not working…
Any tips on how I could fix this and use greek letters for the plots?

Same problem. I tried putting

components.html(f'''
       <script type="text/javascript" async
          src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-MML-AM_CHTML">
       </script>
    ''')

into my script, following the instructions on Getting Started — MathJax 2.7 documentation, without luck. Did you manage to solve it?

Would be grateful for an example on how to use the “<script >” tag as described at the top of this page Latex (plotly.com).

I’m also having this issue. If I st.write(‘latexhere’) it is fine. But as soon as I try to use it in plotly it does not succeed. However, I’m not sure how to activate mathjax.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.