-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ctable-like tables #45
Comments
Hello! SILE doesn't have any existing packages that creates tables?! |
Hi. It does but it is nowhere near as powerful as ctables. I was planning to write a ctables extension for SILE, but it's been bumped down on my priority list. If this is something you'd be willing to pay for you can email me. Until then you can check out some of the examples I've made, like my repository PamudpodUnicodePaper, which contains code for enabling the simpler table that comes with SILE. |
Hello and thanks for your reply. Saw your document. Very interesting especially to one who has worked on Indic Unicode, but really there don't seem to be any tables with column in your final document. |
@jamadagni There is, there's a table on the first page with my name and email. |
Hello yes. I did see your `.sil` file and it had the `\table` element but
scarcely what would normally be perceived as a table, with multiple columns
and rows.
…On Tue, 8 Sep, 2020, 13:19 Fredrick Brennan, ***@***.***> wrote:
@jamadagni <https://github.com/jamadagni> There is, there's a table on
the first page with my name and email.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#45 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHHPSRDZBIKON6E7337ZITSEXOXHANCNFSM4A3PJH3Q>
.
|
...There are multiple columns and rows. Perhaps you will prefer the example used to build the documentation, although at a base level it is identical, since it looks more ordinary. 😄 Please see: sile/documentation/developers.sil Lines 31 to 48 in 4a92f58
|
SILE's For now depending on your use case parallel frames (where each frame is essentially a column and the sync functions align content in rows) might be more useful than the current table implementation. |
I remember when I tried looking at this many years ago, I was planning to use the CSS table model which contains some algorithms that might be useful for implementors. |
Whoa. |
You're on fire these days! |
Well, I admit this is not really related to "ctable" (and "as much as possible" of its syntax), as per the original ticket... But I couldn't find another ticket on complex tables. The true question should be "how complex" and what is the minimal subset of features that should be provided to cover 90% of the normal (non-nerdy) needs. I read the "ctable" documentation, and honestly, to me, its syntax his awful and near to non-human. Some 30+ options, obscure column specifiers (so weird to me that I would never remember them), mixing of concerns (e.g. dedicated footnotes, specific captioning, weird content alignment logic etc.). I would hate having to use it, honestly... I understand the requester concern, though, it's also a powerful solution - and it may be interesting probably with LaTeX compatibility in mind - but heh.. Do we want or need to be LaTeX followers? The Web/CSS model is more akin to my line of thinking, though the way it addresses column/row merging (= spanning) could be debated. My example above includes a few "cheats" - I actually just wanted to see if my current "parbox" implementation could be put to benefit beyond the most basic use case I had for it. A parbox being a "paragraph box" - that is, more or less, an hbox containing paragraphs. I pushed the initial code for it in my repo, with documentation. The above table is not there yet, I'll want to fine-tune it first 😉 but the naive logic is on that line of reasoning:
(N.B. And I overused the parbox here, only cells would need it, and the other some simpler framed hbox) So the above table actually is 4x3, with only 4 rows, hehe. Instead of row merging (on row no. 3), it uses cell spitting, in the form of a 3x2 sub-table. I don't pretend it has to be done this way - the whole question still is "how complex" and "which minimal features" ! |
I don't think we want to follow LaTeX That said, something is very definitely better than nothing... |
Impressive output :) Definitely agree with «something is very definitely better than nothing»! |
Ok, ok 😄 ... I cleaned up and pushed a decently working version of my "ptable" package to my own package repo - It can probably live there for a while, I'm still testing and considering improvements, but it's there if anyone wants to check and try it. It's fully documented (§1.1.8 in the generated documentation) and I hope the code to be commented enough where I erred initially. And would it seem fit by @simoncozens and @alerque at any convenient step, AFAIC, it could go to the core distribution along with the lower-level "parbox" package on which it relies. Just for the fun of it - this one example gave me a headache due to a bad bug - one day, the following could happen, count me in: (And on a more personal angle, this "ptable" package is my 15th package. Yeah! Ok some of them are dumb simple, but heh, anyhow I sort of feel closer to being able to start typesetting a book with all the building blocks I need... And it's real fun hacking SILE, lol) |
Added more flexibility with the cell border options, so that this kind of table (from the AFAIC, the only "missing" features so far could be:
|
I'd say it's worth it, as I plan to use this for Unicode tables (so will often have long tables). |
Added more flexibility with the cell padding options, so that this other table (from the LaTeX Again, settings at cell levels are sufficient, but a bit pedestrian, one could want an easier way to set them at row levels to simplify their typesetting. Still, it would be a convenience rather than an actual feature, so I don't add it for now, as for the borders. The repeated header is less obvious, due to the way the pagebuilder works (so you might not be any longer in the table enviromnement when boxes are moved until a good break point is found... I'll try to think to it... or maybe you can have a look at it @ctrlcctrlv ? |
Do you need a hook from the typesetter from when a new page is started but before all the boxes are put back into it? |
@simoncozens I've a semi-working version just overriding the initNextFrame() method and doing some look up. It sort of works, though I have to take into account potential glues that could be there too and skip them. I wonder whether this is very robust ;) |
Ok, pushed a version with header rows repeated on page breaks. As stated, this could be fragile... The basic test case worked (in the "examples" folder), though. As far as features are concerned, this should be enough? As an aside note, this beast is not very efficient, performance-wise, on long tables... |
Er. No longer true. Bug fixed ^^ |
For reference, I've updated the Wiki equivalent packages:
The question now, is what to do with this very issue. Reading the latest manual:
This is kind of our CTAN for SILE... And then we could close that issue (perhaps other too). (Erm, OT but maybe it's a remembrance from having read A. E. van Vogt in my youth, but SLAN just came to my mind when I wrote this. I don't even remember if that Slan novel was worth reading, just the name stuck, lol). |
I'm closing this issue:
|
Please support tables with the (as much as possible) syntax of cable, see also http://www.ctan.org/tex-archive/macros/latex/contrib/ctable
The text was updated successfully, but these errors were encountered: