Boost logo

Boost-Commit :

From: johnmaddock_at_[hidden]
Date: 2007-06-10 05:16:56


Author: johnmaddock
Date: 2007-06-10 05:16:55 EDT (Sun, 10 Jun 2007)
New Revision: 4518
URL: http://svn.boost.org/trac/boost/changeset/4518

Log:
Fixed most of the remaining PDF generation problems.

Added:
   sandbox/doc_test/doc/stub.cpp
Text files modified:
   sandbox/doc_test/XSL/fo.xsl | 83 ++++++++++++++++++++++++++++++---------
   sandbox/doc_test/doc/html/boostbook.css | 4 +
   sandbox/doc_test/doc/test.qbk | 29 +------------
   3 files changed, 71 insertions(+), 45 deletions(-)

Modified: sandbox/doc_test/XSL/fo.xsl
==============================================================================
--- sandbox/doc_test/XSL/fo.xsl (original)
+++ sandbox/doc_test/XSL/fo.xsl 2007-06-10 05:16:55 EDT (Sun, 10 Jun 2007)
@@ -129,53 +129,75 @@
  
  -->
 
-<xsl:template match="//programlisting/phrase[@role='keyword']">
+<xsl:template match="phrase[@role='keyword']">
   <fo:inline color="#3300CC"><xsl:apply-templates/></fo:inline>
 </xsl:template>
-<xsl:template match="//programlisting/phrase[@role='special']">
+<xsl:template match="phrase[@role='special']">
   <fo:inline color="#707070"><xsl:apply-templates/></fo:inline>
 </xsl:template>
-<xsl:template match="//programlisting/phrase[@role='preprocessor']">
+<xsl:template match="phrase[@role='preprocessor']">
   <fo:inline color="#009999"><xsl:apply-templates/></fo:inline>
 </xsl:template>
-<xsl:template match="//programlisting/phrase[@role='char']">
+<xsl:template match="phrase[@role='char']">
   <fo:inline color="teal"><xsl:apply-templates/></fo:inline>
 </xsl:template>
-<xsl:template match="//programlisting/phrase[@role='comment']">
+<xsl:template match="phrase[@role='comment']">
   <fo:inline color="#009900"><xsl:apply-templates/></fo:inline>
 </xsl:template>
-<xsl:template match="//programlisting/phrase[@role='string']">
+<xsl:template match="phrase[@role='string']">
   <fo:inline color="teal"><xsl:apply-templates/></fo:inline>
 </xsl:template>
-<xsl:template match="//programlisting/phrase[@role='number']">
+<xsl:template match="phrase[@role='number']">
   <fo:inline color="teal"><xsl:apply-templates/></fo:inline>
 </xsl:template>
-<xsl:template match="//programlisting/phrase[@role='white_bkd']">
+<xsl:template match="phrase[@role='white_bkd']">
   <fo:inline color="#E8FBE9"><xsl:apply-templates/></fo:inline>
 </xsl:template>
-<xsl:template match="//programlisting/phrase[@role='dk_grey_bkd']">
+<xsl:template match="phrase[@role='dk_grey_bkd']">
   <fo:inline color="#A0DAAC"><xsl:apply-templates/></fo:inline>
 </xsl:template>
 
 <!--
-Make all hyperlinks blue colored:
+Make all hyperlinks colored:
 -->
 <xsl:attribute-set name="xref.properties">
- <xsl:attribute name="color">blue</xsl:attribute>
+ <xsl:attribute name="color">#0C7445</xsl:attribute>
 </xsl:attribute-set>
 
 <!--
 Put a box around admonishments and keep them together:
 -->
 <xsl:attribute-set name="graphical.admonition.properties">
- <xsl:attribute name="border-color">#FF8080</xsl:attribute>
- <xsl:attribute name="border-width">1px</xsl:attribute>
- <xsl:attribute name="border-style">solid</xsl:attribute>
- <xsl:attribute name="padding-left">0.2cm</xsl:attribute>
- <xsl:attribute name="padding-right">0.2cm</xsl:attribute>
- <xsl:attribute name="padding-top">0.2cm</xsl:attribute>
- <xsl:attribute name="padding-bottom">0.2cm</xsl:attribute>
- <xsl:attribute name="keep-together">1</xsl:attribute>
+ <xsl:attribute name="border-color">#DCDCDC</xsl:attribute>
+ <xsl:attribute name="border-width">1px</xsl:attribute>
+ <xsl:attribute name="border-bottom-color">#9D9D9D</xsl:attribute>
+ <xsl:attribute name="border-bottom-width">3px</xsl:attribute>
+ <xsl:attribute name="border-right-color">#9D9D9D</xsl:attribute>
+ <xsl:attribute name="border-right-width">3px</xsl:attribute>
+ <xsl:attribute name="border-style">solid</xsl:attribute>
+ <xsl:attribute name="padding-left">0.2cm</xsl:attribute>
+ <xsl:attribute name="padding-right">0.2cm</xsl:attribute>
+ <xsl:attribute name="padding-top">0.2cm</xsl:attribute>
+ <xsl:attribute name="padding-bottom">0.2cm</xsl:attribute>
+ <xsl:attribute name="keep-together">1</xsl:attribute>
+ <xsl:attribute name="background-color">#FAFFFB</xsl:attribute>
+</xsl:attribute-set>
+
+<!-- TOC border setup -->
+<xsl:attribute-set name="toc.margin.properties">
+ <xsl:attribute name="border-color">#DCDCDC</xsl:attribute>
+ <xsl:attribute name="border-width">1px</xsl:attribute>
+ <xsl:attribute name="border-bottom-color">#9D9D9D</xsl:attribute>
+ <xsl:attribute name="border-bottom-width">3px</xsl:attribute>
+ <xsl:attribute name="border-right-color">#9D9D9D</xsl:attribute>
+ <xsl:attribute name="border-right-width">3px</xsl:attribute>
+ <xsl:attribute name="border-style">solid</xsl:attribute>
+ <xsl:attribute name="padding-left">0.2cm</xsl:attribute>
+ <xsl:attribute name="padding-right">0.2cm</xsl:attribute>
+ <xsl:attribute name="padding-top">0.2cm</xsl:attribute>
+ <xsl:attribute name="padding-bottom">0.2cm</xsl:attribute>
+ <xsl:attribute name="keep-together">1</xsl:attribute>
+ <xsl:attribute name="background-color">#FAFFFB</xsl:attribute>
 </xsl:attribute-set>
 
 <!--
@@ -185,6 +207,10 @@
 <xsl:attribute-set name="monospace.verbatim.properties">
   <xsl:attribute name="border-color">#DCDCDC</xsl:attribute>
   <xsl:attribute name="border-width">1px</xsl:attribute>
+ <xsl:attribute name="border-bottom-color">#9D9D9D</xsl:attribute>
+ <xsl:attribute name="border-bottom-width">3px</xsl:attribute>
+ <xsl:attribute name="border-right-color">#9D9D9D</xsl:attribute>
+ <xsl:attribute name="border-right-width">3px</xsl:attribute>
   <xsl:attribute name="border-style">solid</xsl:attribute>
   <xsl:attribute name="padding-left">0.2cm</xsl:attribute>
   <xsl:attribute name="padding-right">0.2cm</xsl:attribute>
@@ -192,6 +218,7 @@
   <xsl:attribute name="padding-bottom">0.2cm</xsl:attribute>
   <xsl:attribute name="keep-together">1</xsl:attribute>
   <xsl:attribute name="font-size">9pt</xsl:attribute>
+ <xsl:attribute name="background-color">#FAFFFB</xsl:attribute>
 </xsl:attribute-set>
 
 <xsl:attribute-set name="table.cell.padding">
@@ -203,12 +230,30 @@
 
 <xsl:attribute-set name="table.properties">
   <xsl:attribute name="keep-together">1</xsl:attribute>
+ <xsl:attribute name="background-color">#FAFFFB</xsl:attribute>
 </xsl:attribute-set>
 
 <xsl:param name="table.frame.border.color">#DCDCDC</xsl:param>
 <xsl:param name="table.cell.border.color">#DCDCDC</xsl:param>
 <xsl:param name="admon.graphics.extension">.svg</xsl:param>
 
+<!-- Render sidebars the same as Admonishments -->
+<xsl:attribute-set name="sidebar.properties">
+ <xsl:attribute name="border-color">#DCDCDC</xsl:attribute>
+ <xsl:attribute name="border-width">1px</xsl:attribute>
+ <xsl:attribute name="border-bottom-color">#9D9D9D</xsl:attribute>
+ <xsl:attribute name="border-bottom-width">3px</xsl:attribute>
+ <xsl:attribute name="border-right-color">#9D9D9D</xsl:attribute>
+ <xsl:attribute name="border-right-width">3px</xsl:attribute>
+ <xsl:attribute name="border-style">solid</xsl:attribute>
+ <xsl:attribute name="padding-left">0.2cm</xsl:attribute>
+ <xsl:attribute name="padding-right">0.2cm</xsl:attribute>
+ <xsl:attribute name="padding-top">0.2cm</xsl:attribute>
+ <xsl:attribute name="padding-bottom">0.2cm</xsl:attribute>
+ <xsl:attribute name="keep-together">1</xsl:attribute>
+ <xsl:attribute name="background-color">#FAFFFB</xsl:attribute>
+</xsl:attribute-set>
+
 </xsl:stylesheet>
 
 

Modified: sandbox/doc_test/doc/html/boostbook.css
==============================================================================
--- sandbox/doc_test/doc/html/boostbook.css (original)
+++ sandbox/doc_test/doc/html/boostbook.css 2007-06-10 05:16:55 EDT (Sun, 10 Jun 2007)
@@ -325,7 +325,7 @@
         float: left;
         position:relative;
         left: 4px;
- top: 0px;
+ top: -12px;
         clear: left;
         margin-left:-22px;
     }
@@ -619,3 +619,5 @@
         }
     }
 
+
+

Added: sandbox/doc_test/doc/stub.cpp
==============================================================================
--- (empty file)
+++ sandbox/doc_test/doc/stub.cpp 2007-06-10 05:16:55 EDT (Sun, 10 Jun 2007)
@@ -0,0 +1,69 @@
+/*=============================================================================
+ Copyright (c) 2006 Joel de Guzman
+ http://spirit.sourceforge.net/
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+#include <string>
+
+//[ bar
+//` This is the [*/bar/] function
+std::string bar()
+{
+ // return 'em, bar man!
+ return "bar";
+}
+//]
+
+//[ foo
+/*` This is the [*['foo]] function. */
+std::string foo()
+{
+ // return 'em, foo man!
+ return "foo";
+}
+//]
+
+//[ foo_bar
+std::string foo_bar() /*< The /Mythical/ FooBar.
+ See [@http://en.wikipedia.org/wiki/Foobar Foobar for details] >*/
+{
+ return "foo-bar"; /*< return 'em, foo-bar man! >*/
+}
+//]
+
+//[ class_
+class x
+{
+public:
+
+ /*<< Constructor >>*/
+ x() : n(0)
+ {
+ }
+
+ /*<< Destructor >>*/
+ ~x()
+ {
+ }
+
+ /*<< Get the `n` member variable >>*/
+ int get() const
+ {
+ return n; /*<- this will be ignored by quickbook ->*/
+ }
+
+ /*<< Set the `n` member variable >>*/
+ void set(int n_)
+ {
+ n = n_;
+ }
+//<- this will be ignored by quickbook
+private:
+
+ int n;
+//->
+};
+//]

Modified: sandbox/doc_test/doc/test.qbk
==============================================================================
--- sandbox/doc_test/doc/test.qbk (original)
+++ sandbox/doc_test/doc/test.qbk 2007-06-10 05:16:55 EDT (Sun, 10 Jun 2007)
@@ -510,36 +510,15 @@
 
 [h4 Callouts]
 
+[import stub.cpp]
+
 Here's some code with left-placed callouts:
 
- class x
- {
- public:
-
- 1x() : n(0) /*<< Constructor >>*/
- {
- }
-
- 2~x() /*<< Destructor >>*/
- {
- }
- };
+[class_]
 
 And again with callouts placed exactly where we put them:
 
- class x
- {
- public:
-
- 1x() : n(0) /*< Constructor >*/
- {
- }
-
- 2~x() /*< Destructor >*/
- {
- }
- };
-
+[foo_bar]
 
 [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