Re: [docbook-apps] centered table problem

2010-05-10 Thread Ron Catterall

Bob

Centering a proportional width table in an outer 3x3 empty table works 
OK (but it is an ugly solution)

Now I would like to center the Table 1.  TITLE  heading above the table.
Can you help me with this please?  I guess it needs doing in a 
customization layer.


my centered table in a table attached.

Ron


Bob Stayton wrote:
I think setting the table width to a hard value is necessary for that 
workaround to work.  Setting table width to 50% means 50% of the table's 
context, which is a table cell of variable width.  Too many variables.  8^)


Bob Stayton
Sagehill Enterprises
b...@sagehill.net


- Original Message - From: Ron Catterall r...@catterall.net
To: docbook-apps@lists.oasis-open.org
Sent: Saturday, May 08, 2010 8:36 AM
Subject: [docbook-apps] centered table problem



Hi all (especially Bob)

I have a problem centering a table on a page of FO--PDF output using
XEP 4.18  (Saxon 6.5.5 and latest Docbook 5 NS style sheet)

With no customization this table gives the expected result - see
attached file not_centered.jpg

?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE article
article xml:id=ARTICLE xmlns=http://docbook.org/ns/docbook;
version=5.0 xml:lang=EN
infotitleTitle of article/title/info
sect1 xml:id=SECT1 xmlns=http://docbook.org/ns/docbook;
version=5.0 xml:lang=EN
infotitleSECT1 TITLE/title/info
sect2 xml:id=SECT2 xmlns=http://docbook.org/ns/docbook;
version=5.0 xml:lang=EN
infotitleSECT2 TITLE/title/info
?dbfo-need height=5.5in ?
table frame=all xml:id=ID colsep=1 rowsep=1
infotitleTITLE OF TABLE/title/info
?dbfo table-width=50.0% ?
tgroup align=center cols=4 colsep=1 rowsep=1
colspec colname=cl colwidth=0.5*/
colspec colname=c2 colwidth=1.0*/
colspec colname=c3 colwidth=1.5*/
colspec colname=c4 colwidth=2.0*/
spanspec align=center nameend=c4 namest=c1
spanname=hspan/
theadrow valign=middleentry spanname=hspan
align=centerHEAD/entry/row/thead
tfootrow valign=middleentry spanname=hspan
align=centerFOOT/entry/row/tfoot
tbody
row valign=middle
entry align=center1/entryentry
align=centera/entryentry align=center0/entry
entry align=center0/entry
/row
row valign=middle
entry align=center2/entryentry
align=centerb/entryentry align=center0/entry
entry align=center0/entry
/row
row valign=middle
entry align=center3/entryentry
align=centerc/entryentry align=center0/entry
entry align=center0/entry
/row
row valign=middle
entry align=center4/entryentry
align=centerd/entryentry align=center0/entry
entry align=center0/entry
/row
row valign=middle
entry align=center5/entryentry
align=centere/entryentry align=center0/entry
entry align=center0/entry
/row
row valign=middle
entry align=center6/entryentry
align=centerf/entryentry align=center0/entry
entry align=center0/entry
/row
/tbody
/tgroup
/table
/sect2
/sect1
/article

Customizing using the recipe from Stayton p.474 and XEP4.18 the table is
 off center and its width drastically reduced - see attached file
centered.jpg

  xsl:template name=table.layout
xsl:param name=table.content/
fo:table width=100%
  fo:table-column column-width=proportional-column-width(1)/
  fo:table-column/
  fo:table-column column-width=proportional-column-width(1)/
  fo:table-body start-indent=0pt
fo:table-row
  fo:table-cell/
  fo:table-cell
fo:table
  fo:table-body start-indent=0pt
fo:table-rowfo:table-cellfo:block
  xsl:copy-of select=$table.content/
/fo:block/fo:table-cell/fo:table-row
  /fo:table-body
/fo:table
  /fo:table-cell
  fo:table-cell/
/fo:table-row
  /fo:table-body
/fo:table
  /xsl:template

If I set the colwidths to 0.5cm instead of 0.5* etc the table is
centered correctly.  It appears that the proportional widths from FO and
CALS are interfering with each other.

Does anyone know a way around this problem?

Ron
--
Ron Catterall Ph.D. D.Sc.
r...@catterall.net
http://catterall.net




 





?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE article
article xml:id=ARTICLE xmlns=http://docbook.org/ns/docbook; 
version=5.0 xml:lang=EN

infotitleTitle of article/title

Re: [docbook-apps] centered table problem

2010-05-09 Thread Bob Stayton
I think setting the table width to a hard value is necessary for that workaround to 
work.  Setting table width to 50% means 50% of the table's context, which is a table 
cell of variable width.  Too many variables.  8^)


Bob Stayton
Sagehill Enterprises
b...@sagehill.net


- Original Message - 
From: Ron Catterall r...@catterall.net

To: docbook-apps@lists.oasis-open.org
Sent: Saturday, May 08, 2010 8:36 AM
Subject: [docbook-apps] centered table problem



Hi all (especially Bob)

I have a problem centering a table on a page of FO--PDF output using
XEP 4.18  (Saxon 6.5.5 and latest Docbook 5 NS style sheet)

With no customization this table gives the expected result - see
attached file not_centered.jpg

?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE article
article xml:id=ARTICLE xmlns=http://docbook.org/ns/docbook;
version=5.0 xml:lang=EN
infotitleTitle of article/title/info
sect1 xml:id=SECT1 xmlns=http://docbook.org/ns/docbook;
version=5.0 xml:lang=EN
infotitleSECT1 TITLE/title/info
sect2 xml:id=SECT2 xmlns=http://docbook.org/ns/docbook;
version=5.0 xml:lang=EN
infotitleSECT2 TITLE/title/info
?dbfo-need height=5.5in ?
table frame=all xml:id=ID colsep=1 rowsep=1
infotitleTITLE OF TABLE/title/info
?dbfo table-width=50.0% ?
tgroup align=center cols=4 colsep=1 rowsep=1
colspec colname=cl colwidth=0.5*/
colspec colname=c2 colwidth=1.0*/
colspec colname=c3 colwidth=1.5*/
colspec colname=c4 colwidth=2.0*/
spanspec align=center nameend=c4 namest=c1
spanname=hspan/
theadrow valign=middleentry spanname=hspan
align=centerHEAD/entry/row/thead
tfootrow valign=middleentry spanname=hspan
align=centerFOOT/entry/row/tfoot
tbody
row valign=middle
entry align=center1/entryentry
align=centera/entryentry align=center0/entry
entry align=center0/entry
/row
row valign=middle
entry align=center2/entryentry
align=centerb/entryentry align=center0/entry
entry align=center0/entry
/row
row valign=middle
entry align=center3/entryentry
align=centerc/entryentry align=center0/entry
entry align=center0/entry
/row
row valign=middle
entry align=center4/entryentry
align=centerd/entryentry align=center0/entry
entry align=center0/entry
/row
row valign=middle
entry align=center5/entryentry
align=centere/entryentry align=center0/entry
entry align=center0/entry
/row
row valign=middle
entry align=center6/entryentry
align=centerf/entryentry align=center0/entry
entry align=center0/entry
/row
/tbody
/tgroup
/table
/sect2
/sect1
/article

Customizing using the recipe from Stayton p.474 and XEP4.18 the table is
 off center and its width drastically reduced - see attached file
centered.jpg

  xsl:template name=table.layout
xsl:param name=table.content/
fo:table width=100%
  fo:table-column column-width=proportional-column-width(1)/
  fo:table-column/
  fo:table-column column-width=proportional-column-width(1)/
  fo:table-body start-indent=0pt
fo:table-row
  fo:table-cell/
  fo:table-cell
fo:table
  fo:table-body start-indent=0pt
fo:table-rowfo:table-cellfo:block
  xsl:copy-of select=$table.content/
/fo:block/fo:table-cell/fo:table-row
  /fo:table-body
/fo:table
  /fo:table-cell
  fo:table-cell/
/fo:table-row
  /fo:table-body
/fo:table
  /xsl:template

If I set the colwidths to 0.5cm instead of 0.5* etc the table is
centered correctly.  It appears that the proportional widths from FO and
CALS are interfering with each other.

Does anyone know a way around this problem?

Ron
--
Ron Catterall Ph.D. D.Sc.
r...@catterall.net
http://catterall.net








?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE article
article xml:id=ARTICLE xmlns=http://docbook.org/ns/docbook; version=5.0 
xml:lang=EN

infotitleTitle of article/title/info
sect1 xml:id=SECT1 xmlns=http://docbook.org/ns/docbook; version=5.0 
xml:lang=EN

   infotitleSECT1 TITLE/title/info
   sect2 xml:id=SECT2 xmlns=http://docbook.org/ns/docbook; version=5.0 
xml:lang=EN

   infotitleSECT2 TITLE/title/info
   ?dbfo-need height=5.5in ?
   table frame=all xml:id=ID colsep=1 rowsep=1