Controlling table separators on per-row or per-cell basis

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Controlling table separators on per-row or per-cell basis

oddhack
I'd like to generate a table with two columns that overlap, since both columns can contain very long content. Something like this:

[width="100%",cols="25%,25%,25%,25%",grid=none]
|====
3+| *Col A* |
| 3+| *Col B*
4+a| '''
3+| This is a very long cell lorem ipsum lorem ipsum |
| 3+| This is also a very long cell ipsum lorem ipsum lorem
|====


However, I don't see how to specify row separators only every other row. Is there any way to do this in table markup? I tried to fake it using a row containing just an asciidoctor horizontal rule, but that doesn't quite work (connect to the table borders), and wastes vertical space.

(No, flowing the column text won't work - in actuality the content is an extremely long C structure.member name and the goal is to have it readable in the table without being broken up).

Jon

Reply | Threaded
Open this post in threaded view
|

Re: Controlling table separators on per-row or per-cell basis

David Jencks
I have no idea if either of these would actually work….

1. Since there’s support for table striping, it’s probably possible to use the same counting logic to make alternate row separators invisible using css

2. You might try nested tables, each 2 row section a subtable with no row separator, the outer table with row separators.

David Jencks

On Sep 3, 2020, at 8:11 PM, oddhack [via Asciidoctor :: Discussion] <[hidden email]> wrote:

I'd like to generate a table with two columns that overlap, since both columns can contain very long content. Something like this:

[width="100%",cols="25%,25%,25%,25%",grid=none]
|====
3+| *Col A* |
| 3+| *Col B*
4+a| '''
3+| This is a very long cell lorem ipsum lorem ipsum |
| 3+| This is also a very long cell ipsum lorem ipsum lorem
|====


However, I don't see how to specify row separators only every other row. Is there any way to do this in table markup? I tried to fake it using a row containing just an asciidoctor horizontal rule, but that doesn't quite work (connect to the table borders), and wastes vertical space.

(No, flowing the column text won't work - in actuality the content is an extremely long C structure.member name and the goal is to have it readable in the table without being broken up).

Jon




If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Controlling-table-separators-on-per-row-or-per-cell-basis-tp8216.html
To start a new topic under Asciidoctor :: Discussion, [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Controlling table separators on per-row or per-cell basis

mojavelinux
Administrator
In reply to this post by oddhack
You will need to add a role (which translates into a CSS class) and apply custom styles to it. There's no way I know to cover all possible border needs. We offer general controls for grid and frame (e.g., grid=rows, frame=none). If those aren't sufficient, custom CSS is required.

Best Regards,

-Dan

On Thu, Sep 3, 2020 at 9:11 PM oddhack [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I'd like to generate a table with two columns that overlap, since both columns can contain very long content. Something like this:

[width="100%",cols="25%,25%,25%,25%",grid=none]
|====
3+| *Col A* |
| 3+| *Col B*
4+a| '''
3+| This is a very long cell lorem ipsum lorem ipsum |
| 3+| This is also a very long cell ipsum lorem ipsum lorem
|====


However, I don't see how to specify row separators only every other row. Is there any way to do this in table markup? I tried to fake it using a row containing just an asciidoctor horizontal rule, but that doesn't quite work (connect to the table borders), and wastes vertical space.

(No, flowing the column text won't work - in actuality the content is an extremely long C structure.member name and the goal is to have it readable in the table without being broken up).

Jon




If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Controlling-table-separators-on-per-row-or-per-cell-basis-tp8216.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Controlling table separators on per-row or per-cell basis

oddhack
We run into this problem a lot: the answer to a problem is to just do it in CSS. But we also have a hard requirement for PDF output, and the PDF theming system just doesn't support the range of things that's possible to express in HTML CSS. I guess there is always going to be a huge range of things that asciidoctor cannot support for our use case, because it defers so much onto user-written CSS.

Jon
Reply | Threaded
Open this post in threaded view
|

Re: Controlling table separators on per-row or per-cell basis

mojavelinux
Administrator
Jon, I don't know what to tell you. I try hard every day to make Asciidoctor cover as many use cases as I possibly can. There are limits to what is possible and my own ability. I cannot solve every problem. Either I need help or we have to accept that's just the limit of what is possible.

-Dan

On Fri, Sep 4, 2020 at 2:56 AM oddhack [via Asciidoctor :: Discussion] <[hidden email]> wrote:
We run into this problem a lot: the answer to a problem is to just do it in CSS. But we also have a hard requirement for PDF output, and the PDF theming system just doesn't support the range of things that's possible to express in HTML CSS. I guess there is always going to be a huge range of things that asciidoctor cannot support for our use case, because it defers so much onto user-written CSS.

Jon



If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Controlling-table-separators-on-per-row-or-per-cell-basis-tp8216p8219.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Controlling table separators on per-row or per-cell basis

oddhack
Well, Khronos is trying to help (at least, I assume our contribution is still happening annually - if not let me know, and I'll pursue that). We are increasingly heavy users of asciidoctor - and as the lead person on asciidoctor usage within Khronos, it's frustrating when new working groups come to me and ask how to do something like this, and all I can say is that practically speaking today, it can't be done. Then they start questioning whether switching over from LaTeX or Word or whatever was really the right decision. Eventually they usually come around as the advantage of a shared documentation ecosystem is significant for us, but it's definitely an adoption barrier.

Jon

Reply | Threaded
Open this post in threaded view
|

Re: Controlling table separators on per-row or per-cell basis

mojavelinux
Administrator
I do want to acknowledge and thank you for that ongoing contribution. It definitely helps and was a key reason why we had the resources to launch the AsciiDoc working group and specification effort (which I do hope you will join).

I do think there's a slight misunderstanding about AsciiDoc though. It's definitely not LaTeX and not trying to be. It's intentionally simpler than that to provide a more approachable and user-friendly writing language (yet not as primitive as Markdown). So AsciiDoc is inherently and by design going to have limits.

If someone expects the power of LaTeX, then LaTeX is what they should be using. My opinion is that much of that formatting capability is superfluous and does not actually enhance the content (generally speaking). So the more limited power of AsciiDoc is actually an advantage. It gets the content down to the brass tacks, while at the same time giving plenty of hooks to embellish it when needed. It's a happy medium / best of both worlds kind of scenario.

I hope that makes sense. But now with the working group formed, if you disagree with that assertion and direction...you have a voice to persuade it in a different direction.

Best Regards,

-Dan

On Fri, Sep 4, 2020 at 3:25 AM oddhack [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Well, Khronos is trying to help (at least, I assume our contribution is still happening annually - if not let me know, and I'll pursue that). We are increasingly heavy users of asciidoctor - and as the lead person on asciidoctor usage within Khronos, it's frustrating when new working groups come to me and ask how to do something like this, and all I can say is that practically speaking today, it can't be done. Then they start questioning whether switching over from LaTeX or Word or whatever was really the right decision. Eventually they usually come around as the advantage of a shared ecosystem is significant for us, but it's definitely an adoption barrier.

Jon




If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Controlling-table-separators-on-per-row-or-per-cell-basis-tp8216p8221.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Controlling table separators on per-row or per-cell basis

David Jencks
In reply to this post by oddhack
There’s also the option of asciidoctor-web-pdf, where you get to style your pdf with css.  There are definitely problems with it, but the more people try it, the sooner the problems will get discovered and resolved.

David Jencks

On Sep 4, 2020, at 1:56 AM, oddhack [via Asciidoctor :: Discussion] <[hidden email]> wrote:

We run into this problem a lot: the answer to a problem is to just do it in CSS. But we also have a hard requirement for PDF output, and the PDF theming system just doesn't support the range of things that's possible to express in HTML CSS. I guess there is always going to be a huge range of things that asciidoctor cannot support for our use case, because it defers so much onto user-written CSS.

Jon



If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Controlling-table-separators-on-per-row-or-per-cell-basis-tp8216p8219.html
To start a new topic under Asciidoctor :: Discussion, [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Controlling table separators on per-row or per-cell basis

mojavelinux
Administrator
On Fri, Sep 4, 2020 at 9:27 AM David Jencks [via Asciidoctor :: Discussion] <[hidden email]> wrote:
There’s also the option of asciidoctor-web-pdf, where you get to style your pdf with css.

Indeed, that is an excellent point. The very reason we're starting to explore using web technologies to generate the PDF is because it is both more powerful and closer aligned with the theme used for the HTML output (meaning it enables reuse). I'll be announcing this new strategy and our plans for it on the list as soon as Asciidoctor PDF 2 has been released.

Best Regards,

-Dan


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux