You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to remove the katex-rs dependency in mdbook-katex based on escape trick. I escaped three characters: \->\\* -> \*_ -> \_. So far, I haven't found any problems.
I've noticed that the main repository is having a lot of problems with quickjs, so maybe we should add client-js mode. Thanks to the good design of scan, I can easily merge my escape code using the cargo feature.
I have only tested the case where KatexConfig is the default setting and it works fine on my site.
for c in code.chars(){match c {'_' => {
result.push_str("\\_");}'*' => {
result.push_str("\\*");}'\\' => {
result.push_str("\\\\");}
_ => {
result.push(c);}}}
Currently I am experiencing the following issues:
The katex.css is added to the HTML by the preprocessor. To add katex.js we also need to generate the configuration using the auto-render.js hook according to KatexConfig.
The KatexConfig configuration is very extensive and I'm not sure which configurations are broken by the client-side js mode.
I think it might be easier to instruct people to use head.hbs in the README.
The text was updated successfully, but these errors were encountered:
Sounds good. We could put katex-rs behind a feature flag, and it would get rid of a slew of problems from it for some people.
It would need to be a default feature for backwards compatibility, though.
I have only tested the case where KatexConfig is the default setting and it works fine on my site.
Please provide a dummy example in the README for people's reference. This feature would be experimental, and people would try it out at their own risks following the dummy example.
The katex.css is added to the HTML by the preprocessor. To add katex.js we also need to generate the configuration using the auto-render.js hook according to KatexConfig.
The KatexConfig configuration is very extensive and I'm not sure which configurations are broken by the client-side js mode.
I think it might be easier to instruct people to use head.hbs in the README.
I think we let people configure this themselves in the template, because it is client-side. KatexConfig is for server-side rendering.
Note that the no-css option could also be set, if the user wants to set katex.css themselves.
I'm trying to remove the katex-rs dependency in mdbook-katex based on escape trick. I escaped three characters:
\->\\
* -> \*
_ -> \_
. So far, I haven't found any problems.I've noticed that the main repository is having a lot of problems with quickjs, so maybe we should add client-js mode. Thanks to the good design of
scan
, I can easily merge my escape code using the cargo feature.I have only tested the case where KatexConfig is the default setting and it works fine on my site.
Currently I am experiencing the following issues:
katex.css
is added to the HTML by thepreprocessor
. To addkatex.js
we also need to generate the configuration using theauto-render.js
hook according to KatexConfig.head.hbs
in the README.The text was updated successfully, but these errors were encountered: