curiousdannii / parchment

The Interactive Fiction web app
https://iplayif.com
MIT License
421 stars 60 forks source link

TADS 3 tables, underlining, and font color #128

Closed alec-roberts closed 1 year ago

alec-roberts commented 1 year ago

Though <b> and <i> tags work well, Parchment doesn't seem to like <table>, <u>, or <font color=X> tags in TADS 3 games.

Here's a little demonstration: https://iplayif.com/?story=https%3A%2F%2Fgithub.com%2Falec-roberts%2Fparchment-test%2Fraw%2Fmain%2Fparchment-test.t3

The TADS source code is here: https://github.com/alec-roberts/parchment-test/blob/main/parchment-test.t

I was hoping for something like this:

Capture

But Parchment yields this:

Capture


I'm just coming across Parchment (it's awesome! 😄), so I have no idea what challenges there would be to adding these little features. I'd be happy to take a stab at a PR myself if someone points me in the right direction. 😄

curiousdannii commented 1 year ago

Hi! So Parchment's TADS engine is a port of the Glk version from Gargoyle. So the first thing to do is check how it runs in Gargoyle.

So true HTML tables won't be happening, that's just not really an option with how Parchment and Glk work. A table that was formatted using a monospaced font might work however. If you need a table that's what I recommend.

Colour support is something I'll be working on in the medium-near future. Underlining might eventually be supported in the medium-far future.

If you were interested in ever making improvements to the Glk version of TADS, it is at https://github.com/tads-intfic/tads-runner

alec-roberts commented 1 year ago

Thanks for your quick response! I think I'll take your suggestion and use a monospaced font for my tables. Any guidance on how to do that? The only ways I know of in TADS are <tt>, <pre>, or <font face=TADS-Typewriter>, but none of them seem to be doing the trick.

I think I will try to familiarize myself with the Glk codebase, and maybe one day I'll be able to contribute something. 😅

curiousdannii commented 1 year ago

No sorry, I've never tried writing anything with TADS. I would've thought that <tt> or <pre> would work. And they don't work in Gargoyle either?

alec-roberts commented 1 year ago

You're correct--they're not working in Gargoyle either. In fact, it looks like it might not even be possible to do something like this in Gargoyle (https://intfiction.org/t/lack-of-html-tag-knowledge/45735). I'll have to poke around a bit more...