Re: [Boost-docs] Troubles with quickbook templates

Subject: Re: [Boost-docs] Troubles with quickbook templates
From: Daniel James (dnljms_at_[hidden])
Date: 2014-11-14 11:26:44


On 14 November 2014 07:26, Gennadiy Rozental <rogeeff_at_[hidden]> wrote:
> Hi,
>
> I am trying to write a template which looks like this:
>
> [template bt_example[name descr]
>
> [import ../examples/[name].cpp]
> [import ../examples/[name].output]
> [table:id_[name] `[descr]` usage
> [
> [Code]
> [Output]
> ]
> [
> [[[name]]]
> [[[name]o]]
> ]
> ]
> ]
>
> and invoke it like this:
>
> [bt_example example34..BOOST_<level>]
>
>
> with intention to generate lines like this:
>
> [import ../examples/example34.cpp]
> [import ../examples/example34.output]
> [table:id_example34 `BOOST_<level>` usage
> [
> [Code]
> [Output]
> ]
> [
> [[example34]]
> [[example34o]]
> ]
> ]
>
> Files being imported contain referenced tags in cells.
>
> Unfortunately it seems to be failing on all possible places. import line
> fails with: "error: Unable to find file: ../examples/[name". If I
> hardcode the correct value inside import [descr] is not getting expanded
> and cell content is not expanded as well (i just see [example34]
> instead).
>
> Please advise if this is something I am doing wrong and/or if this is
> something which can be fixed?

My memory is a little rusty as I haven't touched quickbook for a
while, but I think that you'll be able to do the import and id in
quickbook 1.7 (which I'm going to try to finalize for this release,
you can use it now, but it might change a little). You won't be able
to call the imported code snippets as you do, but IIRC the imported
template names will be scoped by the template body, so you might be
able to just use the same names in all examples. I'll have look later.


This archive was generated by hypermail 2.1.7 : 2017-11-11 08:50:41 UTC