请刷新页面以加载LaTeX | Refresh to load LaTeX
↑已经解决啦,看评论!
- [LK′:K′]≥e:
p is unramified in K′ and p is totally ramified in L with ramification e=[L:Q] so p ramified in LK′ with ramification index e, by Theorem 2.1, e∣[LK′:K′], thus [LK′:K′]≥e.
- e≥[LK:K′]≥[LK′:K′]:
[LK:K′]=∣I0′∣ according to the setup. P is tamely ramified since p is tamely ramified in both L and K. By Theorem 2.6, I0′≤(k(p))×=(Zp)×, so I0′ is a cyclic group. Similarly, Gal(LK/Q) injects into Gal(K/Q)×Gal(L/Q) and so I0′ does as well.
Let p′=P∩K. Then by definition, I0′ restricted to K gives an element in the inertia group I0(p′/p) but p′ is conjugate to p so the order of I0(p′∣p) is ∣I0∣=e.
Thus I0′ lives in the subgroup I0(p′∣p)×Gal(L/Q), both of which are groups of order e so I0′ has exponent e. Since it is cyclic and of exponent e, ∣I0′∣≤e.
刷新页面以加载LaTeX,哈哈哈哈哈哈哈哈哈是不是 pjax 的问题!
在昨天的
1.2.4
更新中已经可以自己在后台加入 Pjax 回调了୧(๑•̀⌄•́๑)૭::>_<::这个真不会了,求助大佬
我现在
header.php
添加了<!-- LATEX --> <?php if ($this->is('post') && $this->fields->isLatex == 1): ?> <script defer type="text/javascript" src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.15.2/katex.min.js"></script> <link rel="stylesheet" type="text/css" href="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.15.2/katex.min.css" /> <script defer type="text/javascript" src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.15.2/contrib/auto-render.min.js"></script> <?php endif; ?>
其中
isLatex == 1
是文章的字段用来控制是否引入katex,然后渲染是在footer.php
里加入了<!-- LATEX --> <?php if ($this->is('post') && $this->fields->isLatex == 1): ?> <script type = "text/javascript" > document.addEventListener("DOMContentLoaded", function() { renderMathInElement(document.body, { delimiters: [{ left: "$$", right: "$$", display: true }, { left: "$", right: "$", display: false }], ignoredTags: ["script", "noscript", "style", "textarea", "pre", "code"], ignoredClasses: ["nokatex"] }); }); </script> <?php endif; ?>
我试过在Pjax设置里回调
renderMathInElement
,但是会报错找不到,好像katex的script没有加载以及,我也不是很清楚回调栏的格式是什么,是只用写函数名然后会自动在
'pjax:complete'
的时候调用么好的,我以你的原始代码做个参考!
我将他在
header.php
封装一下然后调用,应该是加入了<?php if ($this->is('post') && $this->fields->isLatex == 1): ?> <script type="text/javascript"> function renderLatex() { renderMathInElement(document.body, { delimiters: [{ left: "$$", right: "$$", display: true }, { left: "$", right: "$", display: false }], ignoredTags: ["script", "noscript", "style", "textarea", "pre", "code"], ignoredClasses: ["nokatex"] }); } document.addEventListener("DOMContentLoaded", function() { renderLatex(); }); </script> <?php endif; ?>
也就是判断了一下当前页面是不是需要的页面,如果是就定义了
renderLatex()
这个函数,然后让他在DOM之后执行。回调这个时候按只要填写
renderLatex()
就好了,但是你有一个 php 的判定条件,我们只要加入判定(你可以参考主题内原本 Pjax 回调的代码也有这样的 php 判定)<?php if ($this->is('post') && $this->fields->isLatex == 1): ?> renderLatex(); <?php endif; ?>
没错就是直接用 php if 一下,如果符合就执行
renderLatex();
,很好理解然后,然后就没有然后了,这样应该就好了,我本地做了一个简单的测试是没遇见逻辑问题
有问题可以再 call 我,不过我建议你可以装一个 CommentNotifier 插件弄个邮箱推送,不然还真不知道有没有收到回复╮(╯▽╰)╭
评论区弄这么多组件的间距还是有点问题,下个版本修一下,回聊~
😱原来是这样,成功了!谢谢谢谢!ヾ(≧▽≦*)o
(邮件推送应该也ok啦( •̀ ω •́ )y
等下抱歉我还是没有很解决😭
我发现如果直接把
<?php if ($this->is('post') && $this->fields->isLatex == 1): ?> renderLatex(); <?php endif; ?>
扔到设置的Pjax回调栏,好像会搞坏掉Pjax——就是这样的话每次跳转页面就又会重新加载了(那个通知条也会再出现),调试报错是
Uncaught SyntaxError: expected expression, got '<'
.然后我也尝试了在
header.php
的document.addEventListener("pjax:success", function(event) {
里直接加入,但是好像就没有效果了(好像这样katex的script还是不会加载){{{(>_<)}}}
我也试了把
<script defer type="text/javascript" src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.15.2/katex.min.js"></script> <link rel="stylesheet" type="text/css" href="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.15.2/katex.min.css" /> <script defer type="text/javascript" src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.15.2/contrib/auto-render.min.js"></script>
一起封进php if里,but still not working>﹏<
刚醒然后我收到邮件过来了,但是你好像去除了php判定然后解决了是嘛( ,,´・ω・)ノ
啊不我搞错了,稍等我看看
非常感谢!q(≧▽≦q)不急不急
(另,如果需要的话,我把源码传到https://github.com/Yu-Misaka/vertin.me了
还要排查一下了,不知道为什么php没执行,不过我是自行写在
header.php
里面的没有问题我本地和访问你网站怎么都没有报错了····(╯°A°)╯
Pjax也是正常的
诶?哦哦可能vertin.me挂了CDN行为有些奇怪,misaka-yu.com现在还有报错https://misaka-yu.com/usr/uploads/2024/11/3598720660.png
好滴好滴,我等会再试试୧(๑•̀⌄•́๑)૭
没事我暂时要出门,回来一定帮你解决他
谢谢谢谢!真的麻烦您了⌇●﹏●⌇
唉我测试了一下还是不太行哦,可能要你手动把这个玩意塞到原本的部分了,也就是 Pjax 部分变成了,这个地方设计没有考虑到还要做一层判断,我试了一下没能解决,后台填写没法再加 php 判定了⌇●﹏●⌇
<script type="text/javascript"> document.addEventListener('DOMContentLoaded', function() { var pjax = new Pjax({ history: true, scrollRestoration: true, cacheBust: false, timeout: 6500, elements: 'a[href^="<?php Helper::options()->siteUrl() ?>"]:not(a[target="_blank"], a[no-pjax] ), form[action]', selectors: [ "pjax", "script[data-pjax]", "title", ".nav.header-item.header-nav", ".main", ".right-sidebar" ] }); // 评论提交状态 var submitButton = document.getElementById("submit"); var textarea = document.getElementById("textarea"); // 检查是否存在对应的元素 if (!submitButton || !textarea) { return; // 如果不存在,退出函数 } submitButton.addEventListener("click", function() { if (textarea.value !== "") { submitButton.innerHTML = "提交中~"; } }); }); // Pjax 加载超时时跳转,不然它不给你跳转的!!! document.addEventListener('pjax:error', function(e) { console.error(e); console.log('pjax error: \n' + JSON.stringify(e)); window.location.href = e.triggerElement.href; }); // Pjax 完成后 JS 重载 document.addEventListener("pjax:success", function(event) { // 短代码及模块部分 runShortcodes(); // TOC吸附 initializeStickyTOC(); // AOS 动画 AOS.refresh(); // 确保代码块高亮 <?php $codeBlockSettings = Typecho_Widget::widget('Widget_Options')->codeBlockSettings; ?> document.querySelectorAll('pre code').forEach((block) => { hljs.highlightElement(block); <?php if (is_array($codeBlockSettings) && in_array('ShowLineNumbers', $codeBlockSettings)): ?> addLineNumber(block); <?php endif; ?> }); <?php if (is_array($codeBlockSettings) && in_array('ShowCopyButton', $codeBlockSettings)): ?> addCopyButtons(); <?php endif; ?> <?php if ($this->options->PjaxScript): ?> <?php echo $this->options->PjaxScript; ?> <?php endif; ?> <?php if ($this->is('post') && $this->fields->isLatex == 1): ?> renderLatex(); <?php endif; ?> // 评论区部分重载 if (document.querySelector('.OwO-textarea')) { initializeCommentsOwO(); } }); </script>
hiヾ(≧∇≦*)ゝ
我已经应用这个更改了b2b3c15
但是好像没有起作用(ó﹏ò。),难道是判定条件没有被识别到么
以及我发现,
好像somehow我在服务器端的文件在浏览器调试里不一样 Σ(っ °Д °;)っ
哦好叭好像所有php if都被去掉了_(:3 」∠ )_
在浏览器调试
(index)
里,变更的代码变成了// Pjax 完成后 JS 重载 document.addEventListener("pjax:success", function(event) { // 短代码及模块部分 runShortcodes(); // TOC吸附 initializeStickyTOC(); // AOS 动画 AOS.refresh(); // 确保代码块高亮 document.querySelectorAll('pre code').forEach((block) => { hljs.highlightElement(block); addLineNumber(block); }); addCopyButtons(); // 评论区部分重载 if (document.querySelector('.OwO-textarea')) { initializeCommentsOwO(); } });
我觉得是你的
<?php if ($this->is('post') && $this->fields->isLatex == 1): ?> <!--<script defer type="text/javascript" src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js"></script>--> <script defer type="text/javascript" src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.15.2/katex.min.js"></script> <!--<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css" />--> <link rel="stylesheet" type="text/css" href="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.15.2/katex.min.css" /> <!--<script defer type="text/javascript" src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js"></script>--> <script defer type="text/javascript" src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.15.2/contrib/auto-render.min.js"></script> <?php endif; ?>
应该是这的问题吧···,现在除非你第一次就在post页面,不然这个文件永远不可能加载了,因为 pjax 切换页面是不会让这个判定再次执行的⌇●﹏●⌇
哦哦有道理(☆ω☆)
那我还是换到全局latex吧2333,这样就不用判定了
嗯呢,等以后我看看合不合适,在主题里内嵌一套完善的配置吧
现在还在取舍臃肿和速度(´・ ・`。),加的东西太多可能会有点本末倒置
完全ok了^o^/非常感谢!
我感觉绝大多数情况下markdown已经完全够用了2333,加油加油~