Show More
@@ -125,7 +125,7 b' Input cells are at the core of the functionality of the IPython Notebook.' | |||||
125 | They are regions in the document in which you can enter different types of text and commands. To *execute* or *run* the *current cell*, i.e. the cell under the cursor, you can use the:kbd:`Shift-Enter` key combination. |
|
125 | They are regions in the document in which you can enter different types of text and commands. To *execute* or *run* the *current cell*, i.e. the cell under the cursor, you can use the:kbd:`Shift-Enter` key combination. | |
126 | This tells the Notebook app to perform the relevant operation for each type of cell (see below), and then to display the resulting output. |
|
126 | This tells the Notebook app to perform the relevant operation for each type of cell (see below), and then to display the resulting output. | |
127 |
|
127 | |||
128 | The notebook consists of a sequence of input cells, labelled ``In[n]``, which may be executed in a non-linear way, and outpus ``Out[n]``, where ``n`` is a number which denotes the order in which the cells were executed over the history of the computational process. |
|
128 | The notebook consists of a sequence of input cells, labelled ``In[n]``, which may be executed in a non-linear way, and outpus ``Out[n]``, where ``n`` is a number which denotes the order in which the cells were executed over the history of the computational process. The content of these cells is accessible as Python variables with the same names. | |
129 |
|
129 | |||
130 |
|
130 | |||
131 | Basic workflow |
|
131 | Basic workflow | |
@@ -186,9 +186,6 b' keyboard shortcuts are also available for the most common ones, so that producti' | |||||
186 |
|
186 | |||
187 | * :kbd:`Ctrl-m`: |
|
187 | * :kbd:`Ctrl-m`: | |
188 | This is the prefix for all of the other shortcuts, which consist of an additional single letter or character. If you type :kbd:`Ctrl-m h` (that is, the sole letter :kbd:`h` after :kbd:`Ctrl-m`), IPython will show you all the available keyboard shortcuts. |
|
188 | This is the prefix for all of the other shortcuts, which consist of an additional single letter or character. If you type :kbd:`Ctrl-m h` (that is, the sole letter :kbd:`h` after :kbd:`Ctrl-m`), IPython will show you all the available keyboard shortcuts. | |
189 |
|
||||
190 |
|
||||
191 |
|
||||
192 |
|
189 | |||
193 |
|
190 | |||
194 | Cell types |
|
191 | Cell types | |
@@ -201,17 +198,23 b' There is a restricted number of possible cell types, which may be set by using t' | |||||
201 | * **raw**: :kbd:`Ctrl-m t` |
|
198 | * **raw**: :kbd:`Ctrl-m t` | |
202 | * **heading**: :kbd:`Ctrl-m 1` - :kbd:`Ctrl-m 6` |
|
199 | * **heading**: :kbd:`Ctrl-m 1` - :kbd:`Ctrl-m 6` | |
203 |
|
200 | |||
|
201 | Upon initial creation, each input cell is by default a code cell. | |||
|
202 | ||||
204 |
|
203 | |||
205 | Code cells |
|
204 | Code cells | |
206 | ~~~~~~~~~~ |
|
205 | ~~~~~~~~~~ | |
207 | Code cells contain code written in some computer language, which is Python by default. When the cell is executed with :kbd:`Shift-Enter`, this code is executed, and the result returned by Python (or the corresponding language) after running the code will be displayed as its output. |
|
206 | A code cell allows you to edit code inline within the cell, with full syntax highlighting and autocompletion. By default, the language of a code cell is Python, but other languages, such as ``julia`` and ``R``, are handled using magic commands (see below). | |
208 |
|
207 | |||
209 | Code may be edited inline in the cell, with full syntax highlighting. |
|
208 | When a code cell is executed with :kbd:`Shift-Enter`, the code that it contains is transparently exported and run in that language | |
|
209 | (with automatic compiling, etc., if necessary). The result that is returned from this computation is then displayed in the notebook space as the cell's | |||
|
210 | *output*. If this output is of a textual nature, then it is placed into a numbered *output cell*. | |||
|
211 | However, many other possible forms of output are allowed, for example, | |||
|
212 | ``matplotlib`` figures and HTML tables (as used, for example, in the ``pandas` data analyis package). This is known as IPython's *rich display* capability. | |||
210 |
|
|
213 | ||
211 |
|
|
214 | ||
212 |
|
|
215 | Rich text using Markdown | |
213 |
|
|
216 | ~~~~~~~~~~~~~~~~~~~~~~~~ | |
214 |
|
|
217 | You can document the computational process in a literate way using rich text. | |
215 | For this purpose, the Notebook provides markdown cells. Text is entered using Markdown_ syntax, allowing for italics, bold, ordered and unordered lists, etc. This is rendered using Markdown syntax to a rich HTML representation when the cell is executed. In this case, the output *replaces* the input cell. |
|
218 | For this purpose, the Notebook provides markdown cells. Text is entered using Markdown_ syntax, allowing for italics, bold, ordered and unordered lists, etc. This is rendered using Markdown syntax to a rich HTML representation when the cell is executed. In this case, the output *replaces* the input cell. | |
216 |
|
|
219 | ||
217 | Within markdown cells, mathematics can be included in a straightforward manner using LaTeX notation: ``$...$`` for inline math and ``$$...$$`` for displayed math. Standard LaTeX environments, such as ``\begin{equation}...\end{equation}``, also work. New commands may be defined using standard LaTeX commands, placed anywhere in a markdown cell. |
|
220 | Within markdown cells, mathematics can be included in a straightforward manner using LaTeX notation: ``$...$`` for inline math and ``$$...$$`` for displayed math. Standard LaTeX environments, such as ``\begin{equation}...\end{equation}``, also work. New commands may be defined using standard LaTeX commands, placed anywhere in a markdown cell. |
General Comments 0
You need to be logged in to leave comments.
Login now