[IPython-dev] New Notebook extensions: Spell checking, document tools, cell tools

Doug Blank doug.blank at gmail.com
Sun Jul 27 14:42:15 EDT 2014


Updated with new instructions:

On Sun, Jul 27, 2014 at 1:50 AM, Doug Blank <doug.blank at gmail.com> wrote:

> IPython notebook users,
>
> Looking for some beta testers to try out three new notebook extensions.
> These are browser extensions, so should work with any kernel. They are:
>
> 1. Spell check: this is implemented in JavaScript, not too big (~700k),
> and pretty fast. It is currently set up to work only for Markdown cells. It
> toggles on/off via the "check" button. Doesn't offer suggestions for
> misspelled words, but is a big help in writing. Currently, English only,
> but supports a range of dictionary types via Typo.js.
>
> 2. Cell tools: There are two formats for code cells: Input/Output Tabbed
> view, and Column view. The Tabbed view will cover the Input code cell with
> the Output of the code, and you can tab back and forth. The Column view
> will show the output in a column next to the  input column. Both of these
> buttons toggle individual code cells, and remembers their state when you
> re-open the notebook. These don't show in nbviewer, however.
>
> 3. Document tools: There are three different extensions for handling
> documents: 1) Heading numbering, 2) Table of Contents generation, and 3)
> Bibliographic support. The first two are fairly straightforward in
> functionality: the first toggles heading numbering on/off, and the second
> creates a Table of Contents from the heading cells.
>
> The Bibliographic tool is a bit more complex, and still needs to be
> refined. It does two things: replaces citations in your Markdown with
> proper author/year, and creates a References section at the end of your
> notebook with cited sources (this part isn't complete yet). It uses Bibtex
> data stored in the notebook, or in a separate Bibliography.ipynb in your
> root dir. For more on this tool, see:
>
>
> http://nbviewer.ipython.org/urls/bitbucket.org/ipre/calico/raw/master/notebooks/Documentation/Reference%20Guide/Reference%20Guide.ipynb#4.-Bibliographic-Support
>
> (Documentation hasn't been refined yet; This is a temp version. We hope to
> have some demo videos next week.)
>
> To install, you can do something like:
>

ipython install-nbextension
https://bitbucket.org/ipre/calico/downloads/calico-spell-check-1.0.zip
ipython install-nbextension
https://bitbucket.org/ipre/calico/downloads/calico-document-tools-1.0.zip
ipython install-nbextension
https://bitbucket.org/ipre/calico/downloads/calico-cell-tools-1.0.zip

You can then begin to use them in your notebooks by loading them
dynamically. In the native and Calico kernels (and perhaps others that
support the %%javascript magic):

```
%%javascript
IPython.load_extensions("calico-spell-check", "calico-document-tools",
"calico-cell-tools");
```
You can include only the ones you want in that list.

Or, if you want to load them always, or use the auto cell formatting on
opening a notebook), put that line in your:

$(ipython locale)/profile_XXX/static/custom/custom.js

where XXX is "default" or another profile name.

That's it! Please feel free to make suggestions, or report bugs. We have an
issue tracker here:

https://bitbucket.org/ipre/calico/issues?status=new&status=open

-Doug


>
> 1) Change to the profile you want to use:
> cd $(ipython locate)/profile_default/static/custom/
>
> 2) Overwrite or edit your custom js and css:
> wget
> https://bitbucket.org/ipre/calico/raw/master/notebooks/profile/static/custom/custom_example.js
> -o custom.css
> wget
> https://bitbucket.org/ipre/calico/raw/master/notebooks/profile/static/custom/custom.css
>
>
> 3) Get the extensions that you want:
>
> Document tools:
> wget
> https://bitbucket.org/ipre/calico/raw/master/notebooks/profile/static/custom/bibtex.js
> wget
> https://bitbucket.org/ipre/calico/raw/master/notebooks/profile/static/custom/document-tools.js
>
> Cell tools:
> wget
> https://bitbucket.org/ipre/calico/raw/master/notebooks/profile/static/custom/cell-tools.js
>
> Spell checking:
> wget
> https://bitbucket.org/ipre/calico/raw/master/notebooks/profile/static/custom/spell-check.js
> wget
> https://bitbucket.org/ipre/calico/raw/master/notebooks/profile/static/custom/typo.zip
> unzip typo.zip
>
>
> We'd be glad to get feedback on any and all of these. We hope that you
> find them useful!
>
> -Doug (and the Bryn Mawr College digital humanities team)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140727/3401c66e/attachment.html>


More information about the IPython-dev mailing list