aboutsummaryrefslogtreecommitdiffstats
path: root/docs/examples/fo
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2002-03-28 11:53:53 +0000
committerKeiron Liddle <keiron@apache.org>2002-03-28 11:53:53 +0000
commit90410f7a18c9154a5519e335579b2e3af29e0a76 (patch)
treeb0d097f54b6103f832df72bafa07926923034410 /docs/examples/fo
parentc6f4e48dc1a45176ec49ccac41e979dd92f6d09f (diff)
downloadxmlgraphics-fop-90410f7a18c9154a5519e335579b2e3af29e0a76.tar.gz
xmlgraphics-fop-90410f7a18c9154a5519e335579b2e3af29e0a76.zip
inline area alignment example from spec
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194727 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/examples/fo')
-rw-r--r--docs/examples/fo/alignment.fo196
1 files changed, 196 insertions, 0 deletions
diff --git a/docs/examples/fo/alignment.fo b/docs/examples/fo/alignment.fo
new file mode 100644
index 000000000..a9f9ff966
--- /dev/null
+++ b/docs/examples/fo/alignment.fo
@@ -0,0 +1,196 @@
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+<fo:layout-master-set>
+ <fo:simple-page-master master-name="one">
+ <fo:region-body margin-top="25pt" margin-bottom="25pt" margin-left="50pt" margin-right="50pt" />
+ </fo:simple-page-master>
+</fo:layout-master-set>
+<fo:page-sequence master-reference="one">
+<fo:flow flow-name="xsl-region-body">
+ <fo:block><fo:inline font-weight="bold">Ex 1:</fo:inline> This
+is a longer line of text that provides a context for the line with the images aligned on it.
+This is a line with before-edge
+<fo:instream-foreign-object vertical-align="top">
+<svg:svg width="25" height="25">
+ <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="0" x2="12.5" y2="22" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 17l7.5 8l7.5 -8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object><fo:instream-foreign-object vertical-align="top">
+<svg:svg width="25" height="50">
+ <svg:rect x="0" y="0" width="25" height="50" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="0" x2="12.5" y2="47" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 42l7.5 8l7.5 -8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object>, after-edge<fo:instream-foreign-object vertical-align="bottom">
+<svg:svg width="25" height="25">
+ <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="2" x2="12.5" y2="25" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object><fo:instream-foreign-object vertical-align="bottom">
+<svg:svg width="25" height="40">
+ <svg:rect x="0" y="0" width="25" height="40" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="2" x2="12.5" y2="40" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object>, middle<fo:instream-foreign-object vertical-align="middle">
+<svg:svg width="25" height="25">
+ <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="3" x2="12.5" y2="22" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 17l7.5 8l7.5 -8z" style="fill:black"/>
+ <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object>, and no<fo:instream-foreign-object>
+<svg:svg width="25" height="40">
+ <svg:rect x="0" y="0" width="25" height="40" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="0" x2="12.5" y2="40" style="stroke:black;stroke-width:1.5"/>
+</svg:svg>
+</fo:instream-foreign-object> alignment.
+And this is the line of text that follows the line with the aligned objects on it.
+And finally, this line illustrates the normal spacing between lines of text in this font.
+</fo:block>
+
+ <fo:block><fo:inline font-weight="bold">Ex 2:</fo:inline> This
+is a longer line of text that provides a context for the line with the images aligned on it.
+This is a line with before-edge
+<fo:instream-foreign-object vertical-align="top">
+<svg:svg width="25" height="25">
+ <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="0" x2="12.5" y2="22" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 17l7.5 8l7.5 -8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object><fo:instream-foreign-object vertical-align="top">
+<svg:svg width="25" height="50">
+ <svg:rect x="0" y="0" width="25" height="50" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="0" x2="12.5" y2="47" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 42l7.5 8l7.5 -8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object>, after-edge<fo:instream-foreign-object vertical-align="bottom">
+<svg:svg width="25" height="25">
+ <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="2" x2="12.5" y2="25" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object><fo:instream-foreign-object vertical-align="bottom">
+<svg:svg width="25" height="40">
+ <svg:rect x="0" y="0" width="25" height="40" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="2" x2="12.5" y2="40" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object>, middle<fo:instream-foreign-object vertical-align="middle">
+<svg:svg width="25" height="25">
+ <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="3" x2="12.5" y2="22" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 17l7.5 8l7.5 -8z" style="fill:black"/>
+ <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object> alignment.
+And this is the line of text that follows the line with the aligned objects on it.
+And finally, this line illustrates the normal spacing between lines of text in this font.
+</fo:block>
+
+ <fo:block><fo:inline font-weight="bold">Ex 3:</fo:inline> This
+is a longer line of text that provides a context for the line with the images aligned on it.
+This is a line with before-edge
+<fo:instream-foreign-object vertical-align="top">
+<svg:svg width="25" height="25">
+ <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="0" x2="12.5" y2="22" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 17l7.5 8l7.5 -8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object><fo:instream-foreign-object vertical-align="top">
+<svg:svg width="25" height="50">
+ <svg:rect x="0" y="0" width="25" height="50" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="0" x2="12.5" y2="47" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 42l7.5 8l7.5 -8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object>, after-edge<fo:instream-foreign-object vertical-align="bottom">
+<svg:svg width="25" height="25">
+ <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="2" x2="12.5" y2="25" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object><fo:instream-foreign-object vertical-align="bottom">
+<svg:svg width="25" height="40">
+ <svg:rect x="0" y="0" width="25" height="40" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="2" x2="12.5" y2="40" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object> alignment.
+And this is the line of text that follows the line with the aligned objects on it.
+And finally, this line illustrates the normal spacing between lines of text in this font.
+</fo:block>
+
+ <fo:block><fo:inline font-weight="bold">Ex 4:</fo:inline> This
+is a longer line of text that provides a context for the line with the images aligned on it.
+This is a line with before-edge
+<fo:instream-foreign-object vertical-align="top">
+<svg:svg width="25" height="25">
+ <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="0" x2="12.5" y2="22" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 17l7.5 8l7.5 -8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object><fo:instream-foreign-object vertical-align="top">
+<svg:svg width="25" height="40">
+ <svg:rect x="0" y="0" width="25" height="40" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="0" x2="12.5" y2="37" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 32l7.5 8l7.5 -8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object>, after-edge<fo:instream-foreign-object vertical-align="bottom">
+<svg:svg width="25" height="25">
+ <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="2" x2="12.5" y2="25" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object><fo:instream-foreign-object vertical-align="bottom">
+<svg:svg width="25" height="50">
+ <svg:rect x="0" y="0" width="25" height="50" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="2" x2="12.5" y2="50" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object> alignment.
+And this is the line of text that follows the line with the aligned objects on it.
+And finally, this line illustrates the normal spacing between lines of text in this font.
+</fo:block>
+
+ <fo:block><fo:inline font-weight="bold">Ex 5:</fo:inline> This
+is a longer line of text that provides a context for the line with the images aligned on it.
+This is a line with before-edge
+<fo:instream-foreign-object vertical-align="top">
+<svg:svg width="25" height="25">
+ <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="0" x2="12.5" y2="22" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 17l7.5 8l7.5 -8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object><fo:instream-foreign-object vertical-align="top">
+<svg:svg width="25" height="40">
+ <svg:rect x="0" y="0" width="25" height="40" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="0" x2="12.5" y2="37" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 32l7.5 8l7.5 -8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object>, after-edge<fo:instream-foreign-object vertical-align="bottom">
+<svg:svg width="25" height="25">
+ <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="2" x2="12.5" y2="25" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object><fo:instream-foreign-object vertical-align="bottom">
+<svg:svg width="25" height="50">
+ <svg:rect x="0" y="0" width="25" height="50" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="2" x2="12.5" y2="50" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object>, middle<fo:instream-foreign-object vertical-align="middle">
+<svg:svg width="25" height="25">
+ <svg:rect x="0" y="0" width="25" height="25" style="fill:none;stroke:#000000"/>
+ <svg:line x1="12.5" y1="3" x2="12.5" y2="22" style="stroke:black;stroke-width:1.5"/>
+ <svg:path d="M5 17l7.5 8l7.5 -8z" style="fill:black"/>
+ <svg:path d="M5 8l7.5 -8l7.5 8z" style="fill:black"/>
+</svg:svg>
+</fo:instream-foreign-object> alignment.
+And this is the line of text that follows the line with the aligned objects on it.
+And finally, this line illustrates the normal spacing between lines of text in this font.
+</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+</fo:root>