justforuse / vue-mathjax-next

Vue3 + Mathjax plugin
https://vue-mathjax-next.vercel.app/
31 stars 2 forks source link

How to make inline formulas #18

Closed Yamioni2007 closed 2 years ago

Yamioni2007 commented 2 years ago

Is there a possibility to prevent the linebreaks before and after the formula? My code looks like this:

<div>
      I would like to have the formula <vue-mathjax :formula="'$$\\frac{1}{2} \\cdot x^2$$'" /> in the text without any linebreaks
</div>

but this always display the formula in a separate line. thanks in advance

Yamioni2007 commented 2 years ago

Nevermind, I figured it out by my self 😅

This isn't about your repo, this is about Mathjax. with only one $ it works. So for all who only know latex like me, this is the solution:

<div>
      This formula <vue-mathjax :formula="'$\\frac{1}{2} \\cdot x^2$'" /> is in the text 
</div>
justforuse commented 2 years ago

👍