##// END OF EJS Templates
Merge pull request #1399 from asmeurer/sympyprinting...
Merge pull request #1399 from asmeurer/sympyprinting Use LaTeX to display, on output, various built-in types with the SymPy printing extension. SymPy's latex() function supports printing lists, tuples, and dicts using latex notation (it uses bmatrix, pmatrix, and Bmatrix, respectively). This provides a more unified experience with SymPy functions that return these types (such as solve()). Also display ints, longs, and floats using LaTeX, to get a more unified printing experience (so that, e.g., x/x will print the same as just 1). The string form can always be obtained by manually calling the actual print function, or 2d unicode printing using pprint(). SymPy's latex() function doesn't treat set() or frosenset() correctly presently (see http://code.google.com/p/sympy/issues /detail?id=3062), so for the present, we leave those alone.

File last commit:

r5730:da5562c4
r6482:ba882bf7 merge
Show More
IPy_Notebook_logo.svg
304 lines | 16.0 KiB | image/svg+xml | TextLexer
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xml:space="preserve"
width="1100"
height="160"
style="fill-rule:evenodd"
viewBox="0 0 1100 159.9984"
id="svg2"
version="1.1"
inkscape:version="0.48.2 r9819"
sodipodi:docname="IPy_Notebook_logo.svg"
inkscape:export-filename="ipynblogo.png"
inkscape:export-xdpi="39.83239"
inkscape:export-ydpi="39.83239"><metadata
id="metadata121"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1843"
inkscape:window-height="1176"
id="namedview119"
showgrid="false"
showguides="true"
inkscape:guide-bbox="true"
inkscape:zoom="1.4837597"
inkscape:cx="535.88673"
inkscape:cy="66.092696"
inkscape:window-x="77"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"><sodipodi:guide
orientation="0,1"
position="338.089,21.683168"
id="guide3042" /><sodipodi:guide
orientation="0,1"
position="-40.48922,128.61282"
id="guide3815" /><sodipodi:guide
orientation="1,0"
position="0,292.95141"
id="guide3817" /></sodipodi:namedview>
<defs
id="defs4">
<font
id="FontID0"
font-variant="normal"
font-weight="400"
horiz-origin-x="0"
horiz-origin-y="0"
horiz-adv-x="90"
vert-origin-x="45"
vert-origin-y="90"
vert-adv-y="90"
style="font-variant:normal;font-weight:400">
<font-face
font-family="Droid Sans Mono"
id="font-face7">
</font-face>
<missing-glyph
id="missing-glyph9"><path
d="M0 0z"
id="path11" /></missing-glyph>
<glyph
unicode=" "
horiz-adv-x="600"
id="glyph13" />
<glyph
unicode=":"
horiz-adv-x="600"
id="glyph15"><path
d="M299.831 549.838c41.3387,0 62.0033,-22.6678 62.0033,-67.8333 0,-45.3356 -20.6646,-68.0034 -62.0033,-68.0034 -41.3293,0 -61.9939,22.6678 -61.9939,68.0034 0,45.1655 20.6646,67.8333 61.9939,67.8333zm0 -427.834c41.3387,0 62.0033,-22.5072 62.0033,-67.8333 0,-45.5057 -20.6646,-68.3341 -62.0033,-68.3341 -41.3293,0 -61.9939,22.8284 -61.9939,68.3341 0,45.3261 20.6646,67.8333 61.9939,67.8333z"
id="path17" /></glyph>
<glyph
unicode="C"
horiz-adv-x="600"
id="glyph19"><path
d="M548.841 98.1632l0 -79.1712c-47.5084,-19.1621 -105.845,-28.8282 -174.84,-28.8282 -100.488,0 -177.504,32.0029 -230.994,95.8388 -53.3477,63.6657 -79.9932,154.317 -79.9932,271.841 0,112.648 29.14,201.826 87.3065,267.646 58.3366,65.6783 138.018,98.6734 238.846,98.6734 71.6594,0 133.993,-14.0031 187,-42.0092l-38.0124 -76.1664c-50.1446,25.3416 -99.8072,38.0124 -148.988,38.0124 -69.987,0 -125.829,-25.8235 -167.498,-77.3286 -41.669,-51.6753 -62.5035,-121.492 -62.5035,-209.677 0,-93.486 19.5022,-164.664 58.6768,-213.646 39.0045,-49.0107 96.1506,-73.5019 171.325,-73.5019 42.321,0 95.4986,9.496 159.675,28.3179z"
id="path21" /></glyph>
<glyph
unicode="I"
horiz-adv-x="600"
id="glyph23"><path
d="M488.838 0l-379.013 0 0 60.0064 144.001 9.83275 0 574.162 -144.001 9.83275 0 60.0064 379.013 0 0 -60.0064 -143.665 -9.83275 0 -574.162 143.665 -9.83275 0 -60.0064z"
id="path25" /></glyph>
<glyph
unicode="]"
horiz-adv-x="600"
id="glyph27"><path
d="M141.166 -85.0018l168.832 0 0 726.172 -168.832 0 0 72.6616 257.831 0 0 -871.996 -257.831 0 0 73.1624z"
id="path29" /></glyph>
<glyph
unicode="["
horiz-adv-x="600"
id="glyph31"><path
d="M458.997 -158.164l-257.831 0 0 871.996 257.831 0 0 -72.6616 -168.993 0 0 -726.172 168.993 0 0 -73.1624z"
id="path33" /></glyph>
<glyph
unicode="P"
horiz-adv-x="600"
id="glyph35"><path
d="M176.83 277.833l0 -277.833 -90.8334 0 0 713.84 197.169 0c167.334,0 251.01,-69.6797 251.01,-209.004 0,-71.1679 -22.5002,-126.834 -67.6777,-166.997 -45.0004,-40.0043 -110.499,-60.0064 -196.496,-60.0064l-93.172 0zm0 77.1738l83.0026 0c64.3292,0 110.499,11.6576 138.332,35.1676 27.8329,23.3329 41.8291,59.9887 41.8291,109.826 0,90.8334 -54.9926,136.17 -165.155,136.17l-98.0086 0 0 -281.164z"
id="path37" /></glyph>
<glyph
unicode="g"
horiz-adv-x="600"
id="glyph39"><path
d="M549.833 536.17l0 -55.1619 -95.6687 -13.181c21.1747,-27.666 31.6628,-62.3335 31.6628,-104.002 0,-52.4973 -17.3196,-94.1663 -51.9871,-125.319 -34.6675,-31.0108 -82.9979,-46.6863 -144.849,-46.6863 -17.8298,0 -31.8329,1.02047 -41.9808,3.00471 -32.5132,-18.17 -48.8406,-39.8265 -48.8406,-64.998 0,-27.3258 26.3337,-40.9887 78.6609,-40.9887l91.3317 0c56.6642,0 100.006,-12.5007 129.826,-37.5021 30.0187,-25.1715 45.0139,-61.0012 45.0139,-107.489 0,-122.683 -92.012,-184.024 -275.838,-184.024 -71.0074,0 -125.007,13.0109 -161.999,39.1746 -36.8218,26.3337 -55.3319,63.0138 -55.3319,110.182 0,68.9948 39.0045,112.988 117.155,131.81 -31.3226,15.3353 -46.8281,40.3368 -46.8281,75.1743 0,36.51 21.6849,67.8326 64.8279,93.8262 -28.8282,12.0188 -51.6469,32.0029 -68.3145,59.839 -16.4975,27.836 -24.8313,58.1666 -24.8313,90.9916 0,59.3571 17.3196,104.853 51.9871,137.026 34.6675,31.9746 84.0184,47.9902 148.166,47.9902 28.0061,0 52.3272,-3.17478 73.1617,-9.66608l184.676 0zm-259.822 -283.179c72.6515,0 108.991,37.332 108.991,112.166 0,77.8389 -36.6801,116.843 -110.012,116.843 -73.1617,0 -109.813,-39.4864 -109.813,-118.176 0,-73.9838 36.9919,-110.834 110.834,-110.834zm47.8202 -244.146l-91.6719 0c-75.0043,0 -112.336,-32.3431 -112.336,-96.6892 0,-56.6642 44.0218,-84.9821 132.349,-84.9821 128.494,0 192.84,36.3399 192.84,108.821 0,28.6864 -8.19207,48.0186 -24.5195,57.8264 -16.1574,10.0062 -48.5005,15.0235 -96.6608,15.0235z"
id="path41" /></glyph>
<glyph
unicode="m"
horiz-adv-x="600"
id="glyph43"><path
d="M477.011 0l0 345.173c0,47.48 -4.33698,80.6735 -12.8409,99.1553 -8.67396,18.5101 -23.1589,27.836 -43.3415,27.836 -28.3179,0 -48.8406,-13.4928 -61.6532,-40.5068 -12.8409,-26.9857 -19.3322,-72.3114 -19.3322,-135.835l0 -295.822 -78.6893 0 0 345.173c0,84.6703 -20.3243,126.991 -61.0012,126.991 -27.3258,0 -46.8281,-13.0109 -58.4784,-38.8344 -11.8487,-25.8235 -17.6881,-77.6688 -17.6881,-155.508l0 -277.822 -78.9727 0 0 536.17 61.9933 0 13.1527 -72.3397 4.84721 0c21.8266,54.68 54.4815,82.0058 98.1632,82.0058 53.0075,0 87.675,-29.5085 104.002,-88.8372l2.83463 0c24.8313,59.3288 60.491,88.8372 106.979,88.8372 41.669,0 72.0279,-14.9952 90.8498,-45.1556 18.8219,-30.0187 28.3179,-80.3334 28.3179,-150.519l0 -350.162 -79.1428 0z"
id="path45" /></glyph>
<glyph
unicode="i"
horiz-adv-x="600"
id="glyph47"><path
d="M309.173 756.846c34.4974,0 51.6469,-18.5101 51.6469,-55.6721 0,-18.8503 -5.15902,-32.9951 -15.307,-42.1793 -10.3464,-9.32593 -22.5069,-14.0031 -36.3399,-14.0031 -34.8376,0 -52.3272,18.6802 -52.3272,56.1823 0,37.162 17.4897,55.6721 52.3272,55.6721zm-45.0139 -291.003l-131.328 10.148 0 60.1791 220.166 0 0 -466.325 171.835 -9.83616 0 -60.0091 -428.652 0 0 60.0091 167.98 9.83616 0 395.998z"
id="path49" /></glyph>
<glyph
unicode="c"
horiz-adv-x="600"
id="glyph51"><path
d="M518 517.178l-30.1604 -77.1869c-48.8406,18.5101 -92.4939,27.836 -130.846,27.836 -120.84,0 -181.161,-67.3224 -181.161,-201.655 0,-132.179 58.6768,-198.339 176.172,-198.339 51.165,0 103.322,10.1763 156.84,30.3305l0 -78.1507c-43.6816,-19.8424 -97.171,-29.8486 -160.667,-29.8486 -83.6782,0 -148.676,23.6691 -194.852,71.1775 -46.1477,47.3383 -69.335,115.313 -69.335,203.838 0,91.4734 23.6691,161.149 70.8373,208.997 47.1682,47.8202 113.498,71.6594 199.161,71.6594 58.0248,0 112.676,-9.496 164.012,-28.6581z"
id="path53" /></glyph>
<glyph
unicode="a"
horiz-adv-x="600"
id="glyph55"><path
d="M436.986 0l-17.9999 74.1539 -3.99683 0c-25.0014,-31.4927 -50.6548,-53.3193 -77.1586,-65.65 -26.3337,-12.1606 -60.3209,-18.34 -101.99,-18.34 -53.0075,0 -94.6766,14.0031 -124.667,42.0092 -30.1604,28.0061 -45.184,67.3224 -45.184,117.665 0,108.169 82.9979,164.834 249.022,169.993l98.9852 3.34486 0 33.8171c0,76.8468 -39.6564,115.171 -118.998,115.171 -47.9902,0 -101.338,-13.3228 -160.156,-39.9966l-30.8408 66.8405c63.8358,31.3226 126.169,46.8281 187,46.8281 73.8421,0 127.331,-14.1731 160.497,-42.3493 32.9951,-28.3179 49.4926,-73.8137 49.4926,-136.317l0 -367.169 -64.0059 0zm-23.8109 262.175l-79.1712 -3.34486c-63.8358,-2.66455 -108.991,-12.6708 -135.835,-29.9904 -26.6738,-17.518 -39.9966,-44.1635 -39.9966,-79.8515 0,-57.9965 32.6549,-86.9947 97.6529,-86.9947 47.8485,0 86.0026,13.3511 114.519,39.8265 28.488,26.5038 42.8312,63.8358 42.8312,112.024l0 48.3304z"
id="path57" /></glyph>
<glyph
unicode="e"
horiz-adv-x="600"
id="glyph59"><path
d="M535.178 251.006l-377.998 0c2.66455,-122.172 58.6484,-183.174 167.98,-183.174 63.4957,0 123.675,12.3306 180.679,37.162l0 -78.1507c-53.9997,-24.3495 -113.328,-36.6801 -177.674,-36.6801 -79.8231,0 -143.659,24.3495 -191.507,72.9917 -47.8202,48.6706 -71.6594,115.681 -71.6594,201.003 0,86.6829 21.9967,155.168 66.1602,205.851 44.0218,50.6548 103.01,75.8263 177.023,75.8263 68.9948,0 123.987,-21.6566 165.145,-65.3382 41.1871,-43.6533 61.8516,-101.82 61.8516,-174.33l0 -55.1619zm-376.013 72.1696l279.834 0c0,99.3254 -44.3336,148.988 -132.831,148.988 -89.4892,0 -138.5,-49.6627 -147.004,-148.988z"
id="path61" /></glyph>
<glyph
unicode="n"
horiz-adv-x="600"
id="glyph63"><path
d="M433.173 0l0 345.174c0,84.668 -38.835,126.993 -116.345,126.993 -99.8335,0 -149.83,-64.8253 -149.83,-194.334l0 -277.833 -88.8314 0 0 536.16 71.664 0 13.3407 -72.3195 4.83665 0c33.4845,54.6559 88.1582,81.9928 163.986,81.9928 126.674,0 190.011,-65.1619 190.011,-195.663l0 -350.17 -88.8314 0z"
id="path65" /></glyph>
<glyph
unicode="o"
horiz-adv-x="600"
id="glyph67"><path
d="M297.835 -9.83275c-70.3352,0 -128.162,25.3348 -173.499,76.0045 -45.4964,50.6697 -68.1738,118.17 -68.1738,202.82 0,85.6778 22.0041,153.178 66.1718,202.679 44.1677,49.5004 103.501,74.162 178.495,74.162 70.8313,0 129.013,-25.1577 174.332,-75.6679 45.1775,-50.3331 67.8371,-117.497 67.8371,-201.173 0,-86.1562 -22.323,-154.33 -67.0045,-203.99 -44.4866,-49.837 -103.997,-74.8352 -178.159,-74.8352zm2.00198 73.8254c100.826,0 151.336,68.3332 151.336,205 0,135.515 -50.8469,203.175 -152.346,203.175 -100.666,0 -150.822,-67.66 -150.822,-203.175 0,-136.666 50.4925,-205 151.832,-205z"
id="path69" /></glyph>
<glyph
unicode="h"
horiz-adv-x="600"
id="glyph71"><path
d="M433.173 0l0 345.174c0,84.668 -38.835,126.993 -116.345,126.993 -99.8335,0 -149.83,-64.8253 -149.83,-194.334l0 -277.833 -88.8314 0 0 759.833 88.8314 0 0 -225.657 -3.8268 -70.3352 4.83665 0c33.4845,54.6559 88.1582,81.9928 163.986,81.9928 126.674,0 190.011,-65.1619 190.011,-195.663l0 -350.17 -88.8314 0z"
id="path73" /></glyph>
<glyph
unicode="u"
horiz-adv-x="600"
id="glyph75"><path
d="M450.167 0l-13.181 71.8295 -4.81887 0c-34.1573,-54.5099 -88.4971,-81.6656 -163.161,-81.6656 -127.161,0 -190.827,65.3382 -190.827,195.844l0 350.162 88.8089 0 0 -345.173c0,-84.6703 38.3525,-126.991 115.171,-126.991 52.4973,0 90.6797,14.9952 114.831,45.1556 24.0093,30.0187 36.1699,79.6814 36.1699,148.676l0 278.332 88.8372 0 0 -536.17 -71.8295 0z"
id="path77" /></glyph>
<glyph
unicode="p"
horiz-adv-x="600"
id="glyph79"><path
d="M165.996 67.8326l-5.83933 0c3.85509,-42.0092 5.83933,-68.3429 5.83933,-79.0011l0 -229.01 -88.8372 0 0 776.348 71.8295 0 13.181 -72.3397 3.82675 0c35.8297,54.68 88.1569,82.0058 157.18,82.0058 65.4799,0 116.815,-24.3495 154.147,-72.9917 37.1903,-48.6706 55.8422,-116.503 55.8422,-203.838 0,-87.8451 -18.6519,-156.33 -56.154,-205.34 -37.332,-49.0107 -88.6672,-73.5019 -153.835,-73.5019 -67.3508,0 -119.678,25.9935 -157.18,77.6688zm0 221.158l0 -19.9841c0,-73.8421 11.3385,-126.509 34.0155,-157.832 22.4786,-31.5211 58.6484,-47.1682 108.169,-47.1682 88.4971,0 132.831,68.6547 132.831,205.992 0,134.843 -44.6737,202.166 -133.851,202.166 -49.4926,0 -84.9821,-14.3432 -106.667,-43.0013 -21.6566,-28.6581 -33.1651,-75.3161 -34.4974,-140.172z"
id="path81" /></glyph>
<glyph
unicode="v"
horiz-adv-x="600"
id="glyph83"><path
d="M243.154 0l-203.158 536.17 91.8419 0 117.155 -318.329c27.666,-75.3444 43.9934,-128.182 48.8406,-158.682l3.00471 0c2.15432,14.1731 18.6519,67.1807 49.3225,158.682l116.673 318.329 92.3238 0 -203.158 -536.17 -112.847 0z"
id="path85" /></glyph>
<glyph
unicode="r"
horiz-adv-x="600"
id="glyph87"><path
d="M517.178 524.009l-24.0093 -81.1837c-39.9966,14.6834 -76.5066,21.9967 -109.332,21.9967 -53.1776,0 -93.9963,-14.9952 -122.824,-45.1556 -28.8565,-30.1604 -43.1714,-73.672 -43.1714,-130.676l0 -288.99 -89.0073 0 0 536.17 72.3397 0 10.6582 -98.1632 3.99683 0c24.6613,38.6643 51.3351,66.3303 79.5113,82.9979 28.3179,16.6676 63.1555,24.8313 104.484,24.8313 38.5226,0 77.4987,-7.34169 117.354,-21.8266z"
id="path89" /></glyph>
<glyph
unicode="t"
horiz-adv-x="600"
id="glyph91"><path
d="M497.998 73.1699l0 -67.3411c-42.3251,-10.3288 -83.3392,-15.6615 -122.989,-15.6615 -117.834,0 -176.848,56.0024 -176.848,168.007l0 310.999 -130.324 0 0 45.9925 130.324 23.8289 37.6657 140.174 51.3429 0 0 -143.009 213.823 0 0 -66.9867 -213.823 0 0 -310.999c0,-63.5143 31.1636,-95.174 93.6681,-95.174 30.3309,0 69.3253,3.33073 117.16,10.1694z"
id="path93" /></glyph>
<glyph
unicode="y"
horiz-adv-x="600"
id="glyph95"><path
d="M40.0043 536.16l91.8255 0 128.003 -319.325c26.6636,-66.8273 41.1736,-114.007 43.335,-141.663l2.99412 0c7.51187,36.4964 22.1636,83.9948 44.0082,142.655l116.664 318.333 92.3393 0 -232 -605.999c-21.8447,-56.6579 -47.1795,-99.1602 -76.1817,-127.666 -28.9845,-28.4884 -68.9887,-42.6618 -120.154,-42.6618 -28.0101,0 -55.3292,2.67522 -82.0105,8.16739l0 70.8313c20.1793,-3.8268 42.3429,-5.82879 66.3312,-5.82879 31.3408,0 55.6835,6.66147 73.0104,20.0021 17.5041,13.3229 33.0062,36.3369 46.6657,68.8293l28.329 73.3293 -223.159 540.996z"
id="path97" /></glyph>
</font>
<style
type="text/css"
id="style99">
@font-face { font-family:&quot;Droid Sans Mono&quot;;src:url(&quot;#FontID0&quot;) format(svg)}
.fil2 {fill:black}
.fil0 {fill:#2B2828}
.fil1 {fill:#3465A4}
.fnt1 {font-weight:normal;font-size:41.6669;font-family:'Droid Sans Mono'}
.fnt0 {font-weight:normal;font-size:66.6661;font-family:'Droid Sans Mono'}
.fnt3 {font-weight:normal;font-size:125;font-family:'Droid Sans Mono'}
.fnt2 {font-weight:normal;font-size:150;font-family:'Droid Sans Mono'}
</style>
</defs>
<g
id="g3107"
transform="translate(-164.37718,0.077996)"><text
x="569.31348"
y="138.23804"
id="text3840"
class="fil0 fnt0"
style="font-size:140.73484802px;font-weight:normal;fill:#3465a4;fill-opacity:1;font-family:Droid Sans Mono">Notebook</text>
</g><text
style="font-size:150px;font-weight:normal;fill:#000000;font-family:Droid Sans Mono"
id="text109"
class="fil2 fnt2"
y="138.31602"
x="6.9652257">IP</text>
<g
id="g3115"
transform="translate(-80.389077,-3.6045988)"><text
x="261.15134"
y="124.71784"
class="fil1 fnt3"
id="text111"
style="font-size:108.73868561px;font-weight:normal;fill:#3465a4;font-family:Droid Sans Mono">[</text>
<text
x="356.85321"
y="124.71784"
class="fil1 fnt3"
id="text113"
style="font-size:108.73868561px;font-weight:normal;fill:#3465a4;font-family:Droid Sans Mono">]</text>
<text
x="395.29062"
y="123.62939"
class="fil1 fnt3"
id="text115"
style="font-size:108.73868561px;font-weight:normal;fill:#3465a4;font-family:Droid Sans Mono">:</text>
<text
x="315.31311"
y="118.70238"
class="fil2 fnt3"
id="text117"
style="font-size:96.64835358px;font-weight:normal;fill:#000000;font-family:Droid Sans Mono">y</text>
</g>
</svg>