Skip to content

Commit d98d030

Browse files
committed
using header cells
1 parent 5dc5e7d commit d98d030

2 files changed

Lines changed: 34 additions & 2 deletions

File tree

Images/ipython_table_header.png

37.7 KB
Loading

tutorials/table_of_contents_ipython.ipynb

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"name": "",
4-
"signature": "sha256:77e6b7710d7e7ab3d4491978f649959a8b99769df6967b7cb9feab83a67c15eb"
4+
"signature": "sha256:ba20b7e6666952b09ad936f7b9cb32fc0e9ed680a00aeff02035be51895c8e45"
55
},
66
"nbformat": 3,
77
"nbformat_minor": 0,
@@ -209,7 +209,7 @@
209209
"\n",
210210
"![img of format problem](https://raw.githubusercontent.com/rasbt/python_reference/master/Images/ipython_links_format.png)\n",
211211
"\n",
212-
"### Remedy: id-anchor tag in a separate cell\n",
212+
"### Solution 1: id-anchor tag in a separate cell\n",
213213
"\n",
214214
"![img of format problem](https://raw.githubusercontent.com/rasbt/python_reference/master/Images/ipython_links_remedy.png)\n",
215215
"\n",
@@ -219,6 +219,38 @@
219219
"<hr>"
220220
]
221221
},
222+
{
223+
"cell_type": "markdown",
224+
"metadata": {},
225+
"source": [
226+
"### Solution 2: using header cells"
227+
]
228+
},
229+
{
230+
"cell_type": "markdown",
231+
"metadata": {},
232+
"source": [
233+
"Alternatively, and I think this is an even better solution, is to use header cells.\n",
234+
"<br>\n",
235+
"<br>\n",
236+
"![header cell](../Images/ipython_table_header.png)"
237+
]
238+
},
239+
{
240+
"cell_type": "markdown",
241+
"metadata": {},
242+
"source": [
243+
"To define the hyperlink anchor tag to this \"header cell\" is just the text content of the \"header cell\" connected by dashes. E.g.,\n",
244+
"\n",
245+
"`[link to another section](#Another-section)`\n",
246+
"<br>\n",
247+
"<br>\n",
248+
"<br>\n",
249+
"<br>\n",
250+
"<br>\n",
251+
"<br>"
252+
]
253+
},
222254
{
223255
"cell_type": "markdown",
224256
"metadata": {},

0 commit comments

Comments
 (0)