Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r85390 - in branches/release/tools/quickbook: . doc src
From: dnljms_at_[hidden]
Date: 2013-08-18 06:04:46


Author: danieljames
Date: 2013-08-18 06:04:46 EDT (Sun, 18 Aug 2013)
New Revision: 85390
URL: http://svn.boost.org/trac/boost/changeset/85390

Log:
Merge quickbook to release.

Properties modified:
   branches/release/tools/quickbook/ (props changed)
Text files modified:
   branches/release/tools/quickbook/doc/block.qbk | 13 +++++++++++--
   branches/release/tools/quickbook/doc/quickbook.qbk | 2 +-
   branches/release/tools/quickbook/doc/structure.qbk | 37 +++++++++++++++++++++++++++++++++++++
   branches/release/tools/quickbook/src/quickbook.cpp | 2 +-
   4 files changed, 50 insertions(+), 4 deletions(-)

Modified: branches/release/tools/quickbook/doc/block.qbk
==============================================================================
--- branches/release/tools/quickbook/doc/block.qbk Sun Aug 18 05:48:53 2013 (r85389)
+++ branches/release/tools/quickbook/doc/block.qbk 2013-08-18 06:04:46 EDT (Sun, 18 Aug 2013) (r85390)
@@ -965,12 +965,18 @@
 [include someother.qbk]
 ```
 
-The included file will be processed as if it had been cut and pasted
+If the included file has a [link quickbook.ref.docinfo docinfo block] then it
+will create a nested document. Otherwise the included file will be processed
+as if it had been cut and pasted
 into the current document, with the following exceptions:
 
 * The '''__FILENAME__''' predefined macro will reflect the name of the
   file currently being processed.
-* Any macros defined in the included file are scoped to that file.
+* Any macros or templates defined in the included file are scoped to that file.
+
+[note In quickbook 1.5 and earlier templates weren't scoped in included files.
+If you want to use templates or macros from a file in quickbook 1.6,
+use [link quickbook.ref.import import] instead.]
 
 The [^\[include\]] directive lets you specify a document id to use for the
 included file. You can specify the id like this:
@@ -984,6 +990,9 @@
 named anchor for that section will be "someid.intro", and you can link to
 it with [^\[link someid.intro The Intro\]].
 
+If the included file has a docinfo block, an id specified in an [^\[include\]]
+directive will overwrite it.
+
 [endsect] [/include]
 
 [#quickbook.ref.import]

Modified: branches/release/tools/quickbook/doc/quickbook.qbk
==============================================================================
--- branches/release/tools/quickbook/doc/quickbook.qbk Sun Aug 18 05:48:53 2013 (r85389)
+++ branches/release/tools/quickbook/doc/quickbook.qbk 2013-08-18 06:04:46 EDT (Sun, 18 Aug 2013) (r85390)
@@ -11,7 +11,7 @@
     [quickbook 1.6]
     [compatibility-mode 1.5]
     [id quickbook]
- [version 1.5]
+ [version 1.6]
     [authors [de Guzman, Joel], [Niebler, Eric]]
     [copyright 2002 2004 2006 Joel de Guzman, Eric Niebler]
     [copyright 2010-2011 Daniel James]

Modified: branches/release/tools/quickbook/doc/structure.qbk
==============================================================================
--- branches/release/tools/quickbook/doc/structure.qbk Sun Aug 18 05:48:53 2013 (r85389)
+++ branches/release/tools/quickbook/doc/structure.qbk 2013-08-18 06:04:46 EDT (Sun, 18 Aug 2013) (r85390)
@@ -144,6 +144,43 @@
 
 [endsect] [/attributes]
 
+[section:nesting Nesting quickbook documents]
+
+Docinfo blocks can only appear at the beginning of a quickbook file, so to
+create a more complicated document you need to use several quickbook files and
+use the [link quickbook.ref.include include tag] to nest them. For example, say
+you wish to create a book with an introduction and a chapter, you first create
+a file for the book:
+
+ [book Simple example
+ [quickbook 1.6]
+ ]
+
+ [include introduction.qbk]
+ [include chapter.qbk]
+
+[note Structuring a document like this was introduced in quickbook 1.6, so the
+`[quickbook 1.6]` docinfo field is required.]
+
+The appropriate document type for an introduction is `preface`, so
+the contents of `introduction.qbk` should be something like:
+
+ [preface Introduction
+ [quickbook 1.6]
+ ]
+
+ Write the introduction to the book here....
+
+And `chapter.qbk`:
+
+ [chapter A chapter
+ [quickbook 1.6]
+ ]
+
+ Chapter contents....
+
+[endsect] [/nesting]
+
 [endsect] [/docinfo]
 
 [#quickbook.ref.section]

Modified: branches/release/tools/quickbook/src/quickbook.cpp
==============================================================================
--- branches/release/tools/quickbook/src/quickbook.cpp Sun Aug 18 05:48:53 2013 (r85389)
+++ branches/release/tools/quickbook/src/quickbook.cpp 2013-08-18 06:04:46 EDT (Sun, 18 Aug 2013) (r85390)
@@ -40,7 +40,7 @@
 #pragma warning(disable:4355)
 #endif
 
-#define QUICKBOOK_VERSION "Quickbook Version 1.6.0 alpha (dev)"
+#define QUICKBOOK_VERSION "Quickbook Version 1.6.0 alpha 1"
 
 namespace quickbook
 {


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