GithubHelp home page GithubHelp logo

Comments (10)

jerrywcy avatar jerrywcy commented on June 18, 2024

配置是直接拷贝的主页上的配置

from hexo-filter-mathjax.

stevenjoezhang avatar stevenjoezhang commented on June 18, 2024

安装的插件中并没有 hexo-filter-mathjax

from hexo-filter-mathjax.

jerrywcy avatar jerrywcy commented on June 18, 2024

???
(我明明记得我装了)
是我傻了。。。
实在抱歉,打扰了。。。

from hexo-filter-mathjax.

stevenjoezhang avatar stevenjoezhang commented on June 18, 2024

哈哈,没事。如果安装了不显示,试试执行

npm install hexo-filter-mathjax --save

应该就没问题了。

from hexo-filter-mathjax.

jerrywcy avatar jerrywcy commented on June 18, 2024

我又来了打扰了。。。
大佬您真是料事如神
这次我肯定装上了(因为两个$是可以用的)
但是行内公式似乎出了一些问题
Markdown:

---
title: test
date: 2020-03-17 21:59:36
tags:
- test
mathjax: true
---
$ \frac{a}{b} $

但是渲染就是这个样子:
image
HTML代码:

<p>
  <mjx-container class="MathJax" jax="SVG"><svg style="vertical-align: 0" xmlns="http://www.w3.org/2000/svg" width="0.002ex" height="0" role="img" focusable="false" viewBox="0 0 1 0" preserveAspectRatio="xMidYMid slice" xlink="http://www.w3.org/1999/xlink"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><g data-mml-node="math"></g></g></svg></mjx-container></p>
<svg style="display: none" id="MJX-SVG-global-cache"><defs></defs></svg>

但就是显示不出来
您说的命令我也执行过了,但还是不行
大佬请问该怎么办?

from hexo-filter-mathjax.

jerrywcy avatar jerrywcy commented on June 18, 2024

$$
\frac{a}{b}
$$

显示是正常的
image
some和content之间应该是数学公式,但是目前看来它就是显示不出来

from hexo-filter-mathjax.

jerrywcy avatar jerrywcy commented on June 18, 2024

实际上数学公式应该一点都没有占位置,前面那张图中间有空格是因为我在写的时候加上了,去掉空格中间就什么都没有了
就像这样:
image
Markdown源码:

some$ \frac{a}{b} $content
$$
\frac{a}{b}
$$

HTML:

<p>some<mjx-container class="MathJax" jax="SVG"><svg style="vertical-align: 0" xmlns="http://www.w3.org/2000/svg" width="0.002ex" height="0" role="img" focusable="false" viewBox="0 0 1 0" preserveAspectRatio="xMidYMid slice"
            xlink="http://www.w3.org/1999/xlink">
            <g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)">
                <g data-mml-node="math"></g>
            </g>
        </svg></mjx-container>content <span class="math display">
        <mjx-container class="MathJax" jax="SVG" display="true"><svg style="vertical-align: -1.486ex; min-width: 11.595ex" xmlns="http://www.w3.org/2000/svg" width="100%" height="4.104ex" role="img" focusable="false"
                xlink="http://www.w3.org/1999/xlink">
                <g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0) scale(0.0181) translate(0, -1157)">
                    <g data-mml-node="math">
                        <g data-mml-node="mtable" transform="translate(2078, 0) translate(-2078, 0)">
                            <g transform="translate(0, 1157) matrix(1 0 0 -1 0 0) scale(55.25)"><svg data-table="true" preserveAspectRatio="xMidYMid" viewBox="-2078 -1157 5125 1814">
                                    <g transform="matrix(1 0 0 -1 0 0)">
                                        <g data-mml-node="mlabeledtr" transform="translate(0, 40)">
                                            <g data-mml-node="mtd">
                                                <g data-mml-node="mfrac">
                                                    <g data-mml-node="mi" transform="translate(220, 676)">
                                                        <use href="#MJX-TEX-I-61"></use>
                                                    </g>
                                                    <g data-mml-node="mi" transform="translate(270, -686)">
                                                        <use href="#MJX-TEX-I-62"></use>
                                                    </g>
                                                    <rect width="729" height="60" x="120" y="220"></rect>
                                                </g>
                                            </g>
                                        </g>
                                    </g>
                                </svg><svg data-labels="true" preserveAspectRatio="xMaxYMid" viewBox="0 -1157 1278 1814">
                                    <g data-labels="true" transform="matrix(1 0 0 -1 0 0)">
                                        <g data-mml-node="mtd" id="mjx-eqn-1" transform="translate(0, 40)">
                                            <g data-mml-node="mtext">
                                                <use href="#MJX-TEX-N-28"></use>
                                                <use href="#MJX-TEX-N-31" transform="translate(389, 0)"></use>
                                                <use href="#MJX-TEX-N-29" transform="translate(889, 0)"></use>
                                            </g>
                                        </g>
                                    </g>
                                </svg></g>
                        </g>
                    </g>
                </g>
            </svg></mjx-container>
    </span></p>
<svg style="display: none" id="MJX-SVG-global-cache">
    <defs>
        <path id="MJX-TEX-I-61"
            d="M33 157Q33 258 109 349T280 441Q331 441 370 392Q386 422 416 422Q429 422 439 414T449 394Q449 381 412 234T374 68Q374 43 381 35T402 26Q411 27 422 35Q443 55 463 131Q469 151 473 152Q475 153 483 153H487Q506 153 506 144Q506 138 501 117T481 63T449 13Q436 0 417 -8Q409 -10 393 -10Q359 -10 336 5T306 36L300 51Q299 52 296 50Q294 48 292 46Q233 -10 172 -10Q117 -10 75 30T33 157ZM351 328Q351 334 346 350T323 385T277 405Q242 405 210 374T160 293Q131 214 119 129Q119 126 119 118T118 106Q118 61 136 44T179 26Q217 26 254 59T298 110Q300 114 325 217T351 328Z">
        </path>
        <path id="MJX-TEX-I-62"
            d="M73 647Q73 657 77 670T89 683Q90 683 161 688T234 694Q246 694 246 685T212 542Q204 508 195 472T180 418L176 399Q176 396 182 402Q231 442 283 442Q345 442 383 396T422 280Q422 169 343 79T173 -11Q123 -11 82 27T40 150V159Q40 180 48 217T97 414Q147 611 147 623T109 637Q104 637 101 637H96Q86 637 83 637T76 640T73 647ZM336 325V331Q336 405 275 405Q258 405 240 397T207 376T181 352T163 330L157 322L136 236Q114 150 114 114Q114 66 138 42Q154 26 178 26Q211 26 245 58Q270 81 285 114T318 219Q336 291 336 325Z">
        </path>
        <path id="MJX-TEX-N-28"
            d="M94 250Q94 319 104 381T127 488T164 576T202 643T244 695T277 729T302 750H315H319Q333 750 333 741Q333 738 316 720T275 667T226 581T184 443T167 250T184 58T225 -81T274 -167T316 -220T333 -241Q333 -250 318 -250H315H302L274 -226Q180 -141 137 -14T94 250Z">
        </path>
        <path id="MJX-TEX-N-31"
            d="M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z">
        </path>
        <path id="MJX-TEX-N-29"
            d="M60 749L64 750Q69 750 74 750H86L114 726Q208 641 251 514T294 250Q294 182 284 119T261 12T224 -76T186 -143T145 -194T113 -227T90 -246Q87 -249 86 -250H74Q66 -250 63 -250T58 -247T55 -238Q56 -237 66 -225Q221 -64 221 250T66 725Q56 737 55 738Q55 746 60 749Z">
        </path>
    </defs>
</svg>

from hexo-filter-mathjax.

stevenjoezhang avatar stevenjoezhang commented on June 18, 2024

发现问题了,使用 hexo-renderer-pandoc 时,行内公式不能加空格
$\frac{a}{b}$
$ \frac{a}{b} $
这可能是 pandoc 的 feature

from hexo-filter-mathjax.

jerrywcy avatar jerrywcy commented on June 18, 2024

成功了,拜谢大佬!

from hexo-filter-mathjax.

stevenjoezhang avatar stevenjoezhang commented on June 18, 2024

不客气,我在文档里注明一下。这个坑不容易发现 😂

from hexo-filter-mathjax.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.