Comments (6)
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?
from pretext.
Ooops, those screenshots did not work out very well.
from pretext.
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.
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.
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.
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)
- Markup in HTML page title HOT 3
- Space character in Sage strings for PDF/print
- Warn about non-Western alphabets in code comments
- Geogebra interactives move around once used
- Pretext repo is missing js/lib directory HOT 5
- Make dark mode work well HOT 6
- Knowl styling consistency HOT 1
- Asides at bottom of page get cut off
- characters in a @label
- Support Mermaid as a source language for diagrams HOT 1
- Use `Streams` interface for xsl info/warings/errors HOT 1
- Recompile latex images as needed HOT 5
- `pretext/pretext` documentation out of date? Example needed HOT 4
- Appendices not placed in back matter HOT 2
- Open DL knowled content at full width
- Empty "test" elements in "program" HOT 1
- Normalize "document-id" HOT 2
- External images in slideshows do not consider the publication file HOT 12
- Height to large: Interactive tag using pure JavaScript HOT 1
- Update the sample slideshow HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pretext.