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

Close #8: math rendering #9

Merged
merged 22 commits into from Jul 1, 2021
Merged

Close #8: math rendering #9

merged 22 commits into from Jul 1, 2021

Conversation

bonartm
Copy link
Owner

@bonartm bonartm commented May 19, 2021

Closes #8. Currently, using this branch, one can include latex within dollar signs (single $ for inline, double $$ for block):

$x=2$
  • Ideally, I'd like to include it without using backticks.
  • By including katex, the bundle size doubles to half a megabyte. I'd like to dynamically load the external libraries (syntax highlighting, katex) based on the users' choice. So users who don't need the features benefit from a small library.

@bonartm
Copy link
Owner Author

bonartm commented Jun 27, 2021

With the new marked.js extensions markedjs/marked#2043 it became much easier to customize the library. Now formulas can be written without backticks.

@bonartm
Copy link
Owner Author

bonartm commented Jun 28, 2021

Implemented a multi output bundle that allows the users to register extensions (syntax highlighting + math formulas) based on their needs. This keeps the file size of the main library small. Output format is now esm and documentation is updated accordingly.

bonartm added 5 commits June 30, 2021 18:35
- forced to remove second selector in :global
- this should fix the GitHub build issue
- add comment to css import
- add hljs class prefix to code tags
- remove obsolete code styling for blocls
- similar inline code style
@bonartm bonartm merged commit 61a6166 into main Jul 1, 2021
@bonartm bonartm deleted the 8_math_katex branch July 1, 2021 10:17
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.

MathJax support
1 participant