【问题标题】:Struggle with character "\" trying to display math formulas with mathjax尝试使用 mathjax 显示数学公式时遇到字符“\”的斗争
【发布时间】:2018-01-01 01:56:45
【问题描述】:

我正在尝试在 web 视图中显示用 LaTex 编写的数学公式,但我正在努力处理字符“\”:我不能写“\”,因为是错误,但如果我使用“\\” " 应用无法呈现公式。

url += "This is a display equation: $$P=\frac{F}{A}$$";

url += "This is also an identical display equation with different format:\\[P=\\frac{F}{A}\\]";

我用这个问题作为模型:Display Good-looking Math Formula in Android

任何建议表示赞赏。

【问题讨论】:

  • 你试过ascii值还是\
  • 您是否尝试过\\(\\) 而不是\\[\\],就像stackoverflow.com/questions/17029780/… 建议的答案之一?
  • 你试过了吗:url += "This is also an identical display equation with different format:"+"\\"+"[P="+"\\"+"frac{F}{A}"+"\\"+"]";
  • 我尝试了你的解决方案,但它仍然给我渲染错误

标签: java android math formula mathjax


【解决方案1】:

对于遇到我自己问题的每个人...我最近发现有一种更简单的方法可以使用 MathView 显示数学公式。 如果有人感兴趣:https://github.com/kexanie/MathView/blob/master/README.md

【讨论】:

    猜你喜欢
    • 2019-03-04
    • 2018-02-22
    • 2019-07-12
    • 2021-02-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-07
    • 2017-02-01
    相关资源
    最近更新 更多