Re: WG: keep-together or span
Hussein Shafie <[email protected]>
| Newsgroups | gmane.text.xml.xfc.general |
|---|---|
| Organization | XMLmind |
| Message-ID | <[email protected]> |
--> Which keep-* properties are supported by XMLmind XSL-FO Converter is
documented here:
http://www.xmlmind.com/foconverter/conformance.html
Please search for "keep-".
--> Using a table such as the one found below should meet most of your
expectations.
Notice the use height="3em" on a row and display-align="center" on some
cells to get the kind of layout you seem to want.
Notice the id="last-page" found inside the table and not in a separate
empty fo:block.
However if a empty paragraph is added after the table, then I'm sorry
but there is no way to meet all your expectations.
---
<fo:table margin-top="12mm"
keep-together.within-page="always">
<fo:table-column column-width="65mm"/>
<fo:table-column column-width="65mm"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell number-columns-spanned="2">
<fo:block>The Simpsons Co.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row height="3em">
<fo:table-cell display-align="center">
<fo:block id="last-page">Bartholomeo</fo:block>
</fo:table-cell>
<fo:table-cell display-align="center">
<fo:block>Lisa</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
---
On 06/07/2013 04:26 PM, Dezsoe Gaal 'EXTERN' wrote:
>
> we are using XMLMIND XFC to produce Word documents from FO and I have a
> problem of implementing signatures that should look like this:
>
>
>
>
> My expectations would be:
> - no page-break between "Regards" and "Lisa Simpsons",
> - no empty paragraph after "Lisa Simpsons",
> - "Lisa Simpsons" should be justified (start at a given position, e.g.
> 10 cm from the margin).
>
> I tried to use *table*s, but
> - at the end of the table there is always an empty paragraph (that might
> result in an empty page at the end of the document),
> - *keep-together* feature does not function for elements which do not
> directly stem from the flow.
>
> I checked other possibilities to solve this problem with *list-blocks*,
> but it incurs similar problem (elements which do not directly stem from
> the flow cannot be kept together).
>
> Unfortunately *span *feature is also not implemented, so using a
> mult-column layout and spanning all paragraphs except the last one (with
> the signature) is not doable either.
>
> Even though /keep-together.within-page="always" /feature is provided to
> the table, this FO does not produce the desired result (has a page break
> between the table and its margin):
>
> <?xml version="1.0" encoding="UTF-8"?>
> <fo:root
> xmlns:sdt="http://www.xmlmind.com/foconverter/xsl/extensions/docx/sdt"
> xmlns:fo="http://www.w3.org/1999/XSL/Format"
> xmlns:fox="http://xml.apache.org/fop/extensions"
> xmlns:java="http://xml.apache.org/xalan/java"
> xmlns:ibex="http://www.xmlpdf.com/2003/ibex/Format" font="11pt
> "arial"">
> <fo:layout-master-set>
> <fo:simple-page-master master-name="A4-first" page-width="210mm"
> page-height="297mm">
> <fo:region-body margin-bottom="40mm" margin-left="20mm"
> margin-right="20mm" margin-top="96mm"/>
> </fo:simple-page-master>
> <fo:page-sequence-master master-name="basic">
> <fo:repeatable-page-master-alternatives>
> <fo:conditional-page-master-reference master-reference="A4-first"
> page-position="any"/>
> </fo:repeatable-page-master-alternatives>
> </fo:page-sequence-master>
> </fo:layout-master-set>
>
> <fo:page-sequence master-reference="basic">
> <fo:flow flow-name="xsl-region-body">
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
> <fo:block>Bla</fo:block>
>
> <fo:block space-before="12mm" keep-with-next.within-page="always">Bart
> Co.</fo:block>
> <fo:table margin-top="22pt" keep-with-next.within-page="always"
> keep-together.within-page="always">
> <fo:table-column column-width="65mm"/>
> <fo:table-column column-width="65mm"/>
> <fo:table-body>
> <fo:table-row keep-with-previous.within-page="always">
> <fo:table-cell>
> <fo:block>Bartholomeo</fo:block>
> </fo:table-cell>
> <fo:table-cell>
> <fo:block>Lisa</fo:block>
> </fo:table-cell>
> </fo:table-row>
> </fo:table-body>
> </fo:table>
>
> <fo:block id="last-page" keep-with-previous.within-page="always"
> line-height="0"/>
> </fo:flow>
> </fo:page-sequence>
> </fo:root>
>
> I would highly appreciate it if you could suggest me a solution for the
> above-mentioned problem that can be implemented by XMLMIND XFC.
> Thanks in advance.
>
--
XMLmind FO Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xfc-support