Table Row Rendering and Column Width in PreTeXt

16 views
Skip to first unread message

RODGERS MARAGIA

unread,
Jul 29, 2025, 9:34:02 AM7/29/25
to PreTeXt support
I have encountered a persistent issue with table rendering in PreTeXt, specifically related to row height and column width, which has proven extremely difficult to resolve through the available documentation or formatting options.

The core problem lies in how PreTeXt handles rows with empty or minimal content. Even when I intend to leave a second row visually blank (for spacing or layout purposes), the rendered output squashes the row height to nearly zero, making it practically invisible. 

I have tried applying styling using <row style="height: 30px;">, <cell><latex>\rule{0pt}{15pt}</latex> 1</cell> with \rule{0pt}{Xpt}, and other LaTeX tricks, but none consistently fix the problem across.

The row is there in the code, but in output, it’s flattened, despite efforts to force vertical space.

This is particularly problematic when I want to visually separate rows, create layout space, or simulate multi-row alignment. It significantly limits the visual clarity of tables in educational content.


---------------------------------------------------------------------------

Another issue I noticed is that setting <col width="30"> (or similar) has no visible effect when applied to columns that are empty. The width definition is ignored, and the table remains unchanged. Screenshot 2025-07-29 162129.pngScreenshot 2025-07-29 162038.png

This makes it impossible to structure a grid-like layout where some cells are intentionally left empty but still need to maintain width for alignment purposes. 

I will attach a screenshot of both the PreTeXt source code and the rendered tables, to clearly demonstrate the issues. Screenshot 2025-07-29 162038.png
Screenshot 2025-07-29 162038.png I'm open to any ideas or workarounds that could help resolve this issue.

D. Brian Walton

unread,
Jul 29, 2025, 10:26:54 AM7/29/25
to pretext...@googlegroups.com
Rodgers,

You seem to be wanting to use the table structure when there is not actual tabular data. This suggests to me that you might do better by using images instead of tables. This gives you full control of format.

Is there a reason other than convenience that you want it to remain a table?

- Brian

--
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.
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/b409676d-a88a-40d0-b2d6-e8516f3906a4n%40googlegroups.com.

Alex Jordan

unread,
Jul 29, 2025, 10:27:16 AM7/29/25
to pretext...@googlegroups.com
On the first issue, if you create a row with nothing in it, there will be actual empty HTML table cells on the screen. A screen reader user will be confused as they navigate into these cells and wonder if there is some mistake as to why these cells are empty. Their visual separator purpose won't be on that reader's radar. Furthermore as they reach the third HTML row, cells will be announced as being in the 3rd row, but your intent and your writing might be that this is the "second" row and that could mean more confusion.

Maybe there is a structural way to achieve the kind of separation you want, but it could help to share more examples. What is the meaningful difference between the rows you want to separate?

On column width. That only has effect if somewhere in the column, there is a p. This makes the entire column a "paragraph column". Similar to the above though, if you were to make a column of empty cells, you would be making HTML with accessibility issues, abusing HTML table structure for layout purposes.

In your images, do I understand right that the empty cells are there for a reader to fill out? Perhaps a "fillin" element within those cells would be appropriate. They can be styled in a few ways. Or with more discussion, maybe fillin could become a new attribute for a table cell.


--

Rob Beezer

unread,
Jul 29, 2025, 1:30:33 PM7/29/25
to pretext...@googlegroups.com
Dear Rodgers,

You have great answers from Brian and Alex. A #tabular is meant for hoding bits
of data. This is addreessed in the documentation:

Subsection 4.19.10: Table Philosophy
https://pretextbook.org/doc/guide/html/topic-tabular.html#topic-tabular-12

> This suggests to me that you might do better by using images instead of tables

My thought exactly. In order of better integration with PrewTeXt, I'd try

* PreFigure

* Mermaid

* TikZ

Rob
Reply all
Reply to author
Forward
0 new messages