katex 0.16.8 → 0.16.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/contrib/copy-tex/README.md +2 -2
- package/contrib/mathtex-script-type/README.md +5 -5
- package/contrib/mhchem/README.md +1 -1
- package/dist/README.md +3 -3
- package/dist/katex.css +6 -1
- package/dist/katex.js +17 -7
- package/dist/katex.min.css +1 -1
- package/dist/katex.min.js +1 -1
- package/dist/katex.mjs +14 -4
- package/package.json +1 -1
- package/src/buildCommon.js +5 -1
- package/src/katex.less +6 -0
- package/src/symbols.js +4 -0
- package/src/wide-character.js +3 -2
package/dist/katex.mjs
CHANGED
|
@@ -5170,6 +5170,10 @@ for (var _i3 = 0; _i3 < letters.length; _i3++) {
|
|
|
5170
5170
|
defineSymbol(text, main, textord, _ch3, wideChar);
|
|
5171
5171
|
wideChar = String.fromCharCode(0xD835, 0xDD04 + _i3); // A-Z a-z Fractur
|
|
5172
5172
|
|
|
5173
|
+
defineSymbol(math, main, mathord, _ch3, wideChar);
|
|
5174
|
+
defineSymbol(text, main, textord, _ch3, wideChar);
|
|
5175
|
+
wideChar = String.fromCharCode(0xD835, 0xDD6C + _i3); // A-Z a-z bold Fractur
|
|
5176
|
+
|
|
5173
5177
|
defineSymbol(math, main, mathord, _ch3, wideChar);
|
|
5174
5178
|
defineSymbol(text, main, textord, _ch3, wideChar);
|
|
5175
5179
|
wideChar = String.fromCharCode(0xD835, 0xDDA0 + _i3); // A-Z a-z sans-serif
|
|
@@ -5277,8 +5281,9 @@ var wideLatinLetterData = [["mathbf", "textbf", "Main-Bold"], // A-Z bold uprigh
|
|
|
5277
5281
|
["mathfrak", "textfrak", "Fraktur-Regular"], // a-z Fraktur
|
|
5278
5282
|
["mathbb", "textbb", "AMS-Regular"], // A-Z double-struck
|
|
5279
5283
|
["mathbb", "textbb", "AMS-Regular"], // k double-struck
|
|
5280
|
-
|
|
5281
|
-
["", "", ""], //
|
|
5284
|
+
// Note that we are using a bold font, but font metrics for regular Fraktur.
|
|
5285
|
+
["mathboldfrak", "textboldfrak", "Fraktur-Regular"], // A-Z bold Fraktur
|
|
5286
|
+
["mathboldfrak", "textboldfrak", "Fraktur-Regular"], // a-z bold Fraktur
|
|
5282
5287
|
["mathsf", "textsf", "SansSerif-Regular"], // A-Z sans-serif
|
|
5283
5288
|
["mathsf", "textsf", "SansSerif-Regular"], // a-z sans-serif
|
|
5284
5289
|
["mathboldsf", "textboldsf", "SansSerif-Bold"], // A-Z bold sans-serif
|
|
@@ -5454,10 +5459,15 @@ var makeOrd = function makeOrd(group, options, type) {
|
|
|
5454
5459
|
|
|
5455
5460
|
var isFont = mode === "math" || mode === "text" && options.font;
|
|
5456
5461
|
var fontOrFamily = isFont ? options.font : options.fontFamily;
|
|
5462
|
+
var wideFontName = "";
|
|
5463
|
+
var wideFontClass = "";
|
|
5457
5464
|
|
|
5458
5465
|
if (text.charCodeAt(0) === 0xD835) {
|
|
5466
|
+
[wideFontName, wideFontClass] = wideCharacterFont(text, mode);
|
|
5467
|
+
}
|
|
5468
|
+
|
|
5469
|
+
if (wideFontName.length > 0) {
|
|
5459
5470
|
// surrogate pairs get special treatment
|
|
5460
|
-
var [wideFontName, wideFontClass] = wideCharacterFont(text, mode);
|
|
5461
5471
|
return makeSymbol(text, wideFontName, mode, options, classes.concat(wideFontClass));
|
|
5462
5472
|
} else if (fontOrFamily) {
|
|
5463
5473
|
var fontName;
|
|
@@ -18309,7 +18319,7 @@ var katex = {
|
|
|
18309
18319
|
/**
|
|
18310
18320
|
* Current KaTeX version
|
|
18311
18321
|
*/
|
|
18312
|
-
version: "0.16.
|
|
18322
|
+
version: "0.16.9",
|
|
18313
18323
|
|
|
18314
18324
|
/**
|
|
18315
18325
|
* Renders the given LaTeX into an HTML+MathML combination, and adds
|
package/package.json
CHANGED
package/src/buildCommon.js
CHANGED
|
@@ -165,9 +165,13 @@ const makeOrd = function<NODETYPE: "spacing" | "mathord" | "textord">(
|
|
|
165
165
|
// Math mode or Old font (i.e. \rm)
|
|
166
166
|
const isFont = mode === "math" || (mode === "text" && options.font);
|
|
167
167
|
const fontOrFamily = isFont ? options.font : options.fontFamily;
|
|
168
|
+
let wideFontName = "";
|
|
169
|
+
let wideFontClass = "";
|
|
168
170
|
if (text.charCodeAt(0) === 0xD835) {
|
|
171
|
+
[wideFontName, wideFontClass] = wideCharacterFont(text, mode);
|
|
172
|
+
}
|
|
173
|
+
if (wideFontName.length > 0) {
|
|
169
174
|
// surrogate pairs get special treatment
|
|
170
|
-
const [wideFontName, wideFontClass] = wideCharacterFont(text, mode);
|
|
171
175
|
return makeSymbol(text, wideFontName, mode, options,
|
|
172
176
|
classes.concat(wideFontClass));
|
|
173
177
|
} else if (fontOrFamily) {
|
package/src/katex.less
CHANGED
package/src/symbols.js
CHANGED
|
@@ -816,6 +816,10 @@ for (let i = 0; i < letters.length; i++) {
|
|
|
816
816
|
defineSymbol(math, main, mathord, ch, wideChar);
|
|
817
817
|
defineSymbol(text, main, textord, ch, wideChar);
|
|
818
818
|
|
|
819
|
+
wideChar = String.fromCharCode(0xD835, 0xDD6C + i); // A-Z a-z bold Fractur
|
|
820
|
+
defineSymbol(math, main, mathord, ch, wideChar);
|
|
821
|
+
defineSymbol(text, main, textord, ch, wideChar);
|
|
822
|
+
|
|
819
823
|
wideChar = String.fromCharCode(0xD835, 0xDDA0 + i); // A-Z a-z sans-serif
|
|
820
824
|
defineSymbol(math, main, mathord, ch, wideChar);
|
|
821
825
|
defineSymbol(text, main, textord, ch, wideChar);
|
package/src/wide-character.js
CHANGED
|
@@ -45,8 +45,9 @@ const wideLatinLetterData: Array<[string, string, string]> = [
|
|
|
45
45
|
["mathbb", "textbb", "AMS-Regular"], // A-Z double-struck
|
|
46
46
|
["mathbb", "textbb", "AMS-Regular"], // k double-struck
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
["", "", ""],
|
|
48
|
+
// Note that we are using a bold font, but font metrics for regular Fraktur.
|
|
49
|
+
["mathboldfrak", "textboldfrak", "Fraktur-Regular"], // A-Z bold Fraktur
|
|
50
|
+
["mathboldfrak", "textboldfrak", "Fraktur-Regular"], // a-z bold Fraktur
|
|
50
51
|
|
|
51
52
|
["mathsf", "textsf", "SansSerif-Regular"], // A-Z sans-serif
|
|
52
53
|
["mathsf", "textsf", "SansSerif-Regular"], // a-z sans-serif
|