问题描述
我的网站位于Asp.net中,我正在使用MySql作为数据库.我在Microsoft Office word中有一些示例数学论文.我想要任何类型的HTML输入工具,例如文本框或编辑器,以便可以将Office Word公式直接复制到编辑器,并且必须保存到数据库中
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 so that I can copy office word formulas direct to editor and that I have to save into database
示例:
- 解决不等式,并在数字线上表示解决方案:(7x-5)/(2x + 14)≥1 1/4(x≥-7),x∈R.[x≥5]
请考虑以上问题,如果我确实将粘贴到文本框的某些符号复制到文本框中.
Consider the above question if I do copy paste into textbox some of symbols it takes as garbage..
推荐答案
要将数学公式保存到数据库中,更适合使用文本格式.您可以将其转换为任何格式.
To save math equation into database, a text format is more applicable. You can convert it to any format.
请参考此问题了解mathematica方程 ://mathematica.stackexchange.com> mathematica.stackexchange.com ,有许多数学公式,其中包含许多指定的字符和文本格式.
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.
-
<script type="math/tex" id="MathJax-Element-19">n(r) = \frac{2\pi r^2}{\sqrt{3}}</script>
,数学方程式为乳胶格式的文本格式n(r) = \frac{2\pi r^2}{\sqrt{3}}
.
<script type="math/tex" id="MathJax-Element-19">n(r) = \frac{2\pi r^2}{\sqrt{3}}</script>
, the math equation is with text formatn(r) = \frac{2\pi r^2}{\sqrt{3}}
in latex format.
<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>π</mi><msup><mi>r</mi><mn>2</mn></msup></mrow><msqrt><mn>3</mn></msqrt></mfrac></math>
为mathml格式.
<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>π</mi><msup><mi>r</mi><mn>2</mn></msup></mrow><msqrt><mn>3</mn></msqrt></mfrac></math>
is in mathml format.
您还可以在服务器或客户端渲染中使用渲染,以将文本正式渲染为图像,例如<img src="https://example.com/?e=n(r) = \frac{2\pi r^2}{\sqrt{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.
这篇关于如何将数学方程式保存到数据库..?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!