jekyll-theme-hydejack 8.4.0 → 8.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -7
  3. data/_includes/body/footer.html +1 -1
  4. data/_includes/body/menu.html +12 -0
  5. data/_includes/body/scripts.html +4 -17
  6. data/_includes/components/post-list-item.html +1 -3
  7. data/_includes/head/links.html +1 -1
  8. data/_includes/head/meta.html +1 -1
  9. data/_includes/head/scripts.html +9 -15
  10. data/_includes/head/styles.html +10 -22
  11. data/_includes/header.txt +1 -1
  12. data/_includes/styles/inline.scss +3 -13
  13. data/_includes/styles/page-style.scss +8 -0
  14. data/_includes/styles/style.scss +5 -15
  15. data/_includes/templates/back.html +2 -2
  16. data/_includes/templates/forward.html +6 -0
  17. data/_includes/templates/index.html +1 -0
  18. data/_layouts/base.html +1 -1
  19. data/_layouts/compress.html +1 -1
  20. data/_sass/_variables.scss +1 -1
  21. data/_sass/hydejack/__link__/_images.scss +4 -0
  22. data/_sass/hydejack/_images.pre.scss +4 -0
  23. data/_sass/pooleparty/__inline__/_base.scss +4 -0
  24. data/_sass/pooleparty/__link__/_table.scss +0 -1
  25. data/_sass/pooleparty/_base.pre.scss +4 -0
  26. data/_sass/pooleparty/_table.pre.scss +0 -1
  27. data/assets/bower.json +1 -2
  28. data/assets/bower_components/katex/.bower.json +5 -5
  29. data/assets/bower_components/katex/dist/fonts/KaTeX_AMS-Regular.ttf +0 -0
  30. data/assets/bower_components/katex/dist/fonts/KaTeX_AMS-Regular.woff +0 -0
  31. data/assets/bower_components/katex/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  32. data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  33. data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  34. data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  35. data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  36. data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  37. data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  38. data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  39. data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  40. data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  41. data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  42. data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  43. data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  44. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Bold.ttf +0 -0
  45. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Bold.woff +0 -0
  46. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
  47. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
  48. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  49. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  50. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Italic.ttf +0 -0
  51. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Italic.woff +0 -0
  52. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
  53. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Regular.ttf +0 -0
  54. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Regular.woff +0 -0
  55. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
  56. data/assets/bower_components/katex/dist/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  57. data/assets/bower_components/katex/dist/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  58. data/assets/bower_components/katex/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  59. data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Italic.ttf +0 -0
  60. data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Italic.woff +0 -0
  61. data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
  62. data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  63. data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  64. data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  65. data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  66. data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  67. data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  68. data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  69. data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  70. data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  71. data/assets/bower_components/katex/dist/fonts/KaTeX_Script-Regular.ttf +0 -0
  72. data/assets/bower_components/katex/dist/fonts/KaTeX_Script-Regular.woff +0 -0
  73. data/assets/bower_components/katex/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
  74. data/assets/bower_components/katex/dist/fonts/KaTeX_Size1-Regular.ttf +0 -0
  75. data/assets/bower_components/katex/dist/fonts/KaTeX_Size1-Regular.woff +0 -0
  76. data/assets/bower_components/katex/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  77. data/assets/bower_components/katex/dist/fonts/KaTeX_Size2-Regular.ttf +0 -0
  78. data/assets/bower_components/katex/dist/fonts/KaTeX_Size2-Regular.woff +0 -0
  79. data/assets/bower_components/katex/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  80. data/assets/bower_components/katex/dist/fonts/KaTeX_Size3-Regular.ttf +0 -0
  81. data/assets/bower_components/katex/dist/fonts/KaTeX_Size3-Regular.woff +0 -0
  82. data/assets/bower_components/katex/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  83. data/assets/bower_components/katex/dist/fonts/KaTeX_Size4-Regular.ttf +0 -0
  84. data/assets/bower_components/katex/dist/fonts/KaTeX_Size4-Regular.woff +0 -0
  85. data/assets/bower_components/katex/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  86. data/assets/bower_components/katex/dist/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  87. data/assets/bower_components/katex/dist/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  88. data/assets/bower_components/katex/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  89. data/assets/bower_components/katex/dist/katex.css +10 -0
  90. data/assets/bower_components/katex/dist/katex.js +541 -249
  91. data/assets/bower_components/katex/dist/katex.min.css +1 -1
  92. data/assets/bower_components/katex/dist/katex.min.js +1 -1
  93. data/assets/bower_components/katex/dist/katex.mjs +418 -198
  94. data/assets/css/{hydejack-8.4.0.css → hydejack-8.5.0.css} +0 -0
  95. data/assets/icomoon/fonts/icomoon.eot +0 -0
  96. data/assets/icomoon/fonts/icomoon.svg +2 -0
  97. data/assets/icomoon/fonts/icomoon.ttf +0 -0
  98. data/assets/icomoon/fonts/icomoon.woff +0 -0
  99. data/assets/icomoon/selection.json +1 -2555
  100. data/assets/icomoon/style.css +11 -5
  101. data/assets/img/blog/louis-hansel.jpg +0 -0
  102. data/assets/js/hydejack-8.5.0.js +162 -0
  103. data/assets/js/hydejack-8.5.0.js.map +1 -0
  104. data/assets/js/hydejack-legacy-8.5.0.js +191 -0
  105. data/assets/js/hydejack-legacy-8.5.0.js.map +1 -0
  106. data/assets/version.json +1 -1
  107. metadata +9 -22
  108. data/assets/bower_components/fontfaceobserver/.bower.json +0 -33
  109. data/assets/bower_components/fontfaceobserver/.gitignore +0 -2
  110. data/assets/bower_components/fontfaceobserver/.travis.yml +0 -16
  111. data/assets/bower_components/fontfaceobserver/Gruntfile.js +0 -101
  112. data/assets/bower_components/fontfaceobserver/LICENSE +0 -23
  113. data/assets/bower_components/fontfaceobserver/bower.json +0 -22
  114. data/assets/bower_components/fontfaceobserver/exports.js +0 -8
  115. data/assets/bower_components/fontfaceobserver/externs-commonjs.js +0 -10
  116. data/assets/bower_components/fontfaceobserver/externs.js +0 -15
  117. data/assets/bower_components/fontfaceobserver/fontfaceobserver.js +0 -12
  118. data/assets/bower_components/fontfaceobserver/fontfaceobserver.standalone.js +0 -8
  119. data/assets/bower_components/fontfaceobserver/package.json +0 -57
  120. data/assets/bower_components/fontfaceobserver/src/descriptors.js +0 -10
  121. data/assets/bower_components/fontfaceobserver/src/observer.js +0 -349
  122. data/assets/bower_components/fontfaceobserver/src/ruler.js +0 -130
  123. data/assets/bower_components/fontfaceobserver/vendor/google/base.js +0 -1489
  124. data/assets/js/hydejack-8.3.1.js +0 -47
  125. data/assets/js/hydejack-8.3.2.js +0 -47
  126. data/assets/js/hydejack-8.4.0.js +0 -47
@@ -47,6 +47,10 @@ body {
47
47
  overflow-y: scroll;
48
48
  }
49
49
 
50
+ p {
51
+ @extend .color-transition;
52
+ }
53
+
50
54
  // No `:visited` state is required by default (browsers will use `a`)
51
55
  a {
52
56
  text-decoration: none;
@@ -27,7 +27,6 @@ table:not(.highlight) {
27
27
 
28
28
 
29
29
  display: block;
30
- vertical-align: top;
31
30
  overflow-x: auto;
32
31
  -webkit-overflow-scrolling: touch;
33
32
 
@@ -38,6 +38,10 @@ body {
38
38
  overflow-y: scroll;
39
39
  }
40
40
 
41
+ p {
42
+ @extend .color-transition;
43
+ }
44
+
41
45
  // No `:visited` state is required by default (browsers will use `a`)
42
46
  a {
43
47
  text-decoration: none;
@@ -22,7 +22,6 @@ table:not(.highlight) {
22
22
 
23
23
  // <<< link
24
24
  display: block;
25
- vertical-align: top;
26
25
  overflow-x: auto;
27
26
  -webkit-overflow-scrolling: touch;
28
27
  // >>>
@@ -6,7 +6,6 @@
6
6
  "private": true,
7
7
  "dependencies": {
8
8
  "html5shiv": "^3.7.3",
9
- "katex": "^0.9.0",
10
- "fontfaceobserver": "^2.0.13"
9
+ "katex": "^0.10.2"
11
10
  }
12
11
  }
@@ -33,15 +33,15 @@
33
33
  "/static",
34
34
  "/website"
35
35
  ],
36
- "version": "0.10.1",
37
- "_release": "0.10.1",
36
+ "version": "0.10.2",
37
+ "_release": "0.10.2",
38
38
  "_resolution": {
39
39
  "type": "version",
40
- "tag": "v0.10.1",
41
- "commit": "e77bf08983d4d5f8df6490e703173fa9ea9aac8b"
40
+ "tag": "v0.10.2",
41
+ "commit": "96c3c62bc1d4f5359761f6a7eb5927cddad9b682"
42
42
  },
43
43
  "_source": "https://github.com/Khan/KaTeX.git",
44
- "_target": "0.10.1",
44
+ "_target": "0.10.2",
45
45
  "_originalSource": "katex",
46
46
  "_direct": true
47
47
  }
@@ -128,6 +128,9 @@
128
128
  .katex * {
129
129
  -ms-high-contrast-adjust: none !important;
130
130
  }
131
+ .katex .katex-version::after {
132
+ content: "0.10.2";
133
+ }
131
134
  .katex .katex-mathml {
132
135
  position: absolute;
133
136
  clip: rect(1px, 1px, 1px, 1px);
@@ -911,6 +914,13 @@
911
914
  .katex svg path {
912
915
  stroke: none;
913
916
  }
917
+ .katex img {
918
+ border-style: none;
919
+ min-width: 0;
920
+ min-height: 0;
921
+ max-width: none;
922
+ max-height: none;
923
+ }
914
924
  .katex .stretchy {
915
925
  width: 100%;
916
926
  display: block;
@@ -1115,6 +1115,70 @@ function () {
1115
1115
 
1116
1116
  return Anchor;
1117
1117
  }();
1118
+ /**
1119
+ * This node represents an image embed (<img>) element.
1120
+ */
1121
+
1122
+ var domTree_Img =
1123
+ /*#__PURE__*/
1124
+ function () {
1125
+ function Img(src, alt, style) {
1126
+ this.src = void 0;
1127
+ this.alt = void 0;
1128
+ this.classes = void 0;
1129
+ this.height = void 0;
1130
+ this.depth = void 0;
1131
+ this.maxFontSize = void 0;
1132
+ this.style = void 0;
1133
+ this.alt = alt;
1134
+ this.src = src;
1135
+ this.classes = ["mord"];
1136
+ this.style = style;
1137
+ }
1138
+
1139
+ var _proto3 = Img.prototype;
1140
+
1141
+ _proto3.hasClass = function hasClass(className) {
1142
+ return utils.contains(this.classes, className);
1143
+ };
1144
+
1145
+ _proto3.toNode = function toNode() {
1146
+ var node = document.createElement("img");
1147
+ node.src = this.src;
1148
+ node.alt = this.alt;
1149
+ node.className = "mord"; // Apply inline styles
1150
+
1151
+ for (var style in this.style) {
1152
+ if (this.style.hasOwnProperty(style)) {
1153
+ // $FlowFixMe
1154
+ node.style[style] = this.style[style];
1155
+ }
1156
+ }
1157
+
1158
+ return node;
1159
+ };
1160
+
1161
+ _proto3.toMarkup = function toMarkup() {
1162
+ var markup = "<img src='" + this.src + " 'alt='" + this.alt + "' "; // Add the styles, after hyphenation
1163
+
1164
+ var styles = "";
1165
+
1166
+ for (var style in this.style) {
1167
+ if (this.style.hasOwnProperty(style)) {
1168
+ styles += utils.hyphenate(style) + ":" + this.style[style] + ";";
1169
+ }
1170
+ }
1171
+
1172
+ if (styles) {
1173
+ markup += " style=\"" + utils.escape(styles) + "\"";
1174
+ }
1175
+
1176
+ markup += "'/>";
1177
+ return markup;
1178
+ };
1179
+
1180
+ return Img;
1181
+ }();
1118
1182
  var iCombinations = {
1119
1183
  'î': "\u0131\u0302",
1120
1184
  'ï': "\u0131\u0308",
@@ -1169,9 +1233,9 @@ function () {
1169
1233
  }
1170
1234
  }
1171
1235
 
1172
- var _proto3 = SymbolNode.prototype;
1236
+ var _proto4 = SymbolNode.prototype;
1173
1237
 
1174
- _proto3.hasClass = function hasClass(className) {
1238
+ _proto4.hasClass = function hasClass(className) {
1175
1239
  return utils.contains(this.classes, className);
1176
1240
  }
1177
1241
  /**
@@ -1180,7 +1244,7 @@ function () {
1180
1244
  */
1181
1245
  ;
1182
1246
 
1183
- _proto3.toNode = function toNode() {
1247
+ _proto4.toNode = function toNode() {
1184
1248
  var node = document.createTextNode(this.text);
1185
1249
  var span = null;
1186
1250
 
@@ -1214,7 +1278,7 @@ function () {
1214
1278
  */
1215
1279
  ;
1216
1280
 
1217
- _proto3.toMarkup = function toMarkup() {
1281
+ _proto4.toMarkup = function toMarkup() {
1218
1282
  // TODO(alpert): More duplication than I'd like from
1219
1283
  // span.prototype.toMarkup and symbolNode.prototype.toNode...
1220
1284
  var needsSpan = false;
@@ -1272,9 +1336,9 @@ function () {
1272
1336
  this.attributes = attributes || {};
1273
1337
  }
1274
1338
 
1275
- var _proto4 = SvgNode.prototype;
1339
+ var _proto5 = SvgNode.prototype;
1276
1340
 
1277
- _proto4.toNode = function toNode() {
1341
+ _proto5.toNode = function toNode() {
1278
1342
  var svgNS = "http://www.w3.org/2000/svg";
1279
1343
  var node = document.createElementNS(svgNS, "svg"); // Apply attributes
1280
1344
 
@@ -1291,7 +1355,7 @@ function () {
1291
1355
  return node;
1292
1356
  };
1293
1357
 
1294
- _proto4.toMarkup = function toMarkup() {
1358
+ _proto5.toMarkup = function toMarkup() {
1295
1359
  var markup = "<svg"; // Apply attributes
1296
1360
 
1297
1361
  for (var attr in this.attributes) {
@@ -1322,9 +1386,9 @@ function () {
1322
1386
  this.alternate = alternate; // Used only for tall \sqrt
1323
1387
  }
1324
1388
 
1325
- var _proto5 = PathNode.prototype;
1389
+ var _proto6 = PathNode.prototype;
1326
1390
 
1327
- _proto5.toNode = function toNode() {
1391
+ _proto6.toNode = function toNode() {
1328
1392
  var svgNS = "http://www.w3.org/2000/svg";
1329
1393
  var node = document.createElementNS(svgNS, "path");
1330
1394
 
@@ -1337,7 +1401,7 @@ function () {
1337
1401
  return node;
1338
1402
  };
1339
1403
 
1340
- _proto5.toMarkup = function toMarkup() {
1404
+ _proto6.toMarkup = function toMarkup() {
1341
1405
  if (this.alternate) {
1342
1406
  return "<path d='" + this.alternate + "'/>";
1343
1407
  } else {
@@ -1355,9 +1419,9 @@ function () {
1355
1419
  this.attributes = attributes || {};
1356
1420
  }
1357
1421
 
1358
- var _proto6 = LineNode.prototype;
1422
+ var _proto7 = LineNode.prototype;
1359
1423
 
1360
- _proto6.toNode = function toNode() {
1424
+ _proto7.toNode = function toNode() {
1361
1425
  var svgNS = "http://www.w3.org/2000/svg";
1362
1426
  var node = document.createElementNS(svgNS, "line"); // Apply attributes
1363
1427
 
@@ -1370,7 +1434,7 @@ function () {
1370
1434
  return node;
1371
1435
  };
1372
1436
 
1373
- _proto6.toMarkup = function toMarkup() {
1437
+ _proto7.toMarkup = function toMarkup() {
1374
1438
  var markup = "<line";
1375
1439
 
1376
1440
  for (var attr in this.attributes) {
@@ -3743,13 +3807,13 @@ function getCharacterMetrics(character, font, mode) {
3743
3807
  }
3744
3808
 
3745
3809
  var ch = character.charCodeAt(0);
3810
+ var metrics = fontMetricsData[font][ch];
3746
3811
 
3747
- if (character[0] in extraCharacterMap) {
3812
+ if (!metrics && character[0] in extraCharacterMap) {
3748
3813
  ch = extraCharacterMap[character[0]].charCodeAt(0);
3814
+ metrics = fontMetricsData[font][ch];
3749
3815
  }
3750
3816
 
3751
- var metrics = fontMetricsData[font][ch];
3752
-
3753
3817
  if (!metrics && mode === 'text') {
3754
3818
  // We don't typically have font metrics for Asian scripts.
3755
3819
  // But since we support them in text mode, we need to return
@@ -3877,7 +3941,7 @@ var op = "op-token";
3877
3941
  var symbols_open = "open";
3878
3942
  var punct = "punct";
3879
3943
  var rel = "rel";
3880
- var spacing = "spacing";
3944
+ var symbols_spacing = "spacing";
3881
3945
  var symbols_textord = "textord"; // Now comes the symbol table
3882
3946
  // Relation Symbols
3883
3947
 
@@ -3982,12 +4046,13 @@ defineSymbol(symbols_math, main, rel, "\u21C1", "\\rightharpoondown", true);
3982
4046
  defineSymbol(symbols_math, main, rel, "\u2196", "\\nwarrow", true);
3983
4047
  defineSymbol(symbols_math, main, rel, "\u21CC", "\\rightleftharpoons", true); // AMS Negated Binary Relations
3984
4048
 
3985
- defineSymbol(symbols_math, ams, rel, "\u226E", "\\nless", true);
3986
- defineSymbol(symbols_math, ams, rel, "\uE010", "\\nleqslant");
3987
- defineSymbol(symbols_math, ams, rel, "\uE011", "\\nleqq");
4049
+ defineSymbol(symbols_math, ams, rel, "\u226E", "\\nless", true); // Symbol names preceeded by "@" each have a corresponding macro.
4050
+
4051
+ defineSymbol(symbols_math, ams, rel, "\uE010", "\\@nleqslant");
4052
+ defineSymbol(symbols_math, ams, rel, "\uE011", "\\@nleqq");
3988
4053
  defineSymbol(symbols_math, ams, rel, "\u2A87", "\\lneq", true);
3989
4054
  defineSymbol(symbols_math, ams, rel, "\u2268", "\\lneqq", true);
3990
- defineSymbol(symbols_math, ams, rel, "\uE00C", "\\lvertneqq");
4055
+ defineSymbol(symbols_math, ams, rel, "\uE00C", "\\@lvertneqq");
3991
4056
  defineSymbol(symbols_math, ams, rel, "\u22E6", "\\lnsim", true);
3992
4057
  defineSymbol(symbols_math, ams, rel, "\u2A89", "\\lnapprox", true);
3993
4058
  defineSymbol(symbols_math, ams, rel, "\u2280", "\\nprec", true); // unicode-math maps \u22e0 to \npreccurlyeq. We'll use the AMS synonym.
@@ -3996,22 +4061,22 @@ defineSymbol(symbols_math, ams, rel, "\u22E0", "\\npreceq", true);
3996
4061
  defineSymbol(symbols_math, ams, rel, "\u22E8", "\\precnsim", true);
3997
4062
  defineSymbol(symbols_math, ams, rel, "\u2AB9", "\\precnapprox", true);
3998
4063
  defineSymbol(symbols_math, ams, rel, "\u2241", "\\nsim", true);
3999
- defineSymbol(symbols_math, ams, rel, "\uE006", "\\nshortmid");
4064
+ defineSymbol(symbols_math, ams, rel, "\uE006", "\\@nshortmid");
4000
4065
  defineSymbol(symbols_math, ams, rel, "\u2224", "\\nmid", true);
4001
4066
  defineSymbol(symbols_math, ams, rel, "\u22AC", "\\nvdash", true);
4002
4067
  defineSymbol(symbols_math, ams, rel, "\u22AD", "\\nvDash", true);
4003
4068
  defineSymbol(symbols_math, ams, rel, "\u22EA", "\\ntriangleleft");
4004
4069
  defineSymbol(symbols_math, ams, rel, "\u22EC", "\\ntrianglelefteq", true);
4005
4070
  defineSymbol(symbols_math, ams, rel, "\u228A", "\\subsetneq", true);
4006
- defineSymbol(symbols_math, ams, rel, "\uE01A", "\\varsubsetneq");
4071
+ defineSymbol(symbols_math, ams, rel, "\uE01A", "\\@varsubsetneq");
4007
4072
  defineSymbol(symbols_math, ams, rel, "\u2ACB", "\\subsetneqq", true);
4008
- defineSymbol(symbols_math, ams, rel, "\uE017", "\\varsubsetneqq");
4073
+ defineSymbol(symbols_math, ams, rel, "\uE017", "\\@varsubsetneqq");
4009
4074
  defineSymbol(symbols_math, ams, rel, "\u226F", "\\ngtr", true);
4010
- defineSymbol(symbols_math, ams, rel, "\uE00F", "\\ngeqslant");
4011
- defineSymbol(symbols_math, ams, rel, "\uE00E", "\\ngeqq");
4075
+ defineSymbol(symbols_math, ams, rel, "\uE00F", "\\@ngeqslant");
4076
+ defineSymbol(symbols_math, ams, rel, "\uE00E", "\\@ngeqq");
4012
4077
  defineSymbol(symbols_math, ams, rel, "\u2A88", "\\gneq", true);
4013
4078
  defineSymbol(symbols_math, ams, rel, "\u2269", "\\gneqq", true);
4014
- defineSymbol(symbols_math, ams, rel, "\uE00D", "\\gvertneqq");
4079
+ defineSymbol(symbols_math, ams, rel, "\uE00D", "\\@gvertneqq");
4015
4080
  defineSymbol(symbols_math, ams, rel, "\u22E7", "\\gnsim", true);
4016
4081
  defineSymbol(symbols_math, ams, rel, "\u2A8A", "\\gnapprox", true);
4017
4082
  defineSymbol(symbols_math, ams, rel, "\u2281", "\\nsucc", true); // unicode-math maps \u22e1 to \nsucccurlyeq. We'll use the AMS synonym.
@@ -4021,20 +4086,20 @@ defineSymbol(symbols_math, ams, rel, "\u22E9", "\\succnsim", true);
4021
4086
  defineSymbol(symbols_math, ams, rel, "\u2ABA", "\\succnapprox", true); // unicode-math maps \u2246 to \simneqq. We'll use the AMS synonym.
4022
4087
 
4023
4088
  defineSymbol(symbols_math, ams, rel, "\u2246", "\\ncong", true);
4024
- defineSymbol(symbols_math, ams, rel, "\uE007", "\\nshortparallel");
4089
+ defineSymbol(symbols_math, ams, rel, "\uE007", "\\@nshortparallel");
4025
4090
  defineSymbol(symbols_math, ams, rel, "\u2226", "\\nparallel", true);
4026
4091
  defineSymbol(symbols_math, ams, rel, "\u22AF", "\\nVDash", true);
4027
4092
  defineSymbol(symbols_math, ams, rel, "\u22EB", "\\ntriangleright");
4028
4093
  defineSymbol(symbols_math, ams, rel, "\u22ED", "\\ntrianglerighteq", true);
4029
- defineSymbol(symbols_math, ams, rel, "\uE018", "\\nsupseteqq");
4094
+ defineSymbol(symbols_math, ams, rel, "\uE018", "\\@nsupseteqq");
4030
4095
  defineSymbol(symbols_math, ams, rel, "\u228B", "\\supsetneq", true);
4031
- defineSymbol(symbols_math, ams, rel, "\uE01B", "\\varsupsetneq");
4096
+ defineSymbol(symbols_math, ams, rel, "\uE01B", "\\@varsupsetneq");
4032
4097
  defineSymbol(symbols_math, ams, rel, "\u2ACC", "\\supsetneqq", true);
4033
- defineSymbol(symbols_math, ams, rel, "\uE019", "\\varsupsetneqq");
4098
+ defineSymbol(symbols_math, ams, rel, "\uE019", "\\@varsupsetneqq");
4034
4099
  defineSymbol(symbols_math, ams, rel, "\u22AE", "\\nVdash", true);
4035
4100
  defineSymbol(symbols_math, ams, rel, "\u2AB5", "\\precneqq", true);
4036
4101
  defineSymbol(symbols_math, ams, rel, "\u2AB6", "\\succneqq", true);
4037
- defineSymbol(symbols_math, ams, rel, "\uE016", "\\nsubseteqq");
4102
+ defineSymbol(symbols_math, ams, rel, "\uE016", "\\@nsubseteqq");
4038
4103
  defineSymbol(symbols_math, ams, bin, "\u22B4", "\\unlhd");
4039
4104
  defineSymbol(symbols_math, ams, bin, "\u22B5", "\\unrhd"); // AMS Negated Arrows
4040
4105
 
@@ -4057,7 +4122,6 @@ defineSymbol(symbols_math, ams, symbols_textord, "\u2204", "\\nexists");
4057
4122
  defineSymbol(symbols_math, ams, symbols_textord, "\u2127", "\\mho");
4058
4123
  defineSymbol(symbols_math, ams, symbols_textord, "\u2132", "\\Finv", true);
4059
4124
  defineSymbol(symbols_math, ams, symbols_textord, "\u2141", "\\Game", true);
4060
- defineSymbol(symbols_math, ams, symbols_textord, "k", "\\Bbbk");
4061
4125
  defineSymbol(symbols_math, ams, symbols_textord, "\u2035", "\\backprime");
4062
4126
  defineSymbol(symbols_math, ams, symbols_textord, "\u25B2", "\\blacktriangle");
4063
4127
  defineSymbol(symbols_math, ams, symbols_textord, "\u25BC", "\\blacktriangledown");
@@ -4356,17 +4420,17 @@ defineSymbol(symbols_math, main, rel, "\u2192", "\\rightarrow", true);
4356
4420
  defineSymbol(symbols_math, main, rel, "\u2192", "\\to");
4357
4421
  defineSymbol(symbols_math, ams, rel, "\u2271", "\\ngeq", true);
4358
4422
  defineSymbol(symbols_math, ams, rel, "\u2270", "\\nleq", true);
4359
- defineSymbol(symbols_math, main, spacing, "\xA0", "\\ ");
4360
- defineSymbol(symbols_math, main, spacing, "\xA0", "~");
4361
- defineSymbol(symbols_math, main, spacing, "\xA0", "\\space"); // Ref: LaTeX Source 2e: \DeclareRobustCommand{\nobreakspace}{%
4362
-
4363
- defineSymbol(symbols_math, main, spacing, "\xA0", "\\nobreakspace");
4364
- defineSymbol(symbols_text, main, spacing, "\xA0", "\\ ");
4365
- defineSymbol(symbols_text, main, spacing, "\xA0", "~");
4366
- defineSymbol(symbols_text, main, spacing, "\xA0", "\\space");
4367
- defineSymbol(symbols_text, main, spacing, "\xA0", "\\nobreakspace");
4368
- defineSymbol(symbols_math, main, spacing, null, "\\nobreak");
4369
- defineSymbol(symbols_math, main, spacing, null, "\\allowbreak");
4423
+ defineSymbol(symbols_math, main, symbols_spacing, "\xA0", "\\ ");
4424
+ defineSymbol(symbols_math, main, symbols_spacing, "\xA0", "~");
4425
+ defineSymbol(symbols_math, main, symbols_spacing, "\xA0", "\\space"); // Ref: LaTeX Source 2e: \DeclareRobustCommand{\nobreakspace}{%
4426
+
4427
+ defineSymbol(symbols_math, main, symbols_spacing, "\xA0", "\\nobreakspace");
4428
+ defineSymbol(symbols_text, main, symbols_spacing, "\xA0", "\\ ");
4429
+ defineSymbol(symbols_text, main, symbols_spacing, "\xA0", "~");
4430
+ defineSymbol(symbols_text, main, symbols_spacing, "\xA0", "\\space");
4431
+ defineSymbol(symbols_text, main, symbols_spacing, "\xA0", "\\nobreakspace");
4432
+ defineSymbol(symbols_math, main, symbols_spacing, null, "\\nobreak");
4433
+ defineSymbol(symbols_math, main, symbols_spacing, null, "\\allowbreak");
4370
4434
  defineSymbol(symbols_math, main, punct, ",", ",");
4371
4435
  defineSymbol(symbols_math, main, punct, ";", ";");
4372
4436
  defineSymbol(symbols_math, ams, bin, "\u22BC", "\\barwedge", true);
@@ -4531,9 +4595,9 @@ defineSymbol(symbols_text, main, mathord, "\xA3", "\\pounds");
4531
4595
  defineSymbol(symbols_text, main, mathord, "\xA3", "\\textsterling", true);
4532
4596
  defineSymbol(symbols_math, ams, symbols_textord, "\u2720", "\\maltese");
4533
4597
  defineSymbol(symbols_text, ams, symbols_textord, "\u2720", "\\maltese");
4534
- defineSymbol(symbols_text, main, spacing, "\xA0", "\\ ");
4535
- defineSymbol(symbols_text, main, spacing, "\xA0", " ");
4536
- defineSymbol(symbols_text, main, spacing, "\xA0", "~"); // There are lots of symbols which are the same, so we add them in afterwards.
4598
+ defineSymbol(symbols_text, main, symbols_spacing, "\xA0", "\\ ");
4599
+ defineSymbol(symbols_text, main, symbols_spacing, "\xA0", " ");
4600
+ defineSymbol(symbols_text, main, symbols_spacing, "\xA0", "~"); // There are lots of symbols which are the same, so we add them in afterwards.
4537
4601
  // All of these are textords in math mode
4538
4602
 
4539
4603
  var mathTextSymbols = "0123456789/@.\"";
@@ -4588,53 +4652,53 @@ defineSymbol(symbols_text, main, mathord, "h", "\u210E"); // The next loop loads
4588
4652
 
4589
4653
  var symbols_wideChar = "";
4590
4654
 
4591
- for (var _i3 = 0; _i3 < letters.length; _i3++) {
4592
- var _ch3 = letters.charAt(_i3); // The hex numbers in the next line are a surrogate pair.
4655
+ for (var symbols_i3 = 0; symbols_i3 < letters.length; symbols_i3++) {
4656
+ var _ch3 = letters.charAt(symbols_i3); // The hex numbers in the next line are a surrogate pair.
4593
4657
  // 0xD835 is the high surrogate for all letters in the range we support.
4594
4658
  // 0xDC00 is the low surrogate for bold A.
4595
4659
 
4596
4660
 
4597
- symbols_wideChar = String.fromCharCode(0xD835, 0xDC00 + _i3); // A-Z a-z bold
4661
+ symbols_wideChar = String.fromCharCode(0xD835, 0xDC00 + symbols_i3); // A-Z a-z bold
4598
4662
 
4599
4663
  defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);
4600
4664
  defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);
4601
- symbols_wideChar = String.fromCharCode(0xD835, 0xDC34 + _i3); // A-Z a-z italic
4665
+ symbols_wideChar = String.fromCharCode(0xD835, 0xDC34 + symbols_i3); // A-Z a-z italic
4602
4666
 
4603
4667
  defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);
4604
4668
  defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);
4605
- symbols_wideChar = String.fromCharCode(0xD835, 0xDC68 + _i3); // A-Z a-z bold italic
4669
+ symbols_wideChar = String.fromCharCode(0xD835, 0xDC68 + symbols_i3); // A-Z a-z bold italic
4606
4670
 
4607
4671
  defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);
4608
4672
  defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);
4609
- symbols_wideChar = String.fromCharCode(0xD835, 0xDD04 + _i3); // A-Z a-z Fractur
4673
+ symbols_wideChar = String.fromCharCode(0xD835, 0xDD04 + symbols_i3); // A-Z a-z Fractur
4610
4674
 
4611
4675
  defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);
4612
4676
  defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);
4613
- symbols_wideChar = String.fromCharCode(0xD835, 0xDDA0 + _i3); // A-Z a-z sans-serif
4677
+ symbols_wideChar = String.fromCharCode(0xD835, 0xDDA0 + symbols_i3); // A-Z a-z sans-serif
4614
4678
 
4615
4679
  defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);
4616
4680
  defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);
4617
- symbols_wideChar = String.fromCharCode(0xD835, 0xDDD4 + _i3); // A-Z a-z sans bold
4681
+ symbols_wideChar = String.fromCharCode(0xD835, 0xDDD4 + symbols_i3); // A-Z a-z sans bold
4618
4682
 
4619
4683
  defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);
4620
4684
  defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);
4621
- symbols_wideChar = String.fromCharCode(0xD835, 0xDE08 + _i3); // A-Z a-z sans italic
4685
+ symbols_wideChar = String.fromCharCode(0xD835, 0xDE08 + symbols_i3); // A-Z a-z sans italic
4622
4686
 
4623
4687
  defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);
4624
4688
  defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);
4625
- symbols_wideChar = String.fromCharCode(0xD835, 0xDE70 + _i3); // A-Z a-z monospace
4689
+ symbols_wideChar = String.fromCharCode(0xD835, 0xDE70 + symbols_i3); // A-Z a-z monospace
4626
4690
 
4627
4691
  defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);
4628
4692
  defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);
4629
4693
 
4630
- if (_i3 < 26) {
4694
+ if (symbols_i3 < 26) {
4631
4695
  // KaTeX fonts have only capital letters for blackboard bold and script.
4632
4696
  // See exception for k below.
4633
- symbols_wideChar = String.fromCharCode(0xD835, 0xDD38 + _i3); // A-Z double struck
4697
+ symbols_wideChar = String.fromCharCode(0xD835, 0xDD38 + symbols_i3); // A-Z double struck
4634
4698
 
4635
4699
  defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);
4636
4700
  defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);
4637
- symbols_wideChar = String.fromCharCode(0xD835, 0xDC9C + _i3); // A-Z script
4701
+ symbols_wideChar = String.fromCharCode(0xD835, 0xDC9C + symbols_i3); // A-Z script
4638
4702
 
4639
4703
  defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);
4640
4704
  defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);
@@ -4648,22 +4712,22 @@ symbols_wideChar = String.fromCharCode(0xD835, 0xDD5C); // k double struck
4648
4712
  defineSymbol(symbols_math, main, mathord, "k", symbols_wideChar);
4649
4713
  defineSymbol(symbols_text, main, symbols_textord, "k", symbols_wideChar); // Next, some wide character numerals
4650
4714
 
4651
- for (var _i4 = 0; _i4 < 10; _i4++) {
4652
- var _ch4 = _i4.toString();
4715
+ for (var symbols_i4 = 0; symbols_i4 < 10; symbols_i4++) {
4716
+ var _ch4 = symbols_i4.toString();
4653
4717
 
4654
- symbols_wideChar = String.fromCharCode(0xD835, 0xDFCE + _i4); // 0-9 bold
4718
+ symbols_wideChar = String.fromCharCode(0xD835, 0xDFCE + symbols_i4); // 0-9 bold
4655
4719
 
4656
4720
  defineSymbol(symbols_math, main, mathord, _ch4, symbols_wideChar);
4657
4721
  defineSymbol(symbols_text, main, symbols_textord, _ch4, symbols_wideChar);
4658
- symbols_wideChar = String.fromCharCode(0xD835, 0xDFE2 + _i4); // 0-9 sans serif
4722
+ symbols_wideChar = String.fromCharCode(0xD835, 0xDFE2 + symbols_i4); // 0-9 sans serif
4659
4723
 
4660
4724
  defineSymbol(symbols_math, main, mathord, _ch4, symbols_wideChar);
4661
4725
  defineSymbol(symbols_text, main, symbols_textord, _ch4, symbols_wideChar);
4662
- symbols_wideChar = String.fromCharCode(0xD835, 0xDFEC + _i4); // 0-9 bold sans
4726
+ symbols_wideChar = String.fromCharCode(0xD835, 0xDFEC + symbols_i4); // 0-9 bold sans
4663
4727
 
4664
4728
  defineSymbol(symbols_math, main, mathord, _ch4, symbols_wideChar);
4665
4729
  defineSymbol(symbols_text, main, symbols_textord, _ch4, symbols_wideChar);
4666
- symbols_wideChar = String.fromCharCode(0xD835, 0xDFF6 + _i4); // 0-9 monospace
4730
+ symbols_wideChar = String.fromCharCode(0xD835, 0xDFF6 + symbols_i4); // 0-9 monospace
4667
4731
 
4668
4732
  defineSymbol(symbols_math, main, mathord, _ch4, symbols_wideChar);
4669
4733
  defineSymbol(symbols_text, main, symbols_textord, _ch4, symbols_wideChar);
@@ -4799,7 +4863,8 @@ var sizeMultipliers = [// fontMetrics.js:getGlobalMetrics also uses size indexes
4799
4863
 
4800
4864
  var sizeAtStyle = function sizeAtStyle(size, style) {
4801
4865
  return style.size < 2 ? size : sizeStyleMap[size - 1][style.size - 1];
4802
- };
4866
+ }; // In these types, "" (empty string) means "no change".
4867
+
4803
4868
 
4804
4869
  /**
4805
4870
  * This is the main options class. It contains the current style, size, color,
@@ -5071,20 +5136,13 @@ function () {
5071
5136
  return this._fontMetrics;
5072
5137
  }
5073
5138
  /**
5074
- * A map of color names to CSS colors.
5075
- * TODO(emily): Remove this when we have real macros
5139
+ * Gets the CSS color of the current options object
5076
5140
  */
5077
5141
  ;
5078
5142
 
5079
- /**
5080
- * Gets the CSS color of the current options object, accounting for the
5081
- * `colorMap`.
5082
- */
5083
5143
  _proto.getColor = function getColor() {
5084
5144
  if (this.phantom) {
5085
5145
  return "transparent";
5086
- } else if (this.color != null && Options.colorMap.hasOwnProperty(this.color)) {
5087
- return Options.colorMap[this.color];
5088
5146
  } else {
5089
5147
  return this.color;
5090
5148
  }
@@ -5094,64 +5152,6 @@ function () {
5094
5152
  }();
5095
5153
 
5096
5154
  Options_Options.BASESIZE = 6;
5097
- Options_Options.colorMap = {
5098
- "katex-blue": "#6495ed",
5099
- "katex-orange": "#ffa500",
5100
- "katex-pink": "#ff00af",
5101
- "katex-red": "#df0030",
5102
- "katex-green": "#28ae7b",
5103
- "katex-gray": "gray",
5104
- "katex-purple": "#9d38bd",
5105
- "katex-blueA": "#ccfaff",
5106
- "katex-blueB": "#80f6ff",
5107
- "katex-blueC": "#63d9ea",
5108
- "katex-blueD": "#11accd",
5109
- "katex-blueE": "#0c7f99",
5110
- "katex-tealA": "#94fff5",
5111
- "katex-tealB": "#26edd5",
5112
- "katex-tealC": "#01d1c1",
5113
- "katex-tealD": "#01a995",
5114
- "katex-tealE": "#208170",
5115
- "katex-greenA": "#b6ffb0",
5116
- "katex-greenB": "#8af281",
5117
- "katex-greenC": "#74cf70",
5118
- "katex-greenD": "#1fab54",
5119
- "katex-greenE": "#0d923f",
5120
- "katex-goldA": "#ffd0a9",
5121
- "katex-goldB": "#ffbb71",
5122
- "katex-goldC": "#ff9c39",
5123
- "katex-goldD": "#e07d10",
5124
- "katex-goldE": "#a75a05",
5125
- "katex-redA": "#fca9a9",
5126
- "katex-redB": "#ff8482",
5127
- "katex-redC": "#f9685d",
5128
- "katex-redD": "#e84d39",
5129
- "katex-redE": "#bc2612",
5130
- "katex-maroonA": "#ffbde0",
5131
- "katex-maroonB": "#ff92c6",
5132
- "katex-maroonC": "#ed5fa6",
5133
- "katex-maroonD": "#ca337c",
5134
- "katex-maroonE": "#9e034e",
5135
- "katex-purpleA": "#ddd7ff",
5136
- "katex-purpleB": "#c6b9fc",
5137
- "katex-purpleC": "#aa87ff",
5138
- "katex-purpleD": "#7854ab",
5139
- "katex-purpleE": "#543b78",
5140
- "katex-mintA": "#f5f9e8",
5141
- "katex-mintB": "#edf2df",
5142
- "katex-mintC": "#e0e5cc",
5143
- "katex-grayA": "#f6f7f7",
5144
- "katex-grayB": "#f0f1f2",
5145
- "katex-grayC": "#e3e5e6",
5146
- "katex-grayD": "#d6d8da",
5147
- "katex-grayE": "#babec2",
5148
- "katex-grayF": "#888d93",
5149
- "katex-grayG": "#626569",
5150
- "katex-grayH": "#3b3e40",
5151
- "katex-grayI": "#21242c",
5152
- "katex-kaBlue": "#314453",
5153
- "katex-kaGreen": "#71B307"
5154
- };
5155
5155
  /* harmony default export */ var src_Options = (Options_Options);
5156
5156
  // CONCATENATED MODULE: ./src/units.js
5157
5157
  /**
@@ -7003,13 +7003,24 @@ var buildMathML_buildExpression = function buildExpression(expression, options)
7003
7003
 
7004
7004
  continue;
7005
7005
  }
7006
+ } else if (lastGroup.type === 'mi' && lastGroup.children.length === 1) {
7007
+ var lastChild = lastGroup.children[0];
7008
+
7009
+ if (lastChild instanceof mathMLTree_TextNode && lastChild.text === "\u0338" && (group.type === 'mo' || group.type === 'mi' || group.type === 'mn')) {
7010
+ var _child = group.children[0];
7011
+
7012
+ if (_child instanceof mathMLTree_TextNode && _child.text.length > 0) {
7013
+ // Overlay with combining character long solidus
7014
+ _child.text = _child.text.slice(0, 1) + "\u0338" + _child.text.slice(1);
7015
+ groups.pop();
7016
+ }
7017
+ }
7006
7018
  }
7007
7019
  }
7008
7020
 
7009
7021
  groups.push(group);
7010
7022
  lastGroup = group;
7011
- } // TODO(kevinb): combine \\not with mrels and mords
7012
-
7023
+ }
7013
7024
 
7014
7025
  return groups;
7015
7026
  };
@@ -7140,8 +7151,10 @@ var stretchyCodePoint = {
7140
7151
  overrightarrow: "\u2192",
7141
7152
  underrightarrow: "\u2192",
7142
7153
  xrightarrow: "\u2192",
7143
- underbrace: "\u23B5",
7154
+ underbrace: "\u23DF",
7144
7155
  overbrace: "\u23DE",
7156
+ overgroup: "\u23E0",
7157
+ undergroup: "\u23E1",
7145
7158
  overleftrightarrow: "\u2194",
7146
7159
  underleftrightarrow: "\u2194",
7147
7160
  xleftrightarrow: "\u2194",
@@ -7747,7 +7760,16 @@ defineFunction({
7747
7760
 
7748
7761
 
7749
7762
 
7750
- // Stretchy arrows with an optional argument
7763
+
7764
+ // Helper function
7765
+ var arrow_paddedNode = function paddedNode(group) {
7766
+ var node = new mathMLTree.MathNode("mpadded", group ? [group] : []);
7767
+ node.setAttribute("width", "+0.6em");
7768
+ node.setAttribute("lspace", "0.3em");
7769
+ return node;
7770
+ }; // Stretchy arrows with an optional argument
7771
+
7772
+
7751
7773
  defineFunction({
7752
7774
  type: "xArrow",
7753
7775
  names: ["\\xleftarrow", "\\xrightarrow", "\\xLeftarrow", "\\xRightarrow", "\\xleftrightarrow", "\\xLeftrightarrow", "\\xhookleftarrow", "\\xhookrightarrow", "\\xmapsto", "\\xrightharpoondown", "\\xrightharpoonup", "\\xleftharpoondown", "\\xleftharpoonup", "\\xrightleftharpoons", "\\xleftrightharpoons", "\\xlongequal", "\\xtwoheadrightarrow", "\\xtwoheadleftarrow", "\\xtofrom", // The next 3 functions are here to support the mhchem extension.
@@ -7842,22 +7864,25 @@ defineFunction({
7842
7864
  mathmlBuilder: function mathmlBuilder(group, options) {
7843
7865
  var arrowNode = stretchy.mathMLnode(group.label);
7844
7866
  var node;
7845
- var lowerNode;
7846
7867
 
7847
7868
  if (group.body) {
7848
- var upperNode = buildMathML_buildGroup(group.body, options);
7869
+ var upperNode = arrow_paddedNode(buildMathML_buildGroup(group.body, options));
7849
7870
 
7850
7871
  if (group.below) {
7851
- lowerNode = buildMathML_buildGroup(group.below, options);
7872
+ var lowerNode = arrow_paddedNode(buildMathML_buildGroup(group.below, options));
7852
7873
  node = new mathMLTree.MathNode("munderover", [arrowNode, lowerNode, upperNode]);
7853
7874
  } else {
7854
7875
  node = new mathMLTree.MathNode("mover", [arrowNode, upperNode]);
7855
7876
  }
7856
7877
  } else if (group.below) {
7857
- lowerNode = buildMathML_buildGroup(group.below, options);
7858
- node = new mathMLTree.MathNode("munder", [arrowNode, lowerNode]);
7878
+ var _lowerNode = arrow_paddedNode(buildMathML_buildGroup(group.below, options));
7879
+
7880
+ node = new mathMLTree.MathNode("munder", [arrowNode, _lowerNode]);
7859
7881
  } else {
7860
- node = new mathMLTree.MathNode("mover", [arrowNode]);
7882
+ // This should never happen.
7883
+ // Parser.js throws an error if there is no argument.
7884
+ node = arrow_paddedNode();
7885
+ node = new mathMLTree.MathNode("mover", [arrowNode, node]);
7861
7886
  }
7862
7887
 
7863
7888
  return node;
@@ -7919,7 +7944,7 @@ var color_htmlBuilder = function htmlBuilder(group, options) {
7919
7944
  };
7920
7945
 
7921
7946
  var color_mathmlBuilder = function mathmlBuilder(group, options) {
7922
- var inner = buildMathML_buildExpression(group.body, options);
7947
+ var inner = buildMathML_buildExpression(group.body, options.withColor(group.color));
7923
7948
  var node = new mathMLTree.MathNode("mstyle", inner);
7924
7949
  node.setAttribute("mathcolor", group.color);
7925
7950
  return node;
@@ -7947,29 +7972,6 @@ defineFunction({
7947
7972
  },
7948
7973
  htmlBuilder: color_htmlBuilder,
7949
7974
  mathmlBuilder: color_mathmlBuilder
7950
- }); // TODO(kevinb): define these using macros
7951
-
7952
- defineFunction({
7953
- type: "color",
7954
- names: ["\\blue", "\\orange", "\\pink", "\\red", "\\green", "\\gray", "\\purple", "\\blueA", "\\blueB", "\\blueC", "\\blueD", "\\blueE", "\\tealA", "\\tealB", "\\tealC", "\\tealD", "\\tealE", "\\greenA", "\\greenB", "\\greenC", "\\greenD", "\\greenE", "\\goldA", "\\goldB", "\\goldC", "\\goldD", "\\goldE", "\\redA", "\\redB", "\\redC", "\\redD", "\\redE", "\\maroonA", "\\maroonB", "\\maroonC", "\\maroonD", "\\maroonE", "\\purpleA", "\\purpleB", "\\purpleC", "\\purpleD", "\\purpleE", "\\mintA", "\\mintB", "\\mintC", "\\grayA", "\\grayB", "\\grayC", "\\grayD", "\\grayE", "\\grayF", "\\grayG", "\\grayH", "\\grayI", "\\kaBlue", "\\kaGreen"],
7955
- props: {
7956
- numArgs: 1,
7957
- allowedInText: true,
7958
- greediness: 3
7959
- },
7960
- handler: function handler(_ref2, args) {
7961
- var parser = _ref2.parser,
7962
- funcName = _ref2.funcName;
7963
- var body = args[0];
7964
- return {
7965
- type: "color",
7966
- mode: parser.mode,
7967
- color: "katex-" + funcName.slice(1),
7968
- body: defineFunction_ordargument(body)
7969
- };
7970
- },
7971
- htmlBuilder: color_htmlBuilder,
7972
- mathmlBuilder: color_mathmlBuilder
7973
7975
  });
7974
7976
  defineFunction({
7975
7977
  type: "color",
@@ -7980,9 +7982,9 @@ defineFunction({
7980
7982
  greediness: 3,
7981
7983
  argTypes: ["color"]
7982
7984
  },
7983
- handler: function handler(_ref3, args) {
7984
- var parser = _ref3.parser,
7985
- breakOnTokenText = _ref3.breakOnTokenText;
7985
+ handler: function handler(_ref2, args) {
7986
+ var parser = _ref2.parser,
7987
+ breakOnTokenText = _ref2.breakOnTokenText;
7986
7988
  var color = assertNodeType(args[0], "color-token").color; // If we see a styling function, parse out the implicit body
7987
7989
 
7988
7990
  var body = parser.parseExpression(true, breakOnTokenText);
@@ -9030,8 +9032,17 @@ defineFunction({
9030
9032
  return middleDelim;
9031
9033
  },
9032
9034
  mathmlBuilder: function mathmlBuilder(group, options) {
9033
- var middleNode = new mathMLTree.MathNode("mo", [buildMathML_makeText(group.delim, group.mode)]);
9034
- middleNode.setAttribute("fence", "true");
9035
+ // A Firefox \middle will strech a character vertically only if it
9036
+ // is in the fence part of the operator dictionary at:
9037
+ // https://www.w3.org/TR/MathML3/appendixc.html.
9038
+ // So we need to avoid U+2223 and use plain "|" instead.
9039
+ var textNode = group.delim === "\\vert" || group.delim === "|" ? buildMathML_makeText("|", "text") : buildMathML_makeText(group.delim, group.mode);
9040
+ var middleNode = new mathMLTree.MathNode("mo", [textNode]);
9041
+ middleNode.setAttribute("fence", "true"); // MathML gives 5/18em spacing to each <mo> element.
9042
+ // \middle should get delimiter spacing instead.
9043
+
9044
+ middleNode.setAttribute("lspace", "0.05em");
9045
+ middleNode.setAttribute("rspace", "0.05em");
9035
9046
  return middleNode;
9036
9047
  }
9037
9048
  });
@@ -9146,7 +9157,7 @@ var enclose_htmlBuilder = function htmlBuilder(group, options) {
9146
9157
  };
9147
9158
 
9148
9159
  var enclose_mathmlBuilder = function mathmlBuilder(group, options) {
9149
- var node = new mathMLTree.MathNode("menclose", [buildMathML_buildGroup(group.body, options)]);
9160
+ var node = new mathMLTree.MathNode(group.label.indexOf("colorbox") > -1 ? "mpadded" : "menclose", [buildMathML_buildGroup(group.body, options)]);
9150
9161
 
9151
9162
  switch (group.label) {
9152
9163
  case "\\cancel":
@@ -9166,8 +9177,20 @@ var enclose_mathmlBuilder = function mathmlBuilder(group, options) {
9166
9177
  break;
9167
9178
 
9168
9179
  case "\\fcolorbox":
9169
- // TODO(ron): I don't know any way to set the border color.
9170
- node.setAttribute("notation", "box");
9180
+ case "\\colorbox":
9181
+ // <menclose> doesn't have a good notation option. So use <mpadded>
9182
+ // instead. Set some attributes that come included with <menclose>.
9183
+ node.setAttribute("width", "+6pt");
9184
+ node.setAttribute("height", "+6pt");
9185
+ node.setAttribute("lspace", "3pt"); // LaTeX source2e: \fboxsep = 3pt
9186
+
9187
+ node.setAttribute("voffset", "3pt");
9188
+
9189
+ if (group.label === "\\fcolorbox") {
9190
+ var thk = options.fontMetrics().defaultRuleThickness;
9191
+ node.setAttribute("style", "border: " + thk + "em solid " + String(group.borderColor));
9192
+ }
9193
+
9171
9194
  break;
9172
9195
 
9173
9196
  case "\\xcancel":
@@ -9355,7 +9378,8 @@ function parseArray(parser, _ref, style) {
9355
9378
  var hskipBeforeAndAfter = _ref.hskipBeforeAndAfter,
9356
9379
  addJot = _ref.addJot,
9357
9380
  cols = _ref.cols,
9358
- arraystretch = _ref.arraystretch;
9381
+ arraystretch = _ref.arraystretch,
9382
+ colSeparationType = _ref.colSeparationType;
9359
9383
  // Parse body of array with \\ temporarily mapped to \cr
9360
9384
  parser.gullet.beginGroup();
9361
9385
  parser.gullet.macros.set("\\\\", "\\cr"); // Get current arraystretch if it's not set by the environment
@@ -9440,7 +9464,8 @@ function parseArray(parser, _ref, style) {
9440
9464
  cols: cols,
9441
9465
  rowGaps: rowGaps,
9442
9466
  hskipBeforeAndAfter: hskipBeforeAndAfter,
9443
- hLinesBeforeRow: hLinesBeforeRow
9467
+ hLinesBeforeRow: hLinesBeforeRow,
9468
+ colSeparationType: colSeparationType
9444
9469
  };
9445
9470
  } // Decides on a style for cells in an array according to whether the given
9446
9471
  // environment name starts with the letter 'd'.
@@ -9690,12 +9715,118 @@ var array_htmlBuilder = function htmlBuilder(group, options) {
9690
9715
  return buildCommon.makeSpan(["mord"], [body], options);
9691
9716
  };
9692
9717
 
9718
+ var alignMap = {
9719
+ c: "center ",
9720
+ l: "left ",
9721
+ r: "right "
9722
+ };
9723
+
9693
9724
  var array_mathmlBuilder = function mathmlBuilder(group, options) {
9694
- return new mathMLTree.MathNode("mtable", group.body.map(function (row) {
9725
+ var table = new mathMLTree.MathNode("mtable", group.body.map(function (row) {
9695
9726
  return new mathMLTree.MathNode("mtr", row.map(function (cell) {
9696
9727
  return new mathMLTree.MathNode("mtd", [buildMathML_buildGroup(cell, options)]);
9697
9728
  }));
9698
- }));
9729
+ })); // Set column alignment, row spacing, column spacing, and
9730
+ // array lines by setting attributes on the table element.
9731
+ // Set the row spacing. In MathML, we specify a gap distance.
9732
+ // We do not use rowGap[] because MathML automatically increases
9733
+ // cell height with the height/depth of the element content.
9734
+ // LaTeX \arraystretch multiplies the row baseline-to-baseline distance.
9735
+ // We simulate this by adding (arraystretch - 1)em to the gap. This
9736
+ // does a reasonable job of adjusting arrays containing 1 em tall content.
9737
+ // The 0.16 and 0.09 values are found emprically. They produce an array
9738
+ // similar to LaTeX and in which content does not interfere with \hines.
9739
+
9740
+ var gap = 0.16 + group.arraystretch - 1 + (group.addJot ? 0.09 : 0);
9741
+ table.setAttribute("rowspacing", gap + "em"); // MathML table lines go only between cells.
9742
+ // To place a line on an edge we'll use <menclose>, if necessary.
9743
+
9744
+ var menclose = "";
9745
+ var align = "";
9746
+
9747
+ if (group.cols) {
9748
+ // Find column alignment, column spacing, and vertical lines.
9749
+ var cols = group.cols;
9750
+ var columnLines = "";
9751
+ var prevTypeWasAlign = false;
9752
+ var iStart = 0;
9753
+ var iEnd = cols.length;
9754
+
9755
+ if (cols[0].type === "separator") {
9756
+ menclose += "top ";
9757
+ iStart = 1;
9758
+ }
9759
+
9760
+ if (cols[cols.length - 1].type === "separator") {
9761
+ menclose += "bottom ";
9762
+ iEnd -= 1;
9763
+ }
9764
+
9765
+ for (var i = iStart; i < iEnd; i++) {
9766
+ if (cols[i].type === "align") {
9767
+ align += alignMap[cols[i].align];
9768
+
9769
+ if (prevTypeWasAlign) {
9770
+ columnLines += "none ";
9771
+ }
9772
+
9773
+ prevTypeWasAlign = true;
9774
+ } else if (cols[i].type === "separator") {
9775
+ // MathML accepts only single lines between cells.
9776
+ // So we read only the first of consecutive separators.
9777
+ if (prevTypeWasAlign) {
9778
+ columnLines += cols[i].separator === "|" ? "solid " : "dashed ";
9779
+ prevTypeWasAlign = false;
9780
+ }
9781
+ }
9782
+ }
9783
+
9784
+ table.setAttribute("columnalign", align.trim());
9785
+
9786
+ if (/[sd]/.test(columnLines)) {
9787
+ table.setAttribute("columnlines", columnLines.trim());
9788
+ }
9789
+ } // Set column spacing.
9790
+
9791
+
9792
+ if (group.colSeparationType === "align") {
9793
+ var _cols = group.cols || [];
9794
+
9795
+ var spacing = "";
9796
+
9797
+ for (var _i = 1; _i < _cols.length; _i++) {
9798
+ spacing += _i % 2 ? "0em " : "1em ";
9799
+ }
9800
+
9801
+ table.setAttribute("columnspacing", spacing.trim());
9802
+ } else if (group.colSeparationType === "alignat") {
9803
+ table.setAttribute("columnspacing", "0em");
9804
+ } else {
9805
+ table.setAttribute("columnspacing", "1em");
9806
+ } // Address \hline and \hdashline
9807
+
9808
+
9809
+ var rowLines = "";
9810
+ var hlines = group.hLinesBeforeRow;
9811
+ menclose += hlines[0].length > 0 ? "left " : "";
9812
+ menclose += hlines[hlines.length - 1].length > 0 ? "right " : "";
9813
+
9814
+ for (var _i2 = 1; _i2 < hlines.length - 1; _i2++) {
9815
+ rowLines += hlines[_i2].length === 0 ? "none " // MathML accepts only a single line between rows. Read one element.
9816
+ : hlines[_i2][0] ? "dashed " : "solid ";
9817
+ }
9818
+
9819
+ if (/[sd]/.test(rowLines)) {
9820
+ table.setAttribute("rowlines", rowLines.trim());
9821
+ }
9822
+
9823
+ if (menclose === "") {
9824
+ return table;
9825
+ } else {
9826
+ var wrapper = new mathMLTree.MathNode("menclose", [table]);
9827
+ wrapper.setAttribute("notation", menclose.trim());
9828
+ return wrapper;
9829
+ }
9699
9830
  }; // Convenience function for aligned and alignedat environments.
9700
9831
 
9701
9832
 
@@ -9737,9 +9868,9 @@ var array_alignedHandler = function alignedHandler(context, args) {
9737
9868
 
9738
9869
  var isAligned = !numCols;
9739
9870
  res.body.forEach(function (row) {
9740
- for (var _i = 1; _i < row.length; _i += 2) {
9871
+ for (var _i3 = 1; _i3 < row.length; _i3 += 2) {
9741
9872
  // Modify ordgroup node within styling node
9742
- var styling = assertNodeType(row[_i], "styling");
9873
+ var styling = assertNodeType(row[_i3], "styling");
9743
9874
 
9744
9875
  var _ordgroup = assertNodeType(styling.body[0], "ordgroup");
9745
9876
 
@@ -9761,18 +9892,18 @@ var array_alignedHandler = function alignedHandler(context, args) {
9761
9892
  // In aligned mode, we add one \qquad between columns;
9762
9893
  // otherwise we add nothing.
9763
9894
 
9764
- for (var _i2 = 0; _i2 < numCols; ++_i2) {
9895
+ for (var _i4 = 0; _i4 < numCols; ++_i4) {
9765
9896
  var align = "r";
9766
9897
  var pregap = 0;
9767
9898
 
9768
- if (_i2 % 2 === 1) {
9899
+ if (_i4 % 2 === 1) {
9769
9900
  align = "l";
9770
- } else if (_i2 > 0 && isAligned) {
9901
+ } else if (_i4 > 0 && isAligned) {
9771
9902
  // "aligned" mode.
9772
9903
  pregap = 1; // add one \quad
9773
9904
  }
9774
9905
 
9775
- cols[_i2] = {
9906
+ cols[_i4] = {
9776
9907
  type: "align",
9777
9908
  align: align,
9778
9909
  pregap: pregap,
@@ -9780,6 +9911,7 @@ var array_alignedHandler = function alignedHandler(context, args) {
9780
9911
  };
9781
9912
  }
9782
9913
 
9914
+ res.colSeparationType = isAligned ? "align" : "alignat";
9783
9915
  return res;
9784
9916
  }; // Arrays are part of LaTeX, defined in lttab.dtx so its documentation
9785
9917
  // is part of the source2e.pdf file of LaTeX2e source documentation.
@@ -10147,6 +10279,7 @@ defineFunction({
10147
10279
  mode: baseArg.mode,
10148
10280
  limits: true,
10149
10281
  alwaysHandleSupSub: true,
10282
+ parentIsSupSub: false,
10150
10283
  symbol: false,
10151
10284
  suppressBaseShift: funcName !== "\\stackrel",
10152
10285
  body: defineFunction_ordargument(baseArg)
@@ -10289,23 +10422,30 @@ defineFunction({
10289
10422
 
10290
10423
 
10291
10424
 
10292
- var genfrac_htmlBuilder = function htmlBuilder(group, options) {
10293
- // Fractions are handled in the TeXbook on pages 444-445, rules 15(a-e).
10425
+ var genfrac_adjustStyle = function adjustStyle(size, originalStyle) {
10294
10426
  // Figure out what style this fraction should be in based on the
10295
10427
  // function used
10296
- var style = options.style;
10428
+ var style = originalStyle;
10297
10429
 
10298
- if (group.size === "display") {
10299
- style = src_Style.DISPLAY;
10300
- } else if (group.size === "text" && style.size === src_Style.DISPLAY.size) {
10430
+ if (size === "display") {
10431
+ // Get display style as a default.
10432
+ // If incoming style is sub/sup, use style.text() to get correct size.
10433
+ style = style.id >= src_Style.SCRIPT.id ? style.text() : src_Style.DISPLAY;
10434
+ } else if (size === "text" && style.size === src_Style.DISPLAY.size) {
10301
10435
  // We're in a \tfrac but incoming style is displaystyle, so:
10302
10436
  style = src_Style.TEXT;
10303
- } else if (group.size === "script") {
10437
+ } else if (size === "script") {
10304
10438
  style = src_Style.SCRIPT;
10305
- } else if (group.size === "scriptscript") {
10439
+ } else if (size === "scriptscript") {
10306
10440
  style = src_Style.SCRIPTSCRIPT;
10307
10441
  }
10308
10442
 
10443
+ return style;
10444
+ };
10445
+
10446
+ var genfrac_htmlBuilder = function htmlBuilder(group, options) {
10447
+ // Fractions are handled in the TeXbook on pages 444-445, rules 15(a-e).
10448
+ var style = genfrac_adjustStyle(group.size, options.style);
10309
10449
  var nstyle = style.fracNum();
10310
10450
  var dstyle = style.fracDen();
10311
10451
  var newOptions;
@@ -10348,7 +10488,7 @@ var genfrac_htmlBuilder = function htmlBuilder(group, options) {
10348
10488
  var clearance;
10349
10489
  var denomShift;
10350
10490
 
10351
- if (style.size === src_Style.DISPLAY.size) {
10491
+ if (style.size === src_Style.DISPLAY.size || group.size === "display") {
10352
10492
  numShift = options.fontMetrics().num1;
10353
10493
 
10354
10494
  if (ruleWidth > 0) {
@@ -10468,11 +10608,20 @@ var genfrac_mathmlBuilder = function mathmlBuilder(group, options) {
10468
10608
  node.setAttribute("linethickness", ruleWidth + "em");
10469
10609
  }
10470
10610
 
10611
+ var style = genfrac_adjustStyle(group.size, options.style);
10612
+
10613
+ if (style.size !== options.style.size) {
10614
+ node = new mathMLTree.MathNode("mstyle", [node]);
10615
+ var isDisplay = style.size === src_Style.DISPLAY.size ? "true" : "false";
10616
+ node.setAttribute("displaystyle", isDisplay);
10617
+ node.setAttribute("scriptlevel", "0");
10618
+ }
10619
+
10471
10620
  if (group.leftDelim != null || group.rightDelim != null) {
10472
10621
  var withDelims = [];
10473
10622
 
10474
10623
  if (group.leftDelim != null) {
10475
- var leftOp = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode(group.leftDelim)]);
10624
+ var leftOp = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode(group.leftDelim.replace("\\", ""))]);
10476
10625
  leftOp.setAttribute("fence", "true");
10477
10626
  withDelims.push(leftOp);
10478
10627
  }
@@ -10480,7 +10629,7 @@ var genfrac_mathmlBuilder = function mathmlBuilder(group, options) {
10480
10629
  withDelims.push(node);
10481
10630
 
10482
10631
  if (group.rightDelim != null) {
10483
- var rightOp = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode(group.rightDelim)]);
10632
+ var rightOp = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode(group.rightDelim.replace("\\", ""))]);
10484
10633
  rightOp.setAttribute("fence", "true");
10485
10634
  withDelims.push(rightOp);
10486
10635
  }
@@ -11249,7 +11398,10 @@ defineFunction({
11249
11398
 
11250
11399
 
11251
11400
 
11252
- // NOTE: Unlike most `htmlBuilder`s, this one handles not only "op", but also
11401
+ // Most operators have a large successor symbol, but these don't.
11402
+ var noSuccessor = ["\\smallint"]; // NOTE: Unlike most `htmlBuilder`s, this one handles not only "op", but also
11403
+ // "supsub" since some of them (like \int) can affect super/subscripting.
11404
+
11253
11405
  var op_htmlBuilder = function htmlBuilder(grp, options) {
11254
11406
  // Operators are handled in the TeXbook pg. 443-444, rule 13(a).
11255
11407
  var supGroup;
@@ -11270,9 +11422,7 @@ var op_htmlBuilder = function htmlBuilder(grp, options) {
11270
11422
  group = assertNodeType(grp, "op");
11271
11423
  }
11272
11424
 
11273
- var style = options.style; // Most operators have a large successor symbol, but these don't.
11274
-
11275
- var noSuccessor = ["\\smallint"];
11425
+ var style = options.style;
11276
11426
  var large = false;
11277
11427
 
11278
11428
  if (style.size === src_Style.DISPLAY.size && group.symbol && !utils.contains(noSuccessor, group.name)) {
@@ -11484,11 +11634,15 @@ var op_htmlBuilder = function htmlBuilder(grp, options) {
11484
11634
  };
11485
11635
 
11486
11636
  var op_mathmlBuilder = function mathmlBuilder(group, options) {
11487
- var node; // TODO(emily): handle big operators using the `largeop` attribute
11637
+ var node;
11488
11638
 
11489
11639
  if (group.symbol) {
11490
11640
  // This is a symbol. Just add the symbol.
11491
11641
  node = new mathMLTree_MathNode("mo", [buildMathML_makeText(group.name, group.mode)]);
11642
+
11643
+ if (utils.contains(noSuccessor, group.name)) {
11644
+ node.setAttribute("largeop", "false");
11645
+ }
11492
11646
  } else if (group.body) {
11493
11647
  // This is an operator with children. Add them.
11494
11648
  node = new mathMLTree_MathNode("mo", buildMathML_buildExpression(group.body, options));
@@ -11501,7 +11655,12 @@ var op_mathmlBuilder = function mathmlBuilder(group, options) {
11501
11655
  // ref: https://www.w3.org/TR/REC-MathML/chap3_2.html#sec3.2.4
11502
11656
 
11503
11657
  var operator = new mathMLTree_MathNode("mo", [buildMathML_makeText("\u2061", "text")]);
11504
- return newDocumentFragment([node, operator]);
11658
+
11659
+ if (group.parentIsSupSub) {
11660
+ node = new mathMLTree_MathNode("mo", [node, operator]);
11661
+ } else {
11662
+ node = newDocumentFragment([node, operator]);
11663
+ }
11505
11664
  }
11506
11665
 
11507
11666
  return node;
@@ -11540,6 +11699,7 @@ defineFunction({
11540
11699
  type: "op",
11541
11700
  mode: parser.mode,
11542
11701
  limits: true,
11702
+ parentIsSupSub: false,
11543
11703
  symbol: true,
11544
11704
  name: fName
11545
11705
  };
@@ -11562,6 +11722,7 @@ defineFunction({
11562
11722
  type: "op",
11563
11723
  mode: parser.mode,
11564
11724
  limits: false,
11725
+ parentIsSupSub: false,
11565
11726
  symbol: false,
11566
11727
  body: defineFunction_ordargument(body)
11567
11728
  };
@@ -11594,6 +11755,7 @@ defineFunction({
11594
11755
  type: "op",
11595
11756
  mode: parser.mode,
11596
11757
  limits: false,
11758
+ parentIsSupSub: false,
11597
11759
  symbol: false,
11598
11760
  name: funcName
11599
11761
  };
@@ -11615,6 +11777,7 @@ defineFunction({
11615
11777
  type: "op",
11616
11778
  mode: parser.mode,
11617
11779
  limits: true,
11780
+ parentIsSupSub: false,
11618
11781
  symbol: false,
11619
11782
  name: funcName
11620
11783
  };
@@ -11642,6 +11805,7 @@ defineFunction({
11642
11805
  type: "op",
11643
11806
  mode: parser.mode,
11644
11807
  limits: false,
11808
+ parentIsSupSub: false,
11645
11809
  symbol: true,
11646
11810
  name: fName
11647
11811
  };
@@ -11910,8 +12074,10 @@ defineFunction({
11910
12074
  },
11911
12075
  mathmlBuilder: function mathmlBuilder(group, options) {
11912
12076
  var inner = buildMathML_buildExpression(defineFunction_ordargument(group.body), options);
11913
- var node = new mathMLTree.MathNode("mphantom", inner);
12077
+ var phantom = new mathMLTree.MathNode("mphantom", inner);
12078
+ var node = new mathMLTree.MathNode("mpadded", [phantom]);
11914
12079
  node.setAttribute("height", "0px");
12080
+ node.setAttribute("depth", "0px");
11915
12081
  return node;
11916
12082
  }
11917
12083
  });
@@ -11938,7 +12104,8 @@ defineFunction({
11938
12104
  },
11939
12105
  mathmlBuilder: function mathmlBuilder(group, options) {
11940
12106
  var inner = buildMathML_buildExpression(defineFunction_ordargument(group.body), options);
11941
- var node = new mathMLTree.MathNode("mphantom", inner);
12107
+ var phantom = new mathMLTree.MathNode("mphantom", inner);
12108
+ var node = new mathMLTree.MathNode("mpadded", [phantom]);
11942
12109
  node.setAttribute("width", "0px");
11943
12110
  return node;
11944
12111
  }
@@ -12106,14 +12273,9 @@ defineFunction({
12106
12273
  // Make an empty span for the rule
12107
12274
  var rule = buildCommon.makeSpan(["mord", "rule"], [], options); // Calculate the shift, width, and height of the rule, and account for units
12108
12275
 
12109
- var shift = 0;
12110
-
12111
- if (group.shift) {
12112
- shift = units_calculateSize(group.shift, options);
12113
- }
12114
-
12115
12276
  var width = units_calculateSize(group.width, options);
12116
- var height = units_calculateSize(group.height, options); // Style the rule to the right size
12277
+ var height = units_calculateSize(group.height, options);
12278
+ var shift = group.shift ? units_calculateSize(group.shift, options) : 0; // Style the rule to the right size
12117
12279
 
12118
12280
  rule.style.borderRightWidth = width + "em";
12119
12281
  rule.style.borderTopWidth = height + "em";
@@ -12129,10 +12291,25 @@ defineFunction({
12129
12291
  return rule;
12130
12292
  },
12131
12293
  mathmlBuilder: function mathmlBuilder(group, options) {
12132
- // TODO(emily): Figure out if there's an actual way to draw black boxes
12133
- // in MathML.
12134
- var node = new mathMLTree.MathNode("mrow");
12135
- return node;
12294
+ var width = units_calculateSize(group.width, options);
12295
+ var height = units_calculateSize(group.height, options);
12296
+ var shift = group.shift ? units_calculateSize(group.shift, options) : 0;
12297
+ var color = options.color && options.getColor() || "black";
12298
+ var rule = new mathMLTree.MathNode("mspace");
12299
+ rule.setAttribute("mathbackground", color);
12300
+ rule.setAttribute("width", width + "em");
12301
+ rule.setAttribute("height", height + "em");
12302
+ var wrapper = new mathMLTree.MathNode("mpadded", [rule]);
12303
+
12304
+ if (shift >= 0) {
12305
+ wrapper.setAttribute("height", "+" + shift + "em");
12306
+ } else {
12307
+ wrapper.setAttribute("height", shift + "em");
12308
+ wrapper.setAttribute("depth", "+" + -shift + "em");
12309
+ }
12310
+
12311
+ wrapper.setAttribute("voffset", shift + "em");
12312
+ return wrapper;
12136
12313
  }
12137
12314
  });
12138
12315
  // CONCATENATED MODULE: ./src/functions/smash.js
@@ -12635,6 +12812,10 @@ defineFunctionBuilders({
12635
12812
  }
12636
12813
  }
12637
12814
 
12815
+ if (group.base && group.base.type === "op") {
12816
+ group.base.parentIsSupSub = true;
12817
+ }
12818
+
12638
12819
  var children = [buildMathML_buildGroup(group.base, options)];
12639
12820
 
12640
12821
  if (group.sub) {
@@ -12652,7 +12833,7 @@ defineFunctionBuilders({
12652
12833
  } else if (!group.sub) {
12653
12834
  var base = group.base;
12654
12835
 
12655
- if (base && base.type === "op" && base.limits && options.style === src_Style.DISPLAY) {
12836
+ if (base && base.type === "op" && base.limits && (options.style === src_Style.DISPLAY || base.alwaysHandleSupSub)) {
12656
12837
  nodeType = "mover";
12657
12838
  } else {
12658
12839
  nodeType = "msup";
@@ -12660,7 +12841,7 @@ defineFunctionBuilders({
12660
12841
  } else if (!group.sup) {
12661
12842
  var _base = group.base;
12662
12843
 
12663
- if (_base && _base.type === "op" && _base.limits && options.style === src_Style.DISPLAY) {
12844
+ if (_base && _base.type === "op" && _base.limits && (options.style === src_Style.DISPLAY || _base.alwaysHandleSupSub)) {
12664
12845
  nodeType = "munder";
12665
12846
  } else {
12666
12847
  nodeType = "msub";
@@ -12701,6 +12882,10 @@ defineFunctionBuilders({
12701
12882
  }
12702
12883
  } else if (group.family === "punct") {
12703
12884
  node.setAttribute("separator", "true");
12885
+ } else if (group.family === "open" || group.family === "close") {
12886
+ // Delims built here should not stretch vertically.
12887
+ // See delimsizing.js for stretchy delims.
12888
+ node.setAttribute("stretchy", "false");
12704
12889
  }
12705
12890
 
12706
12891
  return node;
@@ -12831,12 +13016,25 @@ defineFunctionBuilders({
12831
13016
 
12832
13017
 
12833
13018
 
13019
+
13020
+ var tag_pad = function pad() {
13021
+ var padNode = new mathMLTree.MathNode("mtd", []);
13022
+ padNode.setAttribute("width", "50%");
13023
+ return padNode;
13024
+ };
13025
+
12834
13026
  defineFunctionBuilders({
12835
13027
  type: "tag",
12836
13028
  mathmlBuilder: function mathmlBuilder(group, options) {
12837
- var table = new mathMLTree.MathNode("mtable", [new mathMLTree.MathNode("mlabeledtr", [new mathMLTree.MathNode("mtd", [buildExpressionRow(group.tag, options)]), new mathMLTree.MathNode("mtd", [buildExpressionRow(group.body, options)])])]);
12838
- table.setAttribute("side", "right");
12839
- return table;
13029
+ var table = new mathMLTree.MathNode("mtable", [new mathMLTree.MathNode("mtr", [tag_pad(), new mathMLTree.MathNode("mtd", [buildExpressionRow(group.body, options)]), tag_pad(), new mathMLTree.MathNode("mtd", [buildExpressionRow(group.tag, options)])])]);
13030
+ table.setAttribute("width", "100%");
13031
+ return table; // TODO: Left-aligned tags.
13032
+ // Currently, the group and options passed here do not contain
13033
+ // enough info to set tag alignment. `leqno` is in Settings but it is
13034
+ // not passed to Options. On the HTML side, leqno is
13035
+ // set by a CSS class applied in buildTree.js. That would have worked
13036
+ // in MathML if browsers supported <mlabeledtr>. Since they don't, we
13037
+ // need to rewrite the way this function is called.
12840
13038
  }
12841
13039
  });
12842
13040
  // CONCATENATED MODULE: ./src/functions/text.js
@@ -12853,10 +13051,12 @@ var textFontFamilies = {
12853
13051
  "\\textnormal": "textrm"
12854
13052
  };
12855
13053
  var textFontWeights = {
12856
- "\\textbf": "textbf"
13054
+ "\\textbf": "textbf",
13055
+ "\\textmd": "textmd"
12857
13056
  };
12858
13057
  var textFontShapes = {
12859
- "\\textit": "textit"
13058
+ "\\textit": "textit",
13059
+ "\\textup": "textup"
12860
13060
  };
12861
13061
 
12862
13062
  var optionsWithFont = function optionsWithFont(group, options) {
@@ -12877,8 +13077,8 @@ defineFunction({
12877
13077
  type: "text",
12878
13078
  names: [// Font families
12879
13079
  "\\text", "\\textrm", "\\textsf", "\\texttt", "\\textnormal", // Font weights
12880
- "\\textbf", // Font Shapes
12881
- "\\textit"],
13080
+ "\\textbf", "\\textmd", // Font Shapes
13081
+ "\\textit", "\\textup"],
12882
13082
  props: {
12883
13083
  numArgs: 1,
12884
13084
  argTypes: ["text"],
@@ -13036,6 +13236,8 @@ var functions = _functions;
13036
13236
 
13037
13237
 
13038
13238
 
13239
+ // Disabled until https://github.com/KaTeX/KaTeX/pull/1794 is merged.
13240
+ // import "./functions/includegraphics";
13039
13241
 
13040
13242
 
13041
13243
 
@@ -13640,7 +13842,9 @@ defineMacro("\u211B", "\\mathscr{R}");
13640
13842
  defineMacro("\u212D", "\\mathfrak{C}"); // Fraktur
13641
13843
 
13642
13844
  defineMacro("\u210C", "\\mathfrak{H}");
13643
- defineMacro("\u2128", "\\mathfrak{Z}"); // Unicode middle dot
13845
+ defineMacro("\u2128", "\\mathfrak{Z}"); // Define \Bbbk with a macro that works in both HTML and MathML.
13846
+
13847
+ defineMacro("\\Bbbk", "\\Bbb{k}"); // Unicode middle dot
13644
13848
  // The KaTeX fonts do not contain U+00B7. Instead, \cdotp displays
13645
13849
  // the dot at U+22C5 and gives it punct spacing.
13646
13850
 
@@ -13652,8 +13856,9 @@ defineMacro("\\clap", "\\mathclap{\\textrm{#1}}"); // \not is defined by base/fo
13652
13856
  // \DeclareMathSymbol{\not}{\mathrel}{symbols}{"36}
13653
13857
  // It's thus treated like a \mathrel, but defined by a symbol that has zero
13654
13858
  // width but extends to the right. We use \rlap to get that spacing.
13859
+ // For MathML we write U+0338 here. buildMathML.js will then do the overlay.
13655
13860
 
13656
- defineMacro("\\not", '\\mathrel{\\mathrlap\\@not}'); // Negated symbols from base/fontmath.ltx:
13861
+ defineMacro("\\not", '\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'); // Negated symbols from base/fontmath.ltx:
13657
13862
  // \def\neq{\not=} \let\ne=\neq
13658
13863
  // \DeclareRobustCommand
13659
13864
  // \notin{\mathrel{\m@th\mathpalette\c@ncel\in}}
@@ -13969,31 +14174,37 @@ defineMacro("\\ordinarycolon", ":"); //\def\vcentcolon{\mathrel{\mathop\ordinary
13969
14174
 
13970
14175
  defineMacro("\\vcentcolon", "\\mathrel{\\mathop\\ordinarycolon}"); // \providecommand*\dblcolon{\vcentcolon\mathrel{\mkern-.9mu}\vcentcolon}
13971
14176
 
13972
- defineMacro("\\dblcolon", "\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}"); // \providecommand*\coloneqq{\vcentcolon\mathrel{\mkern-1.2mu}=}
14177
+ defineMacro("\\dblcolon", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}" + "{\\mathop{\\char\"2237}}"); // \providecommand*\coloneqq{\vcentcolon\mathrel{\mkern-1.2mu}=}
14178
+
14179
+ defineMacro("\\coloneqq", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}" + "{\\mathop{\\char\"2254}}"); // ≔
14180
+ // \providecommand*\Coloneqq{\dblcolon\mathrel{\mkern-1.2mu}=}
14181
+
14182
+ defineMacro("\\Coloneqq", "\\html@mathml{" + "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}" + "{\\mathop{\\char\"2237\\char\"3d}}"); // \providecommand*\coloneq{\vcentcolon\mathrel{\mkern-1.2mu}\mathrel{-}}
13973
14183
 
13974
- defineMacro("\\coloneqq", "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}"); // \providecommand*\Coloneqq{\dblcolon\mathrel{\mkern-1.2mu}=}
14184
+ defineMacro("\\coloneq", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}" + "{\\mathop{\\char\"3a\\char\"2212}}"); // \providecommand*\Coloneq{\dblcolon\mathrel{\mkern-1.2mu}\mathrel{-}}
13975
14185
 
13976
- defineMacro("\\Coloneqq", "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}"); // \providecommand*\coloneq{\vcentcolon\mathrel{\mkern-1.2mu}\mathrel{-}}
14186
+ defineMacro("\\Coloneq", "\\html@mathml{" + "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}" + "{\\mathop{\\char\"2237\\char\"2212}}"); // \providecommand*\eqqcolon{=\mathrel{\mkern-1.2mu}\vcentcolon}
13977
14187
 
13978
- defineMacro("\\coloneq", "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}"); // \providecommand*\Coloneq{\dblcolon\mathrel{\mkern-1.2mu}\mathrel{-}}
14188
+ defineMacro("\\eqqcolon", "\\html@mathml{" + "\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}" + "{\\mathop{\\char\"2255}}"); // ≕
14189
+ // \providecommand*\Eqqcolon{=\mathrel{\mkern-1.2mu}\dblcolon}
13979
14190
 
13980
- defineMacro("\\Coloneq", "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}"); // \providecommand*\eqqcolon{=\mathrel{\mkern-1.2mu}\vcentcolon}
14191
+ defineMacro("\\Eqqcolon", "\\html@mathml{" + "\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}" + "{\\mathop{\\char\"3d\\char\"2237}}"); // \providecommand*\eqcolon{\mathrel{-}\mathrel{\mkern-1.2mu}\vcentcolon}
13981
14192
 
13982
- defineMacro("\\eqqcolon", "\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}"); // \providecommand*\Eqqcolon{=\mathrel{\mkern-1.2mu}\dblcolon}
14193
+ defineMacro("\\eqcolon", "\\html@mathml{" + "\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}" + "{\\mathop{\\char\"2239}}"); // \providecommand*\Eqcolon{\mathrel{-}\mathrel{\mkern-1.2mu}\dblcolon}
13983
14194
 
13984
- defineMacro("\\Eqqcolon", "\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}"); // \providecommand*\eqcolon{\mathrel{-}\mathrel{\mkern-1.2mu}\vcentcolon}
14195
+ defineMacro("\\Eqcolon", "\\html@mathml{" + "\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}" + "{\\mathop{\\char\"2212\\char\"2237}}"); // \providecommand*\colonapprox{\vcentcolon\mathrel{\mkern-1.2mu}\approx}
13985
14196
 
13986
- defineMacro("\\eqcolon", "\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}"); // \providecommand*\Eqcolon{\mathrel{-}\mathrel{\mkern-1.2mu}\dblcolon}
14197
+ defineMacro("\\colonapprox", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}" + "{\\mathop{\\char\"3a\\char\"2248}}"); // \providecommand*\Colonapprox{\dblcolon\mathrel{\mkern-1.2mu}\approx}
13987
14198
 
13988
- defineMacro("\\Eqcolon", "\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}"); // \providecommand*\colonapprox{\vcentcolon\mathrel{\mkern-1.2mu}\approx}
14199
+ defineMacro("\\Colonapprox", "\\html@mathml{" + "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}" + "{\\mathop{\\char\"2237\\char\"2248}}"); // \providecommand*\colonsim{\vcentcolon\mathrel{\mkern-1.2mu}\sim}
13989
14200
 
13990
- defineMacro("\\colonapprox", "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}"); // \providecommand*\Colonapprox{\dblcolon\mathrel{\mkern-1.2mu}\approx}
14201
+ defineMacro("\\colonsim", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}" + "{\\mathop{\\char\"3a\\char\"223c}}"); // \providecommand*\Colonsim{\dblcolon\mathrel{\mkern-1.2mu}\sim}
13991
14202
 
13992
- defineMacro("\\Colonapprox", "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}"); // \providecommand*\colonsim{\vcentcolon\mathrel{\mkern-1.2mu}\sim}
14203
+ defineMacro("\\Colonsim", "\\html@mathml{" + "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}" + "{\\mathop{\\char\"2237\\char\"223c}}"); // Some Unicode characters are implemented with macros to mathtools functions.
13993
14204
 
13994
- defineMacro("\\colonsim", "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}"); // \providecommand*\Colonsim{\dblcolon\mathrel{\mkern-1.2mu}\sim}
14205
+ defineMacro("\u2237", "\\dblcolon"); // ::
13995
14206
 
13996
- defineMacro("\\Colonsim", "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}"); // Some Unicode characters are implemented with macros to mathtools functions.
14207
+ defineMacro("\u2239", "\\eqcolon"); // -:
13997
14208
 
13998
14209
  defineMacro("\u2254", "\\coloneqq"); // :=
13999
14210
 
@@ -14027,13 +14238,37 @@ defineMacro("\\approxcoloncolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\d
14027
14238
  defineMacro("\\notni", "\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");
14028
14239
  defineMacro("\\limsup", "\\DOTSB\\mathop{\\operatorname{lim\\,sup}}\\limits");
14029
14240
  defineMacro("\\liminf", "\\DOTSB\\mathop{\\operatorname{lim\\,inf}}\\limits"); //////////////////////////////////////////////////////////////////////
14030
- // semantic
14031
- // The semantic package renders the next two items by calling a glyph from the
14032
- // bbold package. Those glyphs do not exist in the KaTeX fonts. Hence the macros.
14033
-
14034
- defineMacro("\u27E6", "\\mathopen{[\\mkern-3.2mu[}"); // blackboard bold [
14035
-
14036
- defineMacro("\u27E7", "\\mathclose{]\\mkern-3.2mu]}"); // blackboard bold ]
14241
+ // MathML alternates for KaTeX glyphs in the Unicode private area
14242
+
14243
+ defineMacro("\\gvertneqq", "\\html@mathml{\\@gvertneqq}{\u2269}");
14244
+ defineMacro("\\lvertneqq", "\\html@mathml{\\@lvertneqq}{\u2268}");
14245
+ defineMacro("\\ngeqq", "\\html@mathml{\\@ngeqq}{\u2271}");
14246
+ defineMacro("\\ngeqslant", "\\html@mathml{\\@ngeqslant}{\u2271}");
14247
+ defineMacro("\\nleqq", "\\html@mathml{\\@nleqq}{\u2270}");
14248
+ defineMacro("\\nleqslant", "\\html@mathml{\\@nleqslant}{\u2270}");
14249
+ defineMacro("\\nshortmid", "\\html@mathml{\\@nshortmid}{∤}");
14250
+ defineMacro("\\nshortparallel", "\\html@mathml{\\@nshortparallel}{∦}");
14251
+ defineMacro("\\nsubseteqq", "\\html@mathml{\\@nsubseteqq}{\u2288}");
14252
+ defineMacro("\\nsupseteqq", "\\html@mathml{\\@nsupseteqq}{\u2289}");
14253
+ defineMacro("\\varsubsetneq", "\\html@mathml{\\@varsubsetneq}{⊊}");
14254
+ defineMacro("\\varsubsetneqq", "\\html@mathml{\\@varsubsetneqq}{⫋}");
14255
+ defineMacro("\\varsupsetneq", "\\html@mathml{\\@varsupsetneq}{⊋}");
14256
+ defineMacro("\\varsupsetneqq", "\\html@mathml{\\@varsupsetneqq}{⫌}"); //////////////////////////////////////////////////////////////////////
14257
+ // stmaryrd and semantic
14258
+ // The stmaryrd and semantic packages render the next four items by calling a
14259
+ // glyph. Those glyphs do not exist in the KaTeX fonts. Hence the macros.
14260
+
14261
+ defineMacro("\\llbracket", "\\html@mathml{" + "\\mathopen{[\\mkern-3.2mu[}}" + "{\\mathopen{\\char`\u27E6}}");
14262
+ defineMacro("\\rrbracket", "\\html@mathml{" + "\\mathclose{]\\mkern-3.2mu]}}" + "{\\mathclose{\\char`\u27E7}}");
14263
+ defineMacro("\u27E6", "\\llbracket"); // blackboard bold [
14264
+
14265
+ defineMacro("\u27E7", "\\rrbracket"); // blackboard bold ]
14266
+
14267
+ defineMacro("\\lBrace", "\\html@mathml{" + "\\mathopen{\\{\\mkern-3.2mu[}}" + "{\\mathopen{\\char`\u2983}}");
14268
+ defineMacro("\\rBrace", "\\html@mathml{" + "\\mathclose{]\\mkern-3.2mu\\}}}" + "{\\mathclose{\\char`\u2984}}");
14269
+ defineMacro("\u2983", "\\lBrace"); // blackboard bold {
14270
+
14271
+ defineMacro("\u2984", "\\rBrace"); // blackboard bold }
14037
14272
  // TODO: Create variable sized versions of the last two items. I believe that
14038
14273
  // will require new font glyphs.
14039
14274
  //////////////////////////////////////////////////////////////////////
@@ -14095,7 +14330,7 @@ defineMacro("\\Rarr", "\\Rightarrow");
14095
14330
  defineMacro("\\real", "\\Re");
14096
14331
  defineMacro("\\reals", "\\mathbb{R}");
14097
14332
  defineMacro("\\Reals", "\\mathbb{R}");
14098
- defineMacro("\\Rho", "\\mathrm{R}");
14333
+ defineMacro("\\Rho", "\\mathrm{P}");
14099
14334
  defineMacro("\\sdot", "\\cdot");
14100
14335
  defineMacro("\\sect", "\\S");
14101
14336
  defineMacro("\\spades", "\\spadesuit");
@@ -14111,7 +14346,64 @@ defineMacro("\\Zeta", "\\mathrm{Z}"); //////////////////////////////////////////
14111
14346
  // https://ctan.math.illinois.edu/macros/latex/contrib/statmath/statmath.pdf
14112
14347
 
14113
14348
  defineMacro("\\argmin", "\\DOTSB\\mathop{\\operatorname{arg\\,min}}\\limits");
14114
- defineMacro("\\argmax", "\\DOTSB\\mathop{\\operatorname{arg\\,max}}\\limits");
14349
+ defineMacro("\\argmax", "\\DOTSB\\mathop{\\operatorname{arg\\,max}}\\limits"); // Custom Khan Academy colors, should be moved to an optional package
14350
+
14351
+ defineMacro("\\blue", "\\textcolor{##6495ed}{#1}");
14352
+ defineMacro("\\orange", "\\textcolor{##ffa500}{#1}");
14353
+ defineMacro("\\pink", "\\textcolor{##ff00af}{#1}");
14354
+ defineMacro("\\red", "\\textcolor{##df0030}{#1}");
14355
+ defineMacro("\\green", "\\textcolor{##28ae7b}{#1}");
14356
+ defineMacro("\\gray", "\\textcolor{gray}{##1}");
14357
+ defineMacro("\\purple", "\\textcolor{##9d38bd}{#1}");
14358
+ defineMacro("\\blueA", "\\textcolor{##ccfaff}{#1}");
14359
+ defineMacro("\\blueB", "\\textcolor{##80f6ff}{#1}");
14360
+ defineMacro("\\blueC", "\\textcolor{##63d9ea}{#1}");
14361
+ defineMacro("\\blueD", "\\textcolor{##11accd}{#1}");
14362
+ defineMacro("\\blueE", "\\textcolor{##0c7f99}{#1}");
14363
+ defineMacro("\\tealA", "\\textcolor{##94fff5}{#1}");
14364
+ defineMacro("\\tealB", "\\textcolor{##26edd5}{#1}");
14365
+ defineMacro("\\tealC", "\\textcolor{##01d1c1}{#1}");
14366
+ defineMacro("\\tealD", "\\textcolor{##01a995}{#1}");
14367
+ defineMacro("\\tealE", "\\textcolor{##208170}{#1}");
14368
+ defineMacro("\\greenA", "\\textcolor{##b6ffb0}{#1}");
14369
+ defineMacro("\\greenB", "\\textcolor{##8af281}{#1}");
14370
+ defineMacro("\\greenC", "\\textcolor{##74cf70}{#1}");
14371
+ defineMacro("\\greenD", "\\textcolor{##1fab54}{#1}");
14372
+ defineMacro("\\greenE", "\\textcolor{##0d923f}{#1}");
14373
+ defineMacro("\\goldA", "\\textcolor{##ffd0a9}{#1}");
14374
+ defineMacro("\\goldB", "\\textcolor{##ffbb71}{#1}");
14375
+ defineMacro("\\goldC", "\\textcolor{##ff9c39}{#1}");
14376
+ defineMacro("\\goldD", "\\textcolor{##e07d10}{#1}");
14377
+ defineMacro("\\goldE", "\\textcolor{##a75a05}{#1}");
14378
+ defineMacro("\\redA", "\\textcolor{##fca9a9}{#1}");
14379
+ defineMacro("\\redB", "\\textcolor{##ff8482}{#1}");
14380
+ defineMacro("\\redC", "\\textcolor{##f9685d}{#1}");
14381
+ defineMacro("\\redD", "\\textcolor{##e84d39}{#1}");
14382
+ defineMacro("\\redE", "\\textcolor{##bc2612}{#1}");
14383
+ defineMacro("\\maroonA", "\\textcolor{##ffbde0}{#1}");
14384
+ defineMacro("\\maroonB", "\\textcolor{##ff92c6}{#1}");
14385
+ defineMacro("\\maroonC", "\\textcolor{##ed5fa6}{#1}");
14386
+ defineMacro("\\maroonD", "\\textcolor{##ca337c}{#1}");
14387
+ defineMacro("\\maroonE", "\\textcolor{##9e034e}{#1}");
14388
+ defineMacro("\\purpleA", "\\textcolor{##ddd7ff}{#1}");
14389
+ defineMacro("\\purpleB", "\\textcolor{##c6b9fc}{#1}");
14390
+ defineMacro("\\purpleC", "\\textcolor{##aa87ff}{#1}");
14391
+ defineMacro("\\purpleD", "\\textcolor{##7854ab}{#1}");
14392
+ defineMacro("\\purpleE", "\\textcolor{##543b78}{#1}");
14393
+ defineMacro("\\mintA", "\\textcolor{##f5f9e8}{#1}");
14394
+ defineMacro("\\mintB", "\\textcolor{##edf2df}{#1}");
14395
+ defineMacro("\\mintC", "\\textcolor{##e0e5cc}{#1}");
14396
+ defineMacro("\\grayA", "\\textcolor{##f6f7f7}{#1}");
14397
+ defineMacro("\\grayB", "\\textcolor{##f0f1f2}{#1}");
14398
+ defineMacro("\\grayC", "\\textcolor{##e3e5e6}{#1}");
14399
+ defineMacro("\\grayD", "\\textcolor{##d6d8da}{#1}");
14400
+ defineMacro("\\grayE", "\\textcolor{##babec2}{#1}");
14401
+ defineMacro("\\grayF", "\\textcolor{##888d93}{#1}");
14402
+ defineMacro("\\grayG", "\\textcolor{##626569}{#1}");
14403
+ defineMacro("\\grayH", "\\textcolor{##3b3e40}{#1}");
14404
+ defineMacro("\\grayI", "\\textcolor{##21242c}{#1}");
14405
+ defineMacro("\\kaBlue", "\\textcolor{##314453}{#1}");
14406
+ defineMacro("\\kaGreen", "\\textcolor{##71B307}{#1}");
14115
14407
  // CONCATENATED MODULE: ./src/MacroExpander.js
14116
14408
  /**
14117
14409
  * This file contains the “gullet” where macros are expanded
@@ -16418,7 +16710,7 @@ var katex_renderToHTMLTree = function renderToHTMLTree(expression, options) {
16418
16710
  /**
16419
16711
  * Current KaTeX version
16420
16712
  */
16421
- version: "0.10.1",
16713
+ version: "0.10.2",
16422
16714
 
16423
16715
  /**
16424
16716
  * Renders the given LaTeX into an HTML+MathML combination, and adds