-
Notifications
You must be signed in to change notification settings - Fork 432
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
Provide more options for MathJax & KaTeX #678
Comments
Thanks for opening this issue, maintainers will get back to you as soon as possible! |
Delimiters like |
What about KaTeX? I mainly use KaTeX. Is there a way to achieve it? |
Full options support is important in my opinion. Hope there's a way to do it. Additionally, I think it's inconvenient to write KaTeX & MathJax configs with YAML(specifically dictionary) and it's cumbersome to put every option into one config file. Specifically speaking, I mean that we can modify KaTeX & MathJax settings in other config file, or JavaScript file. |
Hey, is it(Custom Configuration) possible for KaTeX? I'm still searching for solution but there's no new messages from this thread. Thanks! |
I've tried to use MathJax under the guide of the doc. However I should use Self ComplaintI turned to brackets delimeters from dollar delimeters because of many reliable and credible reasons, then I met so many issues(not only this one). |
Well, I kept KaTeX and found a solution to add macros. I followed the doc and installed *const custom_options = {
* strict: "ignore",
* macros: {
* "\\d": "\\mathrm{d}"
* }
*}
...
* return katex.renderToString(latex, { ...options, displayMode, ...custom_options });
... Now I can custom most of settings of KaTeX except delimeters, which means I, exhausted physically and mentally, should make a compromise and adapt to dollar delimeters. And I found <script src="/js/third-party/math/copy-tex.min.js"></script> Then it worked. Final question |
Find solution from In detail, add the starred line to const katex = require('katex');
*require('katex/contrib/mhchem');
const inline = require('./lib/inline');
const block = require('./lib/block'); |
Hi @pilgrimlyieu, seems like you've found a solution, congrats! Just a quick note that there are too many specifications and packages of LaTeX that we couldn't possibly bring them all in. Math support beyond MathJax and KaTeX will not be something we actively work on. |
Issue Checklist
Expected behavior
Add detailed options for MathJax & KaTeX. For example adds some macros.(This way seems not pretty, it's just an example. Maybe there are some prettier ways)
Actual behavior
Currently I can only switch on or off MathJax & KaTeX. I can not modify its detailed option.
For example, if I would like to change delimiters(I use
\(...\)
&\[...\]
instead of$...$
&$$...$$
) or add some custom macros, I will fail.Steps to reproduce the behavior
Regardless of it
Other Information
Maybe these websites would help.
I've searched the Internet, read lots of issues, tried many plugins and modified some files while no one satisfied my requests.
I don't know how to achieve it since I didn't have relevant knowledge(like JavaScript) and I failed again and again when I tried.
It'll be appreciated if someone can help me. Thanks in advance
The text was updated successfully, but these errors were encountered: