Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sage cells inside knowls do not fully render #190

Closed
rbeezer opened this issue Dec 30, 2015 · 24 comments
Closed

Sage cells inside knowls do not fully render #190

rbeezer opened this issue Dec 30, 2015 · 24 comments
Labels

Comments

@rbeezer
Copy link
Collaborator

rbeezer commented Dec 30, 2015

As the title says, an instance of a Sage Cell revealed by opening a knowl does not render properly.

  1. When the knowl content is embedded on the page, the cell shows a box, but it is not loaded with text and not functional.
  2. When the knowl is a separate file, the knowl does not display.
  3. In the prototype version of FCLA, knowls from files with Sage cells work fine.

The first two behaviors can be seen in the current "beta" online version of FCLA:
http://linear.ups.edu/beta/fcla.html

Third behavior is in original:
http://linear.ups.edu/html/fcla.html

@rbeezer rbeezer added the bug label Dec 30, 2015
@kcrisman
Copy link
Contributor

kcrisman commented Jun 2, 2016

I think this is a pretty bad bug, because it means that any Sage cells inside of examples (which are rendered as knowls!!!) don't function. Just ran into this now. But, at least for me, examples (and proofs and ...) are "main text" and shouldn't be treated differently. This will make large portions of my text unusable 😦

@rbeezer
Copy link
Collaborator Author

rbeezer commented Jun 3, 2016

I have the same problem with FCLA, perhaps #286 will fix this.

Until then, just turn off knowling examples and you can see the whole example
and Sage should behave.

On 06/02/2016 09:56 AM, kcrisman wrote:

I think this is a pretty bad bug, because it means that any Sage cells inside of
/examples/ (which are rendered as knowls!!!) don't function. Just ran into this
now. But, at least for me, examples (and proofs and ...) are "main text" and
shouldn't be treated differently. This will make large portions of my text
unusable 😦


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#190 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/ABy2chu7207JO2J5eyexFQM-XkzD-jNUks5qHwtAgaJpZM4G8p3e.

@kcrisman
Copy link
Contributor

kcrisman commented Jun 3, 2016

Until then, just turn off knowling examples and you can see the whole example and Sage should behave.

And I assume that I can read exactly how to do that in the sample article ... ?

@rbeezer
Copy link
Collaborator Author

rbeezer commented Jun 3, 2016

There are now two simple examples of this in the sample article, viewable online. One right before Example 4.2, and one within the knowl for Example 4.2.

http://mathbook.pugetsound.edu/examples/sample-article/html/section-4.html

@rbeezer
Copy link
Collaborator Author

rbeezer commented Jun 5, 2016

On 06/03/2016 07:22 AM, kcrisman wrote:

Until then, just turn off knowling examples and you can see the whole
example and Sage should behave.

And I assume that I can read exactly how to do that in the sample article ... ?

You shouldn't assume anything about the documentation. In this case, the answer
you want is in the real documentation:

http://mathbook.pugetsound.edu/doc/author-guide/html/processing-stringparam.html

@kcrisman
Copy link
Contributor

kcrisman commented Jun 6, 2016

You shouldn't assume anything about the documentation.

Haha!

In this case, the answer
you want is in the real documentation:

Oh, the stringparams again. I hope I remember to do this when I need to
start testing the Sage cells.

@rbeezer
Copy link
Collaborator Author

rbeezer commented Aug 12, 2016

beta link above will not serve as an example right now. I'll post a dedicated version later today.

@rbeezer rbeezer assigned rbeezer and unassigned rbeezer Aug 12, 2016
@davidfarmer
Copy link
Contributor

3 comments earlier there is an example.

@rbeezer
Copy link
Collaborator Author

rbeezer commented Aug 12, 2016

Right - forgot I made a simple one. That'll work.

@kcrisman
Copy link
Contributor

kcrisman commented Dec 1, 2016

Until then, just turn off knowling examples and you can see the whole example
and Sage should behave.

Umm, no. Now it doesn't show up at all in html. This is with xsltproc --stringparam html.knowl.example 'no'

@rbeezer
Copy link
Collaborator Author

rbeezer commented Dec 1, 2016 via email

@kcrisman
Copy link
Contributor

kcrisman commented Dec 1, 2016

Locally.

@kcrisman
Copy link
Contributor

kcrisman commented Dec 2, 2016

I would like to suggest that this is the number 1 bug in MBX for my project's usability, as a I have a fair number of Sage cells in examples, which are knowlized. (And we see that the non-knowl version, which I prefer anyway, doesn't currently work.) I don't see any way I can do the JMM workshop without exposing this, and I'd have to work pretty hard to remember not to use those as examples.

@rbeezer
Copy link
Collaborator Author

rbeezer commented Feb 8, 2017

Whatever problems there were with Sage cells in external file knowls (due to cross-references) should be fixed with a47215d

Sage cells in embedded knowls are visible, but not functional. Nothing learned on the current fix seems to help. So there is more work to be done here.

@rbeezer
Copy link
Collaborator Author

rbeezer commented Oct 16, 2019

I noticed the test example in the sample article now seems to be behaving. No idea what might have changed.

Example 4.2 at

https://pretextbook.org/examples/sample-article/html/interesting-corollary.html

has a simple Sage cell within. Now works for me with recent Firefox and Chrome. Any willing Safari testers? @kcrisman - are you able to re-knowl your example and test?

@davidfarmer
Copy link
Contributor

davidfarmer commented Oct 16, 2019 via email

@kcrisman
Copy link
Contributor

kcrisman commented Oct 16, 2019 via email

@rbeezer
Copy link
Collaborator Author

rbeezer commented Oct 16, 2019 via email

@JeanSebastienTurcotte
Copy link
Contributor

Are cells problematic again in knowls? I swear knowled cells (multiple) behaved before, but now they have no memory of one another.

@rbeezer
Copy link
Collaborator Author

rbeezer commented Dec 5, 2019 via email

@JeanSebastienTurcotte
Copy link
Contributor

It works fine outside knowls, used to work in knowl, but now doesn't anymore

@JeanSebastienTurcotte
Copy link
Contributor

If I go here: https://pretextbook.org/examples/sample-article/html/section-sage-cells.html and put a=6 in the first cell and run it, and then put a as the last line of the second cell, it reports 6. Do I misunderstand the problem? Rob

On 12/4/19 4:52 PM, JeanSebastienTurcotte wrote: Are cells problematic again in knowls? I swear knowled cells (multiple) behaved before, but now they have no memory of one another. — You are receiving this because you were assigned. Reply to this email directly, view it on GitHub <#190?email_source=notifications&email_token=AAOLM4SDPD722VGNCCAYCQLQXBGDZA5CNFSM4BXSTXPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF7CPEQ#issuecomment-561915794>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOLM4VIX346ZRX3HWXNGULQXBGDZANCNFSM4BXSTXPA.

Take a look at

http://alir.jsturcotte.profweb.ca/sec-prodscal.html

example "Calcul 1.2.12" .

If you execute both cells, everything is fine, but if I delete the first line of the second cell, Sage does not remember that vector u and v were defined in the first cell of that example.

It used to work fine and does so outside of knowls.

@rbeezer
Copy link
Collaborator Author

rbeezer commented Dec 31, 2019

Sorry for the long delay. I needed to get a block of time to dig into this one. Yes, I think I understand why linking broke (within knowls, only). Discussion and work is on #981, so you'll want to watch that one.

@rbeezer
Copy link
Collaborator Author

rbeezer commented Dec 31, 2019

I'm going to close this. Cells render and execute, which was at issue here. Linking is a new problem, and is addressed on #981.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants