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

See if non-Latin character sets can be made to work with MathJax #67

Closed
Pomax opened this issue Feb 22, 2017 · 3 comments
Closed

See if non-Latin character sets can be made to work with MathJax #67

Pomax opened this issue Feb 22, 2017 · 3 comments

Comments

@Pomax
Copy link
Owner

Pomax commented Feb 22, 2017

http://docs.mathjax.org/en/latest/font-support.html suggests this should be possible, but the linked dev tools definitely need some digging into before any fontsets can be generated easily.

This would also have to be absolute minimal subsets, as bundling full JP or CN fonts is not an option due to their large size - subset fonts with only the characters used in the content should ideally be used.

@mashabow
Copy link
Contributor

How about MathJax's CommonHTML mode, instead of SVG?

mathjax

@Pomax
Copy link
Owner Author

Pomax commented Feb 23, 2017

As far as MathJax goes that should not make a difference, but an HTML rather than SVG output would complicate the build process: right now latex blocks are converted to separate svg files and the original block replaced with an <img src="file hash"> tag, but crucially the conversion to SVG gets a shortcut: if the file exists, only the <img src=...> bit happens, the latex does not get reconverted and we don't spend 10 minutes every npm run build waiting for conversions. Converting to HTML would requite a more complex transclusion system because it would have include the result from file, and make sure the syntax is JSX conformant (rewriting class to className, ensuring void elements are closed, etc).

According to mathjax/MathJax-dev#22 (comment) there should be system font fallback for unknown text, so I'll have to look at what exactly went wrong when I tried this with some Chinese.

@Pomax
Copy link
Owner Author

Pomax commented Feb 27, 2017

Short and sweet: MathJax was too much effort. So I rewrote the code to use XeLaTeX instead, which is an actual LaTeX interpreter. We're running offline already anyway, might as well tap into all the power it has to offer.

@Pomax Pomax closed this as completed Feb 27, 2017
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