While using streamlit.latex, I feel like the line-spaces before and after an equation aren’t matching. The upper line-space seems bigger than the lower one.
Check the output of the following code:
import streamlit as st
st.write('Lorem ipsum dolor sit amet, consectetur adipiscing elit.')
st.latex('s = \\frac{1}{2}(u+v)t, \\quad a = \\frac{v-u}{t}')
st.write('Lorem ipsum dolor sit amet, consectetur adipiscing elit.')
Also, check the output of the below code and compare it with the previous one:
import streamlit as st
st.write(""" Lorem ipsum dolor sit amet, consectetur adipiscing elit.
$$
s = \\frac{1}{2}(u+v)t, \\quad a = \\frac{v-u}{t}
$$
Lorem ipsum dolor sit amet, consectetur adipiscing elit.""")
I prefer the output of the second method. But I want to generate the same output by using st.latex
with equal line-spaces before and after the equation. How can I do so?