[IPython-dev] Just looking for feedback before PR
Sun Nov 18 18:21:53 CST 2012
> Thus we went with markdown for cells, mainly because of how headings were
> handled. But as we began to use markdown, we realized that its approach to
> headings was a bit too flexible. We really wanted the ability for notebooks
> to have formal structure (nested heading levels). There are a number of
> usage cases for this:
> * Exporting to formats that also have nested heading levels (latex, html,
> * Enabling entire sections/subsections in a notebook to be moved, copied,
> collapsed, etc. That would be impossible to do with headings embedded
> inside markdown cells that have other content.
> * Heading cells are common enough that it is nice to be able to do them
> without the markdown syntax.
Thanks for taking the time to explain this for me. So, the choice to
use header cells over hidden markup, is just considered more
convenient? If that's the case, to be honest, I'd still prefer to
define every element in my notebooks using plain text, even if it
meant just using some kind of pig XML.
We could easily define some unused, HTML element names as meaningful,
then use them in Markdown cells, safe in the knowledge that the
browser will just ignore them. There's no reason not to use a tag like
<spam> in a Markdown cell for example.
The hidden tags could provide meta for converters or extensions or
whatever else. These tags could have almost anything in them; you can
get away with murder if it's between angle brackets. Stuff like <ipy
cmd arg0 arg1> would work fine.
The tags used by HTML or core IPython features would be reserved, but
users could use the rest of the namespace arbitrarily, so a converter
might define a tag named <blogger>. You could also reserve all names
that start with special strings like ipynb, so you could later define
tags that do stuff like <ipynb_license
src="http://site.com/license.html"> and <ipynb_author name="John Doe"
mail="firstname.lastname@example.org"> and so on.
Maybe I'm still missing something, but that's where my thinking has
led me so far.
More information about the IPython-dev