issue-#163 Adding 'Decimal' Tabs to Rulers
Re: issue-#146 TextRulers docu improvements
We can life with this problem and ignore it.
Well, an ugly wrap around is to write a comma (or decimal point) at the end of the first number as we do by real numbers.
Robert suggest another solution, but than we get a lot of new different kinds of tab stops.
Let us implement my rules and get some experience with it. One more kind of tab stop is enough.
- Helmut
Well, an ugly wrap around is to write a comma (or decimal point) at the end of the first number as we do by real numbers.
Robert suggest another solution, but than we get a lot of new different kinds of tab stops.
Let us implement my rules and get some experience with it. One more kind of tab stop is enough.
- Helmut
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#146 TextRulers docu improvements
Formatted as CP literals 123.456 means 123456 and 123.456,78 means 123456.78.
The "." is used for grouping 3 digits, the "," is the radix character (in German).
With the proposed rule it would be formatted as
It is interesting that OpenOffice (and also WordPerfect) treats it differently than MS Word.
In OpenOffice you can select any character as the radix character while in Word
it is always the global user's setting. I was asking myself if there is an explanation for this
"strange" behavior of Word.
My conclusion is that Word is optimized towards program generated data.
If you have a Word macro that fills in the data in a Word document that macro typically localizes the formatting
of numbers and the 'program' then works in any region. The 'input' is portable not the
'output'. This behavior cannot be achieved with Openoffice, I think.
Texts can be program generated in BlackBox too.
For example, I have a report generator for BlackBox but it is hard-coded to use german formatting only.
Currently there is no portable way to get the user's setting, I think, and there was no need so far to extend that.
But it is a limitation with respect to supporting localization.
(I certainly don't want to make it more complicated than required but I am trying to understand the
problems involved.)
For the implementation it should also be considered how decimal tabs can be converted to RTF and HTML.
Another issue is if the triangle+underline for a tab in a ruler shouldn't better be replaced by the
more usual symbols L, inverted T, etc.
And finally a question: in which case is the ":" required as the radix character?
- Josef
The "." is used for grouping 3 digits, the "," is the radix character (in German).
With the proposed rule it would be formatted as
Code: Select all
123.456
123.456,78
In OpenOffice you can select any character as the radix character while in Word
it is always the global user's setting. I was asking myself if there is an explanation for this
"strange" behavior of Word.
My conclusion is that Word is optimized towards program generated data.
If you have a Word macro that fills in the data in a Word document that macro typically localizes the formatting
of numbers and the 'program' then works in any region. The 'input' is portable not the
'output'. This behavior cannot be achieved with Openoffice, I think.
Texts can be program generated in BlackBox too.
For example, I have a report generator for BlackBox but it is hard-coded to use german formatting only.
Currently there is no portable way to get the user's setting, I think, and there was no need so far to extend that.
But it is a limitation with respect to supporting localization.
(I certainly don't want to make it more complicated than required but I am trying to understand the
problems involved.)
For the implementation it should also be considered how decimal tabs can be converted to RTF and HTML.
Another issue is if the triangle+underline for a tab in a ruler shouldn't better be replaced by the
more usual symbols L, inverted T, etc.
And finally a question: in which case is the ":" required as the radix character?
- Josef
Re: issue-#146 TextRulers docu improvements
I have no idea why I put it in; I can't ever remenber using it. But maybe it is useful for times?Josef Templ wrote:And finally a question: in which case is the ":" required as the radix character?
Once we decide what behaviour we want, the changes to my code to implement that should be relatively easy.
But I am making no progress on the two major 'bugs'.
1 - If a text ends with a decimal tabbed field (no end-of-line) it is not correctly positioned. I think this should be simple to fix, but I can't find the solution, which is frustrating. And the symptoms are mildly annoying, even though I have lived with them for years.
2 - Fields with '-' signs (ASCII Hyphen 2DX) are mishandled, because the Setter treats this specially as a possible line-break opportunity. I have no idea how to address this issue, which is a major problem for most people. It is not a problem for me as I prefer to use '−' (Unicode minus 2212X), and that can be handled easily. (In most fonts it looks much nicer.)
Re: issue-#146 TextRulers docu improvements
what is the "decimal point tabs"? i have no idea about it. can anyone explain it to me? with a small example is welcome.Zinn wrote:Is it possible to add decimal point tabs to TextRulers? How to do it? How much work is it?
- Helmut
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#146 TextRulers docu improvements
luowy, please look into Word or OpenOffice.luowy wrote:what is the "decimal point tabs"? i have no idea about it. can anyone explain it to me? with a small example is welcome.Zinn wrote:Is it possible to add decimal point tabs to TextRulers? How to do it? How much work is it?
- Helmut
Set a tab stop in the ruler and double click on it.
You will see a window popping up that offers several tabulatur settings: left, right, center, and "decimal".
A decimal tab is aligned at the radix character of a number, if it has one, typically the "." in an english region and the "," in german.
- Josef
Re: issue-#146 TextRulers docu improvements
See the third column below.luowy wrote:what is the "decimal point tabs"?
Re: issue-#146 TextRulers docu improvements
thanks,I got it. now, I can understand what the problem is.
Re: issue-#146 TextRulers docu improvements
a small fixup, @ TextSetters.GatherStringRobert wrote: But I am making no progress on the two major 'bugs'.
1 - If a text ends with a decimal tabbed field (no end-of-line) it is not correctly positioned. I think this should be simple to fix, but I can't find the solution, which is frustrating. And the symptoms are mildly annoying, even though I have lived with them for years.
Code: Select all
....
rd.string[i] := 0X; rd.setterOpts := {wordJoin};
IF rd.blockIsTail THEN rd.zone := '' END;
rd.blockIsTail := (ch = tab) OR (ch = line) (*>>*)OR(ch=0X)(*<<*);
It seems to work. I not test a lot.
issue-#163 Adding 'Decimal' Tabs to Rulers
I am moving the discussion on this topic from the Resolved topic "TextRulers docu improvements".
Re: issue-#146 TextRulers docu improvements
Brilliant - I'm sure that is what is needed here.luowy wrote:a small fixupRobert wrote:I think this should be simple to fix, but I can't find the solution ...Code: Select all
... OR(ch=0X);
I tried all kinds of things, such as looking at Reader.eot and Reader.r.eot, but missed the obvious (well, obvious in hindsight).