Skip to content
This repository has been archived by the owner on Apr 16, 2018. It is now read-only.
Bill Page edited this page Apr 29, 2015 · 115 revisions

Question: May I use SageMathCloud for commercial purposes?

NO. You may not use free SMC projects for non-academic commercial purposes (for personal or company gain) as explained in the terms of service. All free SMC projects run on hardware owned and hosted by University of Washington, and are subject to UW Administrative Policy Statement47.2, which includes statements such as "communications resulting from University computers and equipment may be subject to disclosure under the Public Records Act, in litigation involving the University, or for audit purposes."

Sometime in Spring 2015 we anticipate that there will be a for-pay option to create SMC projects that may be used for commercial purposes.

Question: I want to start long-running numerically intensive computations on SageMathCloud. What are the current limitations?

Open your project and click on Settings. The default limitations are listed under "Quotas" in the lower left. These can be raised, as mentioned there. Notes:

  1. The Virtual Machines get rebooted regularly -- probably about once per week. You can check if a VM rebooted by typing "uptime". crontab files are persistent, unless your project moves from one machine to another, which can happen in case of machine failure.

  2. If a project isn't used (via the web-based UI) for the idle time (by default 3 hours), then all processes in that project are terminated. It's easy for me to raise this idle timeout if necessary -- email me at [email protected].

Question: I want to see all processes running in my project

Type exactly the following in a full terminal (+New--> Terminal) to see all processing running in a project (note the back ticks!):

top -u `whoami`

You can kill things, etc. See http://linux.die.net/man/1/top

Question: I want to know how much memory I am using

Type exactly the following in a full terminal (+New--> Terminal):

smem -tk

It lists all processes and the bottom line shows the total sum. The last RSS column is probably the most interesting one, for more consult man smem.

Question: I want some scratch space

The directory /scratch is a ZFS filesystem (at least 64GB) that is never snapshotted. You can write files there if you need some extra space, and there is insufficient quota in your project. However, if your project moves to another host (e.g., if this host goes down) then the scratch that you were using is no longer accessible. If you type this in a terminal, you will get a clickable link in the file browser that lets you navigate to /scratch:

ln -s /scratch .

The Quota pane in project settings list how much quota space you have in /scratch.

Question: How can I create public projects on SageMathCloud?

You can make individual files and folders public. Pull up information for a file (click the info icon), and click on "Share Publicly". Once you do this, simply share the URL that is displayed in the top of your browser when you look at the file (or directory). Anybody else who views that link will see the file, and can create an account and copy it to their own project.

You can also publish Jupyter notebooks via a Publish button -- see this video.

Question: I would like to use SageMathCloud with my 300+ Calculus Students

Go for it! We have substantial excess capacity. For example, UCLA used SMC in their 400+ Calculus class, and dozens of other 100+ courses are using SMC. See https://github.com/sagemath/cloud/wiki/Teaching

Question: What tools are available for course management?

This blog post describes some new SMC features for course management - e.g. setting up student projects, adding assignments, etc. There is also a video tutorial at the end of the post.

Question: I would like to use hashtags

You can put #foo in the title or description of any project. When you view your list of projects a button will appear for each hashtag, which you can click to show only projects with that tag. There is also excellent support for hashtags in task lists (SageMathCloud's todo list functionality).

Question: How can I download a whole directory?

There is currently no provision to download an entire directory. To accomplish this, you can easily create a .zip-archive. Above the files view, on the right, there is a command-box. For a directory called "My Homework", type in:

zip download-homework.zip "My Homework"

The directory name needs to be exactly the same, including upper and lowercase letters, and any space characters need to be protected by quoting the entire name.

If successful, a new file download-homework.zip should appear.

Question: If I "share" a file, does it become public to everyone and/or searchable? Or is the only way to get to it via a link and a SageMath account?

When you click "Share Publicly" in the info dialog for a file or directory, then yes, it does become public to everyone (as the name "publicly" suggests). It is NOT searchable (via Google, say) right now, but may become searchable later, when I implement something to encourage that. The only way to get it today is via a link, after you share it publicly. But that is temporary. The person getting the link does not need a SageMath account -- try opening the link in private browsing mode to see.

Question: How do I raise the limit on the number of output messages per cell in a Sage worksheet?

import sage_server
sage_server.MAX_OUTPUT_MESSAGES=100000

See this published worksheet for more details.

Also, type sage_server.[tab key] to see information about other limitations.

Question: I would like to edit files (with sync) or manipulate data files that are on some remote server that I have ssh access to

WARNING: The following will only work if your project has outgoing network access, i.e., it says "Network access: true" under project settings. (Outgoing network access is blocked by default due to people using SageMathCloud as a platform to attack other computers. If you don't have it, email [email protected] and convince us you should, and we'll enable it.)

Suppose you have an account on some computer that you can ssh to, e.g, so this works for you:

To temporarily make the files at [email protected] available in a cloud project, open a Terminal and type

mkdir foo   # make any directory you want
sshfs [email protected]:path/to/files/ foo/

and type your password to login to [email protected]. You'll find that you can now use the files at path/to/files in [email protected] as if they were in the directory foo in your project. You can edit files (with sync), open and output data files, etc. When you're done, type

fusermount -u foo

to unmount foo. Whenever the project server is restarted, foo/ will also be unmounted. So you'll have to type sshfs [email protected]: foo/ to mount foo every once in a while.

(Alternatively, you can type crontab -e in a terminal, and add a line like this */2 * * * * sshfs [email protected]: foo/, but that would require setting up ssh keys for passwordless connections to [email protected], which you may or may not want to do.)

NOTE: The files in foo/ will not be included in snapshots, because they are part of another filesystem, and the snapshot system is configured to not cross filesystem boundaries.

Question: I would like to use Octave

I've put an example IPython octave notebook and a Sage octave worksheet here:

https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/cloud-examples/octave/

Unfortunately, neither IPython nor Sage worksheets in Octave mode are "rock solid". For something that is rock solid, type "+New", click terminal, and type "octave" on the command line, and this should work well. You can type "+New", enter a filename that ends with .m, and edit it, then load it into the command line (by typing the filename without the extension).

You might also find this useful: https://github.com/sagemath/cloud/issues/97

Question: I would like to develop a webserver in Python

Here's a simple example of an HTTP server written using the Python SimpleHTTPServer class. Open a project and click "+New" then paste in this link, then click the "From Web" button:

https://gist.github.com/certik/7031075/raw/fe9eb600946e8b3a94b752a50f0ace9d5641354f/browser

Then in a terminal type

chmod +x browser
./browser

You'll see a URL in a box that looks something like this

 https://cloud.sagemath.com/4a5f0542-5873-4eed-a85c-a18c706e8bcd/port/22273/

Just paste it into your browser.

IMPORTANT: This web server is visible exactly to collaborators on your project and nobody else, and all communication is SSL encrypted. Thus you can't use this method to create a general purpose webserver available to the world. On the other hand, this is a good way to collaborate with a controlled group of people on development, without having to worry about security.

If you just want an http view of your files, use the raw servers, which is already available by default at https://cloud.sagemath.com/project_id/raw/. The point of the above script is that you could modify it to provide all sorts of interesting functionality.

Question: How can I install Python packages from https://pypi.python.org/pypi using pip?

NOTE: Temporarily, due to people launching attacks from SMC, using pip install --user is unlikely to work, unless you get network access turned on for your project. Email [email protected] if you need anything installed, or have a good reason to need network access (include project's id).

Let's suppose the package is called ggplot. Create a new Terminal in a project (+New-->Terminal) and type

sage -sh
pip install --user ggplot

Open the project's settings (the gear icon) and click "Restart Sage Worksheet Server" in the Restart section. If you're using Juoyter Notebook you may also have to click "Restart Project Server". Now ggplot should be available in any (restarted) worksheet (click the red restart icon in a worksheet to restart it). The restart is necessary, since the worksheet server uses forking to reduce startup time of worksheets from 5 seconds to 0.1 seconds.

To directly install your Python dependencies for your local user account, you can place your packages here: $HOME/.local/lib/python2.7/site-packages/. The $HOME/.local/ path is the "canonical" root for some overlay directories of linux's standard directory layout (For more information, type $ man hier in a terminal).

Question: Can you tell me how to insert HTML, LaTeX or simple text between two cells in a Sage worksheet?

Put

%md

at the top of a cell to use markdown formatting (which fully supports LaTeX formulas). See http://daringfireball.net/projects/markdown/ about markdown. When you press shift-enter, the output is displayed. Double click to edit.

You can also use %html in a similar way to the above, which also supports LaTeX.

No graphical editor is available yet to edit %html cells, but I hope to change that soon.

Question: I want to use my own copy of Jupyter, which is part of my own Python stack

You can install any version of Python you want into your own project -- just download and build it locally, and install Jupyter (and whatever you want) into it. Then, make a directory "bin" in the home directory of your project and put a symlink to your ipython there, e.g.,

cd ~/bin/
ln -s /path/to/your/ipython .

In project settings, restart your project server (just to be sure), then make sure that when you type "ipython" on the command line, you get your Jupyter. Then clicking on existing Jupyter notebooks or creating new ones (through the gui) should use your copy of Jupyter. It just uses the "Jupyter" that is in the path, since ipython-notebook just sets up some options and runs "ipython notebook" (look at ~/.sagemathcloud/ipython-notebook).

Question: I need to spell check my LaTeX documents

Whenever you save the LaTeX document, it will run a spell checker and underling the words that are not spelled correctly. By default, it uses the language you've set in your web browser.

You can change the autosave interval to be very short in account settings (under editor) if you need the spell checking to update frequently.

Seeing a list of alternative words (correct spellings) isn't supported directly in the editor yet https://github.com/sagemath/cloud/issues/50. For now, a workaround is to run LaTeX-aware aspell, e.g.

1. open a terminal
2. aspell -t -c <filename.tex>

Question: How can I properly work with multi-document LaTeX projects?

Suppose, your LaTeX project is composed of one master.tex file and several chapter-1.tex, chapter-2.tex, etc. SageMathCloud's LaTeX editor only knows about the currently opened file, and using \import{} doesn't work, because the chapter-*.tex parts are not proper documents.

To solve this, use the subfiles package instead. It does not only collect the partial documents into one, but also extracts the preamble of the master.tex file for each chapter-*.tex in order to create valid subdocuments.

Following the documentation, do this:

  1. \usepackage{subfiles} in master.tex

  2. \subfile{⟨subfile name ⟩} for each subfile in master.tex's document environment (i.e. instead of \include or \import).

  3. For each chapter-*.tex subfile:

      \documentclass[⟨master.tex file-name⟩]{subfiles}
      \begin{document}
      ⟨text, graphics, etc.⟩
      \end{document}
    

After that, all *.tex files can be compiled and all other features like forward/inverse search work, too.

Question: I would like that all of my worksheets know where to find a given module that I write or install.

Put an executable file with this content in $HOME/bin/sage:

#!/usr/bin/env bash
SAGE_PATH=$HOME/NEW_MODULE /usr/local/bin/sage "$@"

You could do this by making a new directory called bin, then a new file in there called "sage". Then in the terminal type the following to make "sage" executable.

  cd; cd bin; chmod +x sage

This is also the file "sage" attached to this message.

Then restart the worksheet server by going project settings and clicking "Restart --> Worksheet server".

Now any newly (re-)started worksheet will run with the above modified SAGE_PATH. Since SAGE_PATH is added to PYTHONPATH when Sage starts, this does what you want.

Obviously, I plan to add a simple way to do something equivalent to the above, by filling in some settings box in the UI. I'll update this FAQ entry once I do that.

(From Nathan Dunfield) Another approach, which also works now and doesn't require the custom "$HOME/bin/sage", is to use http://docs.python.org/2/install/#alternate-installation-the-user-scheme

That is, one installs a module with "sage -python setup.py install --user" and it's dumped into

   $HOME/.local/lib/python2.7/site-packages

This is location is searched automatically by Sage's Python without any intervention on the part of the user. (However, I did have to restart the worksheet server to access newly installed modules from a worksheet.) One can also put modules into the user's site-packages by hand and Sage will find them.

Question: In the standard Sage notebook there is a checkbox to switch on the typesetting of math. How do I turn on typesetting of math output in SageMathCloud?

Turn it on with

typeset_mode(True)

and off with

typeset_mode(False)

Putting

%auto
typeset_mode(True)

at the top of a worksheet will make this automatic.

Question: I'm using the vim pentadactyl plugin, and the editor isn't working.

The Pentadactyl plugin is not compatible with the Codemirror editor in SageMathCloud. You can disable Pentadactyl for a particular page, perhaps by pressing Control+Z. SagemMathCloud has it's own Vim bindings for worksheets and editing files; to enable it, go to setting (click the gear by your name in the upper right), then select Vim next to Editor --> Bindings.

Question: I want to browse and view (or edit) files outside of my project's home directory.

You can make a symbolic link to the root of the filesystem by typing

 ln -s / root

Now you can explore the complete filesystem. Note that there many files that you can only read and not write.

Question: I would like to use Emacs in a Terminal on Chrome. Help!

Chrome absolutely doesn't allow normal web applications to intercept certain keystrokes, which makes Emacs-in-a-terminal painful on some operating systems (esp. Linux/Windows). E.g., Ctrl-N brings up a new window, instead of going to the next line! (It is possible to eventually get around this by creating a Chrome extension, but I haven't done this yet.) In the meantime, you can install the SageMathCloud chrome app from the app store or on Linux, type google-chrome --app=https://cloud.sagemath.com to local the website as an app (if you use chromium instead, type chromium-browser --app=https://cloud.sagemath.com).

This is not a completely solution since in some cases, control-shift-minus and control-shift-plus still zoom in and out (on ChromeOS they zoom the entire desktop -- every window, all icons, the time, etc., in and out!). This is a major problem, because control-shift-minus is "undo" in emacs. The workaround I currently use is to put this in my .emacs file, and instead type "alt-u" for undo:

(define-key esc-map "u" 'undo)

Note that undo is also available by default through other key bindings, like C-x u and C-/. (Execute "M-x where-is undo".) So there are other options available.

Question: Is .bashrc or .bash_profile called on startup?

~/.bashrc is run on startup and ~/.bash_profile is not! Hence, use ~/.bashrc to customize your setup, and you can also use ~/.bash_aliases for your aliases (see ~/.bashrc).a

Question: I want to use my own Sage binary (takes 2 minutes)

Get the link address for the latest Ubuntu 14.04 64-bit binary from http://boxen.math.washington.edu/home/sagemath/sage-mirror/linux/64bit/ and do this in a Terminal (for Sage-5.11 right now), which should take less than 10 seconds:

wget http://boxen.math.washington.edu/home/sagemath/sage-mirror/linux/64bit/sage-6.5-x86_64-Linux-Ubuntu_14.04_x86_64.tar.lzma

Then do this, which should take about 2 minutes (since it extracts over 70,000 files!):

time tar xf sage-6.5-x86_64-Linux-Ubuntu_14.04_x86_64.tar.lzma
mv sage-6.5-x86_64-Linux-Ubuntu_14.04_x86_64 sage-6.5

Finally, type

cd; mkdir -p bin; cd bin; ln -sf ~/sage-6.5/sage .

See the discussion about worksheet servers in the next FAQ question below. Also, now that you have your own copy of Sage, you can change anything in Sage! Do so, send us patches, etc. See http://www.sagemath.org/doc/developer/ for step-by-step instructions.

Question: I want to use my own custom built-from-source copy of Sage (takes hours)

Open a Terminal. Grab the source tarball (which takes maybe 5 seconds to download). For example, to get a recent beta

wget http://sage.math.washington.edu/home/release/sage-6.4.rc1.tar.gz

You can browse http://sage.math.washington.edu/home/release/ to find recent releases and testing versions. To build, do the following in your terminal (no need to worry about screen or tmux, of course, since sessions are persistent even if your browser leaves), and check back in about 2 hours:

tar xvf sage-6.4.rc1.tar.gz; cd sage-6.4.rc1; export MAKE="make -j8"; make

WARNING: In fact, building can easily take more than 2 hours. However, by default SageMathCloud projects have an idle timeout that is about 2 hours. If you aren't editing files in the project, your build will get killed part of the way through. If you're doing legit Sage development, email [email protected] and he'll increase the idle timeout so you can easily build Sage.

After doing that, do this in the terminal:

cd; mkdir -p bin; cd bin; ln -s ~/sage-6.4.rc1/sage .

Then restart your worksheet server (in project settings). Then for that project, you'll have your own 100% customizable copy of Sage; and moreover, when I upgrade the system-wide Sage, your project isn't impacted at all -- that sort of stability is a major win for some people. This also uses little extra disk space in my backups/snapshots, because of de-duplication. You can of course also install any custom packages you want into this copy of Sage. You can also help improve Sage: http://www.sagemath.org/doc/developer/

If you want to do Sage development see http://mathandhats.blogspot.com/2014/06/how-to-develop-for-sage-using-sage-math.html.

Important: Whenever you change Python code installed in that copy of Sage, you may have to restart the worksheet server and any running worksheets. This is inconvenient, but is necessary because the worksheet server starts one copy of Sage, then forks off additional copies each time you open a new worksheet, which greatly reduces the time from when you open a worksheet until it actually starts computing things.

Also Important: If your copy of Sage is messed up in some way, then the worksheet server can't start, hence worksheets won't open. To debug this, open a terminal and do this:

~$ cd .sagemathcloud
~/.sagemathcloud$ sage sage_server.py
you should see an error here, e.g., 

and fix whatever error you see.

Question: I want to use a Jupyter Notebook (with Sage support)

Click "+New", then enter a filename and click Jupyter Notebook. This is Jupyter, but enhanced with realtime synchronization. You can also just run a standard Jupyter notebook server (no sync, not integrated into cloud) by (1) finding your project's id in project settings, then (2) visiting https://cloud.sagemath.com/[project_id]/port/jupyter (you will possibly have to refresh your browser if this takes too long the first time). Any collaborator on your project can securely use the Jupyter notebook server by visiting this link, but nobody else can.

If you want to make Jupyter Sage-friendly, so the Sage preparser and library are available, type

 %load_ext sage

Note: nobody has added support for displaying plots yet to this mode (but Volker Braun just did a lot of work on this and it is coming soon!). As a temporary workaround, this function will display a Sage plot:

def showplot(g):
    import IPython.display
    save(g, 'a.png')
    display(IPython.display.Image('a.png'))

For example, this will now work:

g = plot(sin,(0,5)) + plot(cos, (0,5), color='red')
showplot(g)

Question: How can I tell if my code is running in a SageMathCloud Worksheet (a sagews file)?

The global variable __SAGEWS__ will be defined.

Question: How do I access functionality specific to SageMathCloud worksheets (sagews files)?

Type salvus.[tab key].

Question: I created an ssh key in my project; how do I easily copy it?

If you type ssh-keygen in a terminal, then you'll generate an ssh key, which you might use with github (say) or sage's trac to easily push and pull to repositories. To copy this ssh key, you could type cat .ssh/id_rsa.pub and copy in the terminal, but you'll have to manually delete a bunch of newlines. Alternatively, do the following:

  1. In the project file list, click on the icon that looks like an eye in the middle on the right side of the screen to reveal hidden files (those that start with a dot).

  2. Click on the .ssh directory -- you can easily find it by typing "ssh" in the search box labeled "choose files..." on the left.

  3. Click on id_rsa.pub, then highlight everything and copy as usual.

  4. Click the eye again to turn off viewing hidden files.

Alternatively, type this into the small "terminal command" box in "files": cat ~/.ssh/*.pub. Below the box, you can conveniently copy/paste it!

You can also type the following into a full terminal: open ~/.ssh/id_rsa.pub

Question: How to fix an exception related to Sage's Integer(...) vs. Python ints?

By default, Sage parses the input commands and replaces some elements with its own parts and also adds some syntactic sugar. For example, an integer like 234 is translated to Integer(234) in order to be more powerful and live as a part of Sage. To avoid this behaviour, either append an r to the number, like 234r or change the mode of the cell to Python by adding %python at the top. You can also switch to pure Python mode by default via %default_mode python. Alternatively, you can type Integer=int and possibly also RealNumber=float.

Question: I would like to ssh into my project.

Under "Status" in project settings, you'll find a section labeled "SSH into your project", with the ssh command line that you can type (on any computer anywhere) to ssh to your project.

For this to work, you MUST add an ssh public key to your project. There is a link "add a public key to ~/.ssh/authorized_keys" right there, so click on it, and paste an ssh public key into that file, then save it. Now you can ssh to your project.

Question: I would like to install new R packages.

Open a terminal windows and type

    `sage -R`

Then you can install packages as usual

    `install.packages('packagename')`

Note that you may need to request that network access be enabled for your project (email: [email protected]).

Question: I would like to use R in a Sage Worksheet.

Video

  1. Click +New, type a filename, then click the "Sage Worksheet" button.

  2. To evaluate code using R, begin the cell with %r, type the code, then press shift+enter.

  3. Type %default_mode r in a cell and press shift+enter; now all cells will be evaluated using R by default. If you need to switch back, use %default_mode sage.

Question: I would like to use Julia in a Sage Worksheet.

  1. Click +New, type a filename, then click the "Sage Worksheet" button.

  2. To evaluate code using Julia, begin the cell with %julia, type the code, then press shift+enter.

  3. Type %default_mode julia in a cell and press shift+enter; now all cells will be evaluated using Julia by default. If you need to switch back, use %default_mode sage (or %sage to just switch back for one cell).

Question: I would like to create, compile and run a C program.

Video

  1. Click +New, type a filename ending in ".c", e.g., foo.c, and click "Create File" (or just press return).

  2. Paste this code into the file:

#include<stdio.h>
int main(void) {
    printf("Hello World\n");
    printf("this is SageMathCloud!\n");
}
  1. Open a terminal by clicking +New, clicking "Command Line Terminal" (or typing a filename ending in .term), and type gcc foo.c. Finally, run the program by typing ./a.out.

Question: I would like to create, compile and run a Fortran F90 program.

Video

  1. Create a file sum.f90 by clicking +New, which I copy and paste from http://en.wikibooks.org/wiki/Fortran/Fortran_examples#Area_Of_a_Triangle_program

  2. Create a terminal and type gfortran sum.f90

  3. Run the program by typing ./a.out

Question: I would like to create, compile and run a Java program.

Video

  1. Create a file HelloWorld.java containing
public class HelloWorld {
    public static void main (String[] args) {
	System.out.println ("Hello World!");
    }
}
  1. Create a terminal and run javac HelloWorld.java to compile your program.

  2. Run java HelloWorld to see the output.

Question: I want to install Python3 and use it as my default.

With full network access enabled, you can download and compile Python 3 this way. Last line sets a symlink to make it your default!

apt-get source python3.4-dev
cd python3.4-3.4.0/
./configure --prefix=$HOME
make
make install
cd ..
pip3 install numpy
pip3 install scipy
pip3 install matplotlib
pip3 install ipython
pip3 install pyzmq
pip3 install jinja2
pip3 install tornado
ln -s ~/bin/python3 ~/bin/python

Question: Is Scilab broken?

No, the Java stacktrace only happens because there is no graphical interface available due to the fact that there is no graphical interface ;-)

Type

scilab-adv-cli

or

scilab-cli

or

scilab -nw

Question: I would like to nicely display a combinatorial object in a worksheet

How to draw nice latex/tikz-based combinatorial objects in a SageMathCloud worksheet:

bt = BinaryTree([[None, [[],[[], None]]],[[],[]]])
_=latex.eval(latex(bt))

Why? The (awesome) rendering the combinatorics people have implemented for their objects depends on the tikz latex package. Tikz is not at all supported by Mathjax, which is the web-based latex renderer used by the show command. Tikz-using rendering will not work with any web based renderer yet, until somebody implements a tikz package for mathjax. What the above does is instead run latex on the server, convert the result to an image, and display it.

The following Sage/Python command modifies the PATH variable to include $HOME/bin. Sage looks for the fricas executable in this PATH:

os.environ['PATH'] = '%s/bin:%s'%(os.environ['HOME'],os.environ['PATH'])

Restart the worksheet to make sure the new version of FriCAS is started.

A mode xxx specified by %xxx in the first line of a cell in SageMathCloud is just a Python function xxx that takes the cell input as a string and does something visible with it. For example, the following function takes whatever the cell input is, executes the code in Fricas, performs some simple substitutions on the FriCAS output and then displays it using Markdown:

%sage
def fricas_tex(s):
    import re
    t = fricas.eval(s)
    t=re.compile(r'\r').sub('',t)
    # mathml overbar
    t=re.compile(r'&#x000AF;').sub('&#x203E;',t,count=0)
    # cleanup FriCAS LaTeX
    t=re.compile(r'\\leqno\(.*\)\n').sub('',t)
    t=re.compile(r'\\sb ').sub('_',t,count=0)
    t=re.compile(r'\\sp ').sub('^',t,count=0)
    md(t, hide=False)

FriCAS can generate output that is (almost) compatible with Markdown format.

For example you can use this new mode in a cell with the following contents:

%fricas_tex
)set output algebra off
)set output mathml on
)set output tex on
sqrt(2)/2+1

This will evaluate 'sqrt(2)/2+1' and display the result in both LaTeX format and MathML formats (in a MathML capable browser).

Note: The current version of Sage (6.6 and earlier) requires a patch to correct a bug in the fricas/axiom interface.

Question: I want to XXX, but I don't see XXX above.

Do not hesitate to email [email protected] or https://groups.google.com/forum/?fromgroups#!forum/sage-cloud

Clone this wiki locally