# HG changeset patch
# User P Purkayastha <ppurka@gmail.com>
# Date 1324087690 -28800
# Node ID 12dbe7027b7b3dff43192ff7e069ba8363de2660
# Parent 7cd1c80fabc9107eeb84bb8f39ba2283f872e5cc
Add two LatexExpr instances
diff --git a/sage/misc/latex.py b/sage/misc/latex.py
a
|
b
|
|
411 | 411 | sage: type(L) |
412 | 412 | <class 'sage.misc.latex.LatexExpr'> |
413 | 413 | """ |
| 414 | def __add__(self, other): |
| 415 | r""" |
| 416 | Add two instances of LatexExpr. |
| 417 | |
| 418 | EXAMPLES:: |
| 419 | |
| 420 | sage: o = LatexExpr(r"\Delta\neq") + LatexExpr(r"\frac{x}2"); o |
| 421 | \Delta\neq \frac{x}2 |
| 422 | sage: type(o) |
| 423 | <class 'sage.misc.latex.LatexExpr'> |
| 424 | """ |
| 425 | return LatexExpr(str(self) + ' ' + str(other)) |
| 426 | |
414 | 427 | def __repr__(self): |
415 | 428 | """ |
416 | 429 | EXAMPLES:: |