[IPython-dev] prose, notebooks, and thrashing (and a re-direct to another list)
Matthias BUSSONNIER
bussonniermatthias at gmail.com
Mon Jul 29 15:36:37 EDT 2013
Le 29 juil. 2013 à 21:00, Greg Wilson a écrit :
> Thanks for your feedback, Matthias; replies inline.
>>> Problem #1: how do we manage material that ought to appear in multiple
>>> documents?
>> 2.0 and probably will need dexy. (http://www.dexy.it/)
> Brian Granger has suggested going the other way: build one notebook with
> everything in it, tag each cell with the sub-documents it ought to
> appear in, and write a transformer to create those sub-documents. Seems
> like that'll work right now (i.e., once the tagging UI plugin is built,
> the transformer is written, etc.) --- does that seem like a good way
> forward?
I was thinking of material other than notebook that ought to be in many IPynb.
Skimmed too fast.
I concurred with brian for the "One ipynb to rule them all" and produce multiple documents.
>> ... Have you seen slideshow mode ?
> Yup; it solves the "progressive reveal" problem, but doesn't force
> instructors and learners to do a bit of typing as they go along (which
> is very beneficial pedagogically).
>> Yes, that's on my todo list. This would require SC to ship notebook with custom profiles.
>> There is just some edge cases at loading time.
> Is this the same as the tagging Brian Granger mentioned?
Yes.
>>> * (large) Literal ________'s in our code will make it invalid...
>> You could store the "answers" into the metadata of each cell that maps the Nth ____
>> to it's value. We can come up with something.
> Rather than messing with character offsets and the like, can we use a
> plugin to prevent execution of any cell that contains a marker like
> ________ ? In most cases, cells will only have two or three of these,
> so it's not unreasonable to ask people to delete 'em and replace 'em
> manually, rather than trying to do something clever with the UI.
Yes it is do-able (not sure if it is supported), I was more concerned of storing the "answer"
into the metadata, ability to get back to *initial* value of a cell.
Something along
CodeCell.prototype.old_execute = CodeCell.prototype.execute
CodeCell.prototype.execute = function () {
if ( ! this.get_text().match('_{4,}') ){
this.old_execute(arguments); // not sure of the unpacking of arguments here, might be [arguments]
} else {
// hire a GSoC student to write the code that will highlight the ____ in red.
}
};
wrap in a IIFE, listen for the correct even in custom.js and load with require()
--
Matthias
More information about the IPython-dev
mailing list