CharlieMcVicker / mathjax-react

React Component Library for MathJax
33 stars 14 forks source link

how to do SVG resize ? #37

Open ajay311517104001 opened 1 year ago

ajay311517104001 commented 1 year ago

i've used the mathComponent and the input that i fed in tex is pretty long when it throws the svg, the svg is going out of the div. Dynamic resizing is not happening. please help me with this. Thanks in advance :)

manal-t07 commented 1 year ago

i've used the mathComponent and the input that i fed in tex is pretty long when it throws the svg, the svg is going out of the div. Dynamic resizing is not happening. please help me with this. Thanks in advance :)

Did you find any solution to this? I am facing the same issue: image I need to wrap the content to the next line. The scroll is added if I do this: <p style={{display:"inline-block", whiteSpace:"nowrap", maxWidth:"100%", overflowX:"auto", textAlign:"initial"}}> <MathComponent tex={example1} display={true} /></p>

manal-t07 commented 1 year ago

I used the mathjax script instead: ` <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML"

`

and render content in the <p> tag.