making columns wider in tabular in worksheet

25 views
Skip to first unread message

Chrissy Safranski

unread,
Apr 13, 2025, 2:41:17 PM4/13/25
to PreTeXt support
I am working on the table in number 3 here: https://davidaustinm.github.io/fcca/sec_optionallab.html

So far I'm thinking this whole page actually belongs as a worksheet, since it's meant to be printed and used in class.  The issue I'm having is that I need to leave space for students to write in each cell, and I don't know what the best way to accomplish that is.  

I've tried making tabular width=100%, hoping that would just expand all the column widths equally, but that just seemed to make the tabular shift to the left instead of center, and not get any wider.  I tried adding col elements and column widths, and putting and empty <p> element inside at least one cell in each column, but that also didn't work to make things any wider.  Maybe both those things are meant to limit or reduce widths that would otherwise be too wide, not expand widths that are natively not as wide as space allows.  

My current ideas are: 1) adding latex hspaces within the math in each cell of the header row.  2) adding a number of nbsp characters to cells (suggested by the online table builder) and 3) using fillins.  

Semantically, I like fillin since that's precisely what I'm trying to leave the space for, but it appears the options for fillin appearance are limited to underline, box, or shaded, and I would want them to be invisible.  But maybe shaded is the best bet, because I think then it is just blank in the pdf?  But then for the html to not look weird, I imagine I would need to put them in every cell instead of just one row to give the needed space.

Is there an easy way to accomplish wider columns in a tabular that I'm missing?

Chrissy


Rob Beezer

unread,
Apr 14, 2025, 5:45:12 PM4/14/25
to pretext...@googlegroups.com
Dear Chrissy,

A PreTeXt #tabular is not meant as a layout device for lots of different things
in the cells. We talk about not repeating LaTeX mistakes, but I think using
#table for layout might be an HTML mistake.

If you had #fillin rendering as underline and removed the rules between rows, I
think it might look OK. And the column widths, which are designed for
"paragraph cells," just might behave to allow more control.

One of our few concessions to layout is #sidebyside and its big sister
#sbsgroup. LOTS of control over spacing and justification. You'd need to
"fake" the row and column headings but it might look as desired.

One more thought: I think we have #fillin that are suppose to be a grid, like if
an answer was a matrix, say. Numbers of rows and columns as attributes. David
W or Alex A could say more, but I think it might not work so well for your
example here.

Rob
> --
> 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/67a0ae00-8147-4964-9299-202fd87ad275n%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-
> support/67a0ae00-8147-4964-9299-202fd87ad275n%40googlegroups.com?
> utm_medium=email&utm_source=footer>.

Chrissy Safranski

unread,
Apr 15, 2025, 9:34:46 AM4/15/25
to PreTeXt support
Hi Rob,

I thought about whether tabular was even the right element semantically, and I convinced myself it was because the entry in the A_{ij} cell is the result of applying the function/description at the beginning of the i-th row to the number at the top of the j-th column.  Switching to sbsgroup might give the desired layout control, but it would lose that relationship.  But maybe that's not important, because there's nothing for screen readers to actually read in all the blank cells?

Thanks for the suggestions.  I'll play around with it a bit more.   Maybe the whole thing can be re-imagined and formatted differently.  

Chrissy
Reply all
Reply to author
Forward
0 new messages