Overwide table?

11 views
Skip to first unread message

Peter Seibel

unread,
Jul 17, 2025, 6:28:43 PM7/17/25
to pretext...@googlegroups.com
I've got a <table> in my book that is getting rendered like this in Salem:

image.png

If I add this to my custom.css 

.ptx-content .tabular-box {
  width: unset;
  margin-left: unset;
}

it looks like this, which is what I want:

image.png

But I assume the rule that I'm overriding (which maybe comes from css/targets/html/salem/_other-widen.scss?) is there for a reason and I'm worried that I'll be breaking something else. Any ideas what I should be doing here to keep the table in bounds?

--
BHS Bell Schedule app: https://gigamonkeys.com/misc/bhs/


Rob Beezer

unread,
Jul 17, 2025, 6:32:56 PM7/17/25
to pretext...@googlegroups.com
Check recent PRs, open and closed, and your current commit. There's been action
around this.

On 7/17/25 15:28, Peter Seibel wrote:
> I've got a <table> in my book that is getting rendered like this in Salem:
>
> image.png
>
> If I add this to my custom.css
>
> .ptx-content .tabular-box {
>   width: unset;
>   margin-left: unset;
> }
>
> it looks like this, which is what I want:
>
> image.png
>
> But I assume the rule that I'm overriding (which maybe comes from css/targets/
> html/salem/_other-widen.scss?) is there for a reason and I'm worried that I'll
> be breaking something else. Any ideas what I should be doing here to keep the
> table in bounds?
>
> --
> BHS Bell Schedule app: https://gigamonkeys.com/misc/bhs/ <https://
> gigamonkeys.com/misc/bhs/>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com <mailto:pretext-
> support+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-support/
> CAMiqbm%3DZjfCTYZvano0K1XoptiVgkF8Ga42eGErf-_NRuxxqYA%40mail.gmail.com <https://
> groups.google.com/d/msgid/pretext-support/
> CAMiqbm%3DZjfCTYZvano0K1XoptiVgkF8Ga42eGErf-_NRuxxqYA%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Andrew Scholer

unread,
Jul 17, 2025, 6:52:15 PM7/17/25
to pretext...@googlegroups.com
I assume your CSS adds the dashed border to the figure?

The tabular is designed to extend to make use of available page space. Especially in the case that the table contents are unwrappable.

If there is a figure (table) that contains it, that means the tabular may extend past the bounds of that figure. 

image.png

Extending the whole table would move the caption out of line with any other table/figure labels. So it is working as designed.

When you create a new visual boundary on the figure, yes, it will look out of bounds.

That does look like the CSS you want to override if you want to do something different. I don't think it should break anything else, but it isn't easy to guess all the possible downstream effects. (See putting a border around tables).

Andrew Scholer (he/him/his)
Computer Science Instructor
Chemeketa Community College


To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/MTAwMDAyMC5iZWV6ZXI.1752791572%40pnsh.

Peter Seibel

unread,
Jul 17, 2025, 8:06:52 PM7/17/25
to PreTeXt support
I see, so the table is actually always extra wide but the cells don't always take up all that space. So my table that could wrap the columns to fit in a narrower space didn't because it was explicitly styled to be wide. I guess I'll stick with my custom css for now and see if there's anything else that gets wonky as a result. Thanks!

Andrew Scholer

unread,
Jul 17, 2025, 9:05:04 PM7/17/25
to pretext...@googlegroups.com
The table is extra wide if it can possibly use the space.

AFAIK, "Reflow your contents to fit inside the default space available, but only if you can do that without still needing to scroll. Otherwise expand to X size and then flow your contents and scroll if necessary" is more than can be expressed with CSS.

Andrew Scholer

Computer Science instructor

Alex Jordan

unread,
Jul 17, 2025, 10:09:39 PM7/17/25
to pretext...@googlegroups.com

You could also have "line" elements within cells. So you could make sure "Maximum" and "(inclusive)" always land on separate lines and take less horizontal space.


Reply all
Reply to author
Forward
0 new messages