OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Function ANCHOR() instead of "Number:Reserve-Space element"


Dear ODF TC Members,

while reading the "Number:Reserve-Space element"-proposal (see 
http://wiki.oasis-open.org/office/number%3Areserve-space_element) I came 
up with a better idea. But first I need to point to some limitations of 
the current strategy.

Often when I prepare tabular data, I would like to have the numbers 
aligned. This is easy if the numbers have the same format and are of the 
same size. But this is not always the case. More specifically, I have 
sometimes textual information containing numbers and I wish to have 
these aligned along the numbers.

Consider a table consisting of statistical summaries:
      Mean (SD)
X1:   12.3 ( 1.68)
X2:    0.4 ( 0.77)
X3:  256.0 (77.10)

     Median (IQR)
M1:   10.5 (5 - 12)
M2:    3.6 (1 -  6)
...

I would like to have them aligned along some defined points. Reserving 
space is however an ugly and non-flexible workaround. It is a low-level 
hack, but not really a solution. Here is an idea how I would do it.

1.) NUMBER FORMATTING
=====================
When we have only numbers, the user shall be able to include in the 
number format a specific tab-marker which specifies where to anchor the 
number. Lets say this anchor is written as: <a: _ID_ > </a: _ID_ >
#,##0<a:1>.</a:1>00

If we aligned the numbers left, we would get e.g.:
 1,425.25
-1,223.67
    66.59

We could have centered these numbers within a column, and they would 
still be properly aligned.

Another example:
   12.1
    0.27
  125.0

2.) FUNCTION ANCHOR()
====================
When creating more complex strings, e.g.:
=CONCATENATE(A1; ANCHOR(1); B1; ANCHOR(2); C1)

The strings would be aligned first by the first anchor, and then if 
possible by the second anchor (possible only if space characters were 
present between the 2 anchors).

ANCHOR() would insert an invisible tag that permits aligning 2 strings 
on the position of that tag.

format: ANCHOR (int number)
_number_ specifies the anchor level; first anchor is 1 and has 
precedence over subsequent anchors;


ADVANTAGES
===========
Advantages of this new method:
1.) It is possible to align more than one part of the number/string
2.) It is possible to align within a cell: left/center/right
3.) It is overall much more powerful and flexible

Sincerely,

Leonard

P.S. Please implement a shorthand for CONCATENATE() within ODF, e.g. 
CONCAT()


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]