Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASCIIMATH and MathJAX #523

Closed
NoBodyButMe opened this issue May 19, 2019 · 3 comments
Closed

ASCIIMATH and MathJAX #523

NoBodyButMe opened this issue May 19, 2019 · 3 comments

Comments

@NoBodyButMe
Copy link

Hello

I want to use vivliostyle and MathJax to render ASCIIMATH, but that doesn't seem to be possible.

When I use the following code in another page it works without any problem:

<script> MathJax.Hub.Config({ asciimath2jax: { delimiters: [['`','`'], ['$','$']] } }); </script> <script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML"> </script>

But when I try to use it in the "viewer" it only renders MathML, but not the ASCIIMATH-code.

@NoBodyButMe
Copy link
Author

It seems vivlio kan only render MathML? Is that correct? Can I use Latex of ASCIIMATH in any way?

@MurakamiShinyu
Copy link
Member

MurakamiShinyu commented May 20, 2019

I admit the problem that the documentation about TeX/AsciiMath support is missing except in the Change Log:

  • Support TeX and AsciiMath mathematics
    • Support math input other than MathML #108
    • In a element with data-math-typeset="true" attribute, you can use TeX or AsciiMath mathematics.
    • TeX mathematics are indicated by delimiters \(...\) or $$...$$.
    • AsciiMath mathematics are indicated by delimiters `...`.

See also the test file
https://github.com/vivliostyle/vivliostyle/blob/master/packages/core/test/files/math-sample.html

and Vivliostyle output: https://vivliostyle.github.io/vivliostyle.js/viewer/vivliostyle-viewer.html#x=https://github.com/vivliostyle/vivliostyle/blob/master/packages/core/test/files/math-sample.html

@NoBodyButMe
Copy link
Author

Thanks, it helps a lot :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants