You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by Apache Wiki <wi...@apache.org> on 2006/09/04 23:11:36 UTC
[Xmlgraphics-fop Wiki] Update of
"GoogleSummerOfCode2006/AutoTableLayoutProgress" by PatrickPaul
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Xmlgraphics-fop Wiki" for change notification.
The following page has been changed by PatrickPaul:
http://wiki.apache.org/xmlgraphics-fop/GoogleSummerOfCode2006/AutoTableLayoutProgress
------------------------------------------------------------------------------
#pragma section-numbers on
-
- This page will contain various informations about how the project progresses: thoughts, issues, design decisions, etc.
'''Contents'''
[[TableOfContents()]]
- '''News'''
+ == Supported features ==
+ * table-layout="auto"
+ * redistribution of extra space to the columns
+ * table width="auto"
- July21
- Finally getting somewhere. I have implemented a very basic auto-table layout which I will refine in the next few days. I will also plan the splitting of the element list creation and line-breaking in LineLayoutManager.getNextKnuthElements().
+ == Remaining problems ==
+ * when determining the minimum and maximum cell width the 'width' property of the cell has to be taken into account.
+ * take into account the column-width if they are specified
+ * spanned cells are not supported
+
+ == Next steps ==
+ * avoid creating the inline element lists twice. This require to split the LineLM.getNextKnuthElements() method.
+ * support changing available IPD on pages. This implies a big refactoring of the layout engine.
- == Example fo ==
-
- This sample shows what currently happens when using table-layout="auto" with Apache FOP 0.92beta :
-
- {{{
- <?xml version="1.0" encoding="utf-8"?>
-
- <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
-
-
- <!-- defines the layout master -->
- <fo:layout-master-set>
- <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-body margin-top="3cm"/>
- <fo:region-before extent="3cm"/>
- <fo:region-after extent="1.5cm"/>
- </fo:simple-page-master>
- </fo:layout-master-set>
-
- <!-- starts actual layout -->
- <fo:page-sequence master-reference="first">
-
- <fo:flow flow-name="xsl-region-body">
-
- <!-- this defines a title level 1-->
- <fo:block font-size="18pt"
- font-family="sans-serif"
- line-height="24pt"
- space-after.optimum="15pt"
- background-color="blue"
- color="white"
- text-align="center"
- padding-top="3pt">
- Auto table layout test
- </fo:block>
-
- <!-- this defines a title level 2-->
- <fo:block font-size="16pt"
- font-family="sans-serif"
- space-after.optimum="15pt"
- text-align="center">
- A simple table -- fixed layout
- </fo:block>
-
- <!-- normal text -->
- <fo:block text-align="start">This simple table uses table-layout="fixed" which works fine with Apache FOP 0.92beta.
- </fo:block>
-
- <!-- table start -->
- <fo:table table-layout="fixed" width="100%" border-collapse="separate">
- <fo:table-column column-width="30mm"/>
- <fo:table-column column-width="30mm"/>
- <fo:table-column column-width="100mm"/>
- <fo:table-body>
- <fo:table-row>
- <fo:table-cell ><fo:block>one</fo:block></fo:table-cell>
- <fo:table-cell ><fo:block>two</fo:block></fo:table-cell>
- <fo:table-cell ><fo:block>three: a little more texte is nice.</fo:block></fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell ><fo:block>un</fo:block></fo:table-cell>
- <fo:table-cell ><fo:block>deux</fo:block></fo:table-cell>
- <fo:table-cell ><fo:block>trois</fo:block></fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell ><fo:block>uno</fo:block></fo:table-cell>
- <fo:table-cell ><fo:block>dos</fo:block></fo:table-cell>
- <fo:table-cell ><fo:block>tres</fo:block></fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell ><fo:block>eins</fo:block></fo:table-cell>
- <fo:table-cell ><fo:block>zwei</fo:block></fo:table-cell>
- <fo:table-cell ><fo:block>drei</fo:block></fo:table-cell>
- </fo:table-row>
- </fo:table-body>
- </fo:table>
- <!-- table end -->
-
- <!-- normal text -->
- <fo:block text-align="start">This is normal text.
- </fo:block>
-
- <!-- **************************** NEW PAGE ************************************* -->
-
- <!-- this defines a title level 2-->
- <fo:block font-size="16pt"
- font-family="sans-serif"
- space-after.optimum="15pt"
- text-align="center"
- break-before="page">
- A simple table -- auto-table layout
- </fo:block>
-
-
- <!-- normal text -->
- <fo:block text-align="start">This the same simple table but using table-layout="auto" which IS NOT supported by Apache FOP 0.92beta.
- </fo:block>
-
-
- <!-- table start -->
- <fo:table table-layout="auto" width="100%" border-collapse="separate">
- <fo:table-column />
- <fo:table-column />
- <fo:table-column />
- <fo:table-body>
- <fo:table-row>
- <fo:table-cell ><fo:block>one</fo:block></fo:table-cell>
- <fo:table-cell ><fo:block>two</fo:block></fo:table-cell>
- <fo:table-cell ><fo:block>three: a little more texte is nice.</fo:block></fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell ><fo:block>un</fo:block></fo:table-cell>
- <fo:table-cell ><fo:block>deux</fo:block></fo:table-cell>
- <fo:table-cell ><fo:block>trois</fo:block></fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell ><fo:block>uno</fo:block></fo:table-cell>
- <fo:table-cell ><fo:block>dos</fo:block></fo:table-cell>
- <fo:table-cell ><fo:block>tres</fo:block></fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell ><fo:block>eins</fo:block></fo:table-cell>
- <fo:table-cell ><fo:block>zwei</fo:block></fo:table-cell>
- <fo:table-cell ><fo:block>drei</fo:block></fo:table-cell>
- </fo:table-row>
- </fo:table-body>
- </fo:table>
- <!-- table end -->
-
- <!-- normal text -->
- <fo:block text-align="start">The desired optimal result here is to have the third column made larger so that the text can fit without a line-break.
- </fo:block>
-
- </fo:flow>
- </fo:page-sequence>
- </fo:root>
- }}}
-
-
- == Basic auto-table ==
- Here are some sample files showing how the basic auto-table reacts to the little example above :
-
- === Example 1 ===
- Same as code above.
- http://www-etud.iro.umontreal.ca/~paulpatr/fop/table1.fo
- http://www-etud.iro.umontreal.ca/~paulpatr/fop/table1-fopbeta.pdf
- http://www-etud.iro.umontreal.ca/~paulpatr/fop/table1-withautotable.pdf
-
- === Example 2 ===
- Same as code above except the table width="100mn"
- http://www-etud.iro.umontreal.ca/~paulpatr/fop/table2.fo
- http://www-etud.iro.umontreal.ca/~paulpatr/fop/table2-fopbeta.pdf
- http://www-etud.iro.umontreal.ca/~paulpatr/fop/table2-withautotable.pdf
-
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org