mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-03 20:16:48 +00:00
Update katex to latest 0.15.3 (#6671)
* feat: update snippet fields https://github.com/Jermolene/TiddlyWiki5/discussions/6670 * chore: upgrade files * docs: update readme * fix: usage of mhchem * fix: add back katex.without-font-face.min.css https://github.com/Jermolene/TiddlyWiki5/pull/6671#issuecomment-1116287404 * style: format json with 4 space * style: format json with 1 space * style: restore old format * feat: update css by using new one and delete font face * update developer info * move implementation notes to plugin * update TW style tiddler * update katexdemo edition * chore: delete unused files * Update developer.tid * Update developer.tid Co-authored-by: pmario <pmariojo@gmail.com>
This commit is contained in:
30
plugins/tiddlywiki/katex/ImplementationNotes.tid
Normal file
30
plugins/tiddlywiki/katex/ImplementationNotes.tid
Normal file
@@ -0,0 +1,30 @@
|
||||
title: $:/plugins/tiddlywiki/katex/ImplementationNotes
|
||||
|
||||
! CSS Handling
|
||||
|
||||
The ''original CSS from KaTeX'' includes a number of font definitions in this format:
|
||||
|
||||
```
|
||||
@font-face {
|
||||
font-family: 'KaTeX_AMS';
|
||||
src: url('fonts/KaTeX_AMS-Regular.eot');
|
||||
src: url('fonts/KaTeX_AMS-Regular.eot?#iefix') format('embedded-opentype'),
|
||||
url('fonts/KaTeX_AMS-Regular.woff') format('woff'),
|
||||
url('fonts/KaTeX_AMS-Regular.ttf') format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
```
|
||||
|
||||
These definitions are currently ''removed manually'' from [[$:/plugins/tiddlywiki/katex/katex.min.css]] so that they can be redefined as data URIs using TiddlyWiki's macro notation in $:/plugins/tiddlywiki/katex/styles
|
||||
|
||||
```
|
||||
@font-face {
|
||||
font-family: 'KaTeX_AMS';
|
||||
src: url(<<datauri '$:/plugins/tiddlywiki/katex/fonts/KaTeX_AMS-Regular.woff'>>) format('woff');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
```
|
||||
|
||||
Note that the plugin currently only embeds the WOFF format fonts, which seems to be sufficient for most browsers.
|
||||
Reference in New Issue
Block a user