From abf19d0a9523914dc514838211811443ee6ae63a Mon Sep 17 00:00:00 2001 From: pzinn Date: Fri, 24 May 2024 14:05:16 +1000 Subject: [PATCH 1/3] various output routine updates --- M2/Macaulay2/m2/expressions.m2 | 8 ++- M2/Macaulay2/m2/iterators.m2 | 10 +++- M2/Macaulay2/m2/latex.m2 | 103 ++++++++++++++++++++++++++++----- M2/Macaulay2/m2/loadsequence | 4 +- M2/Macaulay2/m2/reals.m2 | 1 + M2/Macaulay2/m2/webapp.m2 | 1 - 6 files changed, 102 insertions(+), 25 deletions(-) diff --git a/M2/Macaulay2/m2/expressions.m2 b/M2/Macaulay2/m2/expressions.m2 index 8826abadc20..2e9f89295ca 100644 --- a/M2/Macaulay2/m2/expressions.m2 +++ b/M2/Macaulay2/m2/expressions.m2 @@ -476,6 +476,7 @@ expression ZZ := i -> ( else if i < 0 then new Minus from { -i } else hold i ) +OneExpression ^ Expression := Holder ^ OneExpression := Expression ^ OneExpression := (x,y) -> x Holder ^ ZeroExpression := @@ -855,7 +856,7 @@ net Sum := v -> ( then bigParenthesize net v#i else net v#i)))) -isNumber = method(TypicalValue => Boolean) +isNumber = method(Dispatch => Thing, TypicalValue => Boolean) isNumber Thing := i -> false isNumber RR := isNumber QQ := -- QQ never appears in an expression... @@ -1104,7 +1105,7 @@ texMathSuperscript := v -> ( x := texMath v#0; y := texMath v#1; if precedence v#0 < p or class v#0 === Superscript or class v#0 === Power then x = "\\left(" | x | "\\right)"; -- precedence of double superscript - concatenate(x,"^{",y,"}") -- no braces around x + concatenate(x,"_{",y,"}",if class v#0===Symbol and last toString v#0=="'" then "{}") -- no braces around x ) texMath Power := v -> if v#1 === 1 or v#1 === ONE then texMath v#0 else texMathSuperscript v texMath Superscript := v -> if v#1 === moduleZERO then "0" else texMathSuperscript v @@ -1196,7 +1197,8 @@ texMath MatrixExpression := x -> ( ) texMath VectorExpression := v -> ( - concatenate( + if all(v,i->class i===ZeroExpression) then "0" + else concatenate( "\\left(", "\\!\\begin{array}{c}", newline, diff --git a/M2/Macaulay2/m2/iterators.m2 b/M2/Macaulay2/m2/iterators.m2 index e6fc4e2b49f..f4e5506d940 100644 --- a/M2/Macaulay2/m2/iterators.m2 +++ b/M2/Macaulay2/m2/iterators.m2 @@ -10,10 +10,14 @@ Iterator.synonym = "iterator" iterator Iterator := identity next Iterator := iter -> iter() -net Iterator := iter -> ( + +expression Iterator := iter -> if hasAttribute(iter,ReverseDictionary) then expression getAttribute(iter,ReverseDictionary) else ( x := if not (first frames iter)#?0 then () else first first frames iter; - net FunctionApplication(iterator, - (if instance(x, String) then format else identity) x)) + FunctionApplication{iterator, + (if instance(x, String) then format else expression) x} + ) +net Iterator := net @@ expression +toString Iterator := toString @@ expression iterator VisibleList := iterator String := x -> Iterator ( diff --git a/M2/Macaulay2/m2/latex.m2 b/M2/Macaulay2/m2/latex.m2 index d1776f2d6d3..f9b491d0287 100644 --- a/M2/Macaulay2/m2/latex.m2 +++ b/M2/Macaulay2/m2/latex.m2 @@ -30,25 +30,32 @@ shorten := s -> ( -- TODO: remove as duplicate noopts := x -> select(x,e -> class e =!= Option and class e =!= OptionTable) -texLiteralTable := new MutableHashTable -scan(0 .. 255, c -> texLiteralTable#(ascii{c}) = concatenate(///{\char ///, toString c, "}")) -scan(ascii(32 .. 126), c -> texLiteralTable#c = c) -scan("\\{}$&#^_%~|<>\"", c -> texLiteralTable#c = concatenate("{\\char ", toString (ascii c)#0, "}")) -texLiteralTable#"\n" = "\n" -texLiteralTable#"\r" = "\r" -texLiteralTable#"\t" = "\t" -texLiteralTable#"`" = "{`}" -- break ligatures ?` and !` in font \tt. See page 381 of TeX Book. -texLiteral = s -> concatenate for c in s list texLiteralTable#c +texLiteralEncode := c -> concatenate apply(ascii c,i->("\\char",toString i)) +texLiteralPairs := splice { + apply(0..8|11..12|14..31|127..255|toSequence ascii "\\{}$&#^_%~|<>\"", c -> ascii c => texLiteralEncode ascii c), + "`" => "{`}" -- break ligatures ?` and !` in font \tt. See page 381 of TeX Book. + } +texLiteralTable := hashTable texLiteralPairs +texLiteral1 := t -> s -> ( + flag:=false; + concatenate apply(characters s, + c -> if t#?c then ( + s:=t#c; + flag=first s==="\\" and last s =!="}"; + s + ) + else if flag then (flag=false; " "|c) else c + ) | if flag then " " else "" + ) +texLiteral := texLiteral1 texLiteralTable HALFLINE := "\\vskip 4.75pt\n" ENDLINE := "\\leavevmode\\hss\\endgraf\n" VERBATIM := "\\begingroup\\tt " ENDVERBATIM := "\\endgroup{}" -texExtraLiteralTable := copy texLiteralTable -texExtraLiteralTable#" " = "\\ " -texExtraLiteral := s -> demark(ENDLINE, - apply(lines s, l -> for c in l list texExtraLiteralTable#c)) +texExtraLiteralTable := hashTable append(texLiteralPairs," " => "\\ ") +texExtraLiteral := s -> demark(ENDLINE, apply(lines s, l -> apply(l, c -> if texExtraLiteralTable#?c then texExtraLiteralTable#c else c))) -------------------------------------------- -- this loop depends on the feature of hash tables that when the keys @@ -72,20 +79,84 @@ sectionType = sectionNumber -> ( "\\subsubsubsubsubparagraph"); ----------------------------------------------------------------------------- +keywordTexMath = applyKeys(hashTable { -- both unary and binary keywords + symbol |- => "\\vdash ", + symbol .. => "\\,{.}{.}\\,", + symbol ..< => "\\,{.}{.}{<}\\,", + symbol <= => "\\le ", + symbol >= => "\\ge ", + symbol => => "\\Rightarrow ", + symbol ==> => "\\Longrightarrow ", + symbol <== => "\\Longleftarrow ", + symbol <==> => "\\Longleftrightarrow ", + symbol _> => "{}_>", + symbol _< => "{}_<", + symbol ^> => "{}^>", + symbol ^< => "{}^<", + symbol ** => "\\otimes ", + symbol ++ => "\\oplus ", + symbol != => "\\ne ", + symbol -> => "\\rightarrow ", + symbol <- => "\\leftarrow ", + symbol ===> => "{\\large\\Longrightarrow}", + symbol <=== => "{\\large\\Longleftarrow}", + symbol << => "\\ll ", + symbol >> => "\\gg ", + symbol ^! => "{}^!", + symbol _! => "{}_!", + symbol ~ => "\\sim ", + symbol ^~ => "{}^\\sim", + symbol _~ => "{}_\\sim", + --symbol ^# => "{}^\\sharp", + --symbol _# => "{}_\\sharp", + symbol _ => "\\_", + symbol { => "\\{", + symbol } => "\\}", + symbol \ => "\\backslash ", + symbol \\ => "\\backslash\\backslash ", + symbol # => "\\#", + symbol #? => "\\#?", + symbol % => "\\%", + symbol & => "\\&", + symbol ^ => "\\wedge ", + symbol ^^ => "\\wedge\\wedge ", + symbol <| => "\\langle ", + symbol |> => "\\rangle ", + symbol | => "\\mid", + symbol || => "\\mid\\mid", + symbol ^** => "{}^{\\otimes}", -- temporary solution to KaTeX issue https://github.com/KaTeX/KaTeX/issues/3576 + symbol _* => "{}_*", -- temporary solution to KaTeX issue https://github.com/KaTeX/KaTeX/issues/3576 + symbol ^* => "{}^*" -- temporary solution to KaTeX issue https://github.com/KaTeX/KaTeX/issues/3576 + },symbolBody) bbLetters := set characters "kABCDEFGHIJKLMNOPQRSTUVWXYZ" +-- greek letters below are only in math mode +texMathLiteralTable := merge(texLiteralTable, + hashTable { + "Α" => "\\Alpha", "Β" => "\\Beta", "Ε" => "\\Epsilon", "Ζ" => "\\Zeta", "Η" => "\\Eta", "Ι" => "\\Iota", "Κ" => "\\Kappa", "Μ" => "\\Mu", "Ν" => "\\Nu", "Ο" => "\\Omicron", "Ρ" => "\\Rho", "Τ" => "\\Tau", "Χ" => "\\Chi", + "Γ" => "\\Gamma", "Δ" => "\\Delta", "Θ" => "\\Theta", "Λ" => "\\Lambda", "Ξ" => "\\Xi", "Π" => "\\Pi", "Σ" => "\\Sigma", "Υ" => "\\Upsilon", "Φ" => "\\Phi", "Ψ" => "\\Psi", "Ω" => "\\Omega", + "ϱ" => "\\varrho", "ϵ" => "\\epsilon", "π" => "\\pi", "ρ" => "\\rho", "ς" => "\\varsigma", "σ" => "\\sigma", "τ" => "\\tau", "υ" => "\\upsilon", "φ" => "\\varphi", "χ" => "\\chi", "ψ" => "\\psi", "ω" => "\\omega", "ϑ" => "\\vartheta", "α" => "\\alpha", "β" => "\\beta", "γ" => "\\gamma", "ϕ" => "\\phi", "δ" => "\\delta", "ε" => "\\varepsilon", "ϖ" => "\\varpi", "ζ" => "\\zeta", "η" => "\\eta", "θ" => "\\theta", "ι" => "\\iota", "κ" => "\\kappa", "λ" => "\\lambda", "μ" => "\\mu", "ν" => "\\nu", "ξ" => "\\xi", "ο" => "\\omicron", + "𝔞" => "\\mathfrak{a}","𝔟" => "\\mathfrak{b}","𝔠" => "\\mathfrak{c}","𝔡" => "\\mathfrak{d}","𝔢" => "\\mathfrak{e}","𝔣" => "\\mathfrak{f}","𝔤" => "\\mathfrak{g}","𝔥" => "\\mathfrak{h}","𝔦" => "\\mathfrak{i}","𝔧" => "\\mathfrak{j}","𝔨" => "\\mathfrak{k}","𝔩" => "\\mathfrak{l}","𝔪" => "\\mathfrak{m}","𝔫" => "\\mathfrak{n}","𝔬" => "\\mathfrak{o}","𝔭" => "\\mathfrak{p}","𝔮" => "\\mathfrak{q}","𝔯" => "\\mathfrak{r}","𝔰" => "\\mathfrak{s}","𝔱" => "\\mathfrak{t}","𝔲" => "\\mathfrak{u}","𝔳" => "\\mathfrak{v}","𝔴" => "\\mathfrak{w}","𝔵" => "\\mathfrak{x}","𝔶" => "\\mathfrak{y}","𝔷" => "\\mathfrak{z}","𝔄" => "\\mathfrak{A}","𝔅" => "\\mathfrak{B}","𝔆" => "\\mathfrak{C}","𝔇" => "\\mathfrak{D}","𝔈" => "\\mathfrak{E}","𝔉" => "\\mathfrak{F}","𝔊" => "\\mathfrak{G}","𝔋" => "\\mathfrak{H}","𝔌" => "\\mathfrak{I}","𝔍" => "\\mathfrak{J}","𝔎" => "\\mathfrak{K}","𝔏" => "\\mathfrak{L}","𝔐" => "\\mathfrak{M}","𝔑" => "\\mathfrak{N}","𝔒" => "\\mathfrak{O}","𝔓" => "\\mathfrak{P}","𝔔" => "\\mathfrak{Q}","𝔕" => "\\mathfrak{R}","𝔖" => "\\mathfrak{S}","𝔗" => "\\mathfrak{T}","𝔘" => "\\mathfrak{U}","𝔙" => "\\mathfrak{V}","𝔚" => "\\mathfrak{W}","𝔛" => "\\mathfrak{X}","𝔜" => "\\mathfrak{Y}","𝔝" => "\\mathfrak{Z}" +},last) +texMathLiteral = texLiteral1 texMathLiteralTable -- TODO: expand and document this behavior suffixes := {"bar","tilde","hat","vec","dot","ddot","check","acute","grave","breve"}; suffixesRegExp := "\\w("|demark("|",suffixes)|")$"; texVariable := x -> ( if x === "" then return ""; - xx := separate("\\$", x); if #xx > 1 then return demark("{\\char36}", texVariable \ xx); -- avoid the use of "$" in tex output if #x === 2 and x#0 === x#1 and bbLetters#?(x#0) then return "{\\mathbb " | x#0 | "}"; if last x === "'" then return texVariable substring(x, 0, #x-1) | "'"; if (r := regex(suffixesRegExp, x)) =!= null then return ( r = r#1; "\\" | substring(r, x) | "{" | texVariable substring(x, 0, r#0) | "}"); - if #x === 1 or regex("[^[:alnum:]]", x) =!= null then x else "\\textit{" | x | "}") -texMath Symbol := x -> if keywordTexMath#?x then keywordTexMath#x else texVariable toString x + if #x === 1 or regex("[^[:alnum:]]", x) =!= null then x else "\\mathit{" | x | "}") +texMathSymbol := +texMath Symbol := texVariable @@ texMathLiteral @@ toString +texMath Keyword := texMath @@ symbolBody +texMath SymbolBody := s -> if keywordTexMath#?s then keywordTexMath#s else texMathSymbol s + +-- add augmented operators +removeLast := s -> substring(s,0,#s-1) +keywordTexMath = merge(keywordTexMath, hashTable apply(toList augmentedAssignmentOperators, s -> symbolBody s => (texMath (getGlobalSymbol ( removeLast toString s ))) | "="), last) ----------------------------------------------------------------------------- diff --git a/M2/Macaulay2/m2/loadsequence b/M2/Macaulay2/m2/loadsequence index 81aa59f985f..73cde48ce11 100644 --- a/M2/Macaulay2/m2/loadsequence +++ b/M2/Macaulay2/m2/loadsequence @@ -10,8 +10,6 @@ regex.m2 profile.m2 debugging.m2 remember.m2 -iterators.m2 -files.m2 set.m2 fold.m2 @@ -31,6 +29,8 @@ code.m2 printing.m2 http.m2 +iterators.m2 +files.m2 computations.m2 gateway.m2 diff --git a/M2/Macaulay2/m2/reals.m2 b/M2/Macaulay2/m2/reals.m2 index ca2a0165e90..0320472a764 100644 --- a/M2/Macaulay2/m2/reals.m2 +++ b/M2/Macaulay2/m2/reals.m2 @@ -415,6 +415,7 @@ texMath RR := x -> ( printingLeadLimit, printingTrailLimit, "}\\cdot 10^{", x ) | "}") +texMath RRi := x -> concatenate("\\big[",texMath left x,",",texMath right x,"\\big]",if isEmpty x then "\\text{ (an empty interval)}") withFullPrecision = f -> ( prec := printingPrecision; acc := printingAccuracy; diff --git a/M2/Macaulay2/m2/webapp.m2 b/M2/Macaulay2/m2/webapp.m2 index b6acc2b461d..f4448d12a62 100644 --- a/M2/Macaulay2/m2/webapp.m2 +++ b/M2/Macaulay2/m2/webapp.m2 @@ -92,7 +92,6 @@ Thing#{WebApp,AfterNoPrint} = x -> ( removeWebAppTags = s -> if s === null then null else replace(webAppTagsRegex,"😀",s); if topLevelMode === WebApp then ( - compactMatrixForm = false; extractStr := x -> concatenate apply(x,y -> if instance(y,Hypertext) then extractStr y else if instance(y,String) then y); -- the help hack: if started in WebApp mode, help is compiled in it as well processExamplesLoop ExampleItem := (x->new LITERAL from extractStr x) @@ (lookup(processExamplesLoop,ExampleItem)); From a725f531192039a4ce4a06770f6e842ca3c5adba Mon Sep 17 00:00:00 2001 From: pzinn Date: Sun, 26 May 2024 22:57:21 +1000 Subject: [PATCH 2/3] reverted expression Iterator, fixed indentation --- M2/Macaulay2/m2/iterators.m2 | 9 +-- M2/Macaulay2/m2/latex.m2 | 111 ++++++++++++++++++----------------- 2 files changed, 61 insertions(+), 59 deletions(-) diff --git a/M2/Macaulay2/m2/iterators.m2 b/M2/Macaulay2/m2/iterators.m2 index f4e5506d940..ded8da8eff3 100644 --- a/M2/Macaulay2/m2/iterators.m2 +++ b/M2/Macaulay2/m2/iterators.m2 @@ -11,13 +11,10 @@ Iterator.synonym = "iterator" iterator Iterator := identity next Iterator := iter -> iter() -expression Iterator := iter -> if hasAttribute(iter,ReverseDictionary) then expression getAttribute(iter,ReverseDictionary) else ( +net Iterator := iter -> if hasAttribute(iter,ReverseDictionary) then net getAttribute(iter,ReverseDictionary) else ( x := if not (first frames iter)#?0 then () else first first frames iter; - FunctionApplication{iterator, - (if instance(x, String) then format else expression) x} - ) -net Iterator := net @@ expression -toString Iterator := toString @@ expression + net FunctionApplication(iterator, + (if instance(x, String) then format else identity) x)) iterator VisibleList := iterator String := x -> Iterator ( diff --git a/M2/Macaulay2/m2/latex.m2 b/M2/Macaulay2/m2/latex.m2 index f9b491d0287..89f0ce9e38a 100644 --- a/M2/Macaulay2/m2/latex.m2 +++ b/M2/Macaulay2/m2/latex.m2 @@ -80,64 +80,69 @@ sectionType = sectionNumber -> ( ----------------------------------------------------------------------------- keywordTexMath = applyKeys(hashTable { -- both unary and binary keywords - symbol |- => "\\vdash ", - symbol .. => "\\,{.}{.}\\,", - symbol ..< => "\\,{.}{.}{<}\\,", - symbol <= => "\\le ", - symbol >= => "\\ge ", - symbol => => "\\Rightarrow ", - symbol ==> => "\\Longrightarrow ", - symbol <== => "\\Longleftarrow ", - symbol <==> => "\\Longleftrightarrow ", - symbol _> => "{}_>", - symbol _< => "{}_<", - symbol ^> => "{}^>", - symbol ^< => "{}^<", - symbol ** => "\\otimes ", - symbol ++ => "\\oplus ", - symbol != => "\\ne ", - symbol -> => "\\rightarrow ", - symbol <- => "\\leftarrow ", - symbol ===> => "{\\large\\Longrightarrow}", - symbol <=== => "{\\large\\Longleftarrow}", - symbol << => "\\ll ", - symbol >> => "\\gg ", - symbol ^! => "{}^!", - symbol _! => "{}_!", - symbol ~ => "\\sim ", - symbol ^~ => "{}^\\sim", - symbol _~ => "{}_\\sim", - --symbol ^# => "{}^\\sharp", - --symbol _# => "{}_\\sharp", - symbol _ => "\\_", - symbol { => "\\{", - symbol } => "\\}", - symbol \ => "\\backslash ", - symbol \\ => "\\backslash\\backslash ", - symbol # => "\\#", - symbol #? => "\\#?", - symbol % => "\\%", - symbol & => "\\&", - symbol ^ => "\\wedge ", - symbol ^^ => "\\wedge\\wedge ", - symbol <| => "\\langle ", - symbol |> => "\\rangle ", - symbol | => "\\mid", - symbol || => "\\mid\\mid", - symbol ^** => "{}^{\\otimes}", -- temporary solution to KaTeX issue https://github.com/KaTeX/KaTeX/issues/3576 - symbol _* => "{}_*", -- temporary solution to KaTeX issue https://github.com/KaTeX/KaTeX/issues/3576 - symbol ^* => "{}^*" -- temporary solution to KaTeX issue https://github.com/KaTeX/KaTeX/issues/3576 - },symbolBody) + symbol |- => "\\vdash ", + symbol .. => "\\,{.}{.}\\,", + symbol ..< => "\\,{.}{.}{<}\\,", + symbol <= => "\\le ", + symbol >= => "\\ge ", + symbol => => "\\Rightarrow ", + symbol ==> => "\\Longrightarrow ", + symbol <== => "\\Longleftarrow ", + symbol <==> => "\\Longleftrightarrow ", + symbol _> => "{}_>", + symbol _< => "{}_<", + symbol ^> => "{}^>", + symbol ^< => "{}^<", + symbol ** => "\\otimes ", + symbol ++ => "\\oplus ", + symbol != => "\\ne ", + symbol -> => "\\rightarrow ", + symbol <- => "\\leftarrow ", + symbol ===> => "{\\large\\Longrightarrow}", + symbol <=== => "{\\large\\Longleftarrow}", + symbol << => "\\ll ", + symbol >> => "\\gg ", + symbol ^! => "{}^!", + symbol _! => "{}_!", + symbol ~ => "\\sim ", + symbol ^~ => "{}^\\sim", + symbol _~ => "{}_\\sim", + --symbol ^# => "{}^\\sharp", + --symbol _# => "{}_\\sharp", + symbol _ => "\\_", + symbol { => "\\{", + symbol } => "\\}", + symbol \ => "\\backslash ", + symbol \\ => "\\backslash\\backslash ", + symbol # => "\\#", + symbol #? => "\\#?", + symbol % => "\\%", + symbol & => "\\&", + symbol ^ => "\\wedge ", + symbol ^^ => "\\wedge\\wedge ", + symbol <| => "\\langle ", + symbol |> => "\\rangle ", + symbol | => "\\mid", + symbol || => "\\mid\\mid", + symbol ^** => "{}^{\\otimes}", -- temporary solution to KaTeX issue https://github.com/KaTeX/KaTeX/issues/3576 + symbol _* => "{}_*", -- temporary solution to KaTeX issue https://github.com/KaTeX/KaTeX/issues/3576 + symbol ^* => "{}^*" -- temporary solution to KaTeX issue https://github.com/KaTeX/KaTeX/issues/3576 + },symbolBody) bbLetters := set characters "kABCDEFGHIJKLMNOPQRSTUVWXYZ" -- greek letters below are only in math mode texMathLiteralTable := merge(texLiteralTable, hashTable { - "Α" => "\\Alpha", "Β" => "\\Beta", "Ε" => "\\Epsilon", "Ζ" => "\\Zeta", "Η" => "\\Eta", "Ι" => "\\Iota", "Κ" => "\\Kappa", "Μ" => "\\Mu", "Ν" => "\\Nu", "Ο" => "\\Omicron", "Ρ" => "\\Rho", "Τ" => "\\Tau", "Χ" => "\\Chi", - "Γ" => "\\Gamma", "Δ" => "\\Delta", "Θ" => "\\Theta", "Λ" => "\\Lambda", "Ξ" => "\\Xi", "Π" => "\\Pi", "Σ" => "\\Sigma", "Υ" => "\\Upsilon", "Φ" => "\\Phi", "Ψ" => "\\Psi", "Ω" => "\\Omega", - "ϱ" => "\\varrho", "ϵ" => "\\epsilon", "π" => "\\pi", "ρ" => "\\rho", "ς" => "\\varsigma", "σ" => "\\sigma", "τ" => "\\tau", "υ" => "\\upsilon", "φ" => "\\varphi", "χ" => "\\chi", "ψ" => "\\psi", "ω" => "\\omega", "ϑ" => "\\vartheta", "α" => "\\alpha", "β" => "\\beta", "γ" => "\\gamma", "ϕ" => "\\phi", "δ" => "\\delta", "ε" => "\\varepsilon", "ϖ" => "\\varpi", "ζ" => "\\zeta", "η" => "\\eta", "θ" => "\\theta", "ι" => "\\iota", "κ" => "\\kappa", "λ" => "\\lambda", "μ" => "\\mu", "ν" => "\\nu", "ξ" => "\\xi", "ο" => "\\omicron", - "𝔞" => "\\mathfrak{a}","𝔟" => "\\mathfrak{b}","𝔠" => "\\mathfrak{c}","𝔡" => "\\mathfrak{d}","𝔢" => "\\mathfrak{e}","𝔣" => "\\mathfrak{f}","𝔤" => "\\mathfrak{g}","𝔥" => "\\mathfrak{h}","𝔦" => "\\mathfrak{i}","𝔧" => "\\mathfrak{j}","𝔨" => "\\mathfrak{k}","𝔩" => "\\mathfrak{l}","𝔪" => "\\mathfrak{m}","𝔫" => "\\mathfrak{n}","𝔬" => "\\mathfrak{o}","𝔭" => "\\mathfrak{p}","𝔮" => "\\mathfrak{q}","𝔯" => "\\mathfrak{r}","𝔰" => "\\mathfrak{s}","𝔱" => "\\mathfrak{t}","𝔲" => "\\mathfrak{u}","𝔳" => "\\mathfrak{v}","𝔴" => "\\mathfrak{w}","𝔵" => "\\mathfrak{x}","𝔶" => "\\mathfrak{y}","𝔷" => "\\mathfrak{z}","𝔄" => "\\mathfrak{A}","𝔅" => "\\mathfrak{B}","𝔆" => "\\mathfrak{C}","𝔇" => "\\mathfrak{D}","𝔈" => "\\mathfrak{E}","𝔉" => "\\mathfrak{F}","𝔊" => "\\mathfrak{G}","𝔋" => "\\mathfrak{H}","𝔌" => "\\mathfrak{I}","𝔍" => "\\mathfrak{J}","𝔎" => "\\mathfrak{K}","𝔏" => "\\mathfrak{L}","𝔐" => "\\mathfrak{M}","𝔑" => "\\mathfrak{N}","𝔒" => "\\mathfrak{O}","𝔓" => "\\mathfrak{P}","𝔔" => "\\mathfrak{Q}","𝔕" => "\\mathfrak{R}","𝔖" => "\\mathfrak{S}","𝔗" => "\\mathfrak{T}","𝔘" => "\\mathfrak{U}","𝔙" => "\\mathfrak{V}","𝔚" => "\\mathfrak{W}","𝔛" => "\\mathfrak{X}","𝔜" => "\\mathfrak{Y}","𝔝" => "\\mathfrak{Z}" -},last) + "Α" => "\\Alpha", "Β" => "\\Beta", "Ε" => "\\Epsilon", "Ζ" => "\\Zeta", "Η" => "\\Eta", "Ι" => "\\Iota", "Κ" => "\\Kappa", "Μ" => "\\Mu", "Ν" => "\\Nu", "Ο" => "\\Omicron", "Ρ" => "\\Rho", "Τ" => "\\Tau", "Χ" => "\\Chi", + "Γ" => "\\Gamma", "Δ" => "\\Delta", "Θ" => "\\Theta", "Λ" => "\\Lambda", "Ξ" => "\\Xi", "Π" => "\\Pi", "Σ" => "\\Sigma", "Υ" => "\\Upsilon", "Φ" => "\\Phi", "Ψ" => "\\Psi", "Ω" => "\\Omega", + "ϱ" => "\\varrho", "ϵ" => "\\epsilon", "π" => "\\pi", "ρ" => "\\rho", "ς" => "\\varsigma", "σ" => "\\sigma", "τ" => "\\tau", "υ" => "\\upsilon", "φ" => "\\varphi", "χ" => "\\chi", "ψ" => "\\psi", "ω" => "\\omega", "ϑ" => "\\vartheta", + "α" => "\\alpha", "β" => "\\beta", "γ" => "\\gamma", "ϕ" => "\\phi", "δ" => "\\delta", "ε" => "\\varepsilon", "ϖ" => "\\varpi", "ζ" => "\\zeta", "η" => "\\eta", "θ" => "\\theta", "ι" => "\\iota", "κ" => "\\kappa", "λ" => "\\lambda", "μ" => "\\mu", "ν" => "\\nu", "ξ" => "\\xi", "ο" => "\\omicron", + "𝔞" => "\\mathfrak{a}","𝔟" => "\\mathfrak{b}","𝔠" => "\\mathfrak{c}","𝔡" => "\\mathfrak{d}","𝔢" => "\\mathfrak{e}","𝔣" => "\\mathfrak{f}","𝔤" => "\\mathfrak{g}","𝔥" => "\\mathfrak{h}","𝔦" => "\\mathfrak{i}","𝔧" => "\\mathfrak{j}","𝔨" => "\\mathfrak{k}", + "𝔩" => "\\mathfrak{l}","𝔪" => "\\mathfrak{m}","𝔫" => "\\mathfrak{n}","𝔬" => "\\mathfrak{o}","𝔭" => "\\mathfrak{p}","𝔮" => "\\mathfrak{q}","𝔯" => "\\mathfrak{r}","𝔰" => "\\mathfrak{s}","𝔱" => "\\mathfrak{t}","𝔲" => "\\mathfrak{u}","𝔳" => "\\mathfrak{v}", + "𝔴" => "\\mathfrak{w}","𝔵" => "\\mathfrak{x}","𝔶" => "\\mathfrak{y}","𝔷" => "\\mathfrak{z}","𝔄" => "\\mathfrak{A}","𝔅" => "\\mathfrak{B}","𝔆" => "\\mathfrak{C}","𝔇" => "\\mathfrak{D}","𝔈" => "\\mathfrak{E}","𝔉" => "\\mathfrak{F}","𝔊" => "\\mathfrak{G}", + "𝔋" => "\\mathfrak{H}","𝔌" => "\\mathfrak{I}","𝔍" => "\\mathfrak{J}","𝔎" => "\\mathfrak{K}","𝔏" => "\\mathfrak{L}","𝔐" => "\\mathfrak{M}","𝔑" => "\\mathfrak{N}","𝔒" => "\\mathfrak{O}","𝔓" => "\\mathfrak{P}","𝔔" => "\\mathfrak{Q}","𝔕" => "\\mathfrak{R}", + "𝔖" => "\\mathfrak{S}","𝔗" => "\\mathfrak{T}","𝔘" => "\\mathfrak{U}","𝔙" => "\\mathfrak{V}","𝔚" => "\\mathfrak{W}","𝔛" => "\\mathfrak{X}","𝔜" => "\\mathfrak{Y}","𝔝" => "\\mathfrak{Z}" + },last) texMathLiteral = texLiteral1 texMathLiteralTable -- TODO: expand and document this behavior suffixes := {"bar","tilde","hat","vec","dot","ddot","check","acute","grave","breve"}; From 72fdf214971e3fa95fd9495831e7aea569b02327 Mon Sep 17 00:00:00 2001 From: pzinn Date: Mon, 27 May 2024 10:37:08 +1000 Subject: [PATCH 3/3] reverted loadsequence --- M2/Macaulay2/m2/loadsequence | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/M2/Macaulay2/m2/loadsequence b/M2/Macaulay2/m2/loadsequence index 73cde48ce11..81aa59f985f 100644 --- a/M2/Macaulay2/m2/loadsequence +++ b/M2/Macaulay2/m2/loadsequence @@ -10,6 +10,8 @@ regex.m2 profile.m2 debugging.m2 remember.m2 +iterators.m2 +files.m2 set.m2 fold.m2 @@ -29,8 +31,6 @@ code.m2 printing.m2 http.m2 -iterators.m2 -files.m2 computations.m2 gateway.m2