Open v2gt opened 4 years ago
In #49 I suggest adding plugin support. With that, one of these might be helpful.
Here's a POC of using LaTeX
Live: https://blorg-latex.hao.systems/using-latex Source: https://github.com/LaloHao/gatsby-theme-blorg-latex
Here's a POC of using LaTeX
Live: https://blorg-latex.hao.systems/using-latex Source: https://github.com/LaloHao/gatsby-theme-blorg-latex
@LaloHao Is this all done with the katex import? I.e. did this require zero changes to orgajs? I mean you didn’t have to render the latex to the AST at all right?
Here's a POC of using LaTeX Live: https://blorg-latex.hao.systems/using-latex Source: https://github.com/LaloHao/gatsby-theme-blorg-latex
@LaloHao Is this all done with the katex import? I.e. did this require zero changes to orgajs? I’m you didn’t have to render the latex to the AST at all right?
Yes, you don't need to change orgajs internals, you can do it on your own project
There are 2 commits on my example repository:
How to:
I ran npm install --save katex rehype-katex rehype-math rehype-parse
for the dependencies
I added the css file to gatsby-browser.js
require('katex/dist/katex.min.css');
希望:
输入org:
html
<div class="section"><h1>test</h1><p>$a+b$</p><p>\[a+b+\alpha\]</p></div>