mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-01 23:27:05 +00:00
First pass at KaTeX plugin
Finally fixes #458 thanks to the KaTeX plugin from Khan Academy
This commit is contained in:
29
editions/katexdemo/tiddlers/ImplementationNotes.tid
Normal file
29
editions/katexdemo/tiddlers/ImplementationNotes.tid
Normal file
@@ -0,0 +1,29 @@
|
||||
title: ImplementationNotes
|
||||
|
||||
! CSS Handling
|
||||
|
||||
The [[original CSS from KaTeX|https://github.com/Khan/KaTeX/blob/master/static%2Ffonts.css]] 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:
|
||||
|
||||
```
|
||||
@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;
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user