English 中文(简体)
• 如何按照jqMath格式表述空间
原标题:How to keep spaces in the formatted expression in jqMath

我正在使用jqMath。 数学方程式。 我不想从表达中删除空间和新线特性。 我如何能够这样做? 我曾尝试过很多事情,但我 co不见找到任何解决办法。

最佳回答

提交人......

In general, it s best to let html handle the text, and jqMath handle the math. For example, write " using $y = (x+1)/(x+2)$", or "<td>$x+y = 2$<td>(1)" inside an html table.

You have to be able to separate user input into mathematics and non-mathematics. If a user inputs "using y=x" you don t want "using" parsed as the product of 5 variables u, s, i, n, and g. Similarly, if he inputs extra spaces that you want to keep outside the mathematics, you have to capture them using regular expressions or something, and don t pass them to jqMath. If you want the spaces to be part of the mathematics, you could make the user input able or sp or ext or something, though most users won t know to do that. You could tell users that they need to put $ $ around their mathematics if they want it to format, and then you could search for that.

Basically, jqMath isn t smart enough to tell what s math and what isn t, without $ $ to help.

Probably 0.2.0 will be out in a couple months, or at least I ll have a version I could send you by then.

<>Update>: 新版本支持/文本和/或html

问题回答

使用批次和“”在公式内留出空间

HTML source : [ ext"average speed" = ext"distance traveled" / ext"elapsed time"]

Result : enter image description here

这一实例可在以下网站查阅: rel=“nofollow noreferer”http://mathreg.com/author/jqmath.html

Update: If you stumble on this, jqmath has added , : and ; operaters that specify thin, mid, and thicker white spacing.

It doesn t look like it can be done. To quote the page you provided:

空间、表格和新线被忽略——jqMath格式





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签