Re: How to get syntax coloring in Quickboook Doxygen C++ Reference sections

"Paul A. Bristow" <[email protected]> Tue, 29 Oct 2013 16:19:48 -0000
Newsgroups gmane.comp.lib.boost.documentation
Message-ID <[email protected]>

> -----Original Message-----
> From: Boost-docs [mailto:[email protected]] On Behalf Of Daniel James
> Sent: Sunday, October 27, 2013 6:12 PM
> To: Discussion of Boost Documentation
> Subject: Re: [Boost-docs] How to get syntax coloring in Quickboook Doxygen C++ Reference sections
> 
> On 27 October 2013 17:54, Paul A. Bristow <[email protected]> wrote:
> > I'm haven't another déjà vu about this issue ;-)
> >
> > But is there something I am doing wrong that I am not seeing syntax
> > coloring from this Doxygen comment, even after specifying that it is cpp.
> >
> > (Syntax coloring works fine from Quickbook snippets).
> >
> > @b Example:
> >
> > \code{.cpp}
> > #include <boost/numeric/safe_cast.hpp> #include
> > <boost/numeric/safe_integer.hpp>
> >
> > void f(){
> >     safe_integer<char> i;
> >     unsigned char j;
> >     i = 1;
> >     j = safe_cast<unsigned char>(i);  // ok
> >     i = -1;
> >     j = safe_cast<unsigned char>(i);  // throws std::out_of_range exception
> >     i = 1024;
> >     j = safe_cast<unsigned char>(i);  // throws std::out_of_range
> > exception } \endcode
> >

Now gives my much desired syntax coloring for functions (and classes)  :-)

(Have yet to try macro but that's less needed ...)

Magic!

Thanks

Paul

---
Paul A. Bristow,
Prizet Farmhouse, Kendal LA8 8AB  UK
+44 1539 561830  07714330204
[email protected]