groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nesting tables with tbl


From: Blake McBride
Subject: Re: Nesting tables with tbl
Date: Sun, 9 Feb 2020 15:40:03 -0600

Hi Ingo,

Thanks for the input!!

I'm not sure this works for me.  Since I am using groff/tbl to produce
computer reports, there could actually be 1,000 lines in the table!  So I
can't specify the format for each line upfront.

In my case, there can be zero or more (could be 50) of col6 col7 rows. for
each col1  col2   col3   col4 row.

I don't understand what you mean by "Nesting of tables is never needed".
You seem to be saying that there is some general solution to this sort of
thing.  I don't see it.

Thank for the help!!

Blake


On Sun, Feb 9, 2020 at 3:22 PM Ingo Schwarze <address@hidden> wrote:

> Hi Blake,
>
> Blake McBride wrote on Sun, Feb 09, 2020 at 01:50:01PM -0600:
>
> > I have a need to nest tables as follows:
>
> I'm reducing the number of columns (no col5 nor col8)
> and lines to make the example code smaller:
>
> > col1   col2   col3   col4
> >            col6   col7
> >            col6   col7
> > col1   col2   col3   col4
> >            col6   col7
> >
> > How can I do something like this with TBL?  Can I simply nest tables?
>
> Nesting of tables is never needed, but you can split columns
> and join cells, for example as follows:
>
> .TS
> allbox tab(:);
> LLSLSLS
> LLLSLS
> LLLSLS
> LLSLSLS
> LLLSLS.
> col1:col2:col3:col4
> ::col6:col7
> ::col6:col7
> col1:col2:col3:col4
> ::col6:col7
> .TE
>
> The allbox option is just intended for illustrative purposes,
> of course it also works without that or with manual lines, e.g.:
>
> .TS
> tab(:);
> L | LS | LS | LS
> LL | LS | LS |
> LL | LS | LS |
> L | LS | LS | LS
> LL | LS | LS |.
> col1:col2:col3:col4
> _
> ::col6:col7
> ::col6:col7
> _
> col1:col2:col3:col4
> _
> ::col6:col7
> .TE
>
> If you repeatedly want to switch between the two row types,
> you cannot rely on the usual default of applying the last layout
> row to all remaining data rows.  You either need to specify the
> layout for all lines up front or re-open the layout multiple times:
>
> .TS
> tab(:);
> L | LS | LS | LS
> LL | LS | LS |.
> col1:col2:col3:col4
> _
> ::col6:col7
> ::col6:col7
> _
> .T&
> L | LS | LS | LS
> LL | LS | LS |.
> col1:col2:col3:col4
> _
> ::col6:col7
> ::col6:col7
> .TE
>
> Yours,
>   Ingo
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]