retext-project / retext

ReText: Simple but powerful editor for Markdown and reStructuredText
GNU General Public License v2.0
1.88k stars 196 forks source link

Math missed #596

Closed GNUqb114514 closed 2 years ago

GNUqb114514 commented 2 years ago

I had used your ReText. I had set the configurations from the wiki because I think I habit use $...$:

mdx_math(enable_dollar_delimiter=1)

Just this line. But when I input this:

$1+1=2$

I want it shows math but it don't shows any things. Is it a bug? Or I did something wrong? How can I let it shows math?

GNUqb114514 commented 2 years ago

P.S. I had installed it using pip install retext.

GNUqb114514 commented 2 years ago

P.S. I had tried it again using \(1+1=2\) and $$1+1=2$$ but it doesn't shows any things again. The html code it makes is:

<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="generator" content="ReText 7.2.3">
<title>新建文档</title>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
  config: ["MMLorHTML.js"],
  jax: ["input/TeX", "input/AsciiMath", "output/HTML-CSS", "output/NativeMML"],
  extensions: ["MathMenu.js", "MathZoom.js"],
  TeX: {
    extensions: ["AMSmath.js", "AMSsymbols.js"],
    equationNumbers: {autoNumber: "AMS"}
  }
});
</script>
<script type="text/javascript" src="file:///usr/share/javascript/mathjax/MathJax.js"></script></head>
<body>
<p>
<script type="math/tex">1+1=2</script>
</p>

</body>
</html>

(I had using Chinese.) And the markdown of it is:

$1+1=2$

And it shows:image.png

GNUqb114514 commented 2 years ago

Oh, I finished it!

  1. Install the libjs-mathjax:
    sudo apt install libjs-mathjax
  2. Set the extensions;
  3. Set use WebKit. Finish!
mitya57 commented 2 years ago

Yeah, you did everything correct!