Boost logo

Boost :

Subject: Re: [boost] [quickbook] Cross-Referencing Source-Snippets
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2012-10-14 04:31:33

On Sun, Oct 14, 2012 at 4:13 AM, John Maddock <boost.regex_at_[hidden]>wrote:

>> I'm not sure I completely understand the issue, but I use "__predicate"
> to link to "predicate".

I can't do that because the text that needs to be replaced by the macro
comes imported directly from C++ source-code (via [import]). I need to take
text such as "Predicate" that appears in a header file and replace it with
a link to the appropriate page in documentation, that way people can read
the imported code samples and even be able to click on identifiers to take
them to the corresponding documentation. The problem is, if I simply make a
macro called "Predicate", it interferes with my quickbook section called
"Predicate", which makes the generated table of contents broken because of
the macro replacement.

Anyway, I figured out a workaround -- what I now do is I define the section
as such: [section:predicate P[']redicate] and do something similar for all
of the other sections. This way, I get the name that I want without
worrying about macro expansion. I updated the documentation here (click on
the different names in the inlined code to see the cross-referencing):

I didn't upload the source files so the #include links won't work, but
everything else should.

-Matt Calabrese

Boost list run by bdawes at, gregod at, cpdaniel at, john at