Skip to content

Commit 62b1eca

Browse files
committed
removed unicode keywords, added tests
1 parent 8df20ab commit 62b1eca

File tree

5 files changed

+5
-13
lines changed

5 files changed

+5
-13
lines changed

M2/Macaulay2/d/binding.d

+1-8
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,8 @@ bumpPrecedence();
285285
export MinusS := makeKeyword(unarybinaryleft("-")); -- also binary
286286
export PlusS := makeKeyword(unarybinaryleft("+")); -- also binary
287287
export PlusPlusS := makeKeyword(binaryleft("++"));
288-
bumpPrecedence();
289-
export InterpunctS := makeKeyword(binaryleft("·"));
290288
bumpPrecedence();
291289
export StarStarS := makeKeyword(binaryleft("**"));
292-
export BoxTimesS := makeKeyword(binaryleft("⊠"));
293-
export ShuffleProductS := makeKeyword(binaryleft("⧢"));
294290
bumpPrecedence();
295291
precBracket := prec;
296292
export leftbracket := parens("[","]",precBracket, precRightParen, precRightParen);
@@ -515,10 +511,7 @@ export opsWithBinaryMethod := array(SymbolClosure)(
515511
PowerGreaterEqualS, UnderscoreGreaterEqualS,
516512
PowerLessS, UnderscoreLessS,
517513
PowerLessEqualS, UnderscoreLessEqualS,
518-
PowerStarStarS,
519-
InterpunctS,
520-
BoxTimesS,
521-
ShuffleProductS
514+
PowerStarStarS
522515
);
523516
export opsWithUnaryMethod := array(SymbolClosure)(
524517
StarS, MinusS, PlusS, LessLessS, QuestionQuestionS,

M2/Macaulay2/m2/exports.m2

-3
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ export {
5757
"_>=",
5858
"_<",
5959
"_<=",
60-
"·",
61-
"",
62-
"",
6360
"Acknowledgement",
6461
"AdditionalPaths",
6562
"Adjacent",

M2/Macaulay2/m2/latex.m2

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ keywordTexMath = applyKeys(hashTable { -- both unary and binary keywords
127127
symbol ^** => "{}^{\\otimes}", -- temporary solution to KaTeX issue https://github.com/KaTeX/KaTeX/issues/3576
128128
symbol _* => "{}_*", -- temporary solution to KaTeX issue https://github.com/KaTeX/KaTeX/issues/3576
129129
symbol ^* => "{}^*", -- temporary solution to KaTeX issue https://github.com/KaTeX/KaTeX/issues/3576
130-
symbol · => "\\cdot",
130+
-- symbol · => "\\cdot",
131131
},symbolBody)
132132
133133
bbLetters := set characters "kABCDEFGHIJKLMNOPQRSTUVWXYZ"

M2/Macaulay2/tests/normal/symbols.m2

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ assert (i -> symbol i === symbol i)()
22
assert( (i -> symbol i)() =!= (i -> symbol i)() )
33
assert( symbolBody (i -> symbol i)() =!= symbolBody (i -> symbol i)() )
44
assert( f = i -> symbol i ; symbolBody f() === symbolBody f() )
5-
5+
assert( try getSymbol "" then false else true )
6+
assert( try getSymbol "++" then false else true )

M2/Macaulay2/tests/normal/unicode.m2

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ v = vector {1, 2}
22
w = vector {3, 4}
33
assert(v⊗w == vector {3, 4, 6, 8})
44

5+
makeKeyword("·")
56
Vector·Vector := (v, w) -> ((transpose v#0) * w#0)_(0, 0)
67
assert(v·w == 11)
78

0 commit comments

Comments
 (0)