aboutsummaryrefslogtreecommitdiffstats
path: root/docs/examples/fo
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/fo')
-rw-r--r--docs/examples/fo/border.fo18
-rw-r--r--docs/examples/fo/extensive.fo6
-rw-r--r--docs/examples/fo/leader.fo84
3 files changed, 93 insertions, 15 deletions
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>