Boost logo

Boost :

From: Julio M. Merino Vidal (jmmv84_at_[hidden])
Date: 2006-07-30 12:53:17


Hi,

I've just started adding example programs to my SoC project and I was
wondering if there was a way to bundle their code into the
documentation (which I'm writing with Quickbook). Of course I can
hyperlink to the source file, but this could be useless in printed
documentation. Also I'd copy&paste the C++ code in the qbk file, but
that is asking for trouble (desyncronization). Hence, I think it'd be
useful to be able to include this code in the final document straight
from the qbk file.

I tried with the [include ...] command but it did not work as I
expected. And indenting it in the .qbk file so that it was formatted
as source code made things worse because the inclusion had no effect
at all. Similarly, [xinclude ...] cannot work either for obvious
reasons (source code is not XML).

So... I added a 'cinclude' tag (standing for code include) to
quickbook which, given a file, includes it in the documentation marked
up (and colored!) appropriately. The implementation is attached. It
can very well be flawed as it is basically a copy&paste of other parts
of the code, but so far seems to work.

Any chance this -- or something similar -- can be integrated?

Thanks.

-- 
Julio M. Merino Vidal <jmmv84_at_[hidden]>
The Julipedia - http://julipedia.blogspot.com/



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk