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

Updated: using katex.min.css from node_modules folder, fixes #252, #349 #356

Merged
merged 1 commit into from Jan 12, 2019

Conversation

upupming
Copy link
Contributor

@upupming upupming commented Jan 12, 2019

This pull request changes the katex.min.css source from the /media folder to node_modules folder. It fixes #252 #349. I just compared your code with Markdown+Math and find this solution.

After I delete the CSS file under the /media folder. I found there are some changes we need to make to make update katex and other dependencies much easier:

  1. Delete all copied files from other packages such as fonts folder, highlight.css, etc. These files are all from npm packages, we should use the files under the node_modules folder to make update them easier.

  2. Make @neilsustc/markdown-it-katex accept an katex object like this(copied from Markdown+Math):

    const kt = require('katex'),
          tm = require('markdown-it-texmath').use(kt);

    In this way, we don't need to worry about katex version and update@neilsustc/markdown-it-katex every time when katex releases a new version.

If you agree with me, I will open another PR for this improment~

@yzhang-gh yzhang-gh merged commit 3b207ff into yzhang-gh:master Jan 12, 2019
@yzhang-gh
Copy link
Owner

Well done! Thanks a lot 👍


For point 1, I agree with you. But be careful. The highlight.css seems to be used for code block syntax highlight, which is not related to math.

And for point 2, I would rather keep what it is now for simplicity. katex doesn't update very frequently. So that is not a big problem.

@upupming
Copy link
Contributor Author

Thanks for you quick response!

By the way, are these font files used? I don't see any code deal with them 😅

image

@yzhang-gh
Copy link
Owner

yzhang-gh commented Jan 12, 2019

These fonts were referenced by the local katex.min.css but not needed now. I have merged your PRs in. Thank you.

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

Successfully merging this pull request may close these issues.

Inequality rendering is incorrect
2 participants