{ "metadata": { "language": "ruby", "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "code", "collapsed": false, "input": [ "IRuby.display(Complex(1,2))" ], "language": "python", "metadata": {}, "outputs": [ { "latex": [ "$1+2\\imath$" ], "metadata": {}, "output_type": "pyout", "prompt_number": 1, "text": [ "(1+2i)" ] } ], "prompt_number": 1 }, { "cell_type": "code", "collapsed": false, "input": [ "require 'matrix'\n", "IRuby.display(Matrix[[1,2],[3,4]])\n", "IRuby.display(Matrix[[1,2],[3,4]],format:'latex')\n", "IRuby.display(Matrix[[1,2],[3,4]],'text/plain')\n", "IRuby.display(Matrix[[1,2],[3,4]],mime:'text/plain')\n", "IRuby.display(Matrix[[1,2],[3,4]],'html')" ], "language": "python", "metadata": {}, "outputs": [ { "latex": [ "$$\\left(\\begin{array}{cc}\n", " 1&2\\\\\n", " 3&4\\\\\n", "\\end{array}\\right)$$" ], "metadata": {}, "output_type": "pyout", "prompt_number": 2, "text": [ "Matrix[[1, 2], [3, 4]]" ] }, { "latex": [ "$$\\left(\\begin{array}{cc}\n", " 1&2\\\\\n", " 3&4\\\\\n", "\\end{array}\\right)$$" ], "metadata": {}, "output_type": "pyout", "prompt_number": 2, "text": [ "Matrix[[1, 2], [3, 4]]" ] }, { "metadata": {}, "output_type": "pyout", "prompt_number": 2, "text": [ "Matrix[[1, 2], [3, 4]]" ] }, { "metadata": {}, "output_type": "pyout", "prompt_number": 2, "text": [ "Matrix[[1, 2], [3, 4]]" ] }, { "html": [ "
12
34
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 2, "text": [ "Matrix[[1, 2], [3, 4]]" ] } ], "prompt_number": 2 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 3 } ], "metadata": {} } ] }