Subject: Re: [Boost-docs] [quickbook] Creating complex tables
From: Joel de Guzman (joel_at_[hidden])
Date: 2007-08-17 11:01:03
Andrew Sutton wrote:
>>>> The main thing I'd like to be able to do is have a top-level cell
>>>> that splits into more than one on the next row. I messed around with
>>>> stuff like:
>>>>
>>>> [table
>>>> [[first header] [second header]]
>>>> [[upper left ] [upper right 1] [upper right 2]]
>>>> ]
>>>>
>>>> That doesn't seem to be possible, or am I missing something?
>> I don't think it's possible, at least not in a nice way: you might
>> be able
>> to put a table inside a table, but I suspect the result would be
>> rather ugly
>> :-(
>
> It might be possible to create a macros that expand differently than
> the usual [table ...] syntax. You'd probably have to make it shell
> out to boostbook. I've been wondering about the same stuff for some
> of the docs I've been working on, but haven't made myself sit down to
> do it yet.
We'll get there, for sure :) I'd suggest waiting a little bit more
until Rene gets his template library into the main branch. Then,
we'll have loads of user customizable template fun.
For tables, lists and stuff that require variable arguments. E.g
[table [[a1][b1][c1]] [[a2][b2][c2]] [[a3][b3][c3]] ] (note that
the general syntax is [x [a][b][c]...]), my plan is to implement
the "[a][b][c]" form as a generalized list. With this generalized
list, we can have a [for_each l f] primitive taking in a list, l,
and a template, f. So, for each element in the list, the f template
is applied.
So essentially, the table will just be 2-for_each call. One for
all columns and one for each row element.
Hope this all makes sense.
Regards,
-- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net
This archive was generated by hypermail 2.1.7 : 2017-11-11 08:50:40 UTC