mirror of
https://github.com/boostorg/quickbook.git
synced 2026-01-28 19:32:14 +00:00
Merge from trunk, fixing unicode escapes in the process.
[SVN r60730]
This commit is contained in:
@@ -180,6 +180,16 @@ Features include:
|
||||
* Accept a space between `section:` and the section id.
|
||||
* Support table ids.
|
||||
|
||||
[h3 Version 1.5.1]
|
||||
|
||||
* Improve the post processor's list of block elements. `table`, `entry` and
|
||||
`varlistentry` are treated as blocks. `replaceable` is treated as an inline
|
||||
element.
|
||||
* Check that `[section]` and `[endsect]` tags are balanced in templates.
|
||||
* Add unicode escape characters, eg. `\u03B1` for \u03B1.
|
||||
* Support UTF-8 files with a unicode byte order mark.
|
||||
* Disallow `[` in simple markup. Fixes some errors with mismatched punctuation.
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:syntax Syntax Summary]
|
||||
@@ -621,6 +631,23 @@ and table cells (see __tables__) may now contain paragraphs.]
|
||||
The escaped space: `\ ` also has a special meaning. The escaped space is removed
|
||||
from the output.
|
||||
|
||||
[endsect]
|
||||
[section 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
|
||||
hexadecimal code. eg.
|
||||
|
||||
[pre'''
|
||||
\u03B1 + \u03B2
|
||||
''']
|
||||
|
||||
will generate:
|
||||
|
||||
[:
|
||||
\u03B1 + \u03B2
|
||||
]
|
||||
|
||||
[endsect]
|
||||
[section Images]
|
||||
|
||||
@@ -2108,8 +2135,8 @@ boostbook standalone
|
||||
:
|
||||
my_doc
|
||||
:
|
||||
<xsl:param>boost.image.src=images/my_project_logo.png
|
||||
<xsl:param>boost.image.alt="\\"My Project\\""
|
||||
<xsl:param>boost.image.src\=images/my_project_logo.png
|
||||
<xsl:param>boost.image.alt\="\\"My Project\\""
|
||||
<xsl:param>boost.image.w=100
|
||||
<xsl:param>boost.image.h=50
|
||||
<xsl:param>nav.layout=none
|
||||
|
||||
@@ -146,13 +146,15 @@ namespace quickbook
|
||||
qi::rule<iterator, quickbook::break_()>& escape_break = store_.create();
|
||||
qi::rule<iterator, quickbook::formatted()>& escape_punct = store_.create();
|
||||
qi::rule<iterator, quickbook::formatted()>& escape_markup = store_.create();
|
||||
qi::rule<iterator, quickbook::unicode_char()>& escape_unicode = store_.create();
|
||||
qi::rule<iterator, quickbook::unicode_char()>& escape_unicode16 = store_.create();
|
||||
qi::rule<iterator, quickbook::unicode_char()>& escape_unicode32 = store_.create();
|
||||
|
||||
escape =
|
||||
( escape_break
|
||||
| "\\ " // ignore an escaped char
|
||||
| escape_punct
|
||||
| escape_unicode
|
||||
| escape_unicode16
|
||||
| escape_unicode32
|
||||
| escape_markup
|
||||
) [actions.process]
|
||||
;
|
||||
@@ -176,9 +178,15 @@ namespace quickbook
|
||||
>> "'''"
|
||||
;
|
||||
|
||||
escape_unicode =
|
||||
escape_unicode16 =
|
||||
"\\u"
|
||||
>> qi::raw[qi::repeat(1,4)[qi::hex]]
|
||||
>> qi::raw[qi::repeat(4)[qi::xdigit]]
|
||||
>> qi::attr(nothing())
|
||||
;
|
||||
|
||||
escape_unicode32 =
|
||||
"\\U"
|
||||
>> qi::raw[qi::repeat(8)[qi::xdigit]]
|
||||
>> qi::attr(nothing())
|
||||
;
|
||||
|
||||
|
||||
@@ -82,4 +82,21 @@
|
||||
Ωω Omega
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>
|
||||
In the unlikely event that you've got a Mahjong font:
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
🀀 East Wind
|
||||
</listitem>
|
||||
<listitem>
|
||||
🀁 South Wind
|
||||
</listitem>
|
||||
<listitem>
|
||||
🀂 West Wind
|
||||
</listitem>
|
||||
<listitem>
|
||||
🀃 North Wind
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</article>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
[quickbook 1.5]
|
||||
]
|
||||
|
||||
[heading I\uF1t\uEBrn\uE2ti\uF4n\uE0liz\uE6ti\uF8n]
|
||||
[heading I\u00F1t\u00EBrn\u00E2ti\u00F4n\u00E0liz\u00E6ti\u00F8n]
|
||||
|
||||
* \u0391\u03B1 Alpha
|
||||
* \u0392\u03B2 Beta
|
||||
@@ -27,4 +27,11 @@
|
||||
* \u03A6\u03C6 Phi
|
||||
* \u03A7\u03C7 Chi
|
||||
* \u03A8\u03C8 Psi
|
||||
* \u03A9\u03C9 Omega
|
||||
* \u03A9\u03C9 Omega
|
||||
|
||||
In the unlikely event that you've got a Mahjong font:
|
||||
|
||||
* \U0001F000 East Wind
|
||||
* \U0001F001 South Wind
|
||||
* \U0001F002 West Wind
|
||||
* \U0001F003 North Wind
|
||||
Reference in New Issue
Block a user