mathjax / MathJax

Beautiful and accessible math in all browsers
http://www.mathjax.org/
Apache License 2.0
10.2k stars 1.16k forks source link

/overrightarrow symbol doesn't render #3257

Open 626394316 opened 4 months ago

626394316 commented 4 months ago

/overrightarrow symbol doesn't render

Issue Summary

When I'm using mathjax for rendering, the /overrightarrow symbol doesn't render when $ wraps, but it renders fine when backslash wraps。I used the mathjax and katex.min.css plugins, and on the browser for the backend of the backsleven wrapped formula appears /[ and the formula has spaces so the formula cannot be rendered。i use vue-markdown to show mathjax

Technical details:

I am using the following MathJax configuration: ` <link rel="stylesheet" href="https://unpkg.com/katex@0.6.0/dist/katex.min.css" />

<script>
  window.MathJax = {
    tex: {
      inlineMath: [
        ["$", "$"],
        ["\(", "\)"],
      ], 
      displayMath: [
        ["$$", "$$"],
        ["\[", "\]"],
      ],
    },
    options: {
      skipHtmlTags: [
        "script",
        "noscript",
        "style",
        "textarea",
        "pre",
        "code",
        "a",
      ], 
      ignoreHtmlClass: "tex2jax_ignore",
      processHtmlClass: "tex2jax_process",
    },
  };
</script>
<script
  src="https://cdn.bootcdn.net/ajax/libs/mathjax/3.2.2/es5/tex-chtml.js"
  id="MathJax-script"
></script>`

promble:

HE_L30I4T%{RNX`_(ZF)E 4

R~ MEXPL)BZ8RQ0FQQZ7_LD

The format of VUE reception is as follows:

L5OTWN8 O@(_X1YE@ Z29R8

626394316 commented 4 months ago

vue code: 5Q1VS)Y(N }8L1J}}0`INEL URX34~KSQIISTFK1D4T09KH

dpvc commented 3 months ago

the /overrightarrow symbol doesn't render when $ wraps, but it renders fine when backslash wraps

I do not understand what this means. Can you explain the situation further?

I used the mathjax and katex.min.css plugins, and on the browser for the backend of the backsleven wrapped formula appears /[ and the formula has spaces so the formula cannot be rendered

Again, I am not sure what this means. Are you using MathJax and KaTeX together? (Both at once?) Spaces in formulas should not be a problem, so I'm not sure what issue you are referring to there. You seem to be concerned about the \[ delimiters. It is not the spaces that is the problem there, it is your configuration. You have used ["\[", "\]"] as one of your display math delimiters, but it should be ["\\[", "\\]"] because strings in javascript use \ as an escape character, so you need to double them to get a literal \ in the string. You have made your delimiters be just [ and ] rather than \[ and \]. The same is true for your inline \( and \) delimiters.

From your images: a red macro name in MathJax means the macro isn't defined. But \overrightarrow is defined in the base configuration, so I don't see why it would not be defined for you. You seem to indicate that this only occurs sometimes, and that it has something to do with wrapping, but it is hard to tell what you mean. Also, the image with the red macro names doesn't seem to correspond to the image of the LaTeX that you provide, so it is hard to tell where the issue is.

Is it possible to provide a link to a page that is exhibiting the issue?

If not, can you use the MathJax contextual menu to copy the original TeX notation on one of the expressions with the red \overrightarrow names and past that in here (not an image, but the actual text)?