Re: Troubles with quickbook templates
Daniel James <[email protected]> Fri, 14 Nov 2014 11:26:44 +0000
| Newsgroups | gmane.comp.lib.boost.documentation |
|---|---|
| Message-ID | <CAHOE3ycUy26Ae6Lq7+bGKPB4yyn3VVO-WtoJWUsEUxn_n-6aZQ@mail.gmail.com> |
On 14 November 2014 07:26, Gennadiy Rozental <[email protected]> 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.