We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
2.7
1.0.3
https://pscpeng.xyz:4433/archives/demo
首先我使用 Halo 2.7 并按照 KaTex 2.0 插件 Git Repository 的使用说明设置完成,然后使用 StackEdit 1.0.0 编辑器做了以下demo: 并在发布时开启了 KaTex 支持: 此时在编辑器右上方预览按钮内预览内容,一切正常: 但是在第一次从外部进入文章时,公式无法渲染: 刷新一次后即可正常显示: 此后再刷新大概率inline公式会变成块公式: 希望能够解决这个bug,真的很喜欢您制作的主题。
# 这是由自带主题Earth正确解析并渲染的: <p>Here is a demo <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"> <semantics> <mrow> <mi>α</mi> <mo>=</mo> <mi>β</mi> </mrow> <annotation encoding="application/x-tex">\alpha=\beta</annotation> </semantics> </math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.4306em;"></span><span style="margin-right: 0.0037em;" class="mord mathnormal">α</span><span class="mspace" style="margin-right: 0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right: 0.2778em;"></span></span><span class="base"><span class="strut" style="height: 0.8889em; vertical-align: -0.1944em;"></span><span style="margin-right: 0.0528em;" class="mord mathnormal">β</span></span></span></span></span> and <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"> <semantics> <mrow> <mi>Z</mi> <mo>=</mo> <mn>0</mn> </mrow> <annotation encoding="application/x-tex">Z=0</annotation> </semantics> </math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.6833em;"></span><span style="margin-right: 0.0715em;" class="mord mathnormal">Z</span><span class="mspace" style="margin-right: 0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right: 0.2778em;"></span></span><span class="base"><span class="strut" style="height: 0.6444em;"></span><span class="mord">0</span></span></span></span></span> </p> # 这是Dream主题未能解析并渲染时的: <div data-id="ea0d0c76-47a8-4a0a-b01e-afadf9be0890" data-target="Post" class="main-content article"> <link rel="stylesheet" href="/plugins/plugin-katex/assets/static/katex.min.css"> <script> document.addEventListener("DOMContentLoaded", function () { const postBody = document.body const renderMath = (selector, displayMode) => { const els = postBody.querySelectorAll(selector) els.forEach((el) => { katex.render(el.innerText, el, { displayMode }) }) } if (postBody) { renderMath(".katex--inline,math-inline", false); renderMath(".katex--display,math-display", true); } }); </script> <p>Here is a demo <span class="katex--inline">\alpha=\beta</span> and <span class="katex--inline">Z=0</span></p> <p>Another:<br> <span class="katex--display"> e^{\pi i}=-1 </span> </p> </div> # 这是Dream主题将inline解析成block的: <p>Here is a demo <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"> <semantics> <mrow> <mi>α</mi> <mo>=</mo> <mi>β</mi> </mrow> <annotation encoding="application/x-tex">\alpha=\beta</annotation> </semantics> </math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.4306em;"></span><span style="margin-right: 0.0037em;" class="mord mathnormal">α</span><span class="mspace" style="margin-right: 0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right: 0.2778em;"></span></span><span class="base"><span class="strut" style="height: 0.8889em; vertical-align: -0.1944em;"></span><span style="margin-right: 0.0528em;" class="mord mathnormal">β</span></span></span></span></span> and <span class="katex--inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"> <semantics> <mrow> <mi>Z</mi> <mo>=</mo> <mn>0</mn> </mrow> <annotation encoding="application/x-tex">Z=0</annotation> </semantics> </math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height: 0.6833em;"></span><span style="margin-right: 0.0715em;" class="mord mathnormal">Z</span><span class="mspace" style="margin-right: 0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right: 0.2778em;"></span></span><span class="base"><span class="strut" style="height: 0.6444em;"></span><span class="mord">0</span></span></span></span></span></p>
No response
The text was updated successfully, but these errors were encountered:
dream会优化自带的KaTex功能,别用KaTex2.0插件了,和pjax功能不兼容
Sorry, something went wrong.
No branches or pull requests
是什么 Halo 版本出现了此问题?
2.7
使用的 Dream 版本是多少?
1.0.3
在线博客地址
https://pscpeng.xyz:4433/archives/demo
BUG 内容
首先我使用 Halo 2.7 并按照 KaTex 2.0 插件 Git Repository 的使用说明设置完成,然后使用 StackEdit 1.0.0 编辑器做了以下demo:
并在发布时开启了 KaTex 支持:
此时在编辑器右上方预览按钮内预览内容,一切正常:
但是在第一次从外部进入文章时,公式无法渲染:
刷新一次后即可正常显示:
此后再刷新大概率inline公式会变成块公式:
希望能够解决这个bug,真的很喜欢您制作的主题。
相关 Console 日志输出
附加信息
No response
The text was updated successfully, but these errors were encountered: