Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pzinn committed May 29, 2024
1 parent aa1cd3a commit 51e2c07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions M2/Macaulay2/m2/expressions.m2
Original file line number Diff line number Diff line change
Expand Up @@ -1105,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,"}",if class v#0===Symbol and last toString v#0=="'" then "{}") -- no braces around x
concatenate(x,"^{",y,"}") -- 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
Expand All @@ -1115,7 +1115,7 @@ texMath Subscript := v -> (
x := texMath v#0;
y := if class v#1 === Sequence then demark(",", apply(v#1,texMath)) else texMath v#1; -- no () for sequences
if precedence v#0 < p or class v#0 === Subscript then x = "\\left(" | x | "\\right)"; -- precedence or double subscript
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
)

-*
Expand Down

0 comments on commit 51e2c07

Please sign in to comment.