Merge pull request #311 from jcb91/readmes

Updates for readmes
This commit is contained in:
Juergen Hasch
2015-09-23 19:23:02 +02:00
34 changed files with 319 additions and 210 deletions
+17 -10
View File
@@ -1,5 +1,6 @@
Jupyter notebook extensions
===========================
This repository contains a collection of extensions that add functionality to the Jupyter notebook.
These extensions are mostly written in Javascript and will be loaded locally in your Browser.
@@ -8,25 +9,28 @@ The IPython-contrib repository is maintained independently by a group of users a
The maturity of the provided extensions may vary, please create an issue if you encounter any problems.
IPython/Jupyter version support
=======================
| Version | Description |
|--------|-------------|
| IPython 1.x | not supported |
| IPython 2.x | checkout 2.x branch |
| IPython 3.x | checkout 3.x branch |
IPython/Jupyter version support
===============================
| Version | Description |
|-------------|------------------------|
| IPython 1.x | not supported |
| IPython 2.x | checkout 2.x branch |
| IPython 3.x | checkout 3.x branch |
| Jupyter 4.x | checkout master branch |
There are different branches of the notebook extensions in this repository.
Please make sure you use the branch corresponding to your IPython/Jupyter version.
Documentation
=============
In the 4.x Jupyter repository, all extensions that are maintained and active have a markdown readme file for
documentation and a yaml file to allow them being configured using the 'nbextensions' server extension.
For older releases (2.x und 3.x) and general installation information, look at the [Wiki](https://github.com/ipython-contrib/IPython-notebook-extensions/wiki)
For older releases (2.x and 3.x), and for general installation information, look at the [Wiki](https://github.com/ipython-contrib/IPython-notebook-extensions/wiki)
Some extensions are not documented. We encourage you to add documentation for them.
@@ -43,17 +47,19 @@ After installation, simply go to the `/nbextensions/` page in the notebook to ac
For more complex installation scenarios, please look up the documentation for installing notebook extensions,
server extensions, pre/postprocessors, and templates at the Jupyter homepage http://www.jupyter.org
More information can also be found in the [Wiki](https://github.com/ipython-contrib/IPython-notebook-extensions/wiki/Home_Jupyter)
More information can also be found in the [Wiki](https://github.com/ipython-contrib/IPython-notebook-extensions/wiki)
Conda receipe
------------
-------------
The conda receive can be found in `meta.yaml`. It will build a conda package using the most recent master branch.
When you install the conda package, `setup.py` will be called to install all required files of your local user.
setup.py
--------
This is the installation script that installs the notebook extensions for your local user.
It will
1. find your local configuration directories
@@ -67,6 +73,7 @@ It will
**Important**: The installation script will overwrite files without asking. It will not delete files that do not belong
to the repository. It will also not delete your Jupyter configuration.
Notebook extension structure
============================
Binary file not shown.

Before

Width:  |  Height:  |  Size: 479 KiB

After

Width:  |  Height:  |  Size: 434 KiB

+21 -60
View File
@@ -1,4 +1,5 @@
# Introduction
Introduction
============
This extension provides a web page
(which you can find by going to the '/nbextensions' URL)
@@ -12,7 +13,7 @@ If you encounter problems with this config page, please create an issue at the
[ipython-contrib](https://github.com/ipython-contrib/IPython-notebook-extensions)
repository.
![](https://github.com/ipython-contrib/IPython-notebook-extensions/raw/master/nbextensions/config/icon.png)
![](icon.png)
The config page is realized using a notebook server extension, new in IPython 3.x.
In order to work, this extension (`nbextensions/config`) needs to be installed.
@@ -21,8 +22,13 @@ In addition, any notebook extensions it will configure will require a YAML
description file under the `nbextensions` directory
(see installation notes, below) in order to be found.
You can see a video of the config extension in action on youtube:
# Setup procedure
[![config extension on youtube](https://i.ytimg.com/vi_webp/h9DEfxZSz2M/mqdefault.webp)](https://youtu.be/h9DEfxZSz2M)
Setup procedure
===============
If you've followed the
[main repository installation instructions](../../README.md), such as
@@ -36,7 +42,8 @@ Otherwise, if you didn't follow the main repository installation instructions,
you can use the detailed instructions below - good luck!
## 1. Installation
1. Installation
---------------
All required files for the configuration page are originally located in the
'config' subdirectory of the repository.
@@ -55,7 +62,9 @@ All required files for the configuration page are originally located in the
`~/Library/Jupyter/nbextensions/config/`.
## 2. Configuration
2. Configuration
----------------
To enable the config extension, you'll need to edit your notebook config file.
In 3.x, this is in your profile directory, e.g.
`~/.ipython/profile_default/ipython_notebook_config.py`
@@ -79,7 +88,9 @@ c.NotebookApp.extra_template_paths = [os.path.join(ipythondir,'templates') ]
```
## 3. Help with locating files
3. Help with locating files
---------------------------
If you're having problems with where the different files are supposed to go,
here's an attempt at an explanation.
Jupyter/IPython 4.x works differently than IPython 3.x:
@@ -120,32 +131,8 @@ print(jupyter_path())
```
### Checking/loading notebook extension manually from IPython
You can check if the directory or a file (or list of files) exists:
```Python
import notebook
notebook.nbextensions.check_nbextension('usability/codefolding', user=True)
notebook.nbextensions.check_nbextension('usability/codefolding/main.js', user=True)
```
Make sure to use `user=True` if you have the extensions installed in your
local path (in `jupyter_data_dir()`) rather than in the global install location.
To enable an extension:
```Python
import notebook
Enabler = notebook.nbextensions.EnableNBExtensionApp()
Enabler.enable_nbextension('usability/codefolding/main')
```
To disable an extension:
```Python
import notebook
Disabler = notebook.nbextensions.DisableNBExtensionApp()
Disabler.disable_nbextension('usability/codefolding/main')
```
Internals
=========
The configuration for which nbextensions are enabled is stored in
either `jupyter_config_dir()/notebok.json`
@@ -156,34 +143,8 @@ If you reload the notebook after enabling a notebook extension, the extension
should be loaded. You can check the Javascript console to confirm.
### Checking/loading notebook extension manually from the command line
Installing and activating notebook extensions works differently in Jupyter
compared to Python.
Please be aware that Jupyter is still in development stage, so some commands
are likely to change in future.
To install an extension:
```
jupyter nbextension install <name of extension>
```
Example:
```
jupyter nbextension install usability/codefolding/main
```
To activate an extension:
```
jupyter nbextension enable <name of extension>
```
To deactivate an extension:
```
jupyter nbextension disable <name of extension>
```
### Troubleshooting
Troubleshooting
===============
If an extension doesn't work, here are some ways you can check what is wrong:

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

+5 -5
View File
@@ -1,17 +1,17 @@
Description
-----------
Add a toolbar button to call nbconvert for the current the notebook and optionally display the converted html file in a
new browser tab.
![](printview-button.png)
The extensions has two options:
* "nbconvert options":
Options to nbconvert. Default: `--to html`
* _nbconvert options_: Options to pass to nbconvert. Default: `--to html`
* "open a new tab in the browser to display nbconvert output (for html only)":
After conversion to html, open a new tab. Only makes sense when converting to html output format.
* _open tab_: After conversion to html, open a new tab to display the output. Only really makes sense when converting to html output format. Default: `true`
This leaves the resulting static html file from your notebook in the directory where the notebook resides.
Internals
---------
+3 -2
View File
@@ -1,11 +1,12 @@
## Legacy Slidemode.
Legacy Slidemode
================
This folder contains the legacy slidemode
Put the following in your custom.js
```
```javascript
// Slidemode
require(['nbextensions/IPython-notebook-extensions/slidemode/main','base/js/events'], function(slidemode, events){
events.on('app_initialized.NotebookApp', function(){
@@ -1,36 +1,41 @@
# Description
Description
===========
This IPython notebook extension adds system clipboard actions for single or multiple cells.
It allows cut/copy/paste operation of notebook cells and images. Images will be saved to the directory where the
current notebook sits. There is currently no way to embed images in markdown cells, due to the google-caja sanitizer
used to prevent malicous code execution. Multi-cell operation is possible with the latest Jupyter version, or using the `rubberband` extension in this repository.
A demo showing single-cell copy&paste operating in Chrome here:
A demo showing single-cell copy & paste operating in Chrome is available on youtube:
http://youtu.be/iU9dNe4vMUY
[![copy & paste extension on youtube](http://img.youtube.com/vi/iU9dNe4vMUY/0.jpg)](http://youtu.be/iU9dNe4vMUY "copy & paste extension on youtube")
*This extension works only for Chrome, as other browsers do not expose the system clipboard to Javascript.*
## Hotkeys
| Key | <--> | Function |
| ----------|- |----------|
| CTRL+C || Copy cell to system clipboard |
| CTRL+X || Cut cell and copy to system clipboard |
| CTRL+V || Paste cell or image from system clipboard |
| Hotkey | Function |
|--------|-------------------------------------------|
| CTRL+C | Copy cell to system clipboard |
| CTRL+X | Cut cell and copy to system clipboard |
| CTRL+V | Paste cell or image from system clipboard |
## Installation
You can manually load the extension from within the IPyton notebook:
Installation
============
You can manually load the extension from within the IPython notebook:
```javascript
%%javascript
IPython.load_extensions('nbextensions/usability/chrome_clipboard');
IPython.load_extensions('usability/chrome_clipboard');
```
For installation instructions using the nbextensions config tool, please see the
[Readme](/rendermd/nbextensions/config/readme.md)
[Readme](../../config/readme.md)
## Internals
Internals
=========
Regarding copying notebook cells over the clipboard, they are stored as mime-type `notebook-cell/json`.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

+32 -14
View File
@@ -2,52 +2,70 @@ This extension adds codefolding functionality from CodeMirror to a codecell.
After clicking on the gutter (left margin of codecell) or typing `Alt+F`, the code gets folded. See the examples below. The folding status is saved in the cell metadata of the notebook, so reloading of a notebook will restore the folding view.
## Supported modes:
Supported modes
===============
Three different folding modes are supported:
### Indent Folding
Indent Folding
--------------
Python-style code folding, detetects indented code.
![](https://github.com/ipython-contrib/IPython-notebook-extensions/raw/master/wiki-images/codefolding_indent_unfolded.png)
![](codefolding_indent_unfolded.png)
The unfolded code above can be folded like this:
![](https://raw.github.com/ipython-contrib/IPython-notebook-extensions/master/wiki-images/codefolding_indent_folded_1.png)
![](codefolding_indent_folded_1.png)
or this:
![](https://raw.github.com/ipython-contrib/IPython-notebook-extensions/master/wiki-images/codefolding_indent_folded_2.png)
![](codefolding_indent_folded_2.png)
Bracket Folding
---------------
### Bracket Folding
Other languages like Javascript use brackets to designate code blocks. Codefolding is supported for Javascript in using the `%%javascript` magic in a codecell.
### Firstline Comment Folding
Firstline Comment Folding
-------------------------
Allows collapsing of Python code cells to a single comment line. This is useful for long codecells. The algorithm simply looks for a comment in the first line and allows folding in the rest of the cell.
![](https://github.com/ipython-contrib/IPython-notebook-extensions/raw/master/wiki-images/codefolding_firstline_unfolded.png)
![](codefolding_firstline_unfolded.png)
The code above can be folded like this:
![](https://raw.github.com/ipython-contrib/IPython-notebook-extensions/master/wiki-images/codefolding_firstline_folded.png)
![](codefolding_firstline_folded.png)
Installation
============
Install the master version of the IPython-notebook-extensions repository as explained on the main wiki page
[here](https://github.com/ipython-contrib/IPython-notebook-extensions/wiki/Home_3x).
Then load the extension from within the IPyton notebook:
Install the master version of the IPython-notebook-extensions repository as explained in the [wiki](https://github.com/ipython-contrib/IPython-notebook-extensions/wiki/).
Then load the extension from within the IPython notebook:
```javascript
%%javascript
IPython.load_extensions('IPython-notebook-extensions-master/usability/codefolding/codefolding');
IPython.load_extensions('usability/codefolding/codefolding');
```
## Internals
Internals
=========
You need the current master branch from Codemirror in order to get codefolding to work. This is still very much work-in-progress.
The folding information is saved in the metadata of each codecell. The number of the folding start line (beginning with 0) is stored in an array:
```javascript
cell.metadata.code_folding = [ 3, 20, 33 ]
```
When reloading the IPython notebook, the folding status is restored.
+20 -8
View File
@@ -4,22 +4,34 @@ The notebook has been tested with Firefox and Chrome.
A demo video showing drag&drop of images is here:
http://youtu.be/buAL1bTZ73c
## Installation
From IPython simply call
Installation
============
Copy the contents of the `dragdrop` directory to a new `/nbextensions/usability/dragdrop` directory of your user's IPython directory, or from IPython simply call
```python
import IPython
IPython.html.nbextensions.install_nbextension('https://raw.githubusercontent.com/ipython-contrib/IPython-notebook-extensions/master/usability/dragdrop/main.js')
IPython.html.nbextensions.install_nbextension('https://raw.github.com/ipython-contrib/IPython-notebook-extensions/master/nbextensions/usability/dragdrop/main.js')
```
Then load the extension from within the IPyton notebook:
Then load the extension from within the IPython notebook:
```javascript
%%javascript
IPython.load_extensions('drag-and-drop');
IPython.load_extensions('usability/dragdrop/main');
```
Alternatively, you can add the load command to your `custom.js`.
## Internals
Or, for permanent installation instructions, please see the [readme](../../README.md),
or the [wiki](https://github.com/ipython-contrib/IPython-notebook-extensions/wiki).
Internals
=========
The image will be uploaded to the server into the directory where your notebook resides. This means, the image is not copied into the notebook itself, it will only be linked to. The markdown cell in the notebook will contain this tag:
`<img src="http://127.0.0.1:8888/notebooks/myimage.png"/>`
```html
<img src="http://127.0.0.1:8888/notebooks/myimage.png"/>
```
If you run `nbconvert` to generate a HTML file, this image will remain outside of the html file. You can embedd all images by calling `nbconvert` with the option `--post=embed.EmbedPostProcessor`. The file `embed.py`, located in the same directory of this extension needs to be in `PYTHONPATH` to be found.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

+36 -13
View File
@@ -1,28 +1,51 @@
This extension displays when the last execution of a cell occurred and how long it took.
## Display
Display
=======
Every executed cell is extended with a new area, attached at the bottom of the input area, that displays when the user started the last execution of this cell. When the kernel finishes to execute a cell, this area is update with the duration.
![](https://github.com/ipython-contrib/IPython-notebook-extensions/raw/master/wiki-images/execution-timings-box.png)
![](execution-timings-box.png)
## Toggling
Toggling
========
The timings area can be hide by double clicking on it or using the option in the cell menu. The menu toggle timings->All hides (resp. shows) all the possible timings area if the first cell is displayed (resp. hidden).
![](https://github.com/ipython-contrib/IPython-notebook-extensions/raw/master/wiki-images/execution-timings-menu.png)
![](execution-timings-menu.png)
Internals
=========
## Internals
To be sure that the kernel is run intentionally by executing a codecell, codecell.prototype.execute() is overloaded and a new event 'ExecuteCell.ExecuteTime' is fired, that this extension catches to display the start time. We use the event 'status_idle.Kernel' to know when the kernel finished the execution of the cell.
## Installation
Copy `ExecuteTime.{js,css}`, and add `require(['/static/custom/ExecuteTime.js'])` to `custom.js` in your profile's `/static/custom` directory, so it looks like this:
```javascript
$([IPython.events]).on('app_initialized.NotebookApp', function(){
//...
require(['/static/custom/ExecuteTime.js'])
});
Installation
============
Copy the contents of the `execute_time` directory to a new `/nbextensions/usability/execute_time` directory of your user's IPython directory, or from IPython simply call
```python
import IPython
IPython.html.nbextensions.install_nbextension('https://raw.github.com/ipython-contrib/IPython-notebook-extensions/master/nbextensions/usability/execute_time/ExecuteTime.js')
```
## TODO
Then you can manually load the extension for a single notebook from within the IPython notebook:
```javascript
%%javascript
IPython.load_extensions('usability/execute_time/ExecuteTime');
```
For permanent installation instructions using the nbextensions config tool, please see the
[readme](../../config/readme.md),
or the [wiki](https://github.com/ipython-contrib/IPython-notebook-extensions/wiki)
TODO
====
The timings information could be stored into the notebook and displayed when it is loaded. Where these information should be stored is still to be decided (maybe in the metadata).

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

@@ -0,0 +1,18 @@
This extension allows hiding all codecells of a notebook. This can be achieved by clicking on the button toolbar:
![](hide_input_all_toggle_codecells.png)
Typically, all codecells are shown with their corresponding output:
![](hide_input_all_show.png)
Clicking on the "Toggle codecell display" toolbar button hides all codecells:
![](hide_input_all_hide.png)
Internals
=========
The codecell hiding state is stored in the metadata `IPython.notebook.metadata.hide_input`.
If it is set to `true`, all codecells will be hidden on reload.
@@ -1,19 +1,19 @@
This directory contains utilitary functions used to convert the notebook, with embedded LaTeX structures, to LaTeX or html.
Procedures are detailed in the documentation latex_env_doc.* and documentation.pdf.
Files
-----
File | description
----------------------- | -----------------------------
header.tex | Header used for LaTeX compilation
ipynb_thms_to_html | Converter from ipynb to html
ipynb_thms_to_latex | Converter from ipynb to LaTeX
post_html_thms.js | Utilitary script used during ipynb --> html conversion
readme.md | This file
texheaders_rm.py | Utilitary script used during ipynb --> LaTeX conversion (removes header/footer)
thmInNb_tolatex.py | Utilitary script used during ipynb --> LaTeX conversion
thmsInNb_article.tplx | Template for LaTeX conversion (article style)
thmsInNb_book.tplx | Template for LaTeX conversion (book style)
thmsInNb.tpl | Template for html conversion
File | description
----------------------|--------------------------------------------------------
header.tex | Header used for LaTeX compilation
ipynb_thms_to_html | Converter from ipynb to html
ipynb_thms_to_latex | Converter from ipynb to LaTeX
post_html_thms.js | Utilitary script used during ipynb --> html conversion
readme.md | This file
texheaders_rm.py | Utilitary script used during ipynb --> LaTeX conversion (removes header/footer)
thmInNb_tolatex.py | Utilitary script used during ipynb --> LaTeX conversion
thmsInNb_article.tplx | Template for LaTeX conversion (article style)
thmsInNb_book.tplx | Template for LaTeX conversion (book style)
thmsInNb.tpl | Template for html conversion
+24 -18
View File
@@ -1,4 +1,5 @@
# (some) LaTeX environments for Jupyter notebook
(some) LaTeX environments for Jupyter notebook
==============================================
This extension for IPython 3.x or Jupyter enables to use some LaTeX commands and environments in the notebook's markdown cells.
@@ -21,39 +22,44 @@ The `conversion` directory contains scripts for converting the notebooks to html
enabled by the extension. Theses scripts require nodejs, perl, ipython3. Examples of such conversions are in the `doc` subdirectory that constains an example notebook and its html and pdf versions. This serves as the documentation.
# Demo/documentation
Demo/documentation
==================
A demo notebook `latex_env_doc.ipynb` is provided. Its html version is [latex_env_doc.html](https://rawgit.com/jfbercher/latex_envs/master/doc/latex_env_doc.html) and a pdf resulting
from conversion to LaTeX is available as [documentation](https://rawgit.com/jfbercher/latex_envs/master/doc/latex_env_doc.html).
# Installation
Installation
============
You should follow the instructions in the wiki.
- Manual installation: Clone the repository and then copy the files to
the notebook extension directory, usually ~/.local/share/jupyter/nebextensions (Jupyter) or ~/.ipython/nbextensions (IPython 3.x).
Copy the scripts in conversion/ to some directory (preferably in your path).
You should follow the instructions in the [wiki](https://github.com/ipython-contrib/Ipython-notebook-extensions/wiki).
- Manual installation: Clone the repository and then copy the files to the notebook extension directory, usually ~/.local/share/jupyter/nebextensions (Jupyter) or ~/.ipython/nbextensions (IPython 3.x). Copy the scripts in conversion/ to some directory (preferably in your path).
- Automated installation
An even more simple procedure is to issue
```
jupyter nbextension install https://rawgit.com/jfbercher/latex_envs/master/latex_envs.zip --user
An even more simple procedure is to issue
``` bash
jupyter nbextension install https://rawgit.com/jfbercher/latex_envs/master/latex_envs.zip --user
```
at the command line.
Either load the extension from your `custom.js` or use a code cell with
%%javascript
require("base/js/utils").load_extensions("latex_envs/latex_envs")
```javascript
%%javascript
require("base/js/utils").load_extensions("latex_envs/latex_envs")
```
You can automatically load the extension via
jupyter nbextension enable latex_envs/latex_envs
# Disclaimer, sources and acknowledgments
```bash
jupyter nbextension enable latex_envs/latex_envs
```
Disclaimer, sources and acknowledgments
=======================================
Code certainly needs improvements. **Contributions, comments, issues are most welcome and will be deeply appreciated.**
The original idea and starting code come from a discussion here: [https://github.com/benweet/stackedit/issues/187](https://github.com/benweet/stackedit/issues/187). Examples and code from [https://github.com/ipython-contrib/IPython-notebook-extensions](https://github.com/ipython-contrib/IPython-notebook-extensions) were also used. The bibliography part was inspired by the nice extension [icalico-document-tools](https://bitbucket.org/ipre/calico/downloads/).
@@ -3,9 +3,12 @@ This extension limits the number of characters a codecell can output as text. Th
[![Demo Video](http://img.youtube.com/vi/U26ujuPXf00/0.jpg)](https://youtu.be/U26ujuPXf00)
You can set the number of characters using the ConfigManager:
```Python
from IPython.html.services.config import ConfigManager
ip = get_ipython()
cm = ConfigManager(parent=ip, profile_dir=ip.profile_dir.location)
cm.update('notebook', {"limit_output": 1000})
```
or by using the nbextensions [config extension](../../config/readme.md).
@@ -1,24 +1,28 @@
Hotkeys in
## Edit Mode
| Hotkey | Description |
|------------|-------------|
| `pageup` | scroll page up |
| `pagedown` | scroll page down |
| `Alt`- `+` | Split cell and keep cursor position |
| `Alt`- `-` | Combine cell and keep cursor position |
| `Alt`-`n` | Toggle line number display in current codecell |
Edit Mode
=========
| Hotkey | Description |
|-----------------|-----------------------------------------------------------|
| `pageup` | scroll page up |
| `pagedown` | scroll page down |
| `Alt`- `+` | Split cell and keep cursor position |
| `Alt`- `-` | Combine cell and keep cursor position |
| `Alt`-`n` | Toggle line number display in current codecell |
| `Shift`-`Enter` | Execute cell, goto next cell and stay in edit mode if next cell is a code cell or unredered markdown cell |
| `Ctrl`-`Enter` | Execute cell and stay in edit mode if cell is a code cell |
| `Ctrl`-`y` | toggle celltype between markdown and code |
| `Ctrl`-`Enter` | Execute cell and stay in edit mode if cell is a code cell |
| `Ctrl`-`y` | toggle celltype between markdown and code |
## Command Mode
| Hotkey | Description |
|------------|-------------|
| `esc` | toggle to edit mode |
| `home` | Go to top of notebook |
| `end` | Go to bottom of notebook |
| `pageup` | scroll page up |
| `pagedown` | scroll page down |
Command Mode
============
| Hotkey | Description |
|------------|--------------------------|
| `esc` | toggle to edit mode |
| `home` | Go to top of notebook |
| `end` | Go to bottom of notebook |
| `pageup` | scroll page up |
| `pagedown` | scroll page down |

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

@@ -1,26 +1,34 @@
This extension allows dynamically displaying Python variables in markdown cells.
Example:
For example:
If you set variable `a` in Python
```Python
a = 1.23
```
and write the following line in a markdown cell:
```Markdown
a = {{a}}
```
It will be displayed as:
```Markdown
a = 1.23
```
[![Demo Video](http://img.youtube.com/vi/_wLwLsgkExc/0.jpg)](https://youtu.be/_wLwLsgkExc)
## Further examples
Further examples
----------------
Before rendering the markdown cell:
![before](https://raw.github.com/ipython-contrib/IPython-notebook-extensions/master/wiki-images/python-markdown-pre.png)
![before](python-markdown-pre.png)
After rendering the markdown cell:
![after](https://raw.github.com/ipython-contrib/IPython-notebook-extensions/master/wiki-images/python-markdown-post.png)
![after](python-markdown-post.png)
Python code is only executed when the notebook is trusted. So if your original Python code is still shown in rendered markdown output, please make sure your notebook is trusted.
@@ -28,21 +36,27 @@ Python code is only executed when the notebook is trusted. So if your original P
Also, images in markdown will be removed due to the HTML sanitizer after a reload.
## Installation
Installation
============
Install the master version of the IPython-notebook-extensions repository as explained on the main wiki page.
Then load the extension from within the IPyton notebook:
Then load the extension from within the IPython notebook:
```javascript
%%javascript
IPython.load_extensions('IPython-notebook-extensions-master/usability/python-markdown/main');
IPython.load_extensions('usability/python-markdown/main');
```
In order to have `nbconvert` show the preprocessed output, copy the `pymdpreprocessor.py` file to a location in your `PYTHONPATH`and add or extend the following line to your `ipython_nbconvert_config.py` configuration file:
`c.Exporter.preprocessors = [ 'pymdpreprocessor.PyMarkdownPreprocessor' ]`
## Internals
Internals
=========
The extension overrides the `textcell.MarkdownCell.prototype.render` function and searches for a Python expression enclosed in double curly braced `{{ <expr> }}`. It then executes the expression and replaces it with the result returned from Python, embedded in a `<span>` tag.
Additionally, the result is saved in the metadata of the markdown cell, i.e. `cell.metadata.variables[varname]`. This stored value is displayed when reloading the notebook and used for the nbconvert preprocesser.
The preprocessor `pymdpreprocessor.PyMarkdownPreprocessor` allows `nbconvert` to display the computed variables when converting the notebook to an output file format.
+13 -3
View File
@@ -1,7 +1,9 @@
Multi-Cell selection using a rubberband. This extension is only available for IPython version 3.x.
Description
===========
The *rubberband* extension allows selecting multiple cells. Cells are selected by pressing `shift` or `ctrl`+`shift` + left mouse button click and dragging the rubber band over the cells.
* `shift` + left mouse button : select cells that are currently touched by the rubberband
@@ -15,13 +17,21 @@ A short video demonstrating the rubberband extension can be found here:
Two other extensions make use of this feature: exercise and chrome_clipboard.
Installation
============
Copy the `rubberband` directory to a new `/nbextensions/usability/rubberband` directory of your user's IPython directory and add
Copy the contents of the `rubberband` directory to a new `/nbextensions/usability/rubberband` directory of your user's IPython directory.
Then you can manually load the extension from within the IPython notebook:
```javascript
IPython.load_extensions('usability/rubberband/main')
%%javascript
IPython.load_extensions('usability/rubberband/main');
```
to your `custom.js` file. Take a look at the general installation instructions in the Wiki if you are unsure how to proceed.
Or, for permanent installation instructions, please see the [readme](../../README.md),
or the [wiki](https://github.com/ipython-contrib/IPython-notebook-extensions/wiki).
Internals
=========
+4 -1
View File
@@ -1,8 +1,11 @@
This extension enables the Ruler CodeMirror feature
## Configuration
Configuration
-------------
You can set the number of characters in the notebook extensions configration page or use the ConfigManager:
```Python
from IPython.html.services.config import ConfigManager
ip = get_ipython()
+26 -10
View File
@@ -1,7 +1,9 @@
Runtools provide a number of additional functions for working with code cells in the IPython notebook:
Code Cell Execution
---
-------------------
* Execute a single cell
* Execute from top cell to currently selected cell
* Execute from currently selected cell to bottom cell
@@ -10,36 +12,50 @@ Code Cell Execution
* Execute marked code cells (cells with green gutter area are marked)
* Stop execution (duplicate to standard toolbar button)
Code Cell Marking
---
-----------------
* Mark one or more code cell
Code Cell Display
---
-----------------
* Hide or show input (i.e. the source code) of marked code cells
* Hide or show output of marked code cells
Description
===========
The *runtools* extension adds a button to turn on/off a floating toolbar:
![](https://raw.github.com/ipython-contrib/IPython-notebook-extensions/master/wiki-images/runtools.png)
![](runtools.png)
This adds Code execution buttons:
![](https://raw.github.com/ipython-contrib/IPython-notebook-extensions/master/wiki-images/runtools_execute.png)
![](runtools_execute.png)
Codecells can be marked by clicking on the gutter of a codecell or by clicking on the markers toolbar:
![](https://raw.github.com/ipython-contrib/IPython-notebook-extensions/master/wiki-images/runtools_marker.png)
![](runtools_marker.png)
A IPython notebook with marked cells looks like this:
![](https://raw.github.com/ipython-contrib/IPython-notebook-extensions/master/wiki-images/runtools_nb.png)
![](runtools_nb.png)
Installation
============
Copy the `runtools` directory to a new `/nbextensions/usability/runtools` directory of your user's IPython directory and add
Copy the contents of the `runtools` directory to a new `/nbextensions/usability/runtools` directory of your user's IPython directory.
Then you can manually load the extension from within the IPython notebook:
```javascript
IPython.load_extensions('usability/runtools/main.js')
%%javascript
IPython.load_extensions('usability/runtools/main');
```
to your `custom.js` file. Take a look at the general installation instructions in the Wiki if you are unsure how to proceed.
Or, for permanent installation instructions, please see the [readme](../../README.md),
or the [wiki](https://github.com/ipython-contrib/IPython-notebook-extensions/wiki).
Internals
=========
@@ -1,8 +1,10 @@
This extension provides a notebook-wide search&replace toolbar.
This extension provides a notebook-wide search & replace toolbar.
![before](https://raw.github.com/ipython-contrib/IPython-notebook-extensions/master/usability/search-replace/icon.png)
![before](icon.png)
It uses the codemirror `search` and `searchcursor` add ons.
## Installation
Installation
============
Install the master version of the IPython-notebook-extensions repository as explained on the main wiki page.
@@ -1,21 +1,26 @@
This extension hides Python tracebacks and only displays the error type an name.
![](https://raw.github.com/ipython-contrib/IPython-notebook-extensions/master/wiki-images/skip-traceback.png)
![](icon.png)
After loading the extension, only newly executed cells are affected. Previous tracebacks will remain visible until the
corresponding cell is executed again.
If you press the button on the toolbar with the exclamation mark, you can turn on tracebacks again.
Installation
============
Copy the `skip-exceptions` directory to a new `/nbextensions/usability/skip-exceptions` directory of your user's IPython
directory and add
Copy the contents of the `skip-exceptions` directory to a new `/nbextensions/usability/skip-exceptions` directory of your user's IPython
directory.
```javascript
IPython.load_extensions('usability/skip-exceptions/main.js')
%%javascript
IPython.load_extensions('usability/skip-exceptions/main');
```
to your `custom.js` file. Alternatively, you might want to use the `nbextensions` UI. Take a look at the general
installation instructions in the Wiki if you are unsure how to proceed.
Or, for permanent installation instructions, please see the [readme](../../README.md),
or the [wiki](https://github.com/ipython-contrib/IPython-notebook-extensions/wiki).
Internals
=========
@@ -1,6 +1,7 @@
This extension adds a toolbar button, along with an optional hotkey,
to toggle all cells' line numbers on or off in one action.
Installation
============
Install the master version of the IPython-notebook-extensions repository as
@@ -14,8 +15,8 @@ Then you can enable the extension by doing one of:
%%javascript
Jupyter.notebook.config.update({
"load_extensions": {
"usability/toggle_all_line_numbers/main.yaml": true
"usability/toggle_all_line_numbers/main": true
}
});
```
from within the IPyton notebook
from within the IPython notebook