"- [Link to this IPython notebook on Github](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day4_2_cython_numba_parakeet.ipynb) \n",
"- [Link to the GitHub Repository One-Python-benchmark-per-day](https://github.com/rasbt/One-Python-benchmark-per-day)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<hr>\n",
"I would be happy to hear your comments and suggestions. \n",
"Please feel free to drop me a note via\n",
"[twitter](https://twitter.com/rasbt), [email](mailto:bluewoodtree@gmail.com), or [google+](https://plus.google.com/118404394130788869227).\n",
"<hr>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<a id='top'></a>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Creating a table of contents with internal links in IPython Notebooks and Markdown documents"
"To define the destination (i.e., the section on the page or the cell you want to jump to), you just need to insert an empty HTML anchor tag and give it an **`id`**, \n",
"e.g., **`<a id='the_destination'></a>`** \n",
"\n",
"This anchor tag will be invisible if you render it as Markdown in the IPython notebook. \n",
"Note that it would also work if we use the **`name`** attribute instead of **`id`**, but since the **`name`** attribute is not supported by HTML5 anymore, I would suggest to just use the **`id`** attribute, which is also shorter to type."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<br>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"###2. The internal hyperlink"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we have to create the hyperlink to the **`<a id='the_destination'></a>`** anchor tag that we just created. \n",
"We can either do this in ye goode olde HTML where we put a fragment identifier in form of a hash mark (`#`) in front of the name, \n",
"for example, **`<a href='#the_destination'>Link to the destination'</a>`**\n",
"\n",
"Or alternatively, we can just use the slightly more convenient Markdown syntax: \n",
"**`[Link to the destination](#the_destination)`**\n",
"And I did this for a very long time ... until I figured out that it wouldn't render the Markdown properly if you convert the IPython Notebook into HTML (for example, for printing via the print preview option). \n",
"which is certainly not what we want (note that it looks normal in the IPython notebook, but not in the converted HTML version). So my favorite remedy would be to put the `id`-anchor tag into a separate cell just above the section, ideally with some line breaks for nicer visuals.\n",