Forgot password?
 Create new account
View 603|Reply 9

Xy-pic for MathJax v3

[Copy link]

3146

Threads

8493

Posts

610K

Credits

Credits
66158
QQ

Show all posts

hbghlyj Posted at 2022-2-20 23:31:57 |Read mode
Last edited by hbghlyj at 2022-2-20 23:49:00github.com/sonoisa/XyJax-v3
是一个MathJax插件,可以支持xymatrix环境
<script>
  MathJax = {
    loader: {
      load: ['[custom]/xypic.js'],
      paths: {custom: 'https://cdn.jsdelivr.net/gh/sonoisa/XyJax-v3@3.0.1/build/'}
    },
    tex: {
      packages: {'[+]': ['xypic']}
    }
  };
</script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.1.4/es5/tex-chtml-full.js"></script>
mathoverflow上的讨论

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

kuing Posted at 2022-2-23 14:48:04
已添加,顺便添加了 mathtools 包。

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

kuing Posted at 2022-2-23 15:28:27
回复  kuing
好像只是添加custom path
需要的时候才会加载吧
hbghlyj 发表于 2022-2-23 07:14

如何判断是在需要的时候才会加载呢?

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

kuing Posted at 2022-2-23 16:10:34
回复 9# hbghlyj

但是自己新加的这种不在autoload的范围内吧?

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

kuing Posted at 2022-2-23 17:11:01
回复 9# hbghlyj

回到论坛首页,清除浏览器缓存,按 F12,刷新首页,看“网络-JS”:
捕获.PNG
看起来是会加载 xypic 以及我顺便加的 mathtoos 吧?加载用时约半秒。
当然再新刷新就只需几十毫秒,因为有缓存了,也就是首次进入论坛时会拖慢一点点,之后就几乎没变化。
所以影响可以忽略,而且加载 xypic 的链接和 mathjax 一致,也不用考虑墙的问题。

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

kuing Posted at 2022-5-17 21:56:39
这两天 jsdelivr 似乎连不了,之前又没下载 xypic 的程序,只能暂时去掉 xypic 的支持。

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

kuing Posted at 2022-8-11 14:11:54
jsdelivr 又能连接了,恢复 xypic 支持。

test:
  1. \[
  2. \xymatrix{
  3. a \ar@{<-}[r]^c \ar[d]_b & d \ar[d]^e \\
  4. f \ar@{<-}[r]_h \ar@{.>}[ur]|-g & i
  5. }
  6. \]
Copy the Code

\[
\xymatrix{
a \ar@{<-}[r]^c \ar[d]_b & d \ar[d]^e \\
f \ar@{<-}[r]_h \ar@{.>}[ur]|-g & i
}
\]
  1. $\xymatrix{A \ar@(u,d)[r] & B}$
Copy the Code

$\xymatrix{A \ar@(u,d)[r] & B}$

3146

Threads

8493

Posts

610K

Credits

Credits
66158
QQ

Show all posts

 Author| hbghlyj Posted at 2023-2-15 02:06:33

lwarp将TeX转换为HTML

Sample HTML file
produced with lwarp, with mathematical formulae displayed with MathJax, and xymatrix commutative diagrams displayed with XyJax-v3

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

kuing Posted at 2023-2-15 02:33:14
hbghlyj 发表于 2023-2-15 02:06
Sample HTML file
produced with lwarp, with mathematical formulae displayed with MathJax, and xymatri ...
啥意思,这里不是已经弄好了吗?还有啥要弄的?

3146

Threads

8493

Posts

610K

Credits

Credits
66158
QQ

Show all posts

 Author| hbghlyj Posted at 2023-5-18 05:22:01
PlanetMath 对 xy-pic 的支持已损坏
Screenshot 2023-05-17 at 22-20-26 orbits of a normal subgroup are equal in size .png

手机版Mobile version|Leisure Math Forum

2025-4-20 22:02 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list