fop/examples/fo/basic/alignment.fo
Jeremias Maerki a0362d121b Move over from docs/examples
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195905 13f79535-47bb-0310-9956-ffa450edef68
2003-01-29 16:07:56 +00:00

208 lines
11 KiB
Plaintext

<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="20pt" margin-right="20pt" />
</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 space-after="15pt"><fo:leader leader-pattern="rule"/></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 space-after="15pt"><fo:leader leader-pattern="rule"/></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 space-after="15pt"><fo:leader leader-pattern="rule"/></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 space-after="15pt"><fo:leader leader-pattern="rule"/></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:block space-after="15pt"><fo:leader leader-pattern="rule"/></fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>