temml 0.10.16 → 0.10.18

Sign up to get free protection for your applications and to get access to all the features.
package/src/macros.js CHANGED
@@ -191,8 +191,6 @@ defineMacro("\\surd", '\\sqrt{\\vphantom{|}}')
191
191
  // See comment for \oplus in symbols.js.
192
192
  defineMacro("\u2295", "\\oplus")
193
193
 
194
- defineMacro("\\hbox", "\\text{#1}");
195
-
196
194
  // Per TeXbook p.122, "/" gets zero operator spacing.
197
195
  // And MDN recommends using U+2044 instead of / for inline
198
196
  defineMacro("/", "{\u2044}")
@@ -275,6 +273,7 @@ const dotsByToken = {
275
273
  "\\bigodot": "\\dotsb",
276
274
  "\\bigsqcap": "\\dotsb",
277
275
  "\\bigsqcup": "\\dotsb",
276
+ "\\bigtimes": "\\dotsb",
278
277
  "\\And": "\\dotsb",
279
278
  "\\longrightarrow": "\\dotsb",
280
279
  "\\Longrightarrow": "\\dotsb",
@@ -8,7 +8,7 @@
8
8
  * https://mit-license.org/
9
9
  */
10
10
 
11
- export const version = "0.10.16";
11
+ export const version = "0.10.18";
12
12
 
13
13
  export function postProcess(block) {
14
14
  const labelMap = {}
package/src/symbols.js CHANGED
@@ -556,7 +556,7 @@ defineSymbol(math, open, "\u00ac", "\\lnot");
556
556
  defineSymbol(math, textord, "\u22a4", "\\top");
557
557
  defineSymbol(math, textord, "\u22a5", "\\bot");
558
558
  defineSymbol(math, textord, "\u2205", "\\emptyset");
559
- defineSymbol(math, textord, "\u00f8", "\\varnothing");
559
+ defineSymbol(math, textord, "\u2300", "\\varnothing");
560
560
  defineSymbol(math, mathord, "\u03b1", "\\alpha", true);
561
561
  defineSymbol(math, mathord, "\u03b2", "\\beta", true);
562
562
  defineSymbol(math, mathord, "\u03b3", "\\gamma", true);
@@ -617,6 +617,8 @@ defineSymbol(math, bin, "\u2228", "\\vee", true);
617
617
  defineSymbol(math, open, "\u27e6", "\\llbracket", true); // stmaryrd/semantic packages
618
618
  defineSymbol(math, close, "\u27e7", "\\rrbracket", true);
619
619
  defineSymbol(math, open, "\u27e8", "\\langle", true);
620
+ defineSymbol(math, open, "\u27ea", "\\lAngle", true);
621
+ defineSymbol(math, open, "\u2989", "\\llangle", true);
620
622
  defineSymbol(math, open, "|", "\\lvert");
621
623
  defineSymbol(math, open, "\u2016", "\\lVert");
622
624
  defineSymbol(math, textord, "!", "\\oc"); // cmll package
@@ -628,6 +630,8 @@ defineSymbol(math, close, "?", "?");
628
630
  defineSymbol(math, close, "!", "!");
629
631
  defineSymbol(math, close, "‼", "‼");
630
632
  defineSymbol(math, close, "\u27e9", "\\rangle", true);
633
+ defineSymbol(math, close, "\u27eb", "\\rAngle", true);
634
+ defineSymbol(math, close, "\u298a", "\\rrangle", true);
631
635
  defineSymbol(math, close, "|", "\\rvert");
632
636
  defineSymbol(math, close, "\u2016", "\\rVert");
633
637
  defineSymbol(math, open, "\u2983", "\\lBrace", true); // stmaryrd/semantic packages
@@ -709,6 +713,8 @@ defineSymbol(math, close, "]", "\\rbrack", true);
709
713
  defineSymbol(text, textord, "]", "\\rbrack", true);
710
714
  defineSymbol(math, open, "(", "\\lparen", true);
711
715
  defineSymbol(math, close, ")", "\\rparen", true);
716
+ defineSymbol(math, open, "⦇", "\\llparenthesis", true);
717
+ defineSymbol(math, close, "⦈", "\\rrparenthesis", true);
712
718
  defineSymbol(text, textord, "<", "\\textless", true); // in T1 fontenc
713
719
  defineSymbol(text, textord, ">", "\\textgreater", true); // in T1 fontenc
714
720
  defineSymbol(math, open, "\u230a", "\\lfloor", true);
@@ -746,6 +752,7 @@ defineSymbol(math, op, "\u2211", "\\sum");
746
752
  defineSymbol(math, op, "\u2a02", "\\bigotimes");
747
753
  defineSymbol(math, op, "\u2a01", "\\bigoplus");
748
754
  defineSymbol(math, op, "\u2a00", "\\bigodot");
755
+ defineSymbol(math, op, "\u2a09", "\\bigtimes");
749
756
  defineSymbol(math, op, "\u222e", "\\oint");
750
757
  defineSymbol(math, op, "\u222f", "\\oiint");
751
758
  defineSymbol(math, op, "\u2230", "\\oiiint");
@@ -865,6 +872,8 @@ defineSymbol(text, textord, "\u20ac", "\\euro", true);
865
872
  defineSymbol(text, textord, "\u20ac", "\\texteuro");
866
873
  defineSymbol(math, textord, "\u00a9", "\\copyright", true);
867
874
  defineSymbol(text, textord, "\u00a9", "\\textcopyright");
875
+ defineSymbol(math, textord, "\u2300", "\\diameter", true);
876
+ defineSymbol(text, textord, "\u2300", "\\diameter");
868
877
 
869
878
  // Italic Greek
870
879
  defineSymbol(math, textord, "𝛤", "\\varGamma");
@@ -913,8 +922,6 @@ for (let i = 0; i < letters.length; i++) {
913
922
  defineSymbol(math, mathord, ch, ch);
914
923
  defineSymbol(text, textord, ch, ch);
915
924
  }
916
- // Prevent Firefox from using a dotless i.
917
- defineSymbol(text, textord, "i\uFE0E", "i")
918
925
 
919
926
  // Some more letters in Unicode Basic Multilingual Plane.
920
927
  const narrow = "ÇÐÞçþℂℍℕℙℚℝℤℎℏℊℋℌℐℑℒℓ℘ℛℜℬℰℱℳℭℨ";
package/temml.js CHANGED
@@ -25,9 +25,9 @@ import { postProcess, version } from "./src/postProcess";
25
25
  * Parse and build an expression, and place that expression in the DOM node
26
26
  * given.
27
27
  */
28
- let render = function(expression, baseNode, options) {
28
+ let render = function(expression, baseNode, options = {}) {
29
29
  baseNode.textContent = "";
30
- const alreadyInMathElement = baseNode.tagName === "MATH"
30
+ const alreadyInMathElement = baseNode.tagName.toLowerCase() === "math"
31
31
  if (alreadyInMathElement) { options.wrap = "none" }
32
32
  const math = renderToMathMLTree(expression, options)
33
33
  if (alreadyInMathElement) {