diff options
Diffstat (limited to 'docs/examples')
-rw-r--r-- | docs/examples/build.xml | 1 | ||||
-rw-r--r-- | docs/examples/fo/border.fo | 18 | ||||
-rw-r--r-- | docs/examples/fo/extensive.fo | 6 | ||||
-rw-r--r-- | docs/examples/fo/leader.fo | 84 | ||||
-rw-r--r-- | docs/examples/svg/Document.xsl | 10 |
5 files changed, 99 insertions, 20 deletions
diff --git a/docs/examples/build.xml b/docs/examples/build.xml index b77a061ae..87678780e 100644 --- a/docs/examples/build.xml +++ b/docs/examples/build.xml @@ -51,6 +51,7 @@ <fop fofile="${foDir}/images.fo" pdffile="${testDir}/images.pdf"/> <fop fofile="${foDir}/readme.fo" pdffile="${testDir}/readme.pdf"/> <fop fofile="${foDir}/fonts.fo" pdffile="${testDir}/fonts.pdf"/> + <fop fofile="${foDir}/leader.fo" pdffile="${testDir}/leader.pdf"/> </target> diff --git a/docs/examples/fo/border.fo b/docs/examples/fo/border.fo index 5456b9bb5..6312578ca 100644 --- a/docs/examples/fo/border.fo +++ b/docs/examples/fo/border.fo @@ -3,14 +3,12 @@ <fo:simple-page-master margin-right="0.5cm" margin-left="0.5cm" margin-bottom="0.5cm" margin-top="0.75cm" page-width="21cm" page-height="29.7cm" master-name="first"> - <fo:region-body> - </fo:region-body> + <fo:region-body></fo:region-body> </fo:simple-page-master> <fo:simple-page-master margin-right="2.5cm" margin-left="2.5cm" margin-bottom="2cm" margin-top="1cm" page-width="21cm" page-height="29.7cm" master-name="rest"> - <fo:region-body> - </fo:region-body> + <fo:region-body></fo:region-body> </fo:simple-page-master> <fo:page-sequence-master master-name="psmA"> @@ -105,14 +103,10 @@ </fo:block-container> <fo:block-container height="17cm" width="19cm" top="8cm" left="0cm" position="absolute"> <fo:table border-color="yellow" border-style="solid" border-width="1pt" height="17cm"> - <fo:table-column column-width="2.5cm" border-color="red" border-style="solid" border-width="1pt"> - </fo:table-column> - <fo:table-column column-width="11.5cm" border-color="red" border-style="solid" border-width="1pt"> - </fo:table-column> - <fo:table-column column-width="2.5cm" border-color="red" border-style="solid" border-width="1pt"> - </fo:table-column> - <fo:table-column column-width="2.5cm" border-color="red" border-style="solid" border-width="1pt"> - </fo:table-column> + <fo:table-column column-width="2.5cm" border-color="red" border-style="solid" border-width="1pt"/> + <fo:table-column column-width="11.5cm" border-color="red" border-style="solid" border-width="1pt"/> + <fo:table-column column-width="2.5cm" border-color="red" border-style="solid" border-width="1pt"/> + <fo:table-column column-width="2.5cm" border-color="red" border-style="solid" border-width="1pt"/> <fo:table-body font-family="sans-serif" font-weight="normal" font-size="10pt"> <fo:table-row line-height="12pt"> <fo:table-cell border-width="1pt" border-color="green" border-style="solid" padding="6pt"> diff --git a/docs/examples/fo/extensive.fo b/docs/examples/fo/extensive.fo index 9ef9368d4..09cbd74b0 100644 --- a/docs/examples/fo/extensive.fo +++ b/docs/examples/fo/extensive.fo @@ -82,9 +82,9 @@ </fo:list-block> <fo:block break-before="page" font-size="24pt" line-height="28pt" space-before.optimum="12pt" space-after.optimum="12pt">Next Stage</fo:block> <fo:block>Right, now we are ready to try some newly implemented things like rules. What follows is a display rule of default thickness 1pt and a space-before and space-after of 12pt.</fo:block> - <fo:display-rule space-before.optimum="12pt" space-after.optimum="12pt"/> - <fo:block>Now what follows is a display-rule of thickness 5pt with start-indent of 100pt (same space-before/after as before).</fo:block> - <fo:display-rule space-before.optimum="12pt" space-after.optimum="12pt" rule-thickness="5pt" start-indent="100pt"/> + <fo:block><fo:leader leader-pattern="rule" space-before.optimum="12pt" space-after.optimum="12pt"/></fo:block> + <fo:block>Now what follows is a leader of thickness 5pt with start-indent of 100pt (same space-before/after as before).</fo:block> + <fo:block><fo:leader leader-pattern="rule" space-before.optimum="12pt" space-after.optimum="12pt" rule-thickness="5pt" start-indent="100pt"/></fo:block> <fo:block font-size="24pt" line-height="28pt" space-before.optimum="12pt" space-after.optimum="12pt" ><fo:inline-sequence color="#500">C</fo:inline-sequence ><fo:inline-sequence color="#700">o</fo:inline-sequence diff --git a/docs/examples/fo/leader.fo b/docs/examples/fo/leader.fo new file mode 100644 index 000000000..abde846ce --- /dev/null +++ b/docs/examples/fo/leader.fo @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- example for the very limited use of the fo leader. --> + +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + + <fo:layout-master-set> + + <!-- layout for the first page --> + <fo:simple-page-master master-name="first" + page-height="29.7cm" + page-width="21cm" + margin-top="1cm" + margin-bottom="2cm" + margin-left="2.5cm" + margin-right="2.5cm"> + <fo:region-before extent="3cm"/> + <fo:region-body margin-top="3cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + + +<fo:page-sequence-master master-name="basicPSM" > + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-name="first" + page-position="first" /> + </fo:repeatable-page-master-alternatives> +</fo:page-sequence-master> + + </fo:layout-master-set> + <!-- end: defines page layout --> + + <!-- actual layout --> + <fo:page-sequence master-name="basicPSM"> + + + <fo:flow flow-name="xsl-region-body"> + + <!-- Normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-after.optimum="3pt" + text-align="start"> + This document has been reviewed by W3C Members and other interested parties and has been endorsed by the Director as a + W3C Recommendation. It is a stable document and may be used as reference material or cited as a normative reference from + another document. W3C's role in making the Recommendation is to draw attention to the specification and to promote its + widespread deployment. - Here comes a line (thickness: 3pt). + </fo:block> + + <!-- Inserts a leader (rule). Because leader is an inline fo you have + to wrap it into a block element --> + <fo:block text-align="center"> + <fo:leader leader-pattern="rule" + rule-thickness="3.0pt" + space-before.optimum="12pt" + space-after.optimum="12pt" + start-indent="1.5cm" + end-indent="2cm"/> + </fo:block> + + <!-- Normal text --> + <fo:block font-size="12pt" + font-family="sans-serif" + line-height="15pt" + space-after.optimum="3pt" + text-align="start"> + This document specifies a syntax created by subsetting an existing, widely used international text processing standard + (Standard Generalized Markup Language, ISO 8879:1986(E) as amended and corrected) for use on the World Wide Web. It + is a product of the W3C XML Activity, details of which can be found at http://www.w3.org/XML. A list of current W3C + Recommendations and other technical documents can be found at http://www.w3.org/TR. - Here comes a line (thickness: 1pt (default)) + </fo:block> + <!-- Inserts a leader (rule). Because leader is an inline fo you have + to wrap it into a block element --> + <fo:block text-align="start"> + <fo:leader leader-pattern="rule" + space-before.optimum="12pt" + space-after.optimum="12pt" + start-indent="1.5cm" + end-indent="2cm"/> + </fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/docs/examples/svg/Document.xsl b/docs/examples/svg/Document.xsl index d8a2aa3ba..12af42999 100644 --- a/docs/examples/svg/Document.xsl +++ b/docs/examples/svg/Document.xsl @@ -62,12 +62,12 @@ </fo:block> </fo:block-container> <fo:block-container height="1cm" width="17cm" top="1.1cm" left="0cm" position="absolute"> - <fo:display-rule space-before.optimum="0pt" space-after.optimum="0pt"/> + <fo:leader leader-pattern="rule" space-before.optimum="0pt" space-after.optimum="0pt"/> </fo:block-container> </fo:static-content> <fo:static-content flow-name="xsl-region-after"> <fo:block-container height="1cm" width="17cm" top="0cm" left="0cm" position="absolute"> - <fo:display-rule space-before.optimum="0pt" space-after.optimum="0pt"/> + <fo:leader leader-pattern="rule" space-before.optimum="0pt" space-after.optimum="0pt"/> </fo:block-container> <fo:block-container height="2cm" width="6cm" top="0.1cm" left="0cm" position="absolute"> <fo:block font-size="10pt" font-family="serif" line-height="12pt"> @@ -154,7 +154,7 @@ <xsl:if test="not(position()=1)"> <fo:block break-before="page"/> </xsl:if> - <fo:display-rule rule-thickness="1.5pt" space-before.optimum="5pt" space-after.optimum="4pt"/> + <fo:leader leader-pattern="rule" rule-thickness="1.5pt" space-before.optimum="5pt" space-after.optimum="4pt"/> <fo:block font-weight="bold" font-size="18pt" line-height="18pt"><xsl:apply-templates select="Title"/></fo:block> <xsl:apply-templates select="ExternalDiagram|ExternalSVG"/> <xsl:apply-templates select="Body"/> @@ -183,7 +183,7 @@ </xsl:template> <xsl:template match="Section"> - <fo:display-rule space-before.optimum="8pt"/> + <fo:leader leader-pattern="rule" space-before.optimum="8pt"/> <fo:block font-weight="bold" font-size="14pt" line-height="14pt" space-before.optimum="2pt"><xsl:apply-templates select="Title"/></fo:block> <xsl:apply-templates select="ExternalDiagram|ExternalSVG"/> @@ -194,7 +194,7 @@ </xsl:template> <xsl:template match="SubSection"> - <fo:display-rule space-before.optimum="6pt"/> + <fo:leader leader-pattern="rule" space-before.optimum="6pt"/> <fo:block font-weight="bold" font-size="12pt" line-height="12pt" space-before.optimum="2pt"><xsl:apply-templates select="Title"/></fo:block> <xsl:apply-templates select="ExternalDiagram|ExternalSVG"/> |