Show More
@@ -15,9 +15,13 b' The IPython Notebook combines two components:' | |||||
15 |
|
15 | |||
16 | In the documentation, the distinction between the *N*otebook app and *n*otebook documents is made by capitalization. |
|
16 | In the documentation, the distinction between the *N*otebook app and *n*otebook documents is made by capitalization. | |
17 |
|
17 | |||
18 | The Notebook app automatically saves the current state of the computation in the web browser to the corresponding notebook, which is just a standard text file with the extension ``.ipynb``, stored in a working directory on your computer. This file can be easily put under version control and shared with colleagues. |
|
18 | The Notebook app automatically saves the current state of the computation in the web browser to the corresponding notebook document. | |
|
19 | ||||
|
20 | It is also common to refer to the current state of the computation, as represented by the sequence of input cells in the Notebook app, as a | |||
|
21 | *notebook*. There is no problem with confounding these two concepts, since | |||
|
22 | there is actually a one-to-one correspondence between what you see on the | |||
|
23 | screen inside the app, and what is stored in the corresponding ``.ipynb`` notebook document. | |||
19 |
|
24 | |||
20 | Despite the fact that the notebook documents are plain text files, they use the JSON format in order to store a *complete*, *reproducible* copy of the state of the computation as it is inside the Notebook app. |
|
|||
21 |
|
25 | |||
22 |
|
26 | |||
23 | Features of the IPython Notebook web app |
|
27 | Features of the IPython Notebook web app | |
@@ -46,11 +50,13 b' able to learn how to use the IPython Notebook in just a few minutes.' | |||||
46 | Notebook documents |
|
50 | Notebook documents | |
47 | ------------------ |
|
51 | ------------------ | |
48 |
|
52 | |||
49 | Notebook documents, or *notebooks*, are files which record all computations carried out and the results obtained in a literate way, including inputs, outputs, toegether with descriptive text and mathematics. |
|
53 | Notebook document files are just standard text files with the extension | |
|
54 | ``.ipynb``, stored in the working directory on your computer. This file can be easily put under version control and shared with colleagues. | |||
50 |
|
55 | |||
51 | They are plain text files, which are thus easy to share with colleagues and place under version control. But, by using the |
|
56 | Despite the fact that the notebook documents are plain text files, they use | |
52 | JSON format, they can record all aspects of the computation, including embedding rich media output. |
|
57 | the JSON format in order to store a *complete*, *reproducible* copy of the | |
53 | The standard file extension for notebook documents is ``.ipynb``. |
|
58 | state of the computation as it is inside the Notebook app. | |
|
59 | That is, they record all computations carried out and the results obtained in a literate way; inputs and outputs of computations can be freely mixed with descriptive text, mathematics, and HTML 5 objects. | |||
54 |
|
60 | |||
55 | Notebooks may easily be exported to a range of static formats, including HTML (for example, for blog posts), PDF and slide shows. |
|
61 | Notebooks may easily be exported to a range of static formats, including HTML (for example, for blog posts), PDF and slide shows. | |
56 | Furthermore, any publicly |
|
62 | Furthermore, any publicly | |
@@ -93,13 +99,41 b' The IPython Notebook web app is based on a server-client structure.' | |||||
93 | This server uses a two-process kernel architecture based on ZeroMQ, as well as Tornado for serving HTTP requests. Other clients may connect to the same underlying IPython kernel. |
|
99 | This server uses a two-process kernel architecture based on ZeroMQ, as well as Tornado for serving HTTP requests. Other clients may connect to the same underlying IPython kernel. | |
94 |
|
100 | |||
95 |
|
101 | |||
96 |
|
||||
97 | Basic workflow |
|
|||
98 | -------------- |
|
|||
99 |
|
||||
100 | When you open or create a new notebook, your browser tab will reflect the name of that notebook, prefixed with "IPy". |
|
102 | When you open or create a new notebook, your browser tab will reflect the name of that notebook, prefixed with "IPy". | |
101 | The URL is currently not meant to be human-readable and is not persistent across invocations of the notebook server; however, this will change in a future version of IPython. |
|
103 | The URL is currently not meant to be human-readable and is not persistent across invocations of the notebook server; however, this will change in a future version of IPython. | |
102 |
|
104 | |||
|
105 | ||||
|
106 | Basic concepts in the Notebook app | |||
|
107 | ---------------------------------- | |||
|
108 | ||||
|
109 | 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*. | |||
|
110 | ||||
|
111 | Notebook title | |||
|
112 | ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ | |||
|
113 | ||||
|
114 | 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. | |||
|
115 | ||||
|
116 | Menu bar | |||
|
117 | ˆˆˆˆˆˆˆˆˆ | |||
|
118 | ||||
|
119 | The menu bar presents different options that may be used to manipulate the way the Notebook functions. | |||
|
120 | ||||
|
121 | Toolbar | |||
|
122 | ˆˆˆˆˆˆˆˆ | |||
|
123 | ||||
|
124 | The tool bar gives handy icons for the most-used operations within the Notebook. | |||
|
125 | ||||
|
126 | Input cell | |||
|
127 | ˆˆˆˆˆˆˆˆˆˆˆ | |||
|
128 | ||||
|
129 | Input cells are the core of the funcionality of the IPython Notebook. | |||
|
130 | The notebook consists of | |||
|
131 | They provide the means by which you direct the computational process, | |||
|
132 | They allow you to enter information of different types as input to the computation. | |||
|
133 | ||||
|
134 | ||||
|
135 | The IPython Notebook consists of a sequence of *input cells*. There are several | |||
|
136 | ||||
103 | The normal workflow in a notebook is quite similar to a standard IPython |
|
137 | The normal workflow in a notebook is quite similar to a standard IPython | |
104 | session, with the difference that you can edit a cell in-place multiple |
|
138 | session, with the difference that you can edit a cell in-place multiple | |
105 | times until you obtain the desired results, rather than having to |
|
139 | times until you obtain the desired results, rather than having to | |
@@ -131,27 +165,30 b' There is a limited number of possible cell types, which may be set by using the ' | |||||
131 |
|
165 | |||
132 |
|
166 | |||
133 | Code cells |
|
167 | Code cells | |
134 | ---------- |
|
168 | ˆˆˆˆˆˆˆˆˆˆˆ | |
|
169 | ||||
135 | 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). |
|
170 | 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). | |
136 |
|
171 | |||
137 | Code may be edited inline in the cell, with full syntax highlighting. |
|
172 | Code may be edited inline in the cell, with full syntax highlighting. | |
138 |
|
173 | |||
139 |
|
174 | |||
140 | Rich text using markdown |
|
175 | Rich text using markdown | |
141 | ------------------------- |
|
176 | ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ | |
142 |
|
177 | |||
143 | 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. |
|
178 | 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. | |
144 |
|
179 | |||
145 |
|
180 | |||
146 | Mathematics using LaTeX |
|
181 | Mathematics using LaTeX | |
147 | ----------------------- |
|
182 | ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ | |
148 |
|
183 | |||
149 | You can write mathematics by including LaTeX code in markdown cells. |
|
184 | You can write mathematics by including LaTeX code in markdown cells. | |
150 | Use ``$...$`` for inline math and ``$$...$$`` for displayed math. Standard LaTeX environments, such as ``\begin{equation}...\end{equation}`` also work. |
|
185 | Use ``$...$`` for inline math and ``$$...$$`` for displayed math. Standard LaTeX environments, such as ``\begin{equation}...\end{equation}`` also work. | |
151 | New commands may be defined using standard LaTeX commands, placed anywhere in a markdown cell. |
|
186 | New commands may be defined using standard LaTeX commands, placed anywhere in a markdown cell. | |
152 |
|
187 | |||
153 | Raw cells |
|
188 | Raw cells | |
154 | --------- |
|
189 | ˆˆˆˆˆˆˆˆˆˆ | |
|
190 | ||||
|
191 | ||||
155 |
|
192 | |||
156 | 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. |
|
193 | 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. | |
157 |
|
194 |
General Comments 0
You need to be logged in to leave comments.
Login now