huxpro.github.io icon indicating copy to clipboard operation
huxpro.github.io copied to clipboard

Mathjax display mode not working

Open Olafyii opened this issue 4 years ago • 10 comments

image -> image

mathjax_support.html:

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    TeX: {
      equationNumbers: {
        autoNumber: "AMS"
      }
    },
    SVG: {
      scale: 90
    },
    tex2jax: {
      inlineMath: [ ['$','$'] ],
      displayMath: [ ['$$','$$'], ['[[', ']]'] ],
      processEscapes: true,
    }
  });
</script>
<script type="text/javascript"
        src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

Why is the double dollar delimiter not working?

Olafyii avatar Aug 07 '20 05:08 Olafyii

@Olafyii

Did you turn on the Latex support via mathjax: true as mentioned in the https://github.com/Huxpro/huxpro.github.io/blob/master/_doc/Manual.md#posts?

Huxpro avatar Aug 07 '20 18:08 Huxpro

@Huxpro Yes, and the inline mode is working fine. The display mode also works if the delimiter is not ['$$','$$'], for example ['[[',']]']. But if I use '\$$' as delimiter, it works. image Line 1, 3, and 4 works just fine. Seems that the '$$' delimiter won't invoke mathjax, and will change to '\(' in HTML...

Olafyii avatar Aug 08 '20 00:08 Olafyii

I cannot have $$ work as well. But $ works.

roife avatar Sep 03 '20 03:09 roife

我也有一样的问题,本地预览的时候,用 Chrome 是可以正常显示公式的,但是 Safari 显示有问题,所有 $$ 都变成 \] ,但是 $ 是没有问题的。然而 push 之后 Chrome 也不能正常显示了,Chrome 和 Safari 都只有 $ 能显示。最近才出现的问题,以前没遇到过。

jinyiliu avatar Sep 14 '20 07:09 jinyiliu

Same problem here. My formulas that were good in the past now don't show correctly. $xx$ still works, but $$xxx$$ is broken. Maybe it's due to the version upgrading of mathjax, I guess?

mikelyou avatar Oct 08 '20 00:10 mikelyou

@jinyiliu 参考https://github.com/fancyerii/fancyerii.github.io/blob/master/_includes/mathjax.html 已解决

zwt0204 avatar Oct 16 '20 08:10 zwt0204

@zwt0204 谢谢,问题解决了!但是 \boldsymbol 的显示好像有点问题,不知道有没有其他人遇到过,这样就无法加粗希腊字母了。下面是 \boldsymbol{F}=m\boldsymbol{a}=m\frac{\mathrm{d}^2\boldsymbol{x}}{\mathrm{d}t^2} 显示的结果,看起来根本没有加粗,就是变得更斜了。 截屏2020-10-16 下午5 58 16

jinyiliu avatar Oct 16 '20 09:10 jinyiliu

我更换为下面这个,可以解决,各字符进行各种操作都显示正常

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [['$','$'], ['\\(','\\)']],
      processEscapes: true,
    }
  });
</script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML' async></script>

simplestory avatar May 17 '21 06:05 simplestory

$xx$ and $$xx$$ works well with this config

// _includes/mathjax_support.html
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ['\\(','\\)'] ],
      processEscapes: true
    }
  });
</script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS_HTML' async></script>

selchwang avatar Aug 30 '21 01:08 selchwang

我更换为下面这个,可以解决,各字符进行各种操作都显示正常

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [['$','$'], ['\\(','\\)']],
      processEscapes: true,
    }
  });
</script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML' async></script>

This approach solved my problem as well! Thx

Yingfan-Duan avatar Mar 25 '22 22:03 Yingfan-Duan