You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Noel Golding <no...@spearreport.com> on 2002/10/24 16:11:38 UTC

what is allowed in a table-column column-width

I was wondering if anyone knew all the various options allowable in
column-width.
I know this sounds very lazy, but I have checked on ZVON.org and although it
is great at showing attributes, it does not explain what is an allowable
argument.  If anyone knows of a different resource, or can explain how I am
using this one incorrectly it would be greatly appreciated.

Anyway, the question I need answered is will column-width use pt as a size?
meaning if I had 12 characters at 12pt would it be fair to say that I could
size my column-width="144pt"?

I am posting here as well as to the XSL list because the second part is if
XSL:FO does allow this, is it implemented in FOP?

Thanks
Noel


Re: what is allowed in a table-column column-width

Posted by Oleg Tkachenko <ol...@multiconn.com>.
Victor Mote wrote:

> A
> somewhat more readable resource would be the O'Reilly book "XSL-FO" by Dave
> Pawson. It is available from Amazon and many other places.

Even online at http://www.dpawson.co.uk/xsl/sect3/bk/index.html :)

-- 
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


Re: what is allowed in a table-column column-width

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Matthew Van Horn wrote:
> All of them? I remember having problems with one of my docs, but maybe I 
> was using a proportional-column-width function and not percentages...

Percentages are not recognized for column widths (they work
in most other places). Use proportional-column-width() instead.
Look up details in the spec or search the list archives for
some examples.

J.Pietschmann




RE: what is allowed in a table-column column-width

Posted by Victor Mote <vi...@outfitr.com>.
Matthew Van Horn wrote:

> > Noel Golding wrote:
> >
> >> meaning if I had 12 characters at 12pt would it be fair to say
> >> that I could
> >> size my column-width="144pt"?
> >
> > Point size refers to the height of the characters, not the width.
> em refers to the width (of a capital M), so you could conceivably use
> that.

True enough, but all it does is scale the problem by a factor equal to the
point size (the size of an em being equal to the point size, in XSL-FO
anyway). The syntax simply becomes column-width="12em" which is identical to
column-width="144pt" in his example of a 12-point font. This still ignores
the fact that the width of the character + letter spacing is not necessarily
equal to anything that is proportional to the font size. For any standard
proportional font, 12 "M" characters are going to take much more space than
12 "." characters.

> >> I am posting here as well as to the XSL list because the second part
> >> is if
> >> XSL:FO does allow this, is it implemented in FOP?
> >
> > Yes, FOP implements this.
> All of them? I remember having problems with one of my docs, but maybe
> I was using a proportional-column-width function and not percentages...

According to the FOP doc, column-width is fully supported. I haven't
personally tried them all, but I would be surprised to find any problem.
Percentages can be computed from the parent, and em is computed from the
font size. Except for pixel (which ends up being more-or-less hard-coded),
all of the others are straightforward conversions. If you have an example
where it fails, post it, and I'll see if I can find out what is going on. If
by proportional-column-width you mean the table-layout="auto" issue, that is
a different story. Joerg Pietschmann posted a message 4 1/2 days ago
explaining why that is a non-trivial task.

Victor Mote


Re: what is allowed in a table-column column-width

Posted by Matthew Van Horn <ho...@accesstech.com>.
On Friday, October 25, 2002, at 02:58 AM, Victor Mote wrote:

> Noel Golding wrote:
>
>> meaning if I had 12 characters at 12pt would it be fair to say
>> that I could
>> size my column-width="144pt"?
>
> Point size refers to the height of the characters, not the width.
em refers to the width (of a capital M), so you could conceivably use 
that.
>
>
>> I am posting here as well as to the XSL list because the second part 
>> is if
>> XSL:FO does allow this, is it implemented in FOP?
>
> Yes, FOP implements this.
All of them? I remember having problems with one of my docs, but maybe 
I was using a proportional-column-width function and not percentages...


RE: what is allowed in a table-column column-width

Posted by Victor Mote <vi...@outfitr.com>.
Noel Golding wrote:

> I was wondering if anyone knew all the various options allowable in
> column-width.

According to the spec, column-width supports <length> | <percentage>.
<length> can be units of cm, mm, in, pt, pc, px, em.

> argument.  If anyone knows of a different resource, or can
> explain how I am
> using this one incorrectly it would be greatly appreciated.

The spec itself is by definition the authoritative source. The pdf is
available at http://www.w3.org/TR/2001/REC-xsl-20011015/xslspecRX.pdf. A
somewhat more readable resource would be the O'Reilly book "XSL-FO" by Dave
Pawson. It is available from Amazon and many other places.

You didn't show us what evidence you have that makes you think you are using
it incorrectly, so there is no way to answer this.

> Anyway, the question I need answered is will column-width use pt
> as a size?

Yes, it should.

> meaning if I had 12 characters at 12pt would it be fair to say
> that I could
> size my column-width="144pt"?

Point size refers to the height of the characters, not the width. Most
characters in most fonts suitable for text in a book will be narrower than
their point size. However, you haven't allowed for space between letters.
These two things tend to offset each other. If your column is too narrow or
too wide, I recommend trial and error to get it where you want it (at least
for current FOP implementations).

> I am posting here as well as to the XSL list because the second part is if
> XSL:FO does allow this, is it implemented in FOP?

Yes, FOP implements this.

I hope this helps.

Victor Mote