Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pzinn authored and mgacummings committed Oct 18, 2024
1 parent 40361bc commit 28594c7
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 28594c7

Please sign in to comment.