Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit f3740e8

Browse files
author
Release Manager
committed
Trac #31147: Add missing curly braces in latex of Kodaira symbol
{{{ sage: latex(EllipticCurve([0, -1, 0, -101781377, -517919745247]).kodaira_symbol(2)) I_64^{*} }}} It should be `I_{64}^{*}`. URL: https://trac.sagemath.org/31147 Reported by: roed Ticket author(s): David Roe Reviewer(s): Frédéric Chapoton, John Cremona, Samuel Lelièvre
2 parents d856033 + ba6e4db commit f3740e8

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/sage/schemes/elliptic_curves/kodaira_symbol.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ def __init__(self, symbol):
9797
I_n
9898
sage: KodairaSymbol_class('In')
9999
In
100+
101+
Check that :trac:`31147` is fixed::
102+
103+
sage: latex(KodairaSymbol_class(-14))
104+
I_{10}^{*}
100105
"""
101106
if not isinstance(symbol, str):
102107
n = Integer(symbol)
@@ -124,8 +129,8 @@ def __init__(self, symbol):
124129
nu = n - 4
125130
self._n = nu
126131
self._roman = 1
127-
self._str = 'I' + nu.str()
128-
self._latex = 'I_{' + nu.str() + '}'
132+
self._str = 'I%s' % nu
133+
self._latex = 'I_{%s}' % nu
129134
elif n == -1:
130135
self._roman = 1
131136
self._n = 0
@@ -147,8 +152,8 @@ def __init__(self, symbol):
147152
nu = -n - 4
148153
self._roman = 1
149154
self._n = nu
150-
self._str = 'I' + nu.str() +'*'
151-
self._latex = 'I_' + nu.str() + '^{*}'
155+
self._str = 'I%s*' % nu
156+
self._latex = 'I_{%s}^{*}' % nu
152157
self._starred = (n < 0)
153158
self._pari = n
154159
return

0 commit comments

Comments
 (0)