From: <pau...@us...> - 2011-01-30 23:27:37
|
Author: paultremblay Date: 2011-01-31 00:27:29 +0100 (Mon, 31 Jan 2011) New Revision: 6715 Added: trunk/sandbox/paultremblay/docs/xsl/image_figure.xsl Modified: trunk/sandbox/paultremblay/docs/xsl/document_stylesheet.xsl Log: Templates to document the image_figure.xsl attribute sets. Modified: trunk/sandbox/paultremblay/docs/xsl/document_stylesheet.xsl =================================================================== --- trunk/sandbox/paultremblay/docs/xsl/document_stylesheet.xsl 2011-01-30 23:02:08 UTC (rev 6714) +++ trunk/sandbox/paultremblay/docs/xsl/document_stylesheet.xsl 2011-01-30 23:27:29 UTC (rev 6715) @@ -22,6 +22,7 @@ <xsl:include href="table.xsl"/> <xsl:include href="footnote.xsl"/> <xsl:include href="admonitions.xsl"/> + <xsl:include href="image_figure.xsl"/> <xsl:include href="inline.xsl"/> <xsl:include href="comment.xsl"/> <xsl:include href="utils.xsl"/> @@ -232,6 +233,33 @@ </block> <xsl:apply-templates select="document('../../xsl_fo/admonitions.xsl')/xsl:stylesheet"/> + <!--image and figure attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">Image and Figure</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for Images and Figures. The image property of + ``alt`` and ``target`` are ignored by the stylesheets, since + they have no use in PDF. In addtion, if the ``align`` is set + to ``top`` or ``bottom``, both properties that have no meaning + for PDF, the stylesheets will report an error, and if + ``strict`` is set to ``true``, quit. + </block> + + <block> + Likwise, the figure ``figwidth`` property will be ignored, since there + is not way to implement this property directy in FO. + </block> + <block> + In order to control the scaling, alignment, and width of images and + figures, it is better to use the attribute sets than to try to set these + properties in RST. The regions of 'image', 'figure', 'caption', and 'legend' + are all wrapped in blocks. Use the attribute sets for these blocks to control the + properties. + </block> + <xsl:apply-templates select="document('../../xsl_fo/image_figure.xsl')/xsl:stylesheet"/> + <!--option-inline attribute sets--> <xsl:call-template name="make-title"> <xsl:with-param name="level">3</xsl:with-param> Added: trunk/sandbox/paultremblay/docs/xsl/image_figure.xsl =================================================================== --- trunk/sandbox/paultremblay/docs/xsl/image_figure.xsl (rev 0) +++ trunk/sandbox/paultremblay/docs/xsl/image_figure.xsl 2011-01-30 23:27:29 UTC (rev 6715) @@ -0,0 +1,75 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + <xsl:template match= "xsl:attribute-set[@name='figure-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">figure</xsl:with-param> + </xsl:call-template> + <block> + Formats the block that wraps the figure. Use this attribute set to set + properties on the image, caption, and legend, as well as to set the space + before and after the figure. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='image-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">image</xsl:with-param> + </xsl:call-template> + <block> + Formats the block that wraps the image, both for an image by itself, and + for an image included in a figure. Use this attribute set to control the space + before and after the image, as well as to align the image itself. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='figure-caption-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">figure/caption</xsl:with-param> + </xsl:call-template> + <block> + Formats the block that wraps the caption. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='figure-legend-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">figure/legend</xsl:with-param> + </xsl:call-template> + <block> + Formats the block that wraps the legend. The paragrahs in the legend have + their own blocks. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='legend-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">figure/legend/paragaph</xsl:with-param> + </xsl:call-template> + <block> + Formats the block that wraps the paragraphs in the legend. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='legend-first-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">figure/legend/paragaph[1]</xsl:with-param> + <xsl:with-param name="inherits">legend-paragraph-block</xsl:with-param> + </xsl:call-template> + <block> + Formats the first block that wraps the paragraphs in the legend. + </block> + </xsl:template> + + +</xsl:stylesheet> + Property changes on: trunk/sandbox/paultremblay/docs/xsl/image_figure.xsl ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native |