Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Can one change the default language of a sagecell with new instance?

Suppose I wish to have multiple, linked sagecells and create them using:

// Make *any* div with class 'rCell' a Sage cell
sagecell.makeSagecell({inputLocation: 'div.rCell',
                       defaultLanguage: "r",
                       languages: sagecell.allLanguages,
                       linked: true});

Is it possible to change the default language later when the nth cell is created? That is, can I change the default language in the div class="rCell" block?

I tried redefining the class before the nth cell with a new default language, but that did not change default language. And, I can simply instruct a user to change the default language before evaluation, but I would like it to be more streamlined. The main thing is that I need to keep the cells linked.

Thanks for any help.