尝试使用 mathjax 显示数学公式时遇到字符“\”的问题

Struggle with character "\" trying to display math formulas with mathjax

我试图在网络视图中显示一个用 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

感谢任何建议。

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