ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* units and decimal separators
@ 2003-05-11 15:19 Sebastian Rooks
  2003-05-11 17:36 ` Willi Egger
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Sebastian Rooks @ 2003-05-11 15:19 UTC (permalink / raw)


Hi ConTeXters,
How can I get ConteXt to typeset numbers as it should be done in french 
in which we use a comma and not a point to separate units and decimals ?
That is when I write \mathematics{5,3} I want to have 5,3 and not 5, 3 
(with a small space between the comma and the 3), as it is when I use 
the english separator, a point.
Cheers,

 Seb.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: units and decimal separators
  2003-05-11 15:19 units and decimal separators Sebastian Rooks
@ 2003-05-11 17:36 ` Willi Egger
  2003-05-11 17:55 ` Eckhart Guthöhrlein
  2003-05-11 20:41 ` Emil Hedevang Lohse
  2 siblings, 0 replies; 16+ messages in thread
From: Willi Egger @ 2003-05-11 17:36 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 191 bytes --]

Hi Sebastian,

Ii can not explain why one gets the strange spacing. However there is a
command \Digits, where you get precisely what you want. Please have a look
at the enclosed code.

Willi

[-- Attachment #2: test.tex --]
[-- Type: application/octet-stream, Size: 334 bytes --]

\setupoutput[pdftex]

\mainlanguage[fr]

\language[fr]

\starttext

\math{5.3} \quad This is \type{\math} \par
\math{5,3} \quad This is \type{\math} \par
$5.3$      \quad This is \type{$} \par
$5,3$      \quad This is \type{$} \par

\Digits{5.3}  \quad This is \type{\Digits} \par
\Digits{5,3}  \quad This is \type{\Digits}
\stoptext

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: units and decimal separators
  2003-05-11 15:19 units and decimal separators Sebastian Rooks
  2003-05-11 17:36 ` Willi Egger
@ 2003-05-11 17:55 ` Eckhart Guthöhrlein
  2003-05-11 21:31   ` Sebastian Rooks
  2003-05-11 20:41 ` Emil Hedevang Lohse
  2 siblings, 1 reply; 16+ messages in thread
From: Eckhart Guthöhrlein @ 2003-05-11 17:55 UTC (permalink / raw)


On Sun, May 11, 2003 at 05:19:13PM +0200, Sebastian Rooks wrote:
> How can I get ConteXt to typeset numbers as it should be done in french 
> in which we use a comma and not a point to separate units and decimals ?
> That is when I write \mathematics{5,3} I want to have 5,3 and not 5, 3 
> (with a small space between the comma and the 3), as it is when I use 
> the english separator, a point.

Try \enablemathpunctuation and then write 5,3 for a decimal sign
and f(x, y) if the comma is used as a list seperator.
Search the list archive for subject "math punctuation", Hans
added this some time ago. If you can't find it, I can forward
the relevant messages to you.

-- 
Eckhart

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: units and decimal separators
  2003-05-11 15:19 units and decimal separators Sebastian Rooks
  2003-05-11 17:36 ` Willi Egger
  2003-05-11 17:55 ` Eckhart Guthöhrlein
@ 2003-05-11 20:41 ` Emil Hedevang Lohse
  2 siblings, 0 replies; 16+ messages in thread
From: Emil Hedevang Lohse @ 2003-05-11 20:41 UTC (permalink / raw)


Sebastian Rooks <sebastian.rooks@free.fr> writes:

> Hi ConTeXters, How can I get ConteXt to typeset numbers as it should
> be done in french in which we use a comma and not a point to
> separate units and decimals ?  That is when I write
> \mathematics{5,3} I want to have 5,3 and not 5, 3 (with a small
> space between the comma and the 3), as it is when I use the english
> separator, a point.  Cheers,

Normally TeX inserts som space after the comma so for example the
tuple $(a,b,c)$ will look right. To kill the space, just type

  3{,}5 

/Emil

-- 
Emil Hedevang Lohse <http://home.imf.au.dk/emil/> 

Alle spørgsmål er lige dumme. 
Og spørgsmålet "Kan ænder flyve?" er ikke dumt.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: units and decimal separators
  2003-05-11 17:55 ` Eckhart Guthöhrlein
@ 2003-05-11 21:31   ` Sebastian Rooks
  2003-05-11 21:39     ` Re[2]: " Giuseppe Bilotta
  0 siblings, 1 reply; 16+ messages in thread
From: Sebastian Rooks @ 2003-05-11 21:31 UTC (permalink / raw)


Thank you all of you for your answers, all of them works !
I think that I will go with \enablemathpunctuation, which seems to 
handle both the text and math cases without any added  special mark 
everywhere in the text.
Bye,

 Seb.

Eckhart Guthöhrlein wrote:

>On Sun, May 11, 2003 at 05:19:13PM +0200, Sebastian Rooks wrote:
>  
>
>>How can I get ConteXt to typeset numbers as it should be done in french 
>>in which we use a comma and not a point to separate units and decimals ?
>>That is when I write \mathematics{5,3} I want to have 5,3 and not 5, 3 
>>(with a small space between the comma and the 3), as it is when I use 
>>the english separator, a point.
>>    
>>
>
>Try \enablemathpunctuation and then write 5,3 for a decimal sign
>and f(x, y) if the comma is used as a list seperator.
>Search the list archive for subject "math punctuation", Hans
>added this some time ago. If you can't find it, I can forward
>the relevant messages to you.
>
>  
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re[2]: units and decimal separators
  2003-05-11 21:31   ` Sebastian Rooks
@ 2003-05-11 21:39     ` Giuseppe Bilotta
  2003-05-12 15:57       ` Hans Hagen
  0 siblings, 1 reply; 16+ messages in thread
From: Giuseppe Bilotta @ 2003-05-11 21:39 UTC (permalink / raw)


Sunday, May 11, 2003 Sebastian Rooks wrote:

SR> Thank you all of you for your answers, all of them works !
SR> I think that I will go with \enablemathpunctuation, which seems to
SR> handle both the text and math cases without any added  special mark
SR> everywhere in the text.

I think that setting the language should also set these kind of
options. Hans?

-- 
Giuseppe "Oblomov" Bilotta

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re[2]: units and decimal separators
  2003-05-11 21:39     ` Re[2]: " Giuseppe Bilotta
@ 2003-05-12 15:57       ` Hans Hagen
  2003-05-12 23:02         ` Re[3]: " Giuseppe Bilotta
  2003-05-15 10:15         ` Eckhart Guthöhrlein
  0 siblings, 2 replies; 16+ messages in thread
From: Hans Hagen @ 2003-05-12 15:57 UTC (permalink / raw)


At 23:39 11/05/2003 +0200, you wrote:
>Sunday, May 11, 2003 Sebastian Rooks wrote:
>
>SR> Thank you all of you for your answers, all of them works !
>SR> I think that I will go with \enablemathpunctuation, which seems to
>SR> handle both the text and math cases without any added  special mark
>SR> everywhere in the text.
>
>I think that setting the language should also set these kind of
>options. Hans?

i dunno in what respect math depends on a language but it would be fun to 
have language dependent math; before doing that some discussion is needed

Hans

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re[3]: units and decimal separators
  2003-05-12 15:57       ` Hans Hagen
@ 2003-05-12 23:02         ` Giuseppe Bilotta
  2003-05-14 22:05           ` Sebastian Rooks
  2003-05-15 10:15         ` Eckhart Guthöhrlein
  1 sibling, 1 reply; 16+ messages in thread
From: Giuseppe Bilotta @ 2003-05-12 23:02 UTC (permalink / raw)


Monday, May 12, 2003 Hans Hagen wrote:

HH> At 23:39 11/05/2003 +0200, you wrote:
>>Sunday, May 11, 2003 Sebastian Rooks wrote:
>>
>>SR> Thank you all of you for your answers, all of them works !
>>SR> I think that I will go with \enablemathpunctuation, which seems to
>>SR> handle both the text and math cases without any added  special mark
>>SR> everywhere in the text.
>>
>>I think that setting the language should also set these kind of
>>options. Hans?

HH> i dunno in what respect math depends on a language but it would be fun to
HH> have language dependent math; before doing that some discussion is needed

Right :)

As far as I know, most European languages (that is, except for
English) use the dot to separate thousands and the comma to
separate integer part from decimals. So setting this math
option for European (non-Anglo-saxon) languages *would* make
sense. It should probably fit together with the lang-mat module
I've been sparsely working at, where common function names
(like sin, cos, tg) are given "local" names (like: sen, cos,
tan in Italian).

-- 
Giuseppe "Oblomov" Bilotta

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: units and decimal separators
  2003-05-12 23:02         ` Re[3]: " Giuseppe Bilotta
@ 2003-05-14 22:05           ` Sebastian Rooks
  2003-05-14 22:17             ` Re[2]: " Giuseppe Bilotta
  0 siblings, 1 reply; 16+ messages in thread
From: Sebastian Rooks @ 2003-05-14 22:05 UTC (permalink / raw)


>
>
>As far as I know, most European languages (that is, except for
>English) use the dot to separate thousands and the comma to
>separate integer part from decimals.
>
In french thousand are separated by a space, and not by a dot.

> So setting this math
>option for European (non-Anglo-saxon) languages *would* make
>sense. It should probably fit together with the lang-mat module
>I've been sparsely working at, where common function names
>(like sin, cos, tg) are given "local" names (like: sen, cos,
>tan in Italian).
>
That would be great ! (and in case of need, frenchies are using sin, cos 
and tan ;-) )

  Seb.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re[2]: units and decimal separators
  2003-05-14 22:05           ` Sebastian Rooks
@ 2003-05-14 22:17             ` Giuseppe Bilotta
  2003-05-15  6:46               ` Henning Hraban Ramm
                                 ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Giuseppe Bilotta @ 2003-05-14 22:17 UTC (permalink / raw)


Thursday, May 15, 2003 Sebastian Rooks wrote:

>>As far as I know, most European languages (that is, except for
>>English) use the dot to separate thousands and the comma to
>>separate integer part from decimals.

SR> In french thousand are separated by a space, and not by a dot.

Oh. Didn't know that :) (Actually I've seen a thin space used
in some Italian books, too --and if you want my Very Personal
Opinion, it's more legible, except in the few cases where it
may generate confusion ...)

>> So setting this math
>>option for European (non-Anglo-saxon) languages *would* make
>>sense. It should probably fit together with the lang-mat
>>module I've been sparsely working at, where common function
>>names (like sin, cos, tg) are given "local" names (like: sen,
>>cos, tan in Italian).

SR> That would be great ! (and in case of need, frenchies are
SR> using sin, cos and tan ;-) )

Good to know :)

-- 
Giuseppe "Oblomov" Bilotta

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: units and decimal separators
  2003-05-14 22:17             ` Re[2]: " Giuseppe Bilotta
@ 2003-05-15  6:46               ` Henning Hraban Ramm
  2003-05-15  7:56               ` Re[2]: " Mari Voipio
  2003-05-15  8:23               ` Patrick Gundlach
  2 siblings, 0 replies; 16+ messages in thread
From: Henning Hraban Ramm @ 2003-05-15  6:46 UTC (permalink / raw)


>>> As far as I know, most European languages (that is, except for
>>> English) use the dot to separate thousands and the comma to
>>> separate integer part from decimals.
> SR> In french thousand are separated by a space, and not by a dot.
> Oh. Didn't know that :) (Actually I've seen a thin space used
> in some Italian books, too --and if you want my Very Personal
> Opinion, it's more legible, except in the few cases where it
> may generate confusion ...)

I think the dot is only a typewriter workaround, it should always
be a "spatium" (small space, about 1/4 of font size).


> SR> That would be great ! (and in case of need, frenchies are
> SR> using sin, cos and tan ;-) )

germans also.

Grüßlis vom Hraban!
-- 
http://www.fiee.net/texnique/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re[2]: units and decimal separators
  2003-05-14 22:17             ` Re[2]: " Giuseppe Bilotta
  2003-05-15  6:46               ` Henning Hraban Ramm
@ 2003-05-15  7:56               ` Mari Voipio
  2003-05-15  8:23               ` Patrick Gundlach
  2 siblings, 0 replies; 16+ messages in thread
From: Mari Voipio @ 2003-05-15  7:56 UTC (permalink / raw)


On Thu, 15 May 2003, Giuseppe Bilotta wrote:

> SR> In french thousand are separated by a space, and not by a dot.
>
> Oh. Didn't know that :)

More details you didn't know: Finnish separates thousands with a space (in
ConTeXt I'd use "\," to make this space, I guess - haven't written
anything real in Finnish yet) and uses comma for decimals.
The recommendation for Swedish is exactly the same: groups of three and a
decimal comma. i.e.
	1 000 000 (one million)
	6 000,3 (six thousand and three tenths)

Use in Norwegian is not so clear, but space seems to be the recommended
option.


> SR> That would be great ! (and in case of need, frenchies are
> SR> using sin, cos and tan ;-) )
>
> Good to know :)

Finnish uses these "standard" versions, too, and as far as I know, so do
all the Scandinavian languages. I haven't actively studied math in other
than my mother tongue...


My ten eurocents,
		 Mari from Finland

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Re[2]: units and decimal separators
  2003-05-14 22:17             ` Re[2]: " Giuseppe Bilotta
  2003-05-15  6:46               ` Henning Hraban Ramm
  2003-05-15  7:56               ` Re[2]: " Mari Voipio
@ 2003-05-15  8:23               ` Patrick Gundlach
  2003-05-15  9:01                 ` Maarten Sneep
  2 siblings, 1 reply; 16+ messages in thread
From: Patrick Gundlach @ 2003-05-15  8:23 UTC (permalink / raw)


Hi,

> SR> In french thousand are separated by a space, and not by a dot.
>

Same in Germany. Don't know about the other german speaking countries.

Every operating system I know has a mapping "Location <--> some 
settings" where "some settings" is language, decimal seperator, 
thousands seperator, date format, input encoding :) (keyboard) ...

So imo this won't be a bad idea to integrate into ConTeXt.


Patrick

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Re[2]: units and decimal separators
  2003-05-15  8:23               ` Patrick Gundlach
@ 2003-05-15  9:01                 ` Maarten Sneep
  2003-05-15  9:24                   ` Patrick Gundlach
  0 siblings, 1 reply; 16+ messages in thread
From: Maarten Sneep @ 2003-05-15  9:01 UTC (permalink / raw)



On donderdag, mei 15, 2003, at 10:23 Europe/Amsterdam, Patrick Gundlach 
wrote:

> Hi,
>
>> SR> In french thousand are separated by a space, and not by a dot.
>>
>
> Same in Germany. Don't know about the other german speaking countries.
>
> Every operating system I know has a mapping "Location <--> some 
> settings" where "some settings" is language, decimal seperator, 
> thousands seperator, date format, input encoding :) (keyboard) ...
>
> So imo this won't be a bad idea to integrate into ConTeXt.

and this is very system dependent. Integrating would be hard.

Besides, I never use the standard dutch settings, since they are 
confusing: comma as the decimal separator, a period for the thousands. 
I usually do not separate the thousands at all (or with a thin space) 
and use comma or period for the decimals.

Maarten

It isn't true unless it makes you laugh, but you don't understand it 
until it makes you cry.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Re[2]: units and decimal separators
  2003-05-15  9:01                 ` Maarten Sneep
@ 2003-05-15  9:24                   ` Patrick Gundlach
  0 siblings, 0 replies; 16+ messages in thread
From: Patrick Gundlach @ 2003-05-15  9:24 UTC (permalink / raw)


Hello out there,

>> Every operating system I know has a mapping "Location <--> some 
>> settings" where "some settings" is language, decimal seperator, 
>> thousands seperator, date format, input encoding :) (keyboard) ...
>>
>> So imo this won't be a bad idea to integrate into ConTeXt.
>
> and this is very system dependent. Integrating would be hard.

It looks as if I am confusing all people including myself: I just wanted 
to express that it is not a bad idea to select the decimal seperator 
(and other things) when saying \mainlanguage[somelang]. I don't think of 
getting the system preferences.

Patrick

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: units and decimal separators
  2003-05-12 15:57       ` Hans Hagen
  2003-05-12 23:02         ` Re[3]: " Giuseppe Bilotta
@ 2003-05-15 10:15         ` Eckhart Guthöhrlein
  1 sibling, 0 replies; 16+ messages in thread
From: Eckhart Guthöhrlein @ 2003-05-15 10:15 UTC (permalink / raw)


On Mon, May 12, 2003 at 05:57:41PM +0200, Hans Hagen wrote:
> At 23:39 11/05/2003 +0200, you wrote:
> >Sunday, May 11, 2003 Sebastian Rooks wrote:
> >
> >SR> Thank you all of you for your answers, all of them works !
> >SR> I think that I will go with \enablemathpunctuation, which seems to
> >SR> handle both the text and math cases without any added  special mark
> >SR> everywhere in the text.
> >
> >I think that setting the language should also set these kind of
> >options. Hans?
> 
> i dunno in what respect math depends on a language but it would be fun to 
> have language dependent math; before doing that some discussion is needed

As far as I have observed, the use of a comma is still preferred
in Germany as the decimal sign.
If any, a small space is used in German as a thousands seperator;
I haven't seen a point for this purpose for a long time.
This complies with international standards, see below.
Of course I have to admit that English texts don't care about
standards and use the point as a decimal sign, sometimes even
the comma as a decimal seperator - ugh! O.k., this will probably
not change.
(Hopefully we can at least get rid of gallons and inches some day.)


Excerpt from ISO 31-0
...

3.3.1

Numbers should generally be printed in roman (upright) type.

To facilitate the reading of numbers with many digits, these may
be seperated into suitable groups, preferably of three, counting
from the decimal sign towards the left and the right; the groups
should be seperated by a small space, and never by a comma or a
point, nor by any other means.

3.3.2 Decimal sign

The decimal sign is a comma on the line.

...


-- 
Eckhart

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2003-05-15 10:15 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-11 15:19 units and decimal separators Sebastian Rooks
2003-05-11 17:36 ` Willi Egger
2003-05-11 17:55 ` Eckhart Guthöhrlein
2003-05-11 21:31   ` Sebastian Rooks
2003-05-11 21:39     ` Re[2]: " Giuseppe Bilotta
2003-05-12 15:57       ` Hans Hagen
2003-05-12 23:02         ` Re[3]: " Giuseppe Bilotta
2003-05-14 22:05           ` Sebastian Rooks
2003-05-14 22:17             ` Re[2]: " Giuseppe Bilotta
2003-05-15  6:46               ` Henning Hraban Ramm
2003-05-15  7:56               ` Re[2]: " Mari Voipio
2003-05-15  8:23               ` Patrick Gundlach
2003-05-15  9:01                 ` Maarten Sneep
2003-05-15  9:24                   ` Patrick Gundlach
2003-05-15 10:15         ` Eckhart Guthöhrlein
2003-05-11 20:41 ` Emil Hedevang Lohse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).