##// 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:

r6035:3077781f
r6482:ba882bf7 merge
Show More
formatting.ipynb
125 lines | 2.7 KiB | text/plain | TextLexer
Brian E. Granger
Converting notebooks to JSON format.
r4634 {
Fernando Perez
Update formatting example nb
r5782 "metadata": {
"name": "formatting"
Brian Granger
Updating example notebooks to v3 format.
r6035 },
"nbformat": 3,
Fernando Perez
Update formatting example nb
r5782 "worksheets": [
{
"cells": [
{
Brian Granger
Updating example notebooks to v3 format.
r6035 "cell_type": "markdown",
Fernando Perez
Update formatting example nb
r5782 "source": [
Brian Granger
Updating example notebooks to v3 format.
r6035 "# Examples of basic formatting in the notebook",
"",
"Normal and formatted text cells such as this one use the ",
"[Markdown](http://daringfireball.net/projects/markdown/basics) syntax.",
"",
"",
"# Title (h1)",
"",
"## Heading (h2)",
"",
"### Heading (h3)",
"",
"Here is a paragraph of text.",
"",
"* One.",
" - Sublist",
" - Here we go",
" - Sublist",
" - Here we go",
" - Here we go",
"* Two.",
" - Sublist",
"* Three.",
" - Sublist",
"",
"Now another list:",
"",
"---",
"",
"1. Here we go",
" 1. Sublist",
" 2. Sublist",
"2. There we go",
"3. Now this",
"",
"And another paragraph.",
"",
"### Heading (h3)",
"",
"#### Heading (h4)",
"",
"##### Heading (h5)",
"",
"###### Heading (h6)",
"",
Fernando Perez
Update formatting example nb
r5782 "## Heading (h2)"
]
Brian Granger
Updating example notebooks to v3 format.
r6035 },
Fernando Perez
Update formatting example nb
r5782 {
Brian Granger
Updating example notebooks to v3 format.
r6035 "cell_type": "markdown",
Fernando Perez
Update formatting example nb
r5782 "source": [
Brian Granger
Updating example notebooks to v3 format.
r6035 "# Heading (h1)",
"",
"## Heading (h2)",
"",
"### Heading (h3)",
"",
"#### Heading (h4)",
"",
"##### Heading (h5)",
"",
"###### Heading (h6)",
"",
"Now for a simple code example:",
"",
" for i in range(10):",
" print i",
"",
Fernando Perez
Update formatting example nb
r5782 "Now more text"
]
Brian Granger
Updating example notebooks to v3 format.
r6035 },
Fernando Perez
Update formatting example nb
r5782 {
Brian Granger
Updating example notebooks to v3 format.
r6035 "cell_type": "markdown",
Fernando Perez
Update formatting example nb
r5782 "source": [
Brian Granger
Updating example notebooks to v3 format.
r6035 "## Heading (h2)",
"",
"Here is text.",
"",
"> This is a *block* quote. This is a block quote. This is a block quote. ",
"> This is a **block** quote. This is a block quote. This is a block quote. ",
"> This is a `block` quote. This is a block quote. This is a block quote. ",
"> This is a block quote. This is a block quote. This is a block quote. ",
"> This is a block quote. This is a block quote. This is a block quote. ",
"> This is a block quote. This is a block quote. This is a block quote. ",
"",
"Here is text",
"",
"<table>",
"<tr>",
"<th>Header 1</th>",
"<th>Header 2</th>",
"</tr>",
"<tr>",
"<td>row 1, cell 1</td>",
"<td>row 1, cell 2</td>",
"</tr>",
"<tr>",
"<td>row 2, cell 1</td>",
"<td>row 2, cell 2</td>",
"</tr>",
Fernando Perez
Update formatting example nb
r5782 "</table>"
]
Brian Granger
Updating example notebooks to v3 format.
r6035 },
Fernando Perez
Update formatting example nb
r5782 {
Brian Granger
Updating example notebooks to v3 format.
r6035 "cell_type": "code",
"collapsed": true,
"input": [],
"language": "python",
MinRK
regenerate example notebooks to remove transformed output
r5981 "outputs": [],
Fernando Perez
Update formatting example nb
r5782 "prompt_number": "&nbsp;"
}
]
}
]
Brian E. Granger
Converting notebooks to JSON format.
r4634 }