|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r73263 - in trunk/tools/quickbook: src test
From: dnljms_at_[hidden]
Date: 2011-07-20 16:28:19
Author: danieljames
Date: 2011-07-20 16:28:15 EDT (Wed, 20 Jul 2011)
New Revision: 73263
URL: http://svn.boost.org/trac/boost/changeset/73263
Log:
Quickbook: Add ids to tables for 1.4-.
Added:
trunk/tools/quickbook/test/table_1_3.gold (contents, props changed)
trunk/tools/quickbook/test/table_1_3.quickbook (contents, props changed)
Text files modified:
trunk/tools/quickbook/src/actions.cpp | 5 +++++
trunk/tools/quickbook/src/actions_class.cpp | 1 +
trunk/tools/quickbook/src/actions_class.hpp | 1 +
trunk/tools/quickbook/test/Jamfile.v2 | 1 +
trunk/tools/quickbook/test/quickbook-manual.gold | 14 +++++++-------
5 files changed, 15 insertions(+), 7 deletions(-)
Modified: trunk/tools/quickbook/src/actions.cpp
==============================================================================
--- trunk/tools/quickbook/src/actions.cpp (original)
+++ trunk/tools/quickbook/src/actions.cpp 2011-07-20 16:28:15 EDT (Wed, 20 Jul 2011)
@@ -1439,6 +1439,11 @@
detail::make_identifier(title));
}
}
+ else if (has_title)
+ {
+ table_id = actions.doc_id + ".t" +
+ boost::lexical_cast<std::string>(actions.table_id_count++);
+ }
// Emulating the old behaviour which used the width of the final
// row for span_count.
Modified: trunk/tools/quickbook/src/actions_class.cpp
==============================================================================
--- trunk/tools/quickbook/src/actions_class.cpp (original)
+++ trunk/tools/quickbook/src/actions_class.cpp 2011-07-20 16:28:15 EDT (Wed, 20 Jul 2011)
@@ -57,6 +57,7 @@
// temporary or global state
, callout_id_count(0)
, footnote_id_count(0)
+ , table_id_count(0)
, template_depth(0)
, templates()
, error_count(0)
Modified: trunk/tools/quickbook/src/actions_class.hpp
==============================================================================
--- trunk/tools/quickbook/src/actions_class.hpp (original)
+++ trunk/tools/quickbook/src/actions_class.hpp 2011-07-20 16:28:15 EDT (Wed, 20 Jul 2011)
@@ -95,6 +95,7 @@
// temporary or global state
int callout_id_count;
int footnote_id_count;
+ int table_id_count;
int template_depth;
template_stack templates;
int error_count;
Modified: trunk/tools/quickbook/test/Jamfile.v2
==============================================================================
--- trunk/tools/quickbook/test/Jamfile.v2 (original)
+++ trunk/tools/quickbook/test/Jamfile.v2 2011-07-20 16:28:15 EDT (Wed, 20 Jul 2011)
@@ -52,6 +52,7 @@
[ quickbook-test identifier_1_6 ]
[ quickbook-test para-test ]
[ quickbook-test variablelist ]
+ [ quickbook-test table_1_3 ]
[ quickbook-test table_1_5 ]
[ quickbook-test image_1_5 ]
[ quickbook-test list_test ]
Modified: trunk/tools/quickbook/test/quickbook-manual.gold
==============================================================================
--- trunk/tools/quickbook/test/quickbook-manual.gold (original)
+++ trunk/tools/quickbook/test/quickbook-manual.gold 2011-07-20 16:28:15 EDT (Wed, 20 Jul 2011)
@@ -459,7 +459,7 @@
</simpara>
</listitem>
</itemizedlist>
- <table frame="all">
+ <table frame="all" id="quickbook.t0">
<title>More Formatting Samples</title>
<tgroup cols="2">
<thead>
@@ -779,7 +779,7 @@
A C++ comment <code><phrase role="comment">// looks like this</phrase></code>
whereas a Python comment <code><phrase role="comment">#looks like this</phrase></code>.
</para>
- <table frame="all">
+ <table frame="all" id="quickbook.t1">
<title>Supported Source Modes</title>
<tgroup cols="2">
<thead>
@@ -1873,7 +1873,7 @@
<para>
Quickbook has some predefined macros that you can already use.
</para>
- <table frame="all">
+ <table frame="all" id="quickbook.t2">
<title>Predefined Macros</title>
<tgroup cols="3">
<thead>
@@ -2330,7 +2330,7 @@
<para>
will generate:
</para>
- <table frame="all">
+ <table frame="all" id="quickbook.t3">
<title>A Simple Table</title>
<tgroup cols="3">
<thead>
@@ -2439,7 +2439,7 @@
<para>
and thus:
</para>
- <table frame="all">
+ <table frame="all" id="quickbook.t4">
<title>Table with fat cells</title>
<tgroup cols="2">
<thead>
@@ -2513,7 +2513,7 @@
]
]
<!--quickbook-escape-postfix--></programlisting>
- <table frame="all">
+ <table frame="all" id="quickbook.t5">
<title>Table with code</title>
<tgroup cols="2">
<thead>
@@ -3191,7 +3191,7 @@
<para>
[cpp]
</para>
- <table frame="all">
+ <table frame="all" id="quickbook.t6">
<title>Syntax Compendium</title>
<tgroup cols="3">
<thead>
Added: trunk/tools/quickbook/test/table_1_3.gold
==============================================================================
--- (empty file)
+++ trunk/tools/quickbook/test/table_1_3.gold 2011-07-20 16:28:15 EDT (Wed, 20 Jul 2011)
@@ -0,0 +1,235 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="table_1_3" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Table 1.3</title>
+ <table frame="all" id="table_1_3.t0">
+ <title>Table 2</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <section id="table_1_3.section1">
+ <title><link linkend="table_1_3.section1">Section 1</link></title>
+ <table frame="all" id="table_1_3.t1">
+ <title>A & B</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ A
+ </para>
+ </entry>
+ <entry>
+ <para>
+ B
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ a
+ </para>
+ </entry>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_1_3.t2">
+ <title>Empty Table</title>
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_1_3.t3">
+ <title>Table with an empty cell</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ x
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_1_3.t4">
+ <title>Indentation</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Header 1. Paragraph 1
+ </para>
+ <para>
+ Header 1. Paragraph 2
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Header 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Row 1. Cell 1.
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Row 1. Cell 2.
+ </para>
+ <para>
+ Row 1. Cell 2. Paragraph 2.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_1_3.t6">
+ <title>Nested Tables</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Header 1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Header 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <table frame="all" id="table_1_3.t5">
+ <title>Inner Table</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ 1.1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 1.2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ 2.1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 2.2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Something.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <anchor id="id1"/>
+ <table frame="all" id="table_1_3.t7">
+ <title>Table with anchors</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ <anchor id="id2"/>a<anchor id="id3"/>
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+</article>
Added: trunk/tools/quickbook/test/table_1_3.quickbook
==============================================================================
--- (empty file)
+++ trunk/tools/quickbook/test/table_1_3.quickbook 2011-07-20 16:28:15 EDT (Wed, 20 Jul 2011)
@@ -0,0 +1,81 @@
+[article Table 1.3
+ [quickbook 1.3]
+ [id table_1_3]
+]
+
+[table Table 2
+ [[Heading]]
+ [[cell]]
+]
+
+[table
+ [[Heading]]
+ [[cell]]
+]
+
+[section:section1 Section 1]
+
+[table A & B
+ [[A][B]]
+ [[a][b]]
+]
+
+[table Empty Table
+]
+
+[table Table with an empty cell
+[[x]]]
+
+[table Indentation
+ [
+ [
+ Header 1. Paragraph 1
+
+ Header 1. Paragraph 2
+ ]
+ [
+ Header 2
+ ]
+ ]
+ [
+ [
+ Row 1. Cell 1.
+ ]
+ [
+ Row 1. Cell 2.
+
+ Row 1. Cell 2. Paragraph 2.
+ ]
+ ]
+]
+
+[table Nested Tables
+ [
+ [
+ Header 1
+ ]
+ [
+ Header 2
+ ]
+ ]
+ [
+ [
+ [table Inner Table
+ [[1.1][1.2]]
+ [[2.1][2.2]]
+ ]
+ ]
+ ]
+ [
+ [
+ Something.
+ ]
+ ]
+]
+
+[#id1]
+[table Table with anchors
+[[[#id2]a[#id3]]][[b]]
+]
+
+[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