[TOC]
which can be placed in a page to produce a table of contents at the start of the page, listing all sections.[TOC]
is the same as using a tableofcontents command.First Header | Second Header |
---|---|
Content Cell | Content Cell |
Content Cell | Content Cell |
Right | Center | Left |
---|---|---|
10 | 10 | 10 |
1000 | 1000 | 1000 |
Right | Center | Left |
---|---|---|
10 | 10 | 10 |
1000 | 1000 |
Right | Center | Left |
---|---|---|
10 | 10 | 10 |
1000 |
.md
or .markdown
(see EXTENSION_MAPPING if your Markdown files have a different extension, and use md
as the name of the parser). Each file is converted to a page (see the page command for details).index
or mainpage
doxygen will put the documentation on the front page (index.html
).README.md
that will appear as the main page when processed by doxygen: <div>
, <table>
, <pre>
, <p>
, etc. — must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces. <pre>
blocks, which are passed untouched (handy for ASCII art).*
or _
only starts an emphasis and a ~
only starts a strikethrough if<{([,:;
({[<=+-@
-#
markers: -d Markdown
option. It will then print each comment block before and after Markdown processing.// Allow sphinx rst references in markdown cells |
// TODO: Markdown cells will only be reevaluated when a notebook is dirty |
// (i.e. you have made changes). If you save it before reevaluating MD cells, |
// they will show the old value. |
define([ |
'base/js/namespace', |
'jquery', |
'notebook/js/cell', |
'base/js/security', |
'components/marked/lib/marked', |
'base/js/events', |
'notebook/js/textcell' |
],function(IPython,$,cell,security,marked,events,textcell){ |
'use strict'; |
/* |
* Find Sphinx expressions and add to text as <a href> tags |
* |
* @method execute_sphinx |
* @param cell {Cell} notebook cell |
* @param text {String} text in cell |
*/ |
varexecute_sphinx=function(cell,text){ |
/* always clear stored variables if notebook is dirty */ |
if(IPython.notebook.dirtytrue)deletecell.metadata.sphinx_links; |
// search for code in mangled <code> blocks |
varfound=false; |
varnewtext=text.replace(/:ref:<code>(.*?)s*<(.*?)></code>/g,function(match,info,link,cha){ |
found=true; |
link=link.replace(/.html$/,'); |
if(link.indexOf('.')-1){ |
link=link+'.ipynb'; |
} |
console.log(link); |
return'<a href='+link+' target=_new>'+info+'</a>'; |
}); |
if(found){ |
if(typeofcell.metadata.sphinx_links'undefined'){ |
cell.metadata.sphinx_links={any: true} |
} |
} |
returnnewtext |
}; |
/* |
* Render markdown cell and replace {{.}} with python code |
* |
*/ |
varrender_cell=function(cell){ |
varelement=cell.element.find('div.text_cell_render'); |
vartext=execute_sphinx(cell,element[0].innerHTML); |
if(text!undefined){ |
element[0].innerHTML=text; |
MathJax.Hub.Queue(['Typeset',MathJax.Hub,element[0]]); |
} |
}; |
/* force rendering of markdown cell if notebook is dirty */ |
varoriginal_render=textcell.MarkdownCell.prototype.render; |
textcell.MarkdownCell.prototype.render=function(){ |
if(IPython.notebook.dirtytrue){ |
this.rendered=false |
} |
returnoriginal_render.apply(this) |
}; |
varload_ipython_extension=function(){ |
events.on('rendered.MarkdownCell',function(event,data){ |
render_cell(data.cell) |
}); |
/* show values stored in metadata on reload */ |
events.on('kernel_ready.Kernel',function(){ |
varncells=IPython.notebook.ncells(); |
varcells=IPython.notebook.get_cells(); |
for(vari=0;i<ncells;i++){ |
varcell=cells[i]; |
if(cell.metadata.hasOwnProperty('sphinx_links')){ |
render_cell(cell); |
} |
} |
}); |
}; |
return{ |
load_ipython_extension : load_ipython_extension |
}; |
}); |