@@ -415,11 +415,15 @@ def _latex_(self):
415
415
"""
416
416
from sage .misc .latex import latex
417
417
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'\}'
419
423
s = '[' if self ._lower_closed else '('
420
- s += latex (self .lower ())
424
+ s += str ( latex (self .lower () ))
421
425
s += ', '
422
- s += latex (self .upper ())
426
+ s += str ( latex (self .upper () ))
423
427
s += ']' if self ._upper_closed else ')'
424
428
return s
425
429
@@ -1380,9 +1384,9 @@ def _latex_(self):
1380
1384
1381
1385
sage: from cutgeneratingfunctionology.spam.real_set import RealSet
1382
1386
sage: latex(RealSet(0, 1))
1383
- ( 0 , 1 )
1387
+ (0 , 1)
1384
1388
sage: latex((RealSet(0, 1).union(RealSet.unbounded_above_closed(2))))
1385
- ( 0 , 1 ) \cup [ 2 , +\infty )
1389
+ (0 , 1) \cup [2 , +\infty)
1386
1390
"""
1387
1391
from sage .misc .latex import latex
1388
1392
if self .n_components () == 0 :
0 commit comments