Bump katex to newest version (#9626)

* Bump katex to newest version

* Update fonts
Also migrate to woff2

* Update readme

* Update change note
This commit is contained in:
XLBilly
2026-02-04 10:11:09 +01:00
committed by GitHub
parent 455f1be3fb
commit 526aaa3db8
47 changed files with 57 additions and 27 deletions
@@ -0,0 +1,10 @@
title: $:/changenotes/5.4.0/#9626
description: Bump katex to latest version
release: 5.4.0
tags: $:/tags/ChangeNote
change-type: enhancement
change-category: plugin
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9626
github-contributors: Leilei332
Bump latex to latest version and use woff2 fonts to reduce plugin size.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -2,11 +2,11 @@
"directories": [
{
"path": "./fonts/",
"filesRegExp": "^.*\\.woff$",
"filesRegExp": "^.*\\.woff2$",
"isTiddlerFile": false,
"fields": {
"title": {"source": "filename", "prefix": "$:/plugins/tiddlywiki/katex/fonts/"},
"type": "font/woff"
"type": "font/woff2"
}
}
],
+1 -1
View File
@@ -1,6 +1,6 @@
title: $:/plugins/tiddlywiki/katex/readme
This is a TiddlyWiki plugin for mathematical and chemical typesetting based on [ext[KaTeX from Khan Academy|https://katex.org/]] (v0.16) and [ext[mhchem|https://github.com/mhchem/MathJax-mhchem]] through a [ext[Katex extension|https://github.com/KaTeX/KaTeX/tree/master/contrib/mhchem]].
This is a TiddlyWiki plugin for mathematical and chemical typesetting based on [ext[KaTeX from Khan Academy|https://katex.org/]] (v0.16.28) and [ext[mhchem|https://github.com/mhchem/MathJax-mhchem]] through a [ext[Katex extension|https://github.com/KaTeX/KaTeX/tree/master/contrib/mhchem]].
It is completely self-contained, and doesn't need an Internet connection in order to work. It works both in the browser and under Node.js.
+40 -20
View File
@@ -28,141 +28,161 @@ tags: [[$:/tags/Stylesheet]]
/* Override font URLs */
@font-face {
font-display: block;
font-family: KaTeX_AMS;
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_AMS-Regular.woff'>>) format('woff');
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_AMS-Regular.woff2'>>) format('woff2');
font-weight: 400;
font-style: normal;
}
@font-face {
font-display: block;
font-family: KaTeX_Caligraphic;
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Caligraphic-Bold.woff'>>) format('woff');
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Caligraphic-Bold.woff2'>>) format('woff2');
font-weight: 700;
font-style: normal;
}
@font-face {
font-display: block;
font-family: KaTeX_Caligraphic;
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Caligraphic-Regular.woff'>>) format('woff');
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Caligraphic-Regular.woff2'>>) format('woff2');
font-weight: 400;
font-style: normal;
}
@font-face {
font-display: block;
font-family: KaTeX_Fraktur;
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Fraktur-Bold.woff'>>) format('woff');
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Fraktur-Bold.woff2'>>) format('woff2');
font-weight: 700;
font-style: normal;
}
@font-face {
font-display: block;
font-family: KaTeX_Fraktur;
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Fraktur-Regular.woff'>>) format('woff');
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Fraktur-Regular.woff2'>>) format('woff2');
font-weight: 400;
font-style: normal;
}
@font-face {
font-display: block;
font-family: KaTeX_Main;
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Main-Bold.woff'>>) format('woff');
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Main-Bold.woff2'>>) format('woff2');
font-weight: 700;
font-style: normal;
}
@font-face {
font-display: block;
font-family: KaTeX_Main;
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Main-BoldItalic.woff'>>) format('woff');
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Main-BoldItalic.woff2'>>) format('woff2');
font-weight: 700;
font-style: italic;
}
@font-face {
font-display: block;
font-family: KaTeX_Main;
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Main-Italic.woff'>>) format('woff');
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Main-Italic.woff2'>>) format('woff2');
font-weight: 400;
font-style: italic;
}
@font-face {
font-display: block;
font-family: KaTeX_Main;
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Main-Regular.woff'>>) format('woff');
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Main-Regular.woff2'>>) format('woff2');
font-weight: 400;
font-style: normal;
}
@font-face {
font-display: block;
font-family: KaTeX_Math;
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Math-BoldItalic.woff'>>) format('woff');
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Math-BoldItalic.woff2'>>) format('woff2');
font-weight: 700;
font-style: italic;
}
@font-face {
font-display: block;
font-family: KaTeX_Math;
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Math-Italic.woff'>>) format('woff');
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Math-Italic.woff2'>>) format('woff2');
font-weight: 400;
font-style: italic;
}
@font-face {
font-display: block;
font-family: KaTeX_SansSerif;
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_SansSerif-Bold.woff'>>) format('woff');
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_SansSerif-Bold.woff2'>>) format('woff2');
font-weight: 700;
font-style: normal;
}
@font-face {
font-display: block;
font-family: KaTeX_SansSerif;
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_SansSerif-Italic.woff'>>) format('woff');
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_SansSerif-Italic.woff2'>>) format('woff2');
font-weight: 400;
font-style: italic;
}
@font-face {
font-display: block;
font-family: KaTeX_SansSerif;
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_SansSerif-Regular.woff'>>) format('woff');
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_SansSerif-Regular.woff2'>>) format('woff2');
font-weight: 400;
font-style: normal;
}
@font-face {
font-display: block;
font-family: KaTeX_Script;
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Script-Regular.woff'>>) format('woff');
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Script-Regular.woff2'>>) format('woff2');
font-weight: 400;
font-style: normal;
}
@font-face {
font-display: block;
font-family: KaTeX_Size1;
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Size1-Regular.woff'>>) format('woff');
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Size1-Regular.woff2'>>) format('woff2');
font-weight: 400;
font-style: normal;
}
@font-face {
font-display: block;
font-family: KaTeX_Size2;
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Size2-Regular.woff'>>) format('woff');
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Size2-Regular.woff2'>>) format('woff2');
font-weight: 400;
font-style: normal;
}
@font-face {
font-display: block;
font-family: KaTeX_Size3;
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Size3-Regular.woff'>>) format('woff');
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Size3-Regular.woff2'>>) format('woff2');
font-weight: 400;
font-style: normal;
}
@font-face {
font-display: block;
font-family: KaTeX_Size4;
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Size4-Regular.woff'>>) format('woff');
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Size4-Regular.woff2'>>) format('woff2');
font-weight: 400;
font-style: normal;
}
@font-face {
font-display: block;
font-family: KaTeX_Typewriter;
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Typewriter-Regular.woff'>>) format('woff');
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_Typewriter-Regular.woff2'>>) format('woff2');
font-weight: 400;
font-style: normal;
}