##// END OF EJS Templates
Types of input cell
David P. Sanders -
Show More
@@ -106,24 +106,20 b' Basic concepts in the Notebook app'
106 When you finally start editing a notebook document in the Notebook, you will be presented with the title of the notebook, a *menu bar*, a *toolbar* and an empty *input cell*.
106 When you finally start editing a notebook document in the Notebook, you will be presented with the title of the notebook, a *menu bar*, a *toolbar* and an empty *input cell*.
107
107
108 Notebook title
108 Notebook title
109 ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ
109 ~~~~~~~~~~~~~~
110
111 The title of the notebook document that is currently being edited is displayed at the top of the page, next to the ``IP[y]: Notebook`` logo. This title may be edited directly by clicking on it. The title is reflected in the name of the ``.ipynb`` notebook document file that is saved.
110 The title of the notebook document that is currently being edited is displayed at the top of the page, next to the ``IP[y]: Notebook`` logo. This title may be edited directly by clicking on it. The title is reflected in the name of the ``.ipynb`` notebook document file that is saved.
112
111
113 Menu bar
112 Menu bar
114 ˆˆˆˆˆˆˆˆˆ
113 ~~~~~~~~
115
116 The menu bar presents different options that may be used to manipulate the way the Notebook functions.
114 The menu bar presents different options that may be used to manipulate the way the Notebook functions.
117
115
118 Toolbar
116 Toolbar
119 ˆˆˆˆˆˆˆˆ
117 ~~~~~~~
120
121 The tool bar gives handy icons for the most-used operations within the Notebook.
118 The tool bar gives handy icons for the most-used operations within the Notebook.
122
119
123
120
124 Input cells
121 Input cells
125 -----------
122 -----------
126
127 Input cells are the core of the functionality of the IPython Notebook.
123 Input cells are the core of the functionality of the IPython Notebook.
128 They are regions in the document where you can enter different types of text and commands. These regions are then executed using :kbd:`Shift-Enter`, at which point the Notebook executes the current input cell, displays the resulting output beneath it, and adds a new input cell below.
124 They are regions in the document where you can enter different types of text and commands. These regions are then executed using :kbd:`Shift-Enter`, at which point the Notebook executes the current input cell, displays the resulting output beneath it, and adds a new input cell below.
129
125
@@ -133,7 +129,6 b' providing the means to direct the computational process.'
133
129
134 Basic workflow
130 Basic workflow
135 --------------
131 --------------
136
137 The normal workflow in a notebook is, then, quite similar to a standard IPython session, with the difference that you can edit cells in-place multiple
132 The normal workflow in a notebook is, then, quite similar to a standard IPython session, with the difference that you can edit cells in-place multiple
138 times until you obtain the desired results, rather than having to
133 times until you obtain the desired results, rather than having to
139 rerun separate scripts with the ``%run`` magic command. (Magic commands do, however, also work in the notebook; see below). Typically, you'll work on a problem in pieces,
134 rerun separate scripts with the ``%run`` magic command. (Magic commands do, however, also work in the notebook; see below). Typically, you'll work on a problem in pieces,
@@ -152,9 +147,8 b' computer (i.e. if you are accessing it via your localhost address at ``127.0.0.1'
152
147
153 Cell types
148 Cell types
154 ----------
149 ----------
155
150 Each IPython input cell has a *cell type*.
156 Each IPython input cell has a cell type.
151 There is a restricted number of possible cell types, which may be set by using the cell type dropdown on the toolbar, or via the following keyboard shortcuts:
157 There is a limited number of possible cell types, which may be set by using the cell type dropdown on the toolbar, or via the following keyboard shortcuts:
158
152
159 * code :kbd:`Ctrl-m y`
153 * code :kbd:`Ctrl-m y`
160 * markdown :kbd:`Ctrl-m m`
154 * markdown :kbd:`Ctrl-m m`
@@ -163,31 +157,21 b' There is a limited number of possible cell types, which may be set by using the '
163
157
164
158
165 Code cells
159 Code cells
166 ˆˆˆˆˆˆˆˆˆˆˆ
160 ~~~~~~~~~~
167
161 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.
168 Code cells contain code, which is Python by default. This code is executed when :kbd:`Shift-Enter` is typed, and the result of running the code will then be displayed as its output just below the cell. For example, the output may be a figure, which can be displayed inline (see below).
169
162
170 Code may be edited inline in the cell, with full syntax highlighting.
163 Code may be edited inline in the cell, with full syntax highlighting.
171
164
172
165
173 Rich text using markdown
166 Rich text using Markdown
174 ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ
167 ~~~~~~~~~~~~~~~~~~~~~~~~
168 The computational process may be documented in a literate way using rich text.
169 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.
175
170
176 The computational process may be documented using rich text by using a markdown cell. Rich text is entered using Markdown_ syntax, allowing for italics, bold, ordered and unordered lists, etc.
171 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.
177
178
179 Mathematics using LaTeX
180 ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ
181
182 You can write mathematics by including LaTeX code in markdown cells.
183 Use ``$...$`` for inline math and ``$$...$$`` for displayed math. Standard LaTeX environments, such as ``\begin{equation}...\end{equation}`` also work.
184 New commands may be defined using standard LaTeX commands, placed anywhere in a markdown cell.
185
172
186 Raw cells
173 Raw cells
187 ˆˆˆˆˆˆˆˆˆˆ
174 ~~~~~~~~~
188
189
190
191 Raw cells provide a place to put additional information which is not evaluated by the Notebook. This can be used, for example, for extra information to be used when the notebook is exported to a certain format.
175 Raw cells provide a place to put additional information which is not evaluated by the Notebook. This can be used, for example, for extra information to be used when the notebook is exported to a certain format.
192
176
193
177
General Comments 0
You need to be logged in to leave comments. Login now