{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "## The highlighter extension:\n",
    "\n",
    "- Firstable, the extension provides <span class=\"mark\">several toolbar buttons</span> for highlighting a selected text _within a markdown cell_. Three different \\`color schemes' are provided, which can be easily customized in the \\textit{stylesheet} `highlighter.css`. The last button enables to remove all highlightings in the current cell. \n",
    "- This works both <span class=\"burk\">when the cell is _rendered_ and when the cell is in edit mode</span>; \n",
    "- In both modes, it is possible to highlight formatted portions of text (In rendered mode, since the selected text loose its formatting, an heuristic is applied to find the best alignment with the actual text)\n",
    "- When no text is selected, the whole cell is highlighted; \n",
    "- The extension also provides two keyboard shortcuts (Alt-G and Alt-H) which fire the highlighting of the selected text. \n",
    "- Highlights can be preserved when exporting to html or to LaTeX -- details are provided in [export_highlights](export_highlights.ipynb)\n",
    "\n",
    "\n",
    "![](image.gif)\n",
    "\n",
    "## Installation:\n",
    "\n",
    "The extension can be installed with the nice UI available on jupyter_contrib_nbextensions website, which also allows to enable/disable the extension. \n",
    "\n",
    "You may also install the extension from the original repo: issue\n",
    "```bash\n",
    "jupyter nbextension install https://rawgit.com/jfbercher/small_nbextensions/master/highlighter.zip  --user\n",
    "\n",
    "```\n",
    "at the command line.\n",
    "\n",
    "### Testing: \n",
    "\n",
    "Use a code cell with\n",
    "```javascript\n",
    "%%javascript\n",
    "require(\"base/js/utils\").load_extensions(\"highlighter/highlighter\")\n",
    "```\n",
    "\n",
    "### Automatic load\n",
    "You may also automatically load the extension for any notebook via\n",
    "```bash\n",
    "jupyter nbextension enable highlighter/highlighter\t\n",
    "```\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "application/javascript": [
       "require(\"base/js/utils\").load_extensions(\"highlighter/highlighter\")"
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%%javascript\n",
    "require(\"base/js/utils\").load_extensions(\"highlighter/highlighter\")"
   ]
  }
 ],
 "metadata": {
  "interactive_sols": {
   "cbx_id": 1
  },
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.4.3+"
  },
  "latex_envs": {
   "bibliofile": "biblio.bib",
   "cite_by": "apalike",
   "current_citInitial": 1,
   "eqLabelWithNumbers": true,
   "eqNumInitial": 0
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
