Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
sage.numerical.interactive_lp._latex_product: Make use of parens arou…
Browse files Browse the repository at this point in the history
…nd a coefficient depend on the same test that sage.misc.repr.coeff_repr uses
  • Loading branch information
Matthias Koeppe committed Jan 31, 2021
1 parent 523a1d5 commit fe4b405
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sage/numerical/interactive_simplex_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def _latex_product(coefficients, variables,
t = latex(v)
else:
t = latex(c)
if SR(c).operator() in [operator.add, operator.sub]:
if t.find("+") != -1 or t.find("-") != -1:
t = r"\left( " + t + r" \right)"
t += " " + latex(v)
entries.extend([sign, t])
Expand Down

0 comments on commit fe4b405

Please sign in to comment.