portfolYOU icon indicating copy to clipboard operation
portfolYOU copied to clipboard

add support for katex?

Open sakgoyal opened this issue 2 years ago • 3 comments

I wonder if its possible to add support for katex math rendering. markdown is quite limited and I really want a way to be able to display math properly. Im going to be writing up blog posts on lots of math heavy topics so being able to render equations is extremely useful. I would strongly perfer to avoid javascript if possible. I want the least amount of js possible on my site.

sakgoyal avatar Aug 01 '22 06:08 sakgoyal

Could you please support Latex?

ChiBei avatar Aug 23 '23 15:08 ChiBei

Also in need of latex.

SydianAndrewChen avatar Oct 08 '23 01:10 SydianAndrewChen

Just figure out how to add latex quickly. Got help from this post.

In the markdown file that requires latex, add this code after the front matter:

---
title: some title
tags: [some tags]
style: fill
color: primary
description: some description
---

<script>
    MathJax = {
        tex: {
        inlineMath: [['$', '$'], ['\\(', '\\)']]
        }
    };
    </script>
<script type="text/javascript" id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js">
</script>    

# Write some latex here. It should appear normal now.

SydianAndrewChen avatar Oct 08 '23 01:10 SydianAndrewChen