Coder Social home page Coder Social logo

Comments (6)

rbeezer avatar rbeezer commented on July 29, 2024

Ok, this seems to all be fine for the standard HTML output.

For Sage notebooks, there is a ton of extra CSS that gets thrown onto the page and when the first Sage cell appears, the mathbook-content div gets truncated and then the rest of the worksheet is no longer under its control, mostly as evidenced by the max-width no longer being in effect.

Two screenshots attached, which might help some. Let me know the beast way to help debug this, I can send you the Sage notebook files, which you could upload into Sagenb.org to inspect?
sagenb1
sagenb2

from pretext.

rbeezer avatar rbeezer commented on July 29, 2024

Ooops, those screenshots did not work out very well.

from pretext.

mxdubois avatar mxdubois commented on July 29, 2024

Hmm. Is it possible to put the "mathbook-content" class on an element
higher up in the DOM tree?

As I have it now, the max-width:600px property is actually not included
in mathbook-content.css. I figured that was an implementation detail of
our standard mathbook layout. From the screenshot there, it looks like you
still have mathbook-modern-2.css loaded on the page. The screenshot is a
sage notebook, right?

Is it not possible to link me to an affected sage notebook? If not, you can
send me the files and I'll try to figure out sagenb.org. Maybe send me an
old one that works too, for comparison?

On Tue, Aug 5, 2014 at 10:47 AM, Rob Beezer [email protected]
wrote:

Ooops, those screenshots did not work out very well.


Reply to this email directly or view it on GitHub
#9 (comment).

from pretext.

rbeezer avatar rbeezer commented on July 29, 2024

OK, I misunderstood, your "not" about loading mathbook-content.css so do not pay any attention to this until I can try again. (which will not be immediately.)

Could have the same problem, and I just thought about perhaps putting the style on a higher element (there's a "user-page-worksheet" div, or something like that). So I may give that I try and then we can look into sharing a worksheet on sagenb.org.

from pretext.

rbeezer avatar rbeezer commented on July 29, 2024

Now loading the right css file. Still becomes ineffective at first Sage cell.

Make an account at test.sagenb.org and send me your user name. I will share a worksheet with you, Chapter 5 of Judson's book. About 80% of the way down is where the first Sage code lives and you will see everything revert to the default SageNB look. Click on the "Edit" button in upper right (not "Text") to see the file that is "original" content, rest is due to machinations by the web application.

Yes, the triple braces delimit Sage cells.

I cannot see how I am able to place the mathbook-content class higher up, I do not have access to what the notebook is doing. I think.

Rob

from pretext.

rbeezer avatar rbeezer commented on July 29, 2024

The "un-prefixed" mathbook-content.css did the job on this.

I'm just writing out a bit of style information (for the Sage notebook div's #user-worksheet-page and #worksheet) to mimic the sort of page widths we are using on straight HTML.

I expect this strategy will work for similar web apps (iPython, Sage Math Cloud).

from pretext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.