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

katex autorender #276

Closed
max-gartz opened this issue May 5, 2021 · 5 comments
Closed

katex autorender #276

max-gartz opened this issue May 5, 2021 · 5 comments

Comments

@max-gartz
Copy link

max-gartz commented May 5, 2021

Hi,
first, thank you very much for the nice template :D

I am struggling to have katex render environments like this one:

\begin{CD}
A @>a>> B \
@vbvv @aaca \
C @= D
\end{CD}

which are supported according to https://katex.org/docs/supported.html.
According to the documentation:

The auto-render extension will render the following environments even if they are not inside math delimiters such as $$…$$. They are display-mode only. ....

I also tried wrapping the environment into $$..$$, but both versions won't render.

The same goes for the equation and split environments.

Finally, I tried to adjust the auto-render.min,js file to change the delimiters, such that inline math is indicated by $...$
and $$...$$ indicates display mode, but this does not seem to work either.

I would be grateful for any tips oder ideas on how to solve this issue!

Thank you very much :)

EDIT:
Everything works as expected if I turn of katex in the config file and include:

<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-z64WtjpyrKFsxox9eI4SI8eM9toXdoYeWb5Qh+8PO+eG54Bv9BZqf9xNhlcLf/sA" crossorigin="anonymous"></script> <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>

in the header.html file.

@sylhare
Copy link
Owner

sylhare commented May 6, 2021

Thanks I will take a look at it.
Do you have a link to your blog where I can have a look at the version you are using (or does the problem happen with the current version)?

@sylhare
Copy link
Owner

sylhare commented May 10, 2021

I tried with KaTex v0.13.5 and could not manage to make it display event with the library from cdn:

<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-z64WtjpyrKFsxox9eI4SI8eM9toXdoYeWb5Qh+8PO+eG54Bv9BZqf9xNhlcLf/sA" crossorigin="anonymous"></script> 
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script> 

I'll update KaTex version and try out more.

@sylhare
Copy link
Owner

sylhare commented May 10, 2021

Ok syntax error, I'll update the version and now it's working

@sylhare
Copy link
Owner

sylhare commented May 10, 2021

You can see it working here

@max-gartz
Copy link
Author

sorry for the late reaction - it looks good :)

thank you very much :)

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