hexo-theme-gal icon indicating copy to clipboard operation
hexo-theme-gal copied to clipboard

[建议]添加对LaTeX渲染的支持

Open Milarodvia opened this issue 5 years ago • 3 comments

RT

Milarodvia avatar Jun 12 '19 07:06 Milarodvia

我按照网上的一些方法自己尝试了一下。如果自己安装Mathjax之类(并且配置正确)会使得博客无响应。建议作者封装一下qwq

Milarodvia avatar Jun 12 '19 08:06 Milarodvia

@Milarodiva 直接在/gal/layout/_partial/head.ejs后面追加

    <script>MathJax = {
        tex:{
                inlineMath: [['$', '$'], ['\\(', '\\)']]
            },
        svg:{
                fontCache: 'global'
            }
        };
    </script>
    <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
    <script type="text/javascript" id="MathJax-script" async  src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>

不就好了吗?

jyeric avatar Feb 25 '20 04:02 jyeric

可以安装插件: https://github.com/next-theme/hexo-filter-mathjax

stevenjoezhang avatar Aug 11 '20 03:08 stevenjoezhang