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 Support #62

Open
serhatbe opened this issue May 16, 2023 · 8 comments
Open

KaTeX Support #62

serhatbe opened this issue May 16, 2023 · 8 comments

Comments

@serhatbe
Copy link

serhatbe commented May 16, 2023

Great theme, many thanks to riggraz.
Can anyone help with adding formulas to posts or pages, something like this:

$$f(x) = \int_{-\infty}^\infty \hat f(\xi)\,e^{2 \pi i \xi x} \,d\xi$$

$$f(x) = \int_{-\infty}^\infty \hat f(\xi),e^{2 \pi i \xi x} ,d\xi$$

Within github, formula is displayed fine but the rendered webpage does not show formula properly, just as a code.

Thanks in advance.

@kekavigi
Copy link

I think there are several ways to display KaTeX on the webpage. The easiest way is to add the 'starter template' in the KaTeX documentation to _includes/head.html.

If there are only a few pages that will use KaTeX, another better way is to add custom YAML like use_math: true to the front-matter of the page you want to render. For this to work, you also need to add the following line to _includes/head.html.

{% if page.use_math %}
 <!-- insert KaTeX starter template here -->
{% endif %}

yet another way to render formulas, is to use a Jekyll plugin such as Jektex.

@yagarea
Copy link

yagarea commented Feb 23, 2024

If you want to I can make pull request adding jektex. Jektex is very lighweigth and does not bloat the rendered site itself.

@serhatbe
Copy link
Author

serhatbe commented Mar 2, 2024

Yes, I’d like to see how it works, thanks.

@yagarea
Copy link

yagarea commented Mar 2, 2024

I have made pull request #73 adding this feature.

@serhatbe
Copy link
Author

serhatbe commented Mar 7, 2024

What are the next steps? Thanks.

@yagarea
Copy link

yagarea commented Mar 7, 2024

What are the next steps? Thanks.

I have made pull request to this repository. If @riggraz decides to accept this PR then you will just have to update no-style-please gem in your repo.

@serhatbe
Copy link
Author

serhatbe commented Mar 9, 2024

Great, thanks very much.

@yagarea
Copy link

yagarea commented Mar 13, 2024

If @riggraz does not merge this PR soon feel free to contact me and I can make PR for you personally.

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

3 participants