Dear community, this topic was described and solved in October 2024 for older versions of streamlit. (Global setting of Latex font size). At that time I got kind assistance by edsaac and he proposed a workaround that did the job (see snippet below).
Short description: The problem was that Latex math fonts were too large (example code: “Wie groß ist die Gate-Source-Spannung in der gezeichneten Schaltung? $U_{\textrm{B}} = 44 V$; $R_1 = 10 k\Omega$; $R_2 = 1 k\Omega$; $R_3 = 2,2 k\Omega$ …” leads to the following output in markdown:
Now, in version 1.50.0 something has been changed and the workaround described in the link does not work any longer. Here, for completeness, the CSS inject that scaled the fonts in the desired manner in the past:
css = f"“”
span.math-inline {{
font-size: {0.8}rem;
}}
div.math-display {{
font-size: {0.8}rem;
}}
“”"
st.html(f"{css}")
Is there any workaround that fixes the issue for 1.50.0? Because of the many math symbols that are involved I would like to avoid formatting of each single math symbol. Thank you so much for your support in advance, best regards, Frank.