Coder Social home page Coder Social logo

Comments (5)

dpvc avatar dpvc commented on June 11, 2024

The default MathJax fonts don't include the U+224C character, so that is why you get a <text> element for that. You re correct that it will look different in different fonts, and MathJax won't know how much space to leave for it, so that is not optimal.

There are two possible solutions. First, you could switch to the STIX-web font rather than the default MathJax fonts, since they include many more characters, includuing U+224C. Then define cong: '\u224C' (do not use the braces as that will alter the spacing).

Alternatively, if you want to stick with the default MathJax fonts, you could use

cong: '\\stackrel{\\Large\\lower.2em\\backsim}{\\lower.1em=}'

which will use the back-sim character over an equal sign. That will give you a symbol that looks correct, but will not be read correctly by screen readers.

from mathjax-node.

lyxabymxlc avatar lyxabymxlc commented on June 11, 2024

@dpvc We have tested the font "STIX-web", the congruent symbol "≌" is normal, but the rendered other letter styles do not meet the requirements.
Default Font ( Tex ):
image
STIX-web Font:
image

Using "stackrel" mode, the display is normal in SVG and abnormal in web page.
image

Finally, we adopt the "stackrel" approach to solve the SVG problem first. As for the web page, we will not make any changes for the time being.
Thank you very much. ^_^

from mathjax-node.

dpvc avatar dpvc commented on June 11, 2024

Note that mathjax-node uses MathJax version 2, while the mathjax.org website uses MathJax version 3. Apparently, there is some inconsistency in the layout of \stackrel between the two versions. I will need to check into that. Since you were using MathJax-node, I gave you a version 2 solution. Are you using version 3 in your website? If so, you could use

\stackrel{\raise.03em{\Large\backsim}}{\smash{\lower.1em=}}

for SVG output. There also seems to be inconsistency between the SVG and CHTML output (in both v2 and v3). If you use CHTML output in v3, you should need to use

\stackrel{\lower.2em{\Large\backsim}}{\smash{\lower.1em=}}

instead.

from mathjax-node.

lyxabymxlc avatar lyxabymxlc commented on June 11, 2024

I see. Thank you very much!

from mathjax-node.

dpvc avatar dpvc commented on June 11, 2024

I forgot to mention:

the rendered other letter styles do not meet the requirements.

Not everyone likes the look of the STIX fonts, and they are different from the default MathJax TeX fonts, which are based on the TeX Computer Modern fonts (whereas STIX is supposed to be compatible with the Times font, if I recall correctly). But they do have the advantage of having much greater character coverage, so they help when you want to use characters that aren't in the MathJax TeX fonts. It is a choice you have to make one way or the other.

from mathjax-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.