Skip to content

Commit 1d61b5a

Browse files
committed
cutgeneratingfunctionology/spam/real_set.py: Another update from Sage 9.5.beta9
1 parent 58df798 commit 1d61b5a

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

cutgeneratingfunctionology/spam/real_set.py

+9-5
Original file line numberDiff line numberDiff line change
@@ -415,11 +415,15 @@ def _latex_(self):
415415
"""
416416
from sage.misc.latex import latex
417417
if self.is_point():
418-
return r'\{' + latex(self.lower()) + r'\}'
418+
# Converting to str avoids the extra whitespace
419+
# that LatexExpr add on concenation. We do not need
420+
# the whitespace because we are wrapping it in
421+
# non-letter characters.
422+
return r'\{' + str(latex(self.lower())) + r'\}'
419423
s = '[' if self._lower_closed else '('
420-
s += latex(self.lower())
424+
s += str(latex(self.lower()))
421425
s += ', '
422-
s += latex(self.upper())
426+
s += str(latex(self.upper()))
423427
s += ']' if self._upper_closed else ')'
424428
return s
425429

@@ -1380,9 +1384,9 @@ def _latex_(self):
13801384
13811385
sage: from cutgeneratingfunctionology.spam.real_set import RealSet
13821386
sage: latex(RealSet(0, 1))
1383-
( 0 , 1 )
1387+
(0, 1)
13841388
sage: latex((RealSet(0, 1).union(RealSet.unbounded_above_closed(2))))
1385-
( 0 , 1 ) \cup [ 2 , +\infty )
1389+
(0, 1) \cup [2, +\infty)
13861390
"""
13871391
from sage.misc.latex import latex
13881392
if self.n_components() == 0:

0 commit comments

Comments
 (0)