|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r75844 - trunk/tools/quickbook/doc
From: dnljms_at_[hidden]
Date: 2011-12-07 04:20:50
Author: danieljames
Date: 2011-12-07 04:20:48 EST (Wed, 07 Dec 2011)
New Revision: 75844
URL: http://svn.boost.org/trac/boost/changeset/75844
Log:
Quickbook: Use fewer escapes in documentation.
Text files modified:
trunk/tools/quickbook/doc/block.qbk | 186 ++++++++++++++++++++--------------------
trunk/tools/quickbook/doc/editors.qbk | 4
trunk/tools/quickbook/doc/phrase.qbk | 178 +++++++++++++++++++-------------------
trunk/tools/quickbook/doc/ref.qbk | 96 ++++++++++----------
trunk/tools/quickbook/doc/structure.qbk | 36 +++---
trunk/tools/quickbook/doc/syntax.qbk | 18 +-
6 files changed, 259 insertions(+), 259 deletions(-)
Modified: trunk/tools/quickbook/doc/block.qbk
==============================================================================
--- trunk/tools/quickbook/doc/block.qbk (original)
+++ trunk/tools/quickbook/doc/block.qbk 2011-12-07 04:20:48 EST (Wed, 07 Dec 2011)
@@ -18,9 +18,9 @@
You can include another XML file with:
-[pre'''
+```
[xinclude file.xml]
-''']
+```
This is useful when file.xml has been generated by Doxygen and contains your
reference section.
@@ -112,11 +112,11 @@
[endsect] [/Long list lines]
[section Unordered lists]
-[pre'''
+```
* First
* Second
* Third
-''']
+```
will generate:
@@ -129,7 +129,7 @@
Mixed lists (ordered and unordered) are supported. Example:
-[pre'''
+```
# One
# Two
# Three
@@ -137,7 +137,7 @@
* Three.b
* Three.c
# Four
-''']
+```
will generate:
@@ -151,7 +151,7 @@
And...
-[pre'''
+```
# 1
* 1.a
# 1.a.1
@@ -164,7 +164,7 @@
# 2.b.2
* 2.b.2.a
* 2.b.2.b
-''']
+```
will generate:
@@ -213,12 +213,12 @@
Macros that are already defined are expanded in source code. Example:
-[pre'''
+```
[def __array__ [@http://www.boost.org/doc/html/array/reference.html array]]
[def __boost__ [@http://www.boost.org/libs/libraries.htm boost]]
using __boost__::__array__;
-''']
+```
Generates:
@@ -237,11 +237,11 @@
language specific /escape-back/ delimiter. In C++ and Python, the delimiter
is the double tick (back-quote): "\`\`" and "\`\`". Example:
-[pre'''
+```
void ``[@http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz foo]``()
{
}
-''']
+```
Will generate:
@@ -259,7 +259,7 @@
Sometimes, you don't want some preformatted text to be parsed as C++. In such
cases, use the [^\[pre ... \]] markup block.
-[pre'''
+```
[pre
Some *preformatted* text Some *preformatted* text
@@ -269,7 +269,7 @@
Some *preformatted* text Some *preformatted* text
]
-''']
+```
Spaces, tabs and newlines are rendered as-is. Unlike all quickbook block level
markup, pre (and Code) are the only ones that allow multiple newlines. The
@@ -302,13 +302,13 @@
[section Admonitions]
-[pre'''
+```
[note This is a note]
[tip This is a tip]
[important This is important]
[caution This is a caution]
[warning This is a warning]
-''']
+```
generates __docbook__ admonitions:
@@ -326,14 +326,14 @@
[section Headings]
-[pre'''
+```
[h1 Heading 1]
[h2 Heading 2]
[h3 Heading 3]
[h4 Heading 4]
[h5 Heading 5]
[h6 Heading 6]
-''']
+```
[h1 Heading 1]
[h2 Heading 2]
@@ -350,9 +350,9 @@
For example: Heading 1 in section Section 2 will be normalized to
[^section_2.heading_1]). You can use:
-[pre'''
+```
[link document_id.section_id.normalized_header_text The link text]
-''']
+```
to link to them. See __anchor_links__ and __section__ for more info.
@@ -363,9 +363,9 @@
In cases when you don't want to care about the heading level (1 to 6), you
can use the /Generic Heading/:
-[pre'''
+```
[heading Heading]
-''']
+```
The /Generic Heading/ assumes the level, plus one, of the innermost section
where it is placed. For example, if it is placed in the outermost section,
@@ -375,13 +375,13 @@
particularly if you do not want to start a new section. In many cases,
however, headings in a particular section is just flat. Example:
-[pre'''
+```
[section A]
[h2 X]
[h2 Y]
[h2 Z]
[endsect]
-''']
+```
Here we use h2 assuming that section A is the outermost level. If it is
placed in an inner level, you'll have to use h3, h4, etc. depending on
@@ -389,13 +389,13 @@
rather tedious, however, to scan the section level everytime. If you
rewrite the example above as shown below, this will be automatic:
-[pre'''
+```
[section A]
[heading X]
[heading Y]
[heading Z]
[endsect]
-''']
+```
They work well regardless where you place them. You can rearrange sections
at will without any extra work to ensure correct heading levels. In fact,
@@ -406,9 +406,9 @@
[section Macros]
-[pre'''
+```
[def macro_identifier some text]
-''']
+```
When a macro is defined, the identifier replaces the text anywhere in the
file, in paragraphs, in markups, etc. macro_identifier is a string of non-
@@ -416,10 +416,10 @@
character or the underscore. The replacement text can be any phrase (even
marked up). Example:
-[pre'''
+```
[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&type=1]]
sf_logo
-''']
+```
Now everywhere the sf_logo is placed, the picture will be inlined.
@@ -428,28 +428,28 @@
[tip It's a good idea to use macro identifiers that are distinguishable.
For instance, in this document, macro identifiers have two leading and
-trailing underscores (e.g. [^'''__spirit__''']). The reason is to avoid
+trailing underscores (e.g. `__spirit__`). The reason is to avoid
unwanted macro replacement.]
Links (URLS) and images are good candidates for macros. *1*) They tend to
change a lot. It is a good idea to place all links and images in one place near the top
to make it easy to make changes. *2*) The syntax is not pretty. It's easier to read and
-write, e.g. [^'''__spirit__'''] than [^'''[@http://spirit.sourceforge.net Spirit]'''].
+write, e.g. `__spirit__` than `[@http://spirit.sourceforge.net Spirit]`.
Some more examples:
-[pre'''
+```
[def :-) [$theme/smiley.png]]
[def __spirit__ [@http://spirit.sourceforge.net Spirit]]
-''']
+```
(See __images__ and __links__)
Invoking these macros:
-[pre'''
+```
Hi __spirit__ :-)
-''']
+```
will generate this:
@@ -463,9 +463,9 @@
[table Predefined Macros
[[Macro] [Meaning] [Example]]
- [['''__DATE__'''] [Today's date] [__DATE__]]
- [['''__TIME__'''] [The current time] [__TIME__]]
- [['''__FILENAME__'''] [Quickbook source filename] [__FILENAME__]]
+ [[[^'''__DATE__''']] [Today's date] [__DATE__]]
+ [[[^'''__TIME__''']] [The current time] [__TIME__]]
+ [[[^'''__FILENAME__''']][Quickbook source filename] [__FILENAME__]]
]
[endsect] [/Predefined Macros]
@@ -482,13 +482,13 @@
Example template:
-[pre'''
+```
[template person[name age what]
Hi, my name is [name]. I am [age] years old. I am a [what].
]
-''']
+```
[template person[name age what]
@@ -525,17 +525,17 @@
are actually two forms. Templates may be phrase or block level. Phrase
templates are of the form:
-[pre'''
+```
[template sample[arg1 arg2...argN] replacement text... ]
-''']
+```
Block templates are of the form:
-[pre'''
+```
[template sample[arg1 arg2...argN]
replacement text...
]
-''']
+```
The basic rule is as follows: if a newline immediately follows the argument
list, then it is a block template, otherwise, it is a phrase template.
@@ -546,17 +546,17 @@
You expand a template this way:
-[pre'''
+```
[template_identifier arg1..arg2..arg3]
-''']
+```
At template expansion, you supply the actual arguments. The template will
be expanded with your supplied arguments. Example:
-[pre'''
+```
[person James Bond..39..Spy]
[person Santa Clause..87..Big Red Fatso]
-''']
+```
Which will expand to:
@@ -602,17 +602,17 @@
Nullary templates look and act like simple macros. Example:
-[pre'''
+```
[template alpha[]'''α''']
[template beta[]'''β''']
-''']
+```
[template alpha[]'''α''']
[template beta[]'''β''']
Expanding:
-[pre'''Some squigles...[*[alpha][beta]]''']
+```Some squigles...[*[alpha][beta]]```
We have:
@@ -634,19 +634,19 @@
arguments. If the template body does not look like a template argument list, we
can elide the empty brackets. Example:
-[pre'''
+```
[template aristotle_quote Aristotle: [*['Education is the best provision
for the journey to old age.]]]
-''']
+```
[template aristotle_quote\ Aristotle: [*['Education is the best provision
for the journey to old age.]]]
Expanding:
-[pre'''
+```
Here's a quote from [aristotle_quote].
-''']
+```
We have:
@@ -657,17 +657,17 @@
will be part of the template body. If that space is unwanted, use empty
brackets or use the space escape: "`\ `". Example:
-[pre'''
+```
[template tag\ _tag]
-''']
+```
[template tag\ _tag]
Then expanding:
-[pre'''
+```
`struct` x[tag];
-''']
+```
We have:
@@ -689,10 +689,10 @@
For example:
-[pre'''
+```
[template simple[a b c d] [a][b][c][d]]
[simple w x y z]
-''']
+```
will produce:
@@ -706,9 +706,9 @@
QuickBook only tries to get the arguments it needs. For example:
-[pre'''
+```
[simple w x y z trail]
-''']
+```
will produce:
@@ -732,15 +732,15 @@
allowed as [link quickbook.syntax.block.templates.template_identifier
template identifiers]. Example:
-[pre'''
-[template ![bar] '''<hey>'''[bar]'''</hey>''']
-''']
+```
+[template ![bar] <hey>[bar]</hey>]
+```
Now, expanding this:
-[pre'''
+```
[!baz]
-''']
+```
We will have:
@@ -752,7 +752,7 @@
[section Blurbs]
-[pre'''
+```
[blurb :-) [*An eye catching advertisement or note...]
__spirit__ is an object-oriented recursive-descent parser generator framework
@@ -760,7 +760,7 @@
allow us to approximate the syntax of Extended Backus-Normal Form (EBNF)
completely in C++.
]
-''']
+```
will generate this:
@@ -779,14 +779,14 @@
[section Tables]
-[pre'''
+```
[table:id A Simple Table
[[Heading 1] [Heading 2] [Heading 3]]
[[R0-C0] [R0-C1] [R0-C2]]
[[R1-C0] [R1-C1] [R1-C2]]
[[R2-C0] [R2-C1] [R2-C2]]
]
-''']
+```
will generate:
@@ -806,9 +806,9 @@
sections, the id is optional. If the table has a title but no id, an id will
be generated from the title. The table above can be linked to using:
-[pre'''
+```
[link quickbook.syntax.block.tables.id link to table]
-''']
+```
which will generate:
@@ -817,7 +817,7 @@
The syntax is free-format and allows big cells to be formatted
nicely. Example:
-[pre'''
+```
[table Table with fat cells
[[Heading 1] [Heading 2]]
[
@@ -838,7 +838,7 @@
[Row 1, Col 1: a small cell]
]
]
-''']
+```
and thus:
@@ -865,12 +865,12 @@
Here's how to have preformatted blocks of code in a table cell:
-[pre'''
+```
[table Table with code
[[Comment] [Code]]
[
[My first program]
- ['''\`\`
+ [``
#include <iostream>
int main()
@@ -878,10 +878,10 @@
std::cout << "Hello, World!" << std::endl;
return 0;
}
- \`\`''']
+ ``]
]
]
-''']
+```
[table Table with code
[[Comment] [Code]]
@@ -903,7 +903,7 @@
[section Variable Lists]
-[pre'''
+```
[variablelist A Variable List
[[term 1] [The definition of term 1]]
[[term 2] [The definition of term 2]]
@@ -913,7 +913,7 @@
Definitions may contain paragraphs.
]]
]
-''']
+```
will generate:
@@ -938,9 +938,9 @@
You can include one QuickBook file from another. The syntax is simply:
-[pre'''
+```
[include someother.qbk]
-''']
+```
The included file will be processed as if it had been cut and pasted
into the current document, with the following exceptions:
@@ -954,9 +954,9 @@
the filename ("someother", in the example above). You can specify the id
like this:
-[pre'''
+```
[include:someid someother.qbk]
-''']
+```
All auto-generated anchors will use the document id as a unique prefix. So
for instance, if there is a top section in someother.qbk named "Intro", the
@@ -981,17 +981,17 @@
You can effortlessly import code snippets from source code into your QuickBook.
The following illustrates how this is done:
-[pre'''
+```
[import ../test/stub.cpp]
[foo]
[bar]
-''']
+```
The first line:
-[pre'''
+```
[import ../test/stub.cpp]
-''']
+```
collects specially marked-up code snippets from
[@boost:/tools/quickbook/test/stub.cpp stub.cpp]
@@ -1000,10 +1000,10 @@
example above). This shall be the template identifier for that particular code
snippet. The second and third line above does the actual template expansion:
-[pre'''
+```
[foo]
[bar]
-''']
+```
And the result is:
Modified: trunk/tools/quickbook/doc/editors.qbk
==============================================================================
--- trunk/tools/quickbook/doc/editors.qbk (original)
+++ trunk/tools/quickbook/doc/editors.qbk 2011-12-07 04:20:48 EST (Wed, 07 Dec 2011)
@@ -34,7 +34,7 @@
You can use the following settings to highlight quickbook tags when
editing quickbook files.
-[pre'''
+```
qbk=*.qbk
lexer.*.qbk=props
use.tabs.$(qbk)=0
@@ -46,7 +46,7 @@
comment.box.start.props=[/
comment.box.middle.props=
comment.box.end.props=]
-''']
+```
[note Thanks to Rene Rivera for the above SciTE settings.]
Modified: trunk/tools/quickbook/doc/phrase.qbk
==============================================================================
--- trunk/tools/quickbook/doc/phrase.qbk (original)
+++ trunk/tools/quickbook/doc/phrase.qbk 2011-12-07 04:20:48 EST (Wed, 07 Dec 2011)
@@ -16,9 +16,9 @@
[section Font Styles]
-[pre'''
+```
['italic], [*bold], [_underline], [^teletype], [-strikethrough]
-''']
+```
will generate:
@@ -26,9 +26,9 @@
Like all non-terminal phrase level elements, this can of course be nested:
-[pre'''
+```
[*['bold-italic]]
-''']
+```
will generate:
@@ -40,9 +40,9 @@
When you want content that may or must be replaced by the user, use the syntax:
-[pre'''
+```
[~replacement]
-''']
+```
This will generate:
@@ -52,9 +52,9 @@
[section Quotations]
-[pre'''
+```
["A question that sometimes drives me hazy: am I or are the others crazy?]--Einstein
-''']
+```
will generate:
@@ -66,10 +66,10 @@
Like all phrase elements, quotations may be nested. Example:
-[pre'''
+```
["Here's the rule for bargains: ["Do other men, for they would do you.] That's
the true business precept.]
-''']
+```
will generate:
@@ -82,9 +82,9 @@
Simple markup for formatting text, common in many applications, is now supported:
-[pre'''
+```
/italic/, *bold*, _underline_, =teletype=
-''']
+```
will generate:
@@ -113,32 +113,32 @@
[table More Formatting Samples
[[Markup] [Result]]
- [[[^'''*Bold*''']] [*Bold*]]
- [[[^'''*Is bold*''']] [*Is bold*]]
- [[[^'''* Not bold* *Not bold * * Not bold *''']] [* Not bold* *Not bold * * Not bold *]]
- [[[^'''This*Isn't*Bold (no bold)''']] [This*Isn't*Bold (no bold)]]
- [[[^'''(*Bold Inside*) (parenthesis not bold)''']] [(*Bold Inside*) (parenthesis not bold)]]
- [[[^'''*(Bold Outside)* (parenthesis bold)''']] [*(Bold Outside)* (parenthesis bold)]]
- [[[^'''3*4*5 = 60 (no bold)''']] [3*4*5 = 60 (no bold)]]
- [[[^'''3 * 4 * 5 = 60 (no bold)''']] [3 * 4 * 5 = 60 (no bold)]]
- [[[^'''3 *4* 5 = 60 (4 is bold)''']] [3 *4* 5 = 60 (4 is bold)]]
- [[[^'''*This is bold* this is not *but this is*''']][*This is bold* this is not *but this is*]]
- [[[^'''*This is bold*.''']] [*This is bold*.]]
- [[[^'''*B*. (bold B)''']] [*B*. (bold B)]]
- [[[^'''['*Bold-Italic*]''']] [['*Bold-Italic*]]]
- [[[^'''*side-by*/-side/''']] [*side-by*/-side/]]
+ [[`*Bold*`] [*Bold*]]
+ [[`*Is bold*`] [*Is bold*]]
+ [[`* Not bold* *Not bold * * Not bold *`] [* Not bold* *Not bold * * Not bold *]]
+ [[`This*Isn't*Bold (no bold)`] [This*Isn't*Bold (no bold)]]
+ [[`(*Bold Inside*) (parenthesis not bold)`] [(*Bold Inside*) (parenthesis not bold)]]
+ [[`*(Bold Outside)* (parenthesis bold)`] [*(Bold Outside)* (parenthesis bold)]]
+ [[`3*4*5 = 60 (no bold)`] [3*4*5 = 60 (no bold)]]
+ [[`3 * 4 * 5 = 60 (no bold)`] [3 * 4 * 5 = 60 (no bold)]]
+ [[`3 *4* 5 = 60 (4 is bold)`] [3 *4* 5 = 60 (4 is bold)]]
+ [[`*This is bold* this is not *but this is*`] [*This is bold* this is not *but this is*]]
+ [[`*This is bold*.`] [*This is bold*.]]
+ [[`*B*. (bold B)`] [*B*. (bold B)]]
+ [[`['*Bold-Italic*]`] [['*Bold-Italic*]]]
+ [[`*side-by*/-side/`] [*side-by*/-side/]]
]
As mentioned, simple markups cannot go past a single block. The text
from "have" to "full" in the following paragraph will be rendered as
bold:
-[pre'''
+```
Baa baa black sheep, *have you any wool?
Yes sir, yes sir, three bags full!*
One for the master, one for the dame,
And one for the little boy who lives down the lane.
-''']
+```
Baa baa black sheep, *have you any wool?
Yes sir, yes sir, three bags full!*
@@ -147,12 +147,12 @@
But in the following paragraph, bold is not applied:
-[pre'''
+```
Baa baa black sheep, *have you any wool?
Yes sir, yes sir, three bags full!
One for the master, one for the dame,
And one for the little boy who lives down the lane.
-''']
+```
Baa baa black sheep, *have you any wool?
Yes sir, yes sir, three bags full!
@@ -166,18 +166,18 @@
Inlining code in paragraphs is quite common when writing C++ documentation. We
provide a very simple markup for this. For example, this:
-[pre'''
+```
This text has inlined code `int main() { return 0; }` in it.
-''']
+```
will generate:
This text has inlined code `int main() { return 0; }` in it. The code will be
syntax highlighted.
-[note We simply enclose the code with the tick: [^'''"`"'''], not the
-single quote: `"'"`. Note too that [^'''`some code`'''] is preferred over
-[^'''[^some code]''']. ]
+[note We simply enclose the code with the tick: [^"\`"], not the
+single quote: `"'"`. Note too that [^\`some code\`] is preferred over
+`[^some code]`. ]
[endsect] [/Inline Code]
@@ -229,11 +229,11 @@
To change the source mode, use the [^\[source-mode\]] markup, where
=source-mode= is one of the supported modes. For example, this:
-[pre'''
+```
Python's [python] `import` is rather like C++'s [c++] `#include`. A
C++ comment `// looks like this` whereas a Python comment [python]
`# looks like this`.
-''']
+```
will generate:
@@ -256,9 +256,9 @@
[section line-break]
-[pre'''
+```
[br]
-''']
+```
[warning `[br]` is now deprecated. __blurbs__, __admonitions__ and
table cells (see __tables__) may now contain paragraphs.]
@@ -266,13 +266,13 @@
[endsect]
[section Anchors]
-[pre'''
+```
[#named_anchor]
-''']
+```
A named anchor is a hook that can be referenced by a link elsewhere in the
-document. You can then reference an anchor with [^'''[link named_anchor
-Some link text]''']. See __anchor_links__, __section__ and __heading__.
+document. You can then reference an anchor with `[link named_anchor
+Some link text]`. See __anchor_links__, __section__ and __heading__.
These anchors are global and can be accessed from anywhere in the
quickbook documentation. Be careful to avoid clashes with anchors in
@@ -282,9 +282,9 @@
[section Links]
-[pre'''
+```
[@http://www.boost.org this is [*boost's] website....]
-''']
+```
will generate:
@@ -292,15 +292,15 @@
URL links where the link text is the link itself is common. Example:
-[pre'''
+```
see http://spirit.sourceforge.net/
-''']
+```
so, when the text is absent in a link markup, the URL is assumed. Example:
-[pre
-see '''[@http://spirit.sourceforge.net/]'''
-]
+```
+see [@http://spirit.sourceforge.net/]
+```
will generate:
@@ -309,9 +309,9 @@
Boostbook also support a custom url schema for linking to files within
the boost distribution:
-[pre
-'''[@boost:/libs/spirit/index.html the Boost.Spirit documentation]'''
-]
+```
+[@boost:/libs/spirit/index.html the Boost.Spirit documentation]
+```
will generate: [@boost:/libs/spirit/index.html the Boost.Spirit documentation]
@@ -324,9 +324,9 @@
You can link within a document using:
-[pre'''
+```
[link document_id.section_id.normalized_header_text The link text]
-''']
+```
See sections __section__ and __heading__ for more info.
@@ -336,18 +336,18 @@
In addition, you can link internally to an XML refentry like:
-[pre'''
+```
[link xml.refentry The link text]
-''']
+```
This gets converted into [^<link linkend="xml.refentry">The link text</link>].
Like URLs, the link text is optional. If this is not present, the link text will
automatically be the refentry. Example:
-[pre'''
+```
[link xml.refentry]
-''']
+```
This gets converted into [^<link linkend="xml.refentry">xml.refentry</link>].
@@ -358,7 +358,7 @@
If you want to link to a function, class, member, enum, concept, global, or header in
the reference section, you can use:
-[pre'''
+```
[funcref fully::qualified::function_name The link text]
[classref fully::qualified::class_name The link text]
[memberref fully::qualified::member_name The link text]
@@ -367,15 +367,15 @@
[conceptref ConceptName The link text]
[headerref path/to/header.hpp The link text]
[globalref fully::qualified::global The link text]
-''']
+```
Again, the link text is optional. If this is not present, the link text will
automatically be the function, class, member, enum, macro, concept, global, or header name.
Example:
-[pre'''
+```
[classref boost::bar::baz]
-''']
+```
would have "boost::bar::baz" as the link text.
@@ -385,19 +385,19 @@
The escape mark-up is used when we don't want to do any processing.
-[pre
-\'\'\'
+```
+'''
escape (no processing/formatting)
-\'\'\'
-]
+'''
+```
Escaping allows us to pass XML markup to __boostbook__ or __docbook__. For example:
-[pre
-\'\'\'
+```
+'''
<emphasis role="bold">This is direct XML markup</emphasis>
-\'\'\'
-]
+'''
+```
'''
<emphasis role="bold">This is direct XML markup</emphasis>
@@ -432,9 +432,9 @@
hexadecimal code, or a 32-bit character by using `\U` followed by an 8 digit
hexadecimal code. eg.
-[pre'''
+```
\u03B1 + \u03B2
-''']
+```
will generate:
@@ -446,17 +446,17 @@
[section Images]
-[pre'''
+```
[$image.jpg]
-''']
+```
From version 1.5, you can also use
[@http://www.docbook.org/tdg/en/html/imagedata.html
DocBook imagedata attributes]:
-[pre'''
+```
[$image.jpg [width 200in] [height 200in]]
-''']
+```
[endsect] [/Images]
@@ -466,9 +466,9 @@
footnote in a `[footnote]` block, and the text will be put at the bottom
of the current page. For example, this:
-[pre'''
+```
[footnote A sample footnote]
-''']
+```
will generate this[footnote A sample footnote].
@@ -476,9 +476,9 @@
[section Macro Expansion]
-[pre'''
+```
__a_macro_identifier__
-''']
+```
See __macros__ for details.
@@ -486,9 +486,9 @@
[section Template Expansion]
-[pre'''
+```
[a_template_identifier]
-''']
+```
See __templates__ for details.
@@ -499,20 +499,20 @@
Like C++ `#ifdef`, you can generate phrases depending on the presence of
a macro. Example:
-[pre'''
+```
[? __to_be__ To be or not to be]
-''']
+```
[? __to_be__ To be or not to be]
Here, the phrase "To be or not to be" will only be generated if the
-macro symbol '''__to_be__''' has been previously defined. The phrase
-above will not do anything since we haven't defined '''__to_be__'''.
+macro symbol `__to_be__` has been previously defined. The phrase
+above will not do anything since we haven't defined `__to_be__`.
Now, let's define the symbol:
-[pre'''
+```
[def __to_be__]
-''']
+```
[def __to_be__]
Modified: trunk/tools/quickbook/doc/ref.qbk
==============================================================================
--- trunk/tools/quickbook/doc/ref.qbk (original)
+++ trunk/tools/quickbook/doc/ref.qbk 2011-12-07 04:20:48 EST (Wed, 07 Dec 2011)
@@ -17,90 +17,90 @@
[teletype]
[template ordered_list_sample[]
-[pre'''
+```
# one
# two
# three
-''']
+```
]
[template unordered_list_sample[]
-[pre'''
+```
* one
* two
* three
-''']
+```
]
[template table_sample[]
-[pre'''
+```
[table Title
[[a][b][c]]
[[a][b][c]]
]
-''']
+```
]
[template var_list_sample[]
-[pre'''
+```
[variablelist Title
[[a][b]]
[[a][b]]
]
-''']
+```
]
[table Syntax Compendium
[[To do this...] [Use this...] [See this...]]
- [[comment] [[^'''[/ some comment]''']] [__comments__]]
- [[['italics]] [[^'''['italics] or /italics/''']] [__font_styles__ and __simple_formatting__]]
- [[[*bold]] [[^'''[*bold] or *bold*''']] [__font_styles__ and __simple_formatting__]]
- [[[_underline]] [[^'''[_underline] or _underline_''']] [__font_styles__ and __simple_formatting__]]
- [[[^teletype]] [[^'''[^teletype] or =teletype=''']] [__font_styles__ and __simple_formatting__]]
- [[[-strikethrough]] [[^'''[-strikethrough]''']] [__font_styles__ and __simple_formatting__]]
- [[[~replaceable]] [[^'''[~replaceable]''']] [__replaceable__]]
- [[source mode] [[^\[c++\]] or [^\[python\]]] [__source_mode__]]
+ [[comment] [`[/ some comment]`] [__comments__]]
+ [[['italics]] [`['italics] or /italics/`] [__font_styles__ and __simple_formatting__]]
+ [[[*bold]] [`[*bold] or *bold*`] [__font_styles__ and __simple_formatting__]]
+ [[[_underline]] [`[_underline] or _underline_`] [__font_styles__ and __simple_formatting__]]
+ [[[^teletype]] [`[^teletype] or =teletype=`] [__font_styles__ and __simple_formatting__]]
+ [[[-strikethrough]] [`[-strikethrough]`] [__font_styles__ and __simple_formatting__]]
+ [[[~replaceable]] [`[~replaceable]`] [__replaceable__]]
+ [[source mode] [`[c++]` or `[python]`] [__source_mode__]]
[[inline code] [[^'''`int main();`''']] [__inline_code__]]
[[code block] [[^'''``int main();``''']] [__code__]]
[[code escape] [[^'''``from c++ to QuickBook``''']] [__escape_back__]]
- [[line break] [[^'''[br] or \n''']] [__line_break__ *DEPRECATED*]]
- [[anchor] [[^'''[#anchor]''']] [__anchors__]]
- [[link] [[^'''[@http://www.boost.org Boost]''']] [__links__]]
- [[anchor link] [[^'''[link section.anchor Link text]''']] [__anchor_links__]]
- [[refentry link] [[^'''[link xml.refentry Link text]''']] [__refentry_links__]]
- [[function link] [[^'''[funcref fully::qualified::function_name Link text]''']] [__code_links__]]
- [[class link] [[^'''[classref fully::qualified::class_name Link text]''']] [__code_links__]]
- [[member link] [[^'''[memberref fully::qualified::member_name Link text]''']] [__code_links__]]
- [[enum link] [[^'''[enumref fully::qualified::enum_name Link text]''']] [__code_links__]]
- [[macro link] [[^'''[macroref MACRO_NAME Link text]''']] [__code_links__]]
- [[concept link] [[^'''[conceptref ConceptName Link text]''']] [__code_links__]]
- [[header link] [[^'''[headerref path/to/header.hpp Link text]''']] [__code_links__]]
- [[global link] [[^'''[globalref fully::qualified::global Link text]''']] [__code_links__]]
- [[escape] [[^\'\'\'escaped text (no processing/formatting)\'\'\']] [__escape__]]
- [[single char escape] [[^\\c]] [__single_char_escape__]]
- [[images] [[^'''[$image.jpg]''']] [__images__]]
- [[begin section] [[^'''[section The Section Title]''']] [__section__]]
- [[end section] [[^'''[endsect]''']] [__section__]]
+ [[line break] [`[br] or \n`] [__line_break__ *DEPRECATED*]]
+ [[anchor] [`[#anchor]`] [__anchors__]]
+ [[link] [`[@http://www.boost.org Boost]`] [__links__]]
+ [[anchor link] [`[link section.anchor Link text]`] [__anchor_links__]]
+ [[refentry link] [`[link xml.refentry Link text]`] [__refentry_links__]]
+ [[function link] [`[funcref fully::qualified::function_name Link text]`] [__code_links__]]
+ [[class link] [`[classref fully::qualified::class_name Link text]`] [__code_links__]]
+ [[member link] [`[memberref fully::qualified::member_name Link text]`] [__code_links__]]
+ [[enum link] [`[enumref fully::qualified::enum_name Link text]`] [__code_links__]]
+ [[macro link] [`[macroref MACRO_NAME Link text]`] [__code_links__]]
+ [[concept link] [`[conceptref ConceptName Link text]`] [__code_links__]]
+ [[header link] [`[headerref path/to/header.hpp Link text]`] [__code_links__]]
+ [[global link] [`[globalref fully::qualified::global Link text]`] [__code_links__]]
+ [[escape] [`'''escaped text (no processing/formatting)'''`] [__escape__]]
+ [[single char escape] [`\c`] [__single_char_escape__]]
+ [[images] [`[$image.jpg]`] [__images__]]
+ [[begin section] [`[section The Section Title]`] [__section__]]
+ [[end section] [`[endsect]`] [__section__]]
[[paragraph] [No markup. Paragraphs start left-flushed and are terminated by two or more newlines.] [__paragraphs__]]
[[ordered list] [[ordered_list_sample]] [__ordered_lists__]]
[[unordered list] [[unordered_list_sample]] [__unordered_lists__]]
[[code] [No markup. Preformatted code starts with a space or a tab.] [__code__]]
- [[preformatted] [[^'''[pre preformatted]''']] [__preformatted__]]
- [[block quote] [[^'''[:sometext...]''']] [__blockquote__]]
- [[heading 1] [[^'''[h1 Heading 1]''']] [__heading__]]
- [[heading 2] [[^'''[h2 Heading 2]''']] [__heading__]]
- [[heading 3] [[^'''[h3 Heading 3]''']] [__heading__]]
- [[heading 4] [[^'''[h4 Heading 4]''']] [__heading__]]
- [[heading 5] [[^'''[h5 Heading 5]''']] [__heading__]]
- [[heading 6] [[^'''[h6 Heading 6]''']] [__heading__]]
- [[macro] [[^'''[def macro_identifier some text]''']] [__macros__]]
- [[template] [[^'''[template[a b] [a] body [b]]''']] [__templates__]]
- [[blurb] [[^'''[blurb advertisement or note...]''']] [__blurbs__]]
- [[admonition] [[^'''[warning Warning text...]''']] [__admonitions__]]
+ [[preformatted] [`[pre preformatted]`] [__preformatted__]]
+ [[block quote] [`[:sometext...]`] [__blockquote__]]
+ [[heading 1] [`[h1 Heading 1]`] [__heading__]]
+ [[heading 2] [`[h2 Heading 2]`] [__heading__]]
+ [[heading 3] [`[h3 Heading 3]`] [__heading__]]
+ [[heading 4] [`[h4 Heading 4]`] [__heading__]]
+ [[heading 5] [`[h5 Heading 5]`] [__heading__]]
+ [[heading 6] [`[h6 Heading 6]`] [__heading__]]
+ [[macro] [`[def macro_identifier some text]`] [__macros__]]
+ [[template] [`[template[a b] [a] body [b]]`] [__templates__]]
+ [[blurb] [`[blurb advertisement or note...]`] [__blurbs__]]
+ [[admonition] [`[warning Warning text...]`] [__admonitions__]]
[[table] [[table_sample]] [__tables__]]
[[variablelist] [[var_list_sample]] [__variable_lists__]]
- [[include] [[^'''[include someother.qbk]''']] [__include__]]
+ [[include] [`[include someother.qbk]`] [__include__]]
[[conditional generation]
- [[^'''[? symbol phrase]''']] [__cond__]]
+ [`[? symbol phrase]`] [__cond__]]
]
Modified: trunk/tools/quickbook/doc/structure.qbk
==============================================================================
--- trunk/tools/quickbook/doc/structure.qbk (original)
+++ trunk/tools/quickbook/doc/structure.qbk 2011-12-07 04:20:48 EST (Wed, 07 Dec 2011)
@@ -32,7 +32,7 @@
Every document must begin with a Document Info section, which looks something
like this:
-[pre'''
+```
[article The Document Title
[quickbook 1.5]
[version 1.0]
@@ -42,7 +42,7 @@
[license The document's license]
[source-mode c++]
]
-''']
+```
`article` is the document type. There are several possible document types,
most of these are based on docbook document elements. These are fully
@@ -65,13 +65,13 @@
So the documentation for the 'foo' library might start:
-[pre'''
+```
[library Foo
[quickbook 1.5]
[id foo]
[version 1.0]
]
-''']
+```
[section:attributes Document Info Attributes]
@@ -80,35 +80,35 @@
[heading Quickbook specific meta data]
-[pre'''
+```
[quickbook 1.5]
-''']
+```
The `quickbook` attribute declares the version of quickbook
the document is written for.
In its absence, version 1.1 is assumed. It's recommended that
you use `[quickbook 1.5]` which is the version described here.
-[pre'''
+```
[source-mode teletype]
-''']
+```
The `source-mode` attribute sets the initial __source_mode__. If
it is omitted, the default value of =c++= will be used.
[heading Boostbook/Docbook root element attributes]
-[pre'''
+```
[id foo]
-''']
+```
`id` specifies the id of the document element. If it isn't specified
the id is automatically generated from the title. This id is also
used to generate the nested ids.
-[pre'''
+```
[lang en]
-''']
+```
`lang` specifies the document language. This is used by docbook to
localize the documentation. Note that Boostbook doesn't have any
@@ -119,9 +119,9 @@
drawn from ISO 639 (perhaps extended with a country code drawn from
ISO 3166, as en-US).
-[pre'''
+```
[dirname foo]
-''']
+```
`dirname` is used to specify the directory name of the library in the
repository. This is a boostbook extension so it's only valid for
@@ -154,7 +154,7 @@
A sectioned document might look like:
-[pre'''
+```
[book Title
[quickbook 1.5]
]
@@ -170,16 +170,16 @@
[/...]
[endsect]
-''']
+```
Sections start with the `section` tag, and end with the `[endsect]` tag.
(`[/...]` is a comment, [link quickbook.syntax.comments described later]).
Sections can be given an optional id:
-[pre'''
+```
[section:id The Section Title]
-''']
+```
`id` will be the filename of the generated section.
If it is not present, "The Section Title" will be normalized and become the id.
Modified: trunk/tools/quickbook/doc/syntax.qbk
==============================================================================
--- trunk/tools/quickbook/doc/syntax.qbk (original)
+++ trunk/tools/quickbook/doc/syntax.qbk 2011-12-07 04:20:48 EST (Wed, 07 Dec 2011)
@@ -32,21 +32,21 @@
Can be placed anywhere.
-[pre
-'''[/ comment (no output generated) ]'''
-]
+```
+[/ comment (no output generated) ]
+```
[/ for testing only... ]
-[pre
-'''[/ comments can be nested [/ some more here] ]'''
-]
+```
+[/ comments can be nested [/ some more here] ]
+```
[/ for testing [/ only ] ]
-[pre
-'''[/ Quickbook blocks can nest inside comments. [*Comment this out too!] ]'''
-]
+```
+[/ Quickbook blocks can nest inside comments. [*Comment this out too!] ]
+```
[/ for testing [*only ] ]
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