[xep-support] RE: Calculate mid-point of column using inherited-property-value

Alexei Gagarinov agagarinov at renderx.com
Fri Sep 7 02:26:57 PDT 2007


Angela,

> What technique do you suggest for right-aligning, after aligning on the
> decimal?  I assume I would want the third inner cell to be limited to
> the width of the value with the maximum precision (and largest
> font-size), but I haven't had luck with that, either.

> +-------------+
> |    My Column|
> +-------------+ 
> |     123.123 |
> |       1.1234|
> |   12345.1   |
> |      12.12  |
> +-------------+ 

You need to know the maximum width of fractional part of all numbers.

A general technique is the following:
1) Take a digit width from a font metrics. This width is the same for
all digits in the most of fonts.
Note: 0.6 em is a good approximation for any font.
2) Calculate the maximum width: max(number of digits * font-size) *
the digit width

I've just sent you an XSL-FO example with more detailed explanations.

> Thanks!
> Angela 

Best regards,
  Alexei Gagarinov
RenderX
---
www.renderx.net




-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html



More information about the Xep-support mailing list