Sagecell parent container as div instead of pre?

2 views
Skip to first unread message

Andrew Scholer

unread,
Jul 19, 2024, 5:25:01 PM (4 days ago) Jul 19
to prete...@googlegroups.com
Working on the broken styling of sage in revealjs. The source of the issues is that reveal has ideas about what  <pre> tags should look like and that sage cells use <pre> as a container for all the stuff that gets produced by the makeSagecell script.

Is there a reason that container is a pre instead of a div? Conceptually it isn't a block of preformatted text. It ends up containing a number of components, not all of which are preformatted text. (Like a button). The ones that are preformatted text get their own appropriate styling.

Everything appears to work fine in an HTML build if pretext-html is set to output a <div> instead of <pre> and the js is changed to match. And doing that immediately fixes many of the styling issues in revealjs.

I also see that the sage docs use <div> as the sample container. 

Is there a reason not to change pretext-html to output a div?

Andrew Scholer (he/him/his)
Computer Science Instructor/Program Chair
Chemeketa Community College
Reply all
Reply to author
Forward
0 new messages