Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 81 additions & 1 deletion Sources/SwiftMath/MathRender/MTMathAtomFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public class MTMathAtomFactory {
"omicron" : MTMathAtom(type: .variable, value: "\u{03BF}"),
"pi" : MTMathAtom(type: .variable, value: "\u{03C0}"),
"rho" : MTMathAtom(type: .variable, value: "\u{03C1}"),
"varsigma" : MTMathAtom(type: .variable, value: "\u{03C1}"),
"varsigma" : MTMathAtom(type: .variable, value: "\u{03C2}"),
"sigma" : MTMathAtom(type: .variable, value: "\u{03C3}"),
"tau" : MTMathAtom(type: .variable, value: "\u{03C4}"),
"upsilon" : MTMathAtom(type: .variable, value: "\u{03C5}"),
Expand All @@ -177,6 +177,8 @@ public class MTMathAtomFactory {
"phi" : MTMathAtom(type: .ordinary, value: "\u{0001D719}"),
"varrho" : MTMathAtom(type: .ordinary, value: "\u{0001D71A}"),
"varpi" : MTMathAtom(type: .ordinary, value: "\u{0001D71B}"),
"varkappa" : MTMathAtom(type: .ordinary, value: "\u{03F0}"),
// Note: digamma (U+03DD) and Digamma (U+03DC) are not supported by Latin Modern Math font

// Capital greek characters
"Gamma" : MTMathAtom(type: .variable, value: "\u{0393}"),
Expand Down Expand Up @@ -227,11 +229,16 @@ public class MTMathAtomFactory {
"Longleftarrow" : MTMathAtom(type: .relation, value: "\u{27F8}"),
"Longrightarrow" : MTMathAtom(type: .relation, value: "\u{27F9}"),
"Longleftrightarrow" : MTMathAtom(type: .relation, value: "\u{27FA}"),
"longmapsto" : MTMathAtom(type: .relation, value: "\u{27FC}"),
"hookrightarrow" : MTMathAtom(type: .relation, value: "\u{21AA}"),
"hookleftarrow" : MTMathAtom(type: .relation, value: "\u{21A9}"),


// Relations
"leq" : MTMathAtom(type: .relation, value: UnicodeSymbol.lessEqual),
"geq" : MTMathAtom(type: .relation, value: UnicodeSymbol.greaterEqual),
"leqslant" : MTMathAtom(type: .relation, value: "\u{2A7D}"),
"geqslant" : MTMathAtom(type: .relation, value: "\u{2A7E}"),
"neq" : MTMathAtom(type: .relation, value: UnicodeSymbol.notEqual),
"in" : MTMathAtom(type: .relation, value: "\u{2208}"),
"notin" : MTMathAtom(type: .relation, value: "\u{2209}"),
Expand All @@ -250,6 +257,8 @@ public class MTMathAtomFactory {
"ll" : MTMathAtom(type: .relation, value: "\u{226A}"),
"prec" : MTMathAtom(type: .relation, value: "\u{227A}"),
"succ" : MTMathAtom(type: .relation, value: "\u{227B}"),
"preceq" : MTMathAtom(type: .relation, value: "\u{2AAF}"),
"succeq" : MTMathAtom(type: .relation, value: "\u{2AB0}"),
"subset" : MTMathAtom(type: .relation, value: "\u{2282}"),
"supset" : MTMathAtom(type: .relation, value: "\u{2283}"),
"subseteq" : MTMathAtom(type: .relation, value: "\u{2286}"),
Expand All @@ -259,9 +268,73 @@ public class MTMathAtomFactory {
"sqsubseteq" : MTMathAtom(type: .relation, value: "\u{2291}"),
"sqsupseteq" : MTMathAtom(type: .relation, value: "\u{2292}"),
"models" : MTMathAtom(type: .relation, value: "\u{22A7}"),
"vdash" : MTMathAtom(type: .relation, value: "\u{22A2}"),
"dashv" : MTMathAtom(type: .relation, value: "\u{22A3}"),
"bowtie" : MTMathAtom(type: .relation, value: "\u{22C8}"),
"perp" : MTMathAtom(type: .relation, value: "\u{27C2}"),
"implies" : MTMathAtom(type: .relation, value: "\u{27F9}"),

// Negated relations (amssymb)
// Inequality negations
"nless" : MTMathAtom(type: .relation, value: "\u{226E}"),
"ngtr" : MTMathAtom(type: .relation, value: "\u{226F}"),
"nleq" : MTMathAtom(type: .relation, value: "\u{2270}"),
"ngeq" : MTMathAtom(type: .relation, value: "\u{2271}"),
"nleqslant" : MTMathAtom(type: .relation, value: "\u{2A87}"),
"ngeqslant" : MTMathAtom(type: .relation, value: "\u{2A88}"),
"lneq" : MTMathAtom(type: .relation, value: "\u{2A87}"),
"gneq" : MTMathAtom(type: .relation, value: "\u{2A88}"),
"lneqq" : MTMathAtom(type: .relation, value: "\u{2268}"),
"gneqq" : MTMathAtom(type: .relation, value: "\u{2269}"),
"lnsim" : MTMathAtom(type: .relation, value: "\u{22E6}"),
"gnsim" : MTMathAtom(type: .relation, value: "\u{22E7}"),
"lnapprox" : MTMathAtom(type: .relation, value: "\u{2A89}"),
"gnapprox" : MTMathAtom(type: .relation, value: "\u{2A8A}"),
// Ordering negations
"nprec" : MTMathAtom(type: .relation, value: "\u{2280}"),
"nsucc" : MTMathAtom(type: .relation, value: "\u{2281}"),
"npreceq" : MTMathAtom(type: .relation, value: "\u{22E0}"),
"nsucceq" : MTMathAtom(type: .relation, value: "\u{22E1}"),
"precneqq" : MTMathAtom(type: .relation, value: "\u{2AB5}"),
"succneqq" : MTMathAtom(type: .relation, value: "\u{2AB6}"),
"precnsim" : MTMathAtom(type: .relation, value: "\u{22E8}"),
"succnsim" : MTMathAtom(type: .relation, value: "\u{22E9}"),
"precnapprox" : MTMathAtom(type: .relation, value: "\u{2AB9}"),
"succnapprox" : MTMathAtom(type: .relation, value: "\u{2ABA}"),
// Similarity/congruence negations
"nsim" : MTMathAtom(type: .relation, value: "\u{2241}"),
"ncong" : MTMathAtom(type: .relation, value: "\u{2247}"),
"nmid" : MTMathAtom(type: .relation, value: "\u{2224}"),
"nshortmid" : MTMathAtom(type: .relation, value: "\u{2224}"),
"nparallel" : MTMathAtom(type: .relation, value: "\u{2226}"),
"nshortparallel" : MTMathAtom(type: .relation, value: "\u{2226}"),
// Set relation negations
"nsubseteq" : MTMathAtom(type: .relation, value: "\u{2288}"),
"nsupseteq" : MTMathAtom(type: .relation, value: "\u{2289}"),
"subsetneq" : MTMathAtom(type: .relation, value: "\u{228A}"),
"supsetneq" : MTMathAtom(type: .relation, value: "\u{228B}"),
"subsetneqq" : MTMathAtom(type: .relation, value: "\u{2ACB}"),
"supsetneqq" : MTMathAtom(type: .relation, value: "\u{2ACC}"),
"varsubsetneq" : MTMathAtom(type: .relation, value: "\u{228A}"),
"varsupsetneq" : MTMathAtom(type: .relation, value: "\u{228B}"),
"varsubsetneqq" : MTMathAtom(type: .relation, value: "\u{2ACB}"),
"varsupsetneqq" : MTMathAtom(type: .relation, value: "\u{2ACC}"),
"notni" : MTMathAtom(type: .relation, value: "\u{220C}"),
"nni" : MTMathAtom(type: .relation, value: "\u{220C}"),
// Triangle negations
"ntriangleleft" : MTMathAtom(type: .relation, value: "\u{22EA}"),
"ntriangleright" : MTMathAtom(type: .relation, value: "\u{22EB}"),
"ntrianglelefteq" : MTMathAtom(type: .relation, value: "\u{22EC}"),
"ntrianglerighteq" : MTMathAtom(type: .relation, value: "\u{22ED}"),
// Turnstile negations
"nvdash" : MTMathAtom(type: .relation, value: "\u{22AC}"),
"nvDash" : MTMathAtom(type: .relation, value: "\u{22AD}"),
"nVdash" : MTMathAtom(type: .relation, value: "\u{22AE}"),
"nVDash" : MTMathAtom(type: .relation, value: "\u{22AF}"),
// Square subset negations
"nsqsubseteq" : MTMathAtom(type: .relation, value: "\u{22E2}"),
"nsqsupseteq" : MTMathAtom(type: .relation, value: "\u{22E3}"),

// operators
"times" : MTMathAtomFactory.times(),
"div" : MTMathAtomFactory.divide(),
Expand All @@ -288,6 +361,7 @@ public class MTMathAtomFactory {
"odot" : MTMathAtom(type: .binaryOperator, value: "\u{2299}"),
"star" : MTMathAtom(type: .binaryOperator, value: "\u{22C6}"),
"cdot" : MTMathAtom(type: .binaryOperator, value: "\u{22C5}"),
"diamond" : MTMathAtom(type: .binaryOperator, value: "\u{22C4}"),
"amalg" : MTMathAtom(type: .binaryOperator, value: "\u{2A3F}"),

// No limit operators
Expand Down Expand Up @@ -388,19 +462,25 @@ public class MTMathAtomFactory {
"Re" : MTMathAtom(type: .ordinary, value: "\u{211C}"),
"mho" : MTMathAtom(type: .ordinary, value: "\u{2127}"),
"aleph" : MTMathAtom(type: .ordinary, value: "\u{2135}"),
"beth" : MTMathAtom(type: .ordinary, value: "\u{2136}"),
"gimel" : MTMathAtom(type: .ordinary, value: "\u{2137}"),
"daleth" : MTMathAtom(type: .ordinary, value: "\u{2138}"),
"forall" : MTMathAtom(type: .ordinary, value: "\u{2200}"),
"exists" : MTMathAtom(type: .ordinary, value: "\u{2203}"),
"nexists" : MTMathAtom(type: .ordinary, value: "\u{2204}"),
"emptyset" : MTMathAtom(type: .ordinary, value: "\u{2205}"),
"varnothing" : MTMathAtom(type: .ordinary, value: "\u{2205}"),
"nabla" : MTMathAtom(type: .ordinary, value: "\u{2207}"),
"infty" : MTMathAtom(type: .ordinary, value: "\u{221E}"),
"angle" : MTMathAtom(type: .ordinary, value: "\u{2220}"),
"measuredangle" : MTMathAtom(type: .ordinary, value: "\u{2221}"),
"top" : MTMathAtom(type: .ordinary, value: "\u{22A4}"),
"bot" : MTMathAtom(type: .ordinary, value: "\u{22A5}"),
"vdots" : MTMathAtom(type: .ordinary, value: "\u{22EE}"),
"cdots" : MTMathAtom(type: .ordinary, value: "\u{22EF}"),
"ddots" : MTMathAtom(type: .ordinary, value: "\u{22F1}"),
"triangle" : MTMathAtom(type: .ordinary, value: "\u{25B3}"),
"Box" : MTMathAtom(type: .ordinary, value: "\u{25A1}"),
"imath" : MTMathAtom(type: .ordinary, value: "\u{0001D6A4}"),
"jmath" : MTMathAtom(type: .ordinary, value: "\u{0001D6A5}"),
"upquote" : MTMathAtom(type: .ordinary, value: "\u{0027}"),
Expand Down
Loading