|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r77569 - in branches/release/tools/quickbook: . doc src test
From: dnljms_at_[hidden]
Date: 2012-03-26 16:48:02
Author: danieljames
Date: 2012-03-26 16:48:00 EDT (Mon, 26 Mar 2012)
New Revision: 77569
URL: http://svn.boost.org/trac/boost/changeset/77569
Log:
Quickbook: Partial merge from trunk.
- Fixes to 1.6 lists, involving blocks in lists.
- Use anchors for links in documentation, and explicit section ids. Will make
it easier to edits docs in future.
- Fix filesystem includes.
Properties modified:
branches/release/tools/quickbook/ (props changed)
Text files modified:
branches/release/tools/quickbook/doc/block.qbk | 120 ++++++++++++++++++++++++----------------
branches/release/tools/quickbook/doc/phrase.qbk | 104 ++++++++++++++++++++--------------
branches/release/tools/quickbook/doc/quickbook.qbk | 82 +++++++++++++-------------
branches/release/tools/quickbook/doc/structure.qbk | 8 ++
branches/release/tools/quickbook/doc/syntax.qbk | 6 +-
branches/release/tools/quickbook/src/actions.cpp | 12 +++
branches/release/tools/quickbook/src/doc_info_actions.cpp | 2
branches/release/tools/quickbook/src/files.cpp | 2
branches/release/tools/quickbook/src/files.hpp | 2
branches/release/tools/quickbook/src/grammar_impl.hpp | 1
branches/release/tools/quickbook/src/input_path.hpp | 2
branches/release/tools/quickbook/src/main_grammar.cpp | 21 +++++-
branches/release/tools/quickbook/src/quickbook.cpp | 6 +-
branches/release/tools/quickbook/src/quickbook.hpp | 2
branches/release/tools/quickbook/test/list_test-1_5.gold | 16 +++++
branches/release/tools/quickbook/test/list_test-1_5.quickbook | 8 ++
branches/release/tools/quickbook/test/list_test-1_6.gold | 50 ++++++++++++++++
branches/release/tools/quickbook/test/list_test-1_6.quickbook | 21 ++++++
18 files changed, 313 insertions(+), 152 deletions(-)
Modified: branches/release/tools/quickbook/doc/block.qbk
==============================================================================
--- branches/release/tools/quickbook/doc/block.qbk (original)
+++ branches/release/tools/quickbook/doc/block.qbk 2012-03-26 16:48:00 EDT (Mon, 26 Mar 2012)
@@ -14,7 +14,8 @@
[source-mode teletype]
]
-[section xinclude]
+[#quickbook.ref.xinclude]
+[section:xinclude xinclude]
You can include another XML file with:
@@ -27,7 +28,8 @@
[endsect] [/xinclude]
-[section Paragraphs]
+[#quickbook.ref.paragraphs]
+[section:paragraphs Paragraphs]
Paragraphs start left-flushed and are terminated by two or more newlines. No
markup is needed for paragraphs. QuickBook automatically detects paragraphs from
@@ -36,10 +38,12 @@
[/ <-- There's a space here. Don't remove. this is intentianal, for testing]
This is a new paragraph...
-[endsect] [/Paragraphs]
+[endsect] [/paragraphs]
-[section Lists]
-[section Ordered lists]
+[#quickbook.ref.lists]
+[section:lists Lists]
+[#quickbook.ref.ordered_lists]
+[section:ordered_lists Ordered lists]
[pre
# One
@@ -53,8 +57,9 @@
# Two
# Three
-[endsect] [/Ordered lists]
-[section List Hierarchies]
+[endsect] [/ordered_lists]
+[#quickbook.ref.list_hierarchies]
+[section:list_hierarchies List Hierarchies]
List hierarchies are supported. Example:
@@ -86,8 +91,9 @@
# Four.a.ii
# Five
-[endsect] [/List Hierarchies]
-[section Long List Lines]
+[endsect] [/list_hierarchies]
+[#quickbook.ref.long_list_lines]
+[section:long_list_lines Long List Lines]
Long lines will be wrapped appropriately. Example:
@@ -109,8 +115,9 @@
A very long item. A very long item. A very long item.
# A short item.
-[endsect] [/Long list lines]
-[section Unordered lists]
+[endsect] [/long_list_lines]
+[#quickbook.ref.unordered_lists]
+[section:unordered_lists Unordered lists]
```
* First
@@ -124,8 +131,9 @@
* Second
* Third
-[endsect] [/Unordered lists]
-[section Mixed lists]
+[endsect] [/unordered_lists]
+[#quickbook.ref.mixed_lists]
+[section:mixed_lists Mixed lists]
Mixed lists (ordered and unordered) are supported. Example:
@@ -181,10 +189,11 @@
* 2.b.2.a
* 2.b.2.b
-[endsect] [/Mixed lists]
-[endsect] [/Lists]
+[endsect] [/mixed_lists]
+[endsect] [/lists]
-[section Code]
+[#quickbook.ref.code]
+[section:code Code]
Preformatted code starts with a space or a tab. The code will be
syntax highlighted according to the current __source_mode__:
@@ -227,8 +236,9 @@
using __boost__::__array__;
-[endsect] [/Code]
+[endsect] [/code]
+[#quickbook.ref.escape_back]
[section:escape_back Escaping Back To QuickBook]
Inside code, code blocks and inline code, QuickBook does not allow any
@@ -252,9 +262,10 @@
When escaping from code to QuickBook, only phrase level markups are
allowed. Block level markups like lists, tables etc. are not allowed.
-[endsect] [/Escaping back to quickbook]
+[endsect] [/escaping_back_to_quickbook]
-[section Preformatted]
+[#quickbook.ref.preformatted]
+[section:preformatted Preformatted]
Sometimes, you don't want some preformatted text to be parsed as source code. In such
cases, use the [^\[pre ... \]] markup block.
@@ -288,9 +299,10 @@
Notice that unlike Code, phrase markup such as font style is still permitted
inside =pre= blocks.
-[endsect] [/Preformatted]
+[endsect] [/preformatted]
-[section Blockquote]
+[#quickbook.ref.blockquote]
+[section:blockquote Blockquote]
[pre
'''[:sometext...]'''
@@ -298,9 +310,10 @@
[:Indents the paragraph. This applies to one paragraph only.]
-[endsect] [/Blockquote]
+[endsect] [/blockquote]
-[section Admonitions]
+[#quickbook.ref.admonitions]
+[section:admonitions Admonitions]
```
[note This is a note]
@@ -322,9 +335,10 @@
for example [^\[information This is some information\]] is unlikely
to produce the desired effect.
-[endsect] [/Admonitions]
+[endsect] [/admonitions]
-[section Headings]
+[#quickbook.ref.headings]
+[section:headings Headings]
```
[h1 Heading 1]
@@ -356,9 +370,10 @@
to link to them. See __anchor_links__ and __section__ for more info.
-[endsect] [/Headings]
+[endsect] [/headings]
-[section Generic Heading]
+[#quickbook.ref.generic_heading]
+[section:generic_heading Generic Heading]
In cases when you don't want to care about the heading level (1 to 6), you
can use the /Generic Heading/:
@@ -402,9 +417,10 @@
with /section/ and /heading/, you have all you need. /h1/../h6/ becomes
redundant. /h1/../h6/ might be deprecated in the future.
-[endsect] [/Generic Heading]
+[endsect] [/generic_heading]
-[section Macros]
+[#quickbook.ref.macros]
+[section:macros Macros]
```
[def macro_identifier some text]
@@ -455,9 +471,10 @@
Hi __spirit__ :-)
-[endsect] [/Macros]
+[endsect] [/macros]
-[section Predefined Macros]
+[#quickbook.ref.predefined_macros]
+[section:predefined_macros Predefined Macros]
Quickbook has some predefined macros that you can already use.
@@ -468,9 +485,10 @@
[[[^\__FILENAME__]][Quickbook source filename] [__FILENAME__]]
]
-[endsect] [/Predefined Macros]
+[endsect] [/predefined_macros]
-[section Templates]
+[#quickbook.ref.templates]
+[section:templates Templates]
Templates provide a more versatile text substitution mechanism. Templates
come in handy when you need to create parameterizable, multi-line,
@@ -496,6 +514,7 @@
]
+[#quickbook.ref.template_identifier]
[heading Template Identifier]
Template identifiers can either consist of:
@@ -513,7 +532,7 @@
C/C++ identifier.
A template formal argument temporarily hides a template of the same name at
-the point where the [link quickbook.syntax.block.templates.template_expansion
+the point where the [link quickbook.ref.template_expansion
template is expanded]. Note that the body of the [^person] template above
refers to [^name] [^age] and [^what] as [^\[name\]] [^\[age\]] and
[^\[what\]]. [^name] [^age] and [^what] are actually templates that exist
@@ -620,7 +639,7 @@
The difference with macros are
-* The explicit [link quickbook.syntax.block.templates.template_expansion
+* The explicit [link quickbook.ref.template_expansion
template expansion syntax]. This is an advantage because, now, we don't
have to use obscure naming conventions like double underscores (e.g.
\_\_alpha\_\_) to avoid unwanted
@@ -729,7 +748,7 @@
in QuickBook (as a qbk library). For that to happen, we need to accommodate
single character punctuation templates which are fairly common in
QuickBook. You might have noticed that single character punctuations are
-allowed as [link quickbook.syntax.block.templates.template_identifier
+allowed as [link quickbook.ref.template_identifier
template identifiers]. Example:
```
@@ -748,9 +767,10 @@
<hey>baz</hey>
]
-[endsect] [/Templates]
+[endsect] [/templates]
-[section Blurbs]
+[#quickbook.ref.blurbs]
+[section:blurbs Blurbs]
```
[blurb ``\:-)`` [*An eye catching advertisement or note...]
@@ -772,12 +792,13 @@
(EBNF) completely in C++.
]
-[note Prefer [link quickbook.syntax.block.admonitions admonitions] wherever
+[note Prefer [link quickbook.ref.admonitions admonitions] wherever
appropriate.]
-[endsect] [/Blurbs]
+[endsect] [/blurbs]
-[section Tables]
+[#quickbook.ref.tables]
+[section:tables Tables]
```
[table:id A Simple Table
@@ -899,9 +920,10 @@
]
]
-[endsect] [/Tables]
+[endsect] [/tables]
-[section Variable Lists]
+[#quickbook.ref.variable_lists]
+[section:variable_lists Variable Lists]
```
[variablelist A Variable List
@@ -932,9 +954,10 @@
the second column contains the definitions. Those familiar with HTML
will recognize this as a "definition list".
-[endsect] [/Variable Lists]
+[endsect] [/variable_lists]
-[section Include]
+[#quickbook.ref.include]
+[section:include Include]
You can include one QuickBook file from another. The syntax is simply:
@@ -963,9 +986,10 @@
named anchor for that section will be "someid.intro", and you can link to
it with [^\[link someid.intro The Intro\]].
-[endsect] [/Include]
+[endsect] [/include]
-[section Import]
+[#quickbook.ref.import]
+[section:import Import]
When documenting code, you'd surely need to present code from actual source
files. While it is possible to copy some code and paste them in your QuickBook
@@ -1110,4 +1134,4 @@
See the actual code here: [@boost:/tools/quickbook/test/stub.cpp]
-[endsect] [/Import]
+[endsect] [/import]
Modified: branches/release/tools/quickbook/doc/phrase.qbk
==============================================================================
--- branches/release/tools/quickbook/doc/phrase.qbk (original)
+++ branches/release/tools/quickbook/doc/phrase.qbk 2012-03-26 16:48:00 EDT (Mon, 26 Mar 2012)
@@ -14,7 +14,8 @@
[source-mode teletype]
]
-[section Font Styles]
+[#quickbook.ref.font_styles]
+[section:font_styles Font Styles]
```
['italic], [*bold], [_underline], [^teletype], [-strikethrough]
@@ -34,9 +35,10 @@
[*['bold-italic]]
-[endsect] [/Font Styles]
+[endsect] [/font_styles]
-[section Replaceable]
+[#quickbook.ref.replaceable]
+[section:replaceable Replaceable]
When you want content that may or must be replaced by the user, use the syntax:
@@ -48,9 +50,10 @@
[~replacement]
-[endsect] [/Replaceable]
+[endsect] [/replaceable]
-[section Quotations]
+[#quickbook.ref.quotations]
+[section:quotations Quotations]
```
["A question that sometimes drives me hazy: am I or are the others crazy?]--Einstein
@@ -76,9 +79,10 @@
["Here's the rule for bargains: ["Do other men, for they would do you.]
That's the true business precept.]
-[endsect] [/Quotations]
+[endsect] [/quotations]
-[section Simple formatting]
+[#quickbook.ref.simple_formatting]
+[section:simple_formatting Simple formatting]
Simple markup for formatting text, common in many applications, is now supported:
@@ -159,9 +163,10 @@
One for the master, one for the dame,
And one for the little boy who lives down the lane.
-[endsect] [/Simple Formatting]
+[endsect] [/simple_formatting]
-[section Inline code]
+[#quickbook.ref.inline_code]
+[section:inline_code Inline code]
Inlining code in paragraphs is quite common when writing C++ documentation. We
provide a very simple markup for this. For example, this:
@@ -179,9 +184,10 @@
single quote: `"'"`. Note too that [^\`some code\`] is preferred over
`[^some code]`. ]
-[endsect] [/Inline Code]
+[endsect] [/inline_code]
-[section Code blocks]
+[#quickbook.ref.code_blocks]
+[section:code_blocks Code blocks]
Preformatted code simply starts with a space or a tab (See __code__).
However, such a simple syntax cannot be used as phrase elements in lists
@@ -235,9 +241,10 @@
[teletype]
-[endsect] [/Code blocks]
+[endsect] [/code_blocks]
-[section Source Mode]
+[#quickbook.ref.source_mode]
+[section:source_mode Source Mode]
If a document contains more than one type of source code then the source
mode may be changed dynamically as the document is processed. All QuickBook
@@ -270,10 +277,10 @@
[note The source mode strings are lowercase.]
-[endsect] [/Source Mode]
+[endsect] [/source_mode]
-[#ref-line-break]
-[section line-break]
+[#quickbook.ref.line_break]
+[section:line_break line-break]
```
[br]
@@ -283,9 +290,10 @@
there might be problems, especially when using an alternative docbook
processor.]
-[endsect] [/Line break]
+[endsect] [/line_break]
-[section Anchors]
+[#quickbook.ref.anchors]
+[section:anchors Anchors]
```
[#named_anchor]
@@ -299,9 +307,10 @@
quickbook documentation. Be careful to avoid clashes with anchors in
other sections.
-[endsect] [/Anchors]
+[endsect] [/anchors]
-[section Links]
+[#quickbook.ref.links]
+[section:links Links]
```
[@http://www.boost.org this is [*boost's] website....]
@@ -339,9 +348,10 @@
Note that this is only available when using BoostBook, and only for links
- it can't be used for images.
-[endsect] [/Links]
+[endsect] [/links]
-[section Anchor links]
+[#quickbook.ref.anchor_links]
+[section:anchor_links Anchor links]
You can link within a document using:
@@ -351,9 +361,10 @@
See sections __section__ and __heading__ for more info.
-[endsect] [/Anchor links]
+[endsect] [/anchor_links]
-[section refentry links]
+[#quickbook.ref.refentry_links]
+[section:refentry_links refentry links]
In addition, you can link internally to an XML refentry like:
@@ -372,8 +383,9 @@
This gets converted into [^<link linkend="xml.refentry">xml.refentry</link>].
-[endsect] [/refentry links]
+[endsect] [/refentry_links]
+[#quickbook.ref.code_links]
[section:code_links Code Links]
If you want to link to a function, class, member, enum, concept, global, or header in
@@ -400,9 +412,10 @@
would have "boost::bar::baz" as the link text.
-[endsect] [/Code Links]
+[endsect] [/code_links]
-[section Escape]
+[#quickbook.ref.escape]
+[section:escape Escape]
The escape mark-up is used when we don't want to do any processing.
@@ -427,9 +440,10 @@
[important Be careful when using the escape. The text must conform to
__boostbook__/__docbook__ syntax.]
-[endsect] [/Escape]
+[endsect] [/escape]
-[section Single char escape]
+[#quickbook.ref.single_char_escape]
+[section:single_char_escape Single char escape]
The backslash may be used to escape a single punctuation character. The
punctuation immediately after the backslash is passed without any processing.
@@ -439,15 +453,16 @@
`\n` has a special meaning. It is used to generate line breaks.
-[warning `\n` is now deprecated, use [link ref-line-break `[br]`]
+[warning `\n` is now deprecated, use [link quickbook.ref.line_break `[br]`]
instead. Although, use it sparingly as it can generated invalid docbook]
The escaped space: `\ ` also has a special meaning. The escaped space is removed
from the output.
-[endsect] [/Single char escape]
+[endsect] [/single_char_escape]
-[section Unicode escape]
+[#quickbook.ref.unicode_escape]
+[section:unicode_escape Unicode escape]
You can enter any 16-bit unicode character by using `\u` followed by its 4 digit
hexadecimal code, or a 32-bit character by using `\U` followed by an 8 digit
@@ -463,9 +478,10 @@
\u03B1 + \u03B2
]
-[endsect] [/Unicode escape]
+[endsect] [/unicode_escape]
-[section Images]
+[#quickbook.ref.images]
+[section:images Images]
```
[$image.jpg]
@@ -479,9 +495,10 @@
[$image.jpg [width 200in] [height 200in]]
```
-[endsect] [/Images]
+[endsect] [/images]
-[section Footnotes]
+[#quickbook.ref.footnotes]
+[section:footnotes Footnotes]
As of version 1.3, QuickBook supports footnotes. Just put the text of the
footnote in a `[footnote]` block, and the text will be put at the bottom
@@ -493,9 +510,10 @@
will generate this[footnote A sample footnote].
-[endsect] [/Footnotes]
+[endsect] [/footnotes]
-[section Macro Expansion]
+[#quickbook.ref.macro_expansion]
+[section:macro_expansion Macro Expansion]
```
__a_macro_identifier__
@@ -503,9 +521,10 @@
See __macros__ for details.
-[endsect] [/Macro Expansion]
+[endsect] [/macro_expansion]
-[section Template Expansion]
+[#quickbook.ref.template_expansion]
+[section:template_expansion Template Expansion]
```
[a_template_identifier]
@@ -513,8 +532,9 @@
See __templates__ for details.
-[endsect] [/Template Expansion]
+[endsect] [/template_expansion]
+[#quickbook.ref.cond]
[section:cond Conditional Generation]
Like C++ `#ifdef`, you can generate phrases depending on the presence of
@@ -543,4 +563,4 @@
Yes!
-[endsect] [/Condition Generation]
+[endsect] [/cond]
Modified: branches/release/tools/quickbook/doc/quickbook.qbk
==============================================================================
--- branches/release/tools/quickbook/doc/quickbook.qbk (original)
+++ branches/release/tools/quickbook/doc/quickbook.qbk 2012-03-26 16:48:00 EDT (Mon, 26 Mar 2012)
@@ -37,49 +37,49 @@
[def __boostbook__ [@http://www.boost.org/doc/html/boostbook.html BoostBook]]
[def __docbook__ [@http://www.docbook.org/ DocBook]]
-[def __comments__ [link quickbook.syntax.comments Comments]]
+[def __comments__ [link quickbook.ref.comments Comments]]
-[def __font_styles__ [link quickbook.syntax.phrase.font_styles Font Styles]]
-[def __quotations__ [link quickbook.syntax.phrase.quotations Quotations]]
-[def __replaceable__ [link quickbook.syntax.phrase.replaceable Replaceble]]
-[def __simple_formatting__ [link quickbook.syntax.phrase.simple_formatting Simple formatting]]
-[def __inline_code__ [link quickbook.syntax.phrase.inline_code Inline code]]
-[def __code_blocks__ [link quickbook.syntax.phrase.code_blocks Code blocks]]
-[def __source_mode__ [link quickbook.syntax.phrase.source_mode Source Mode]]
-[def __line_break__ [link quickbook.syntax.phrase.line_break line-break]]
-[def __anchors__ [link quickbook.syntax.phrase.anchors Anchors]]
-[def __links__ [link quickbook.syntax.phrase.links Links]]
-[def __anchor_links__ [link quickbook.syntax.phrase.anchor_links Anchor links]]
-[def __refentry_links__ [link quickbook.syntax.phrase.refentry_links refentry links]]
-[def __code_links__ [link quickbook.syntax.phrase.code_links function, class, member, enum, macro, concept or header links]]
-[def __escape__ [link quickbook.syntax.phrase.escape Escape]]
-[def __single_char_escape__ [link quickbook.syntax.phrase.single_char_escape Single char escape]]
-[def __images__ [link quickbook.syntax.phrase.images Images]]
-[def __cond__ [link quickbook.syntax.phrase.cond Conditional Generation]]
+[def __font_styles__ [link quickbook.ref.font_styles Font Styles]]
+[def __quotations__ [link quickbook.ref.quotations Quotations]]
+[def __replaceable__ [link quickbook.ref.replaceable Replaceble]]
+[def __simple_formatting__ [link quickbook.ref.simple_formatting Simple formatting]]
+[def __inline_code__ [link quickbook.ref.inline_code Inline code]]
+[def __code_blocks__ [link quickbook.ref.code_blocks Code blocks]]
+[def __source_mode__ [link quickbook.ref.source_mode Source Mode]]
+[def __line_break__ [link quickbook.ref.line_break line-break]]
+[def __anchors__ [link quickbook.ref.anchors Anchors]]
+[def __links__ [link quickbook.ref.links Links]]
+[def __anchor_links__ [link quickbook.ref.anchor_links Anchor links]]
+[def __refentry_links__ [link quickbook.ref.refentry_links refentry links]]
+[def __code_links__ [link quickbook.ref.code_links function, class, member, enum, macro, concept or header links]]
+[def __escape__ [link quickbook.ref.escape Escape]]
+[def __single_char_escape__ [link quickbook.ref.single_char_escape Single char escape]]
+[def __images__ [link quickbook.ref.images Images]]
+[def __cond__ [link quickbook.ref.cond Conditional Generation]]
-[def __document__ [link quickbook.syntax.structure.docinfo Document]]
-[def __section__ [link quickbook.syntax.structure.section Section]]
-[def __xinclude__ [link quickbook.syntax.block.xinclude xinclude]]
-[def __paragraphs__ [link quickbook.syntax.block.paragraphs Paragraphs]]
-[def __ordered_lists__ [link quickbook.syntax.block.lists.ordered_lists Ordered lists]]
-[def __list_hierarchies__ [link quickbook.syntax.block.lists.list_hierarchies List Hierarchies]]
-[def __long_list_lines__ [link quickbook.syntax.block.lists.long_list_lines Long List Lines]]
-[def __unordered_lists__ [link quickbook.syntax.block.lists.unordered_lists Unordered lists]]
-[def __mixed_lists__ [link quickbook.syntax.block.lists.mixed_lists Mixed lists]]
-[def __code__ [link quickbook.syntax.block.code Code]]
-[def __escape_back__ [link quickbook.syntax.block.escape_back Escaping Back To QuickBook]]
-[def __preformatted__ [link quickbook.syntax.block.preformatted Preformatted]]
-[def __blockquote__ [link quickbook.syntax.block.blockquote Blockquote]]
-[def __heading__ [link quickbook.syntax.block.headings Heading]]
-[def __macros__ [link quickbook.syntax.block.macros Macros]]
-[def __templates__ [link quickbook.syntax.block.templates Templates]]
-[def __predefined_macros__ [link quickbook.syntax.block.predefined_macros Predefined Macros]]
-[def __blurbs__ [link quickbook.syntax.block.blurbs Blurbs]]
-[def __admonitions__ [link quickbook.syntax.block.admonitions Admonitions]]
-[def __tables__ [link quickbook.syntax.block.tables Tables]]
-[def __variable_lists__ [link quickbook.syntax.block.variable_lists Variable Lists]]
-[def __include__ [link quickbook.syntax.block.include Include]]
-[def __import__ [link quickbook.syntax.block.import Import]]
+[def __document__ [link quickbook.ref.docinfo Document]]
+[def __section__ [link quickbook.ref.section Section]]
+[def __xinclude__ [link quickbook.ref.xinclude xinclude]]
+[def __paragraphs__ [link quickbook.ref.paragraphs Paragraphs]]
+[def __ordered_lists__ [link quickbook.ref.ordered_lists Ordered lists]]
+[def __list_hierarchies__ [link quickbook.ref.list_hierarchies List Hierarchies]]
+[def __long_list_lines__ [link quickbook.ref.long_list_lines Long List Lines]]
+[def __unordered_lists__ [link quickbook.ref.unordered_lists Unordered lists]]
+[def __mixed_lists__ [link quickbook.ref.mixed_lists Mixed lists]]
+[def __code__ [link quickbook.ref.code Code]]
+[def __escape_back__ [link quickbook.ref.escape_back Escaping Back To QuickBook]]
+[def __preformatted__ [link quickbook.ref.preformatted Preformatted]]
+[def __blockquote__ [link quickbook.ref.blockquote Blockquote]]
+[def __heading__ [link quickbook.ref.headings Heading]]
+[def __macros__ [link quickbook.ref.macros Macros]]
+[def __templates__ [link quickbook.ref.templates Templates]]
+[def __predefined_macros__ [link quickbook.ref.predefined_macros Predefined Macros]]
+[def __blurbs__ [link quickbook.ref.blurbs Blurbs]]
+[def __admonitions__ [link quickbook.ref.admonitions Admonitions]]
+[def __tables__ [link quickbook.ref.tables Tables]]
+[def __variable_lists__ [link quickbook.ref.variable_lists Variable Lists]]
+[def __include__ [link quickbook.ref.include Include]]
+[def __import__ [link quickbook.ref.import Import]]
[include introduction.qbk]
[include change_log.qbk]
Modified: branches/release/tools/quickbook/doc/structure.qbk
==============================================================================
--- branches/release/tools/quickbook/doc/structure.qbk (original)
+++ branches/release/tools/quickbook/doc/structure.qbk 2012-03-26 16:48:00 EDT (Mon, 26 Mar 2012)
@@ -7,6 +7,7 @@
[@http://www.boost.org/LICENSE_1_0.txt])
]
+[#quickbook.ref.structure]
[chapter Document Structure
[quickbook 1.6]
[id quickbook.syntax.structure]
@@ -26,7 +27,7 @@
currently a work in progress and subject to change.
]
-[#ref-docinfo]
+[#quickbook.ref.docinfo]
[section:docinfo Document Info]
Every document must begin with a Document Info section, which looks something
@@ -73,6 +74,7 @@
]
```
+[#quickbook.ref.attributes]
[section:attributes Document Info Attributes]
The document info block has a few different types of attributes.
@@ -145,6 +147,7 @@
[endsect] [/docinfo]
+[#quickbook.ref.section]
[section:section Sections]
Quickbook documents are structured using 'sections'. These are used
@@ -173,11 +176,12 @@
```
Sections start with the `section` tag, and end with the `[endsect]` tag.
-(`[/...]` is a comment, [link quickbook.syntax.comments described later]).
+(`[/...]` is a comment, [link quickbook.ref.comments described later]).
Sections can be given an optional id:
```
+[#quickbook.ref.id]
[section:id The Section Title]
```
Modified: branches/release/tools/quickbook/doc/syntax.qbk
==============================================================================
--- branches/release/tools/quickbook/doc/syntax.qbk (original)
+++ branches/release/tools/quickbook/doc/syntax.qbk 2012-03-26 16:48:00 EDT (Mon, 26 Mar 2012)
@@ -28,7 +28,8 @@
such as un-matched closing brackets do not go haywire and corrupt anything past
a single block.
-[section Comments]
+[#quickbook.ref.comments]
+[section:comments Comments]
Can be placed anywhere.
@@ -50,5 +51,4 @@
[/ for testing [*only ] ]
-[endsect] [/Comments]
-
+[endsect] [/comments]
Modified: branches/release/tools/quickbook/src/actions.cpp
==============================================================================
--- branches/release/tools/quickbook/src/actions.cpp (original)
+++ branches/release/tools/quickbook/src/actions.cpp 2012-03-26 16:48:00 EDT (Mon, 26 Mar 2012)
@@ -12,8 +12,8 @@
#include <functional>
#include <vector>
#include <map>
-#include <boost/filesystem/v3/convenience.hpp>
-#include <boost/filesystem/v3/fstream.hpp>
+#include <boost/filesystem/convenience.hpp>
+#include <boost/filesystem/fstream.hpp>
#include <boost/range/distance.hpp>
#include <boost/range/algorithm/replace.hpp>
#include <boost/lexical_cast.hpp>
@@ -313,6 +313,14 @@
void list_item_action::operator()() const
{
+ // Be careful as this is sometimes called in the wrong place
+ // for markup such as:
+ //
+ // * A
+ // [endsect]
+ //
+ // This action is called before [endsect] (to end the list item)
+ // and then also after it due to the way the parser works.
std::string str;
actions.phrase.swap(str);
actions.out << str;
Modified: branches/release/tools/quickbook/src/doc_info_actions.cpp
==============================================================================
--- branches/release/tools/quickbook/src/doc_info_actions.cpp (original)
+++ branches/release/tools/quickbook/src/doc_info_actions.cpp 2012-03-26 16:48:00 EDT (Mon, 26 Mar 2012)
@@ -12,7 +12,7 @@
#include <boost/bind.hpp>
#include <boost/algorithm/string/join.hpp>
#include <boost/foreach.hpp>
-#include <boost/filesystem/v3/operations.hpp>
+#include <boost/filesystem/operations.hpp>
#include "quickbook.hpp"
#include "utils.hpp"
#include "files.hpp"
Modified: branches/release/tools/quickbook/src/files.cpp
==============================================================================
--- branches/release/tools/quickbook/src/files.cpp (original)
+++ branches/release/tools/quickbook/src/files.cpp 2012-03-26 16:48:00 EDT (Mon, 26 Mar 2012)
@@ -8,7 +8,7 @@
http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
#include "files.hpp"
-#include <boost/filesystem/v3/fstream.hpp>
+#include <boost/filesystem/fstream.hpp>
#include <boost/unordered_map.hpp>
#include <boost/range/algorithm/upper_bound.hpp>
#include <boost/range/algorithm/transform.hpp>
Modified: branches/release/tools/quickbook/src/files.hpp
==============================================================================
--- branches/release/tools/quickbook/src/files.hpp (original)
+++ branches/release/tools/quickbook/src/files.hpp 2012-03-26 16:48:00 EDT (Mon, 26 Mar 2012)
@@ -12,7 +12,7 @@
#define BOOST_QUICKBOOK_FILES_HPP
#include <string>
-#include <boost/filesystem/v3/path.hpp>
+#include <boost/filesystem/path.hpp>
#include <boost/intrusive_ptr.hpp>
#include <stdexcept>
#include <cassert>
Modified: branches/release/tools/quickbook/src/grammar_impl.hpp
==============================================================================
--- branches/release/tools/quickbook/src/grammar_impl.hpp (original)
+++ branches/release/tools/quickbook/src/grammar_impl.hpp 2012-03-26 16:48:00 EDT (Mon, 26 Mar 2012)
@@ -38,6 +38,7 @@
in_block = phrase | maybe_block | nested_block | conditional_or_block | block,
only_nested_block = nested_block,
only_block = nested_block | conditional_or_block | block,
+ only_list_block = nested_block | conditional_or_block,
only_contextual_block = maybe_block | nested_block | conditional_or_block | block
};
Modified: branches/release/tools/quickbook/src/input_path.hpp
==============================================================================
--- branches/release/tools/quickbook/src/input_path.hpp (original)
+++ branches/release/tools/quickbook/src/input_path.hpp 2012-03-26 16:48:00 EDT (Mon, 26 Mar 2012)
@@ -10,7 +10,7 @@
#define BOOST_QUICKBOOK_DETAIL_INPUT_PATH_HPP
#include <boost/config.hpp>
-#include <boost/filesystem/v3/path.hpp>
+#include <boost/filesystem/path.hpp>
#include <string>
#include <stdexcept>
#include <iostream>
Modified: branches/release/tools/quickbook/src/main_grammar.cpp
==============================================================================
--- branches/release/tools/quickbook/src/main_grammar.cpp (original)
+++ branches/release/tools/quickbook/src/main_grammar.cpp 2012-03-26 16:48:00 EDT (Mon, 26 Mar 2012)
@@ -27,8 +27,6 @@
#include <boost/range/algorithm/find_first_of.hpp>
#include <boost/range/as_literal.hpp>
-#include <iostream>
-
namespace quickbook
{
namespace cl = boost::spirit::classic;
@@ -103,9 +101,18 @@
info_ = l.info;
- if (info_.type != element_info::phrase &&
+ if (!l.list_stack.empty() && !l.list_stack.top().root &&
+ info_.type == element_info::block)
+ {
+ // If in a list and the element is a block, end the list.
+ l.actions_.list_item();
+ l.clear_stack();
+ }
+ else if (info_.type != element_info::phrase &&
info_.type != element_info::maybe_block)
+ {
l.actions_.paragraph();
+ }
l.actions_.values.builder.reset();
@@ -235,7 +242,7 @@
, no_eols(true)
, actions_(actions)
, check_indentation(*this, &main_grammar_local::check_indentation_impl)
- , check_code_block(*this, &main_grammar_local::check_indentation_impl)
+ , check_code_block(*this, &main_grammar_local::check_code_block_impl)
, start_blocks(*this, &main_grammar_local::start_blocks_impl)
, end_blocks(*this, &main_grammar_local::end_blocks_impl)
, in_list(*this)
@@ -361,8 +368,12 @@
>> (cl::ch_p('*') | '#')
>> (*cl::blank_p) [local.list.still_in_block = true]
>> *( cl::eps_p(local.list.still_in_block)
- >> local.list_item(element_info::only_block)
+ >> ( qbk_since(106u) >> local.list_item(element_info::only_block)
+ | qbk_before(106u) >> local.list_item(element_info::only_list_block)
+ )
)
+ // TODO: This is sometimes called in the wrong place. Currently
+ // harmless.
>> cl::eps_p [actions.list_item]
;
Modified: branches/release/tools/quickbook/src/quickbook.cpp
==============================================================================
--- branches/release/tools/quickbook/src/quickbook.cpp (original)
+++ branches/release/tools/quickbook/src/quickbook.cpp 2012-03-26 16:48:00 EDT (Mon, 26 Mar 2012)
@@ -16,9 +16,9 @@
#include "input_path.hpp"
#include "id_manager.hpp"
#include <boost/program_options.hpp>
-#include <boost/filesystem/v3/path.hpp>
-#include <boost/filesystem/v3/operations.hpp>
-#include <boost/filesystem/v3/fstream.hpp>
+#include <boost/filesystem/path.hpp>
+#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem/fstream.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/ref.hpp>
#include <boost/version.hpp>
Modified: branches/release/tools/quickbook/src/quickbook.hpp
==============================================================================
--- branches/release/tools/quickbook/src/quickbook.hpp (original)
+++ branches/release/tools/quickbook/src/quickbook.hpp 2012-03-26 16:48:00 EDT (Mon, 26 Mar 2012)
@@ -15,7 +15,7 @@
#include <time.h>
#include <vector>
#include <string>
-#include <boost/filesystem/v3/path.hpp>
+#include <boost/filesystem/path.hpp>
#include "fwd.hpp"
#include "values.hpp"
Modified: branches/release/tools/quickbook/test/list_test-1_5.gold
==============================================================================
--- branches/release/tools/quickbook/test/list_test-1_5.gold (original)
+++ branches/release/tools/quickbook/test/list_test-1_5.gold 2012-03-26 16:48:00 EDT (Mon, 26 Mar 2012)
@@ -383,4 +383,20 @@
</listitem>
</itemizedlist>
</section>
+ <section id="list_test.list_immediately_following_markup_2">
+ <title><link linkend="list_test.list_immediately_following_markup_2">List immediately
+ following markup 2</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ One [section Nested section]
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Two [endsect]
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
</article>
Modified: branches/release/tools/quickbook/test/list_test-1_5.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/list_test-1_5.quickbook (original)
+++ branches/release/tools/quickbook/test/list_test-1_5.quickbook 2012-03-26 16:48:00 EDT (Mon, 26 Mar 2012)
@@ -98,3 +98,11 @@
* Three
[endsect]
+
+[section List immediately following markup 2]
+* One
+[section Nested section]
+* Two
+[endsect]
+
+[endsect]
Modified: branches/release/tools/quickbook/test/list_test-1_6.gold
==============================================================================
--- branches/release/tools/quickbook/test/list_test-1_6.gold (original)
+++ branches/release/tools/quickbook/test/list_test-1_6.gold 2012-03-26 16:48:00 EDT (Mon, 26 Mar 2012)
@@ -420,6 +420,28 @@
</listitem>
</itemizedlist>
</section>
+ <section id="list_test.list_immediately_following_mark0">
+ <title><link linkend="list_test.list_immediately_following_mark0">List immediately
+ following markup 2</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ One
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <section id="list_test.list_immediately_following_mark0.nested_section">
+ <title><link linkend="list_test.list_immediately_following_mark0.nested_section">Nested
+ section</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Two
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ </section>
<section id="list_test.paragraphs_in_list_items">
<title><link linkend="list_test.paragraphs_in_list_items">Paragraphs in list
items</link></title>
@@ -473,4 +495,32 @@
</listitem>
</itemizedlist>
</section>
+ <section id="list_test.indented_code_blocks_in_lists">
+ <title><link linkend="list_test.indented_code_blocks_in_lists">Indented code
+ blocks in lists</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+<programlisting><phrase role="identifier">B</phrase>
+</programlisting>
+ <para>
+ C
+ </para>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D
+<programlisting><phrase role="identifier">E</phrase>
+</programlisting>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ F
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
</article>
Modified: branches/release/tools/quickbook/test/list_test-1_6.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/list_test-1_6.quickbook (original)
+++ branches/release/tools/quickbook/test/list_test-1_6.quickbook 2012-03-26 16:48:00 EDT (Mon, 26 Mar 2012)
@@ -103,6 +103,13 @@
[endsect]
+[section List immediately following markup 2]
+* One
+[section Nested section]
+* Two
+[endsect]
+[endsect]
+
[section Paragraphs in list items]
* A1
@@ -125,4 +132,16 @@
D2
-[endsect]
\ No newline at end of file
+[endsect]
+
+[section Indented code blocks in lists]
+
+* A
+
+ B
+ C
+* D
+
+ E
+* F
+[endsect]
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