Bug 1723 - Text alignment in table cells
Summary: Text alignment in table cells
Status: CLOSED DUPLICATE of bug 1724
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: all
Hardware: PC All
: P1 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-05-11 10:54 UTC by Joy Andree
Modified: 2012-04-01 13:49 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joy Andree 2001-05-11 10:54:12 UTC
FOP 0.18.1 - default text alignment is left - 1.37 Docbook - Norm Walsh style 
sheet
PDF file viewed in Acrobat Reader and Ghostview. 

(1)Text align right attribute does not work in table cells. The text will align 
center in the cells but not right align.  See xml source files and .fo output 
below.
 
(2)Table column align does not work for alignment of text in table cells.
    See example tgroup below.


XML source

<table>
<title>Test table 1</title>
<tgroup cols="3"><colspec colname="col1" colwidth="2.0in"/><colspec 
colname="col2"
colwidth="2.0in"/><colspec colname="col3" colwidth="2.0in"/><tbody><row>
<entry colname="col1" colsep="1" rowsep="1" align="right">colwidth=2in</entry>
<entry colname="col2" colsep="1" rowsep="1" align="left">colwidth=2in</entry>
<entry colname="col3" colsep="1" rowsep="1" align="center">colwidth=2in</entry>
</row><row>
<entry colname="col1" colsep="1" rowsep="1" align="right">cell text align
right</entry>
<entry colname="col2" colsep="1" rowsep="1" align="left">cell text align 
left</entry>
<entry colname="col3" colsep="1" rowsep="1" align="center">cell text align
center</entry>
</row></tbody></tgroup>
</table>


.fo output files

<fo:table-and-caption id="N2544" keep-together.within-column="always" space-
before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em" 
space-after.minimum="0.5em" space-after.optimum="0.8em" space-
after.maximum="1.0em">
<fo:table-caption>
<fo:block font-weight="bold" keep-with-next.within-column="always" 
hyphenate="false">Test table 1</fo:block>
</fo:table-caption>
<fo:table space-before.minimum="0.5em" space-before.optimum=".8em" space-
before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" 
space-after.maximum="1.2em">
<fo:table-column column-number="1" column-width="2.0in"/>
<fo:table-column column-number="2" column-width="2.0in"/>
<fo:table-column column-number="3" column-width="2.0in"/>
<fo:table-body border-left="0.5pt solid red " padding-left="0pt" border-
right="0.5pt solid red " padding-right="0pt" border-top="0.5pt solid red " 
padding-top="0pt" border-bottom="0.5pt solid red " padding-bottom="0pt">
<fo:table-row>
<fo:table-cell border-right="0.5pt solid red " padding-right="0pt" border-
bottom="0.5pt solid red " padding-bottom="0pt">
<fo:block start-indent="5pt" end-indent="5pt" text-
align="right">colwidth=2in</fo:block>
</fo:table-cell>
<fo:table-cell border-right="0.5pt solid red " padding-right="0pt" border-
bottom="0.5pt solid red " padding-bottom="0pt">
<fo:block start-indent="5pt" end-indent="5pt" text-
align="left">colwidth=2in</fo:block>
</fo:table-cell>
<fo:table-cell border-right="0.5pt solid red " padding-right="0pt" border-
bottom="0.5pt solid red " padding-bottom="0pt">
<fo:block start-indent="5pt" end-indent="5pt" text-
align="center">colwidth=2in</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border-right="0.5pt solid red " padding-right="0pt" border-
bottom="0.5pt solid red " padding-bottom="0pt">
<fo:block start-indent="5pt" end-indent="5pt" text-align="right">cell text align
right</fo:block>
</fo:table-cell>
<fo:table-cell border-right="0.5pt solid red " padding-right="0pt" border-
bottom="0.5pt solid red " padding-bottom="0pt">
<fo:block start-indent="5pt" end-indent="5pt" text-align="left">cell text align 
left</fo:block>
</fo:table-cell>
<fo:table-cell border-right="0.5pt solid red " padding-right="0pt" border-
bottom="0.5pt solid red " padding-bottom="0pt">
<fo:block start-indent="5pt" end-indent="5pt" text-align="center">cell text 
align
center</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:table-and-caption>


Also text alignment attribute for table-column does not follow through and 
align the table cells text.

XML source - example tgroup

<tgroup cols="3"><colspec colname="col1" colwidth="2.0in" align="right"/>
<colspec colname="col2" colwidth="2.0in" align="left"/><colspec colname="col3"
colwidth="2.0in" align="center"/>
Comment 1 klease 2001-05-16 14:59:12 UTC

*** This bug has been marked as a duplicate of 1724 ***
Comment 2 klease 2001-09-21 14:54:01 UTC
The keywords left and right now (CVS 0.20.1+) work for text-align (on any block
FO).
Concerning the second issue, there is no direct inheritance from table-columns.
YOu must use the from-table-column function (XSL 5.10.4), but that doesn't yet
work in FOP.
Comment 3 Glenn Adams 2012-04-01 13:49:30 UTC
batch transition to closed remaining pre-FOP1.0 resolved bugs