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
KrisMerckx opened this issue May 19, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@KrisMerckx
Copy link

commented May 19, 2019

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.

@KrisMerckx

This comment has been minimized.

Copy link
Author

commented May 19, 2019

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

@MurakamiShinyu

This comment has been minimized.

Copy link
Member

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
    • #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.js/blob/master/test/files/math-sample.html

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

@KrisMerckx

This comment has been minimized.

Copy link
Author

commented May 20, 2019

Thanks, it helps a lot :-)

@KrisMerckx KrisMerckx closed this May 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.