[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev new tables idea for SoCR
From: |
Heather Stern |
Subject: |
lynx-dev new tables idea for SoCR |
Date: |
Wed, 14 Jul 1999 15:20:00 -0700 (PDT) |
I've thought of a new idea for lynx handling tables in a Stream of Consciousness
Rendering (SoCR) fashion that will still look somewhat tabular, and may
improve readability of many tables.
Normal text is indented by several characters, Headers are indented by less
(thus outdented), bullet lists indent by a couple of spaces and their bullet,
and blockquotes are of course indented.
If we were to consider each column as an indention level, and use a somewhat
wider indent, perhaps 6? I used 8. Too few would lose the tabular impression.
I suppose it could also be done as 6 for the first 4, and 4 thereafter to
squeeze a few more possible cells in, but that would mean adding more decsions.
While this wastes lines, at least lines from each paragraph wouldn't bleed
into each other. Anyways I have two examples, one "WYSIWYG layout artist"
style, one "ordinary tabular data" style. Let me know what you think.
I've got a different idea I don't like as much, but the style goes well with
unALT'd images. It doesn't know about spans but seems much easier to
implement. I'll show it too, using the same table samples so you can get a
feel for it.
* Heather Stern * address@hidden * Starshine Technical Services *
-- examples.
...example #1...
With a layout planned something like this.
Possible CAPTION
--------------------------------,---------,---------
| A | B | C |
|-----------,---------,---------+---------+--------|
| D | E | F | G | H |
| |---------'---------| |--------|
| | I | | J |
|-----------'---------,---------'---------+--------|
| K | L | M |
|---------------------'-------------------'--------|
| N |
----------------------------------------------------
Assuming that we also render rowspan and colspan, might look like:
+-- possible CAPTION ---------------------------------------------------------+
A paragraph ho hum de dum. A whole lot more A stuff. Wraps as necessary of
course, until mr.A shuts up.
B paragraph ho hum de dum. Thanks mr.B. Wraps as
necessary of course.
C paragraph ho hum de dum. A whole lot more
C stuff. Wraps as necessary of course, until
mr.C shuts up.
D paragraph ho hum de dum. More D stuff. Wraps as necessary of course.
E paragraph ho hum de dum. More E stuff. Wraps as necessary of
course.
F paragraph ho hum de dum. More F stuff. Wraps as necessary
of course.
G paragraph ho hum de dum. More G stuff. Wraps as
necessary of course.
H paragraph ho hum de dum. More H stuff.
Wraps as necessary of course.
I paragraph ho hum de dum. More I stuff. Wraps as needed
of course, in this case early.
J paragraph ho hum de dum. More J stuff.
Wraps as necessary of course.
K paragraph ho hum de dum. A whole lot more K stuff. Wraps as necessary of
course.
L paragraph ho hum de dum. A whole lot more L stuff. Wraps
as necessary of course.
M paragraph ho hum de dum. A whole lot more
M stuff. Wraps as necessary of course.
N paragraph ho hum de dum. A whole lot more N stuff. Wraps as necessary.
+-----------------------------------------------------------------------------+
code comments:
I guess SPAN has to be an array, so each column can have its own rowspan
counter, and on any particular row where there's some rowspans flagged,
spanned cells to the left are tabbed past, spanned cells to the right reduce
the paragraph wrap point, each by the tab distance. Colspans count as an add
to the counter, but for the next cell over, so when that cell is about to
be rendered it gets indent-skipped, and the counter in its column is
decremented again.
So, in the row containg cell I: at the beginning of parsing, SPAN[1]
contains 1 (D's tag set it to 2, but decremented it to 1 at the /td),
SPAN[4] does too (F did the same). Rendering begins, column 1 is rendered
only with the tab and its counter dec'd. Column 2 is tabbed in, the 1 in
column 4 is noted but not touched, and I's end of paragraph point is reduced
(by my tab distance, 8) though SPAN[4] is not changed, only used as a flag
here. I's colspan entry adds 1 to SPAN[3]. Column 3 is rendered, with a
tab cuz' it's empty, and SPAN[3] dec'd again. Column 4 is rendered the same.
Yeah, there's unnecessary white space, but it's "necessary" because it's what
allows the correct rendering to be one-pass style, in case there are content
cells after as well as before rowspan'd cells, in this case both I and J.
user comments:
The clueful reader might guess by I's early cutoff (blockquote-like rather
than DL-like) that some cells have been rowspanned. K and L are not
similarly dented on the right side, because there's nothing in the counter
for other columns, until each sets the counter for a later column in its own
processing.
Yes, I'm for the idea of having a slightly doctored HR line indicate you're
about to be tortured with a table, and a similar HR ending it.
...example #2...
+-- Tabular Info for ya! -----------------------------------------------------+
Name of recipient
Award Recieved
Date of Award
URL
lynx-dev team
Best of Linux at DaveCentral
July
http://...
joe random webmaster
cool site of the day
yesterday
http://...
(etc. ad nausea)
+-----------------------------------------------------------------------------+
Dang, almost readable! TSST is much shorter and obviously what was intended.
...second style, #1...
cell prefix mode. TABLE invokes the mode, attribs are ignored though
border=0 should turn the mode back off, possibly. This one doesn't have any
clue about spans. I took /// as a splitter from poetry, where I understand
that it's habit to use less of them, but a single slash might be confused
for being part of the text, // are used for URL discussions. I'm assuming
that this web wizard is clueless and used no style tags at all.
This should be able to be done with simple stream replacement of
TR =[
/TD TD ///
/TD /TR ]=
If /// was user settable that would be nice, some people could change it out
for ][ and the entire page might look like it was ALT tags. Or I could change
it for a prettier splitter, or perhaps if I don't mind potentially wasting
lines, /(line break)(space)/
I thought of this as something that goes well with the INLINEs or
[really_ling_line_instead_of_HR.gif] thingies on a completely untuned page.
=[ Possible CAPTION
=[ A paragraph ho hum de dum. A whole lot more A stuff. Wraps as necessary
of course, until mr.A shuts up. /// B paragraph ho hum de dum. Thanks
mr.B. Wraps as necessary of course. /// C paragraph ho hum de dum. A
whole lot more C stuff. Wraps as necessary of course, until mr.C shuts
up. ]=
=[ D paragraph ho hum de dum. More D stuff. Wraps as necessary of course. ///
E paragraph ho hum de dum. More E stuff. Wraps as necessary of course. ///
F paragraph ho hum de dum. More F stuff. Wraps as necessary of course. ///
G paragraph ho hum de dum. More G stuff. Wraps as necessary of course. ///
H paragraph ho hum de dum. More H stuff. Wraps as necessary of course. ]=
=[ I paragraph ho hum de dum. More I stuff. Wraps as needed of course, in
this case early. /// J paragraph ho hum de dum. More J stuff. Wraps as
necessary of course. ]=
=[ K paragraph ho hum de dum. A whole lot more K stuff. Wraps as necessary
of course. /// L paragraph ho hum de dum. A whole lot more L stuff. Wraps
as necessary of course. /// M paragraph ho hum de dum. A whole lot more M
stuff. Wraps as necessary of course. ]=
=[ N paragraph ho hum de dum. A whole lot more N stuff. Wraps as necessary.
]=
...second style, #2...
=[ Tabular info for ya!
=[ Name of recipient /// Award Recieved /// Date of Award /// URL ]=
=[ lynx-dev team /// Best of Linux at DaveCentral /// July /// http://... ]=
=[ joe random webmaster /// cool site of the day /// yesterday /// http://...
]=
=[ (etc. ad nausea) ]=
- lynx-dev new tables idea for SoCR,
Heather Stern <=
- Re: lynx-dev new tables idea for SoCR, Larry W. Virden, 1999/07/14
- Re: lynx-dev new tables idea for SoCR, Heather Stern, 1999/07/14
- Re: lynx-dev new tables idea for SoCR, Larry W. Virden, 1999/07/14
- Re: lynx-dev new tables idea for SoCR, asgilman, 1999/07/14
- Re: lynx-dev new tables idea for SoCR, Heather Stern, 1999/07/15
- Re: lynx-dev new tables idea for SoCR, Lloyd G. Rasmussen, 1999/07/15
- Re: lynx-dev new tables idea for SoCR (and emacs), David Combs, 1999/07/15
- Re: lynx-dev new tables idea for SoCR, Heather Stern, 1999/07/15
- Re: lynx-dev new tables idea for SoCR, Lloyd G. Rasmussen, 1999/07/15