Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67092 - trunk/tools/quickbook/doc
From: dnljms_at_[hidden]
Date: 2010-12-07 16:23:24


Author: danieljames
Date: 2010-12-07 16:23:21 EST (Tue, 07 Dec 2010)
New Revision: 67092
URL: http://svn.boost.org/trac/boost/changeset/67092

Log:
Add a description of using a quickbook template to generate a link.
Text files modified:
   trunk/tools/quickbook/doc/Jamfile.v2 | 2 +-
   trunk/tools/quickbook/doc/block.qbk | 25 +++++++++++++++++++++++++
   2 files changed, 26 insertions(+), 1 deletions(-)

Modified: trunk/tools/quickbook/doc/Jamfile.v2
==============================================================================
--- trunk/tools/quickbook/doc/Jamfile.v2 (original)
+++ trunk/tools/quickbook/doc/Jamfile.v2 2010-12-07 16:23:21 EST (Tue, 07 Dec 2010)
@@ -10,7 +10,7 @@
 
 project boost/quickbook/doc ;
 
-import boostbook : boostbook ;
+using boostbook ;
 using quickbook ;
 
 xml quickbook : quickbook.qbk ;

Modified: trunk/tools/quickbook/doc/block.qbk
==============================================================================
--- trunk/tools/quickbook/doc/block.qbk (original)
+++ trunk/tools/quickbook/doc/block.qbk 2010-12-07 16:23:21 EST (Tue, 07 Dec 2010)
@@ -633,6 +633,31 @@
 quickbook.phrase QuickBook phrase]. Arguments are separated by the
 double dot [^".."] and terminated by the close parenthesis.
 
+Note that templates and template parameters can't be expanded
+everywhere, only where text is interpreted as a phrase. So they can't be
+expanded in places such as table titles and link's urls. If you want to
+use a template to generate a link based of the template parameter, you
+can't use a normal link and will need to use escaped docbook instead.
+Example:
+
+[teletype]
+```
+[template boost_ticket[key] '''<ulink url="https://svn.boost.org/trac/boost/ticket/'''[key]'''">#'''[key]'''</ulink>''']
+
+[boost_ticket 2035]
+```
+
+will expand to:
+
+[template boost_ticket[key] '''<ulink url="https://svn.boost.org/trac/boost/ticket/'''[key]'''">#'''[key]'''</ulink>''']
+
+[boost_ticket 2035]
+
+[caution Since quickbook doesn't understand the context where the
+parameter is being used, it will interpret it as quickbook markup, so
+when writing a template like this, you'll need to escape any meaningful
+punctuation.]
+
 [heading Nullary Templates]
 
 Nullary templates look and act like simple macros. Example:


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk