Open rbeezer opened 4 years ago
Passing a list may involve a major change to the knowls code. (Or maybe not: I will investigate.)
A global variable, which is not particularly frowned upon in Javascript (not like in some other languages) could do what you want.
On Wed, 12 Aug 2020, Rob Beezer wrote:
Sage cells in knowls are not being configured for different (programming) languages, like R, Python, Octave, etc.
Outside of knowls, we have put the language on the Evaluate button. So, we might have button text "Evaluate (Python)".
Can we pass in a list to the knowls code to make multiple configurations, each with its own label text? Items of this list might need to be pairs (with correct syntax!):
[(python, 'Evaluate (Python)'),....]
This is a follow-on from #981.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, orunsubscribe.[AABTULFVJRYEZWSUNKHO5EDSAMPYFA5CNFSM4P5OBN5KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4KDKAKG Q.gif]
I meant setting a variable, like have now. "Passing" was colloquial, not technical. (Sorry!)
I think it would mean looping over that list, building several "makeSageCell()" calls. (Function name may not be correct.)
On August 12, 2020 9:16:25 PM PDT, "David W. Farmer" notifications@github.com wrote:
Passing a list may involve a major change to the knowls code.> (Or maybe not: I will investigate.)>
A global variable, which is not particularly frowned upon> in Javascript (not like in some other languages) could do> what you want.>
On Wed, 12 Aug 2020, Rob Beezer wrote:>
Sage cells in knowls are not being configured for different (programming) languages, like R, Python, Octave, etc.>
Outside of knowls, we have put the language on the Evaluate button. So, we might have button text "Evaluate> (Python)".>
Can we pass in a list to the knowls code to make multiple configurations, each with its own label text? Items of> this list might need to be pairs (with correct syntax!):>
[(python, 'Evaluate (Python)'),....]>
This is a follow-on from #981.>
—> You are receiving this because you are subscribed to this thread.> Reply to this email directly, view it on GitHub, orunsubscribe.[AABTULFVJRYEZWSUNKHO5EDSAMPYFA5CNFSM4P5OBN5KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4KDKAKG> Q.gif]>
-- > You are receiving this because you authored the thread.> Reply to this email directly or view it on GitHub:> https://github.com/rbeezer/mathbook/issues/1347#issuecomment-673244737
@rbeezer Sorry if you already had my ping in #981 , but it seems something is still lacking there. I didn't get an email when I posted in 981, so I figured notification are maybe off on a closed thread.
Sage cells in knowls are not being configured for different (programming) languages, like R, Python, Octave, etc.
Outside of knowls, we have put the language on the Evaluate button. So, we might have button text "Evaluate (Python)".
Can we pass in a list to the knowls code to make multiple configurations, each with its own label text? Items of this list might need to be pairs (with correct syntax!):
This is a follow-on from #981.