class Disc(object): def __init__(self, size, color='red'): self.size = size self.color = color def _repr_svg_(self): return """ """.format(self.size, self.color) Disc(80, 'purple') import IPython.display as dsp dsp.Math(r"\sum_{n=1}^\infty \frac{1}{n^2} = \frac{\pi^2}{6}")