# The PreTeXt Guide

## Section4.20Sage

Until we can expand this section, get some ideas from Section 3.17. We will also collect a few items here, to be cleaned-up later.
For online output formats, sometimes the output of a Sage command can be overwhelming, and a bit complicated to parse. Many objects in Sage also have a representation, which can be used to create a superior output format (for some purposes). Begin a cell with the “magic”:
%display latex

Experiment with the following Sage code on the next line
integral(x^9*cos(x), x)

Boom! Very nice. Try replacing latex with None, plain, ascii_art, or unicode_art.

### Subsection4.20.1Sage Cell Server Design

The ability to execute, and edit, chunks of Sage code is provided by a distinct project, the Sage Cell Server 1 . Simplifying somewhat, the Sage code a reader sees (or has edited!) is shipped out to a running instance of Sage (on a server somewhere) and the code is executed there. The results of that computation are shipped back to the reader for display below the code.
Two implications of this design are
sagecell.sagemath.org/
groups.google.com/g/sage-cell
www.dropbox.com
github.com
github.com/PreTeXtBook/pretext/raw/master/README.md