How to save math equations to database..?

前端 未结 1 1594
小鲜肉
小鲜肉 2020-12-12 00:57

My website is in Asp.net and I am using MySql as database. I have some sample math papers in Microsoft office word. I want any kind of HTML input tool like textbox or editor

相关标签:
1条回答
  • 2020-12-12 01:51

    To save math equation into database, a text format is more applicable. You can convert it to any format.

    Refer to this question understanding a mathematica equation on mathematica.stackexchange.com, there are many math formula with many specified chars and in text format.

    There are many ways to render a text formula.

    1. <script type="math/tex" id="MathJax-Element-19">n(r) = \frac{2\pi r^2}{\sqrt{3}}</script>, the math equation is with text format n(r) = \frac{2\pi r^2}{\sqrt{3}} in latex format.

    2. <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mo stretchy="false">(</mo><mi>r</mi><mo stretchy="false">)</mo><mo>=</mo><mfrac><mrow><mn>2</mn><mi>&#x03C0;</mi><msup><mi>r</mi><mn>2</mn></msup></mrow><msqrt><mn>3</mn></msqrt></mfrac></math> is in mathml format.

    3. You also can use a render in your server or a client render to render the text formual to a image, like <img src="https://example.com/?e=n(r) = \frac{2\pi r^2}{\sqrt{3}}">

    So you can choose a common formula format, when use it you can render it directly or convert it to other format, or image.

    0 讨论(0)
提交回复
热议问题