ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: \unit and Hertz, lux, and degrees/minutes/seconds
       [not found] <mailman.0.1321614002.10878.ntg-context@ntg.nl>
@ 2011-11-21  1:00 ` Robin Kirkham
  2011-11-21  9:52   ` Hans Hagen
  0 siblings, 1 reply; 19+ messages in thread
From: Robin Kirkham @ 2011-11-21  1:00 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 2033 bytes --]

On 18/11/2011, at 10:00 PM, Pontus Lurcock <pont@talvi.net> wrote:

> On Fri 18 Nov 2011, Hans Hagen wrote:
>> so, best is that those asking for it come up with a list of issues:
>> which symbols need this option, is it language related or whatever,
>> so that i can do them all at once. We can already have different
>> mapping sets so spacing could be part of that.
> 
> I don't personally have a need for units in the foreseeable future (I
> was just nitpicking with Robin about spacing) so feel free to ignore
> any of my suggestions, but I think the summary so far would be:
> 
> 1. Spacing for almost all SI units should be the same and doesn't
>   need special cases.
> 
> 2. Geographical degrees/minutes/seconds should have no spaces.
> 
> 3. Spacing for degrees temperature varies according to different style 
>   guides -- both before and after the ° -- so ideally it would be
>   possible to set these independently of the rest of the units.
> 
> For my own part I would add:
> 
> 4. SI unit abbreviations are mostly capital letters, and look (to me)
>   strange with old-style figures. I have seen books which used 
>   old-style figures for page numbers, years, etc. but switched to
>   lining figures when a unit was involved; this is also what I did
>   in my thesis. So I think it would be useful to allow an automatic
>   switch to lining figures to be configured when typesetting a unit.
> 
> Pont

I agree on points 1 and 2 (although it seems arcminute and arcsecond are
not implemented anyway). Point 3, yes, but I'm dubious about space after °
for the temperature units °C or °F as it breaks the rule about unit
ambiguity ("° C" is a degree-Coulomb -- although I can't image a physical
situation that would need such a unit). Point 4 is a bit beyond the scope
of the SI units scheme but sounds like a potential need.

Over the weekend I've discovered a couple more problems with \unit so I'll
make up some test cases and desired output and post it in a few days.

Robin

[-- Attachment #1.2: Type: text/html, Size: 3535 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: \unit and Hertz, lux, and degrees/minutes/seconds
  2011-11-21  1:00 ` \unit and Hertz, lux, and degrees/minutes/seconds Robin Kirkham
@ 2011-11-21  9:52   ` Hans Hagen
  2011-11-24 12:36     ` Robin.Kirkham
  0 siblings, 1 reply; 19+ messages in thread
From: Hans Hagen @ 2011-11-21  9:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Robin Kirkham

On 21-11-2011 02:00, Robin Kirkham wrote:

> Over the weekend I've discovered a couple more problems with \unit so I'll
> make up some test cases and desired output and post it in a few days.

ok, I'll wait for that then


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: \unit and Hertz, lux, and degrees/minutes/seconds
  2011-11-21  9:52   ` Hans Hagen
@ 2011-11-24 12:36     ` Robin.Kirkham
  2011-11-24 12:58       ` Wolfgang Schuster
                         ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Robin.Kirkham @ 2011-11-24 12:36 UTC (permalink / raw)
  To: pragma, ntg-context

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

On Monday, 21 November 2011 20:52, Hans Hagen wrote:

>> Over the weekend I've discovered a couple more problems with \unit so I'll
>> make up some test cases and desired output and post it in a few days.
>
> ok, I'll wait for that then

Hans, all,

I attach a document (source and PDF) with some \unit test cases that don't currently work
(even with the most recent beta). It also has a number of suggestions for improvement.
Some of this should be construed as personal opinion, but hopefully it isn't too controversial.

Best,

Robin


[-- Attachment #2: units.tex --]
[-- Type: application/x-tex, Size: 5829 bytes --]

[-- Attachment #3: units.pdf --]
[-- Type: application/pdf, Size: 42074 bytes --]

[-- Attachment #4: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: \unit and Hertz, lux, and degrees/minutes/seconds
  2011-11-24 12:36     ` Robin.Kirkham
@ 2011-11-24 12:58       ` Wolfgang Schuster
  2011-11-25  9:29         ` Ian Lawrence
  2011-11-24 13:42       ` Romain Diss
  2011-11-25  8:29       ` Hans Hagen
  2 siblings, 1 reply; 19+ messages in thread
From: Wolfgang Schuster @ 2011-11-24 12:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 24.11.2011 um 13:36 schrieb <Robin.Kirkham@csiro.au> <Robin.Kirkham@csiro.au>:

> On Monday, 21 November 2011 20:52, Hans Hagen wrote:
> 
>>> Over the weekend I've discovered a couple more problems with \unit so I'll
>>> make up some test cases and desired output and post it in a few days.
>> 
>> ok, I'll wait for that then
> 
> Hans, all,
> 
> I attach a document (source and PDF) with some \unit test cases that don't currently work
> (even with the most recent beta). It also has a number of suggestions for improvement.
> Some of this should be construed as personal opinion, but hopefully it isn't too controversial.

Nice summary, you should write a My Way about units once this things are fixed.

A few comments from me:

    \type{1234}\tex{unit}\arg{m} should print equivalently to \tex{unit}\arg{1234m}
    and \tex{unit}\arg{1234 m}. (I have a lot of text that uses a \tex{unit}
    macro like that.)

Maybe it’s possible with MkIV to check if the text before the \unit command was
a number but of the number is part of the unit them put in the command, such
things are always tricky with TeX and it’s better to force users to use proper input.

    Within \type{phys-dim.lua} all the units and all the prefixes seem to have
    capitalised names; in fact, they should be all lowercase (even when they
    are named after some person). The exception is Celsius.

I think this is a feature because Hans saves also a lowercase version of all
keywords and you can use both as input.

    I wonder whether \tex{unit} should only parse and format units, and have
    another macro \tex{quan} or \tex{quantity} to handle number+unit combinations
    (obviously using \tex{digit} and \tex{unit}).

Please don’t suggest this, one of the nice features is that you don’t have
to care which command you need but it would be nice to drop the old
formatting options for \digits in the \unit command.

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: \unit and Hertz, lux, and degrees/minutes/seconds
  2011-11-24 12:36     ` Robin.Kirkham
  2011-11-24 12:58       ` Wolfgang Schuster
@ 2011-11-24 13:42       ` Romain Diss
  2011-11-24 20:18         ` Pontus Lurcock
  2011-11-25  8:29       ` Hans Hagen
  2 siblings, 1 reply; 19+ messages in thread
From: Romain Diss @ 2011-11-24 13:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Robin.Kirkham

Le jeudi 24 novembre 2011, Robin.Kirkham@csiro.au a écrit :
> I attach a document (source and PDF) with some \unit test cases that don't
> currently work (even with the most recent beta). It also has a number of
> suggestions for improvement. Some of this should be construed as personal
> opinion, but hopefully it isn't too controversial.
As Wolfgang said, it's a nice summary and I agree with most of the 
suggestions. However. this points out some conventions which are specific to 
certain languages:
- for example, in french, the percent symbol is preceded by a space.
- again in french, the liter symbol is lowercase l (althought the uppercase L 
is also temporarly accepted).

All the best.

-- 
Romain Diss
<romain.diss@yahoo.fr>
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: \unit and Hertz, lux, and degrees/minutes/seconds
  2011-11-24 13:42       ` Romain Diss
@ 2011-11-24 20:18         ` Pontus Lurcock
  2011-11-25  8:18           ` Hans Hagen
  0 siblings, 1 reply; 19+ messages in thread
From: Pontus Lurcock @ 2011-11-24 20:18 UTC (permalink / raw)
  To: ntg-context

On Thu 24 Nov 2011, Romain Diss wrote:

> - again in french, the liter symbol is lowercase l (althought the
> uppercase L is also temporarly accepted).

Not only in French, but in most of Europe, I think:
http://en.wikipedia.org/wiki/Litre#Symbol . Should probably be
explicitly configurable.

Pont
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: \unit and Hertz, lux, and degrees/minutes/seconds
  2011-11-24 20:18         ` Pontus Lurcock
@ 2011-11-25  8:18           ` Hans Hagen
  2011-11-25 13:54             ` Wolfgang Schuster
  0 siblings, 1 reply; 19+ messages in thread
From: Hans Hagen @ 2011-11-25  8:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Pontus Lurcock

On 24-11-2011 21:18, Pontus Lurcock wrote:
> On Thu 24 Nov 2011, Romain Diss wrote:
>
>> - again in french, the liter symbol is lowercase l (althought the
>> uppercase L is also temporarly accepted).
>
> Not only in French, but in most of Europe, I think:
> http://en.wikipedia.org/wiki/Litre#Symbol . Should probably be
> explicitly configurable.

there is already some basic mechanism fro that

\startluacode
     languages.data.labels.units.foo = {
         Liter = "l"
     }
     languages.data.labels.units.bar = {
         Liter = "L"
     }
\stopluacode

\starttext

\defineunits[lunit]            \lunit{10 l/s}\par
\defineunits[funit][label=foo] \funit{10 l/s}\par
\defineunits[bunit][label=bar] \bunit{10 l/s}\par

\stoptext




-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: \unit and Hertz, lux, and degrees/minutes/seconds
  2011-11-24 12:36     ` Robin.Kirkham
  2011-11-24 12:58       ` Wolfgang Schuster
  2011-11-24 13:42       ` Romain Diss
@ 2011-11-25  8:29       ` Hans Hagen
  2011-11-27 10:59         ` Robin.Kirkham
  2 siblings, 1 reply; 19+ messages in thread
From: Hans Hagen @ 2011-11-25  8:29 UTC (permalink / raw)
  To: Robin.Kirkham; +Cc: ntg-context

On 24-11-2011 13:36, Robin.Kirkham@csiro.au wrote:
> On Monday, 21 November 2011 20:52, Hans Hagen wrote:
>
>>> Over the weekend I've discovered a couple more problems with \unit so I'll
>>> make up some test cases and desired output and post it in a few days.
>>
>> ok, I'll wait for that then
>
> Hans, all,
>
> I attach a document (source and PDF) with some \unit test cases that don't currently work
> (even with the most recent beta). It also has a number of suggestions for improvement.
> Some of this should be construed as personal opinion, but hopefully it isn't too controversial.

I uploaded a new beta.

- degrees fixed (special category as it can be standalone or in 
combination).

- per fixed

- Hz, dB (actually deci + bel so megabel also works), lx, permille, t, 
k, Da added

- eV, m, \mu m, root added

- ad 1: should normally work out ok

- ad 2: no looking back (would demand an extra correction pass 
elsewhere, maybe some day)

- ad 3: see remark WS

- ad 4: see remark WS (also, the existing module was starting point)

- ad 5: depends on what users want

- ad 6: see remark WS

- ad 7: the old modules had that, maybe this one will have it too; in 
that case we need a list of descriptions too (for different languages) 
for units that make sense to be mentioned in such a list

- ad 8: manipulating the input this way is somewhat beyond the purpose 
of a typesetting system

- ad 9: much will be configureable; see mkiv file for an example of 
defining extra units (\registerunit [units] [point=pt, basepoint=bp]);

- I myself am not going to look in all kind of other tex stuff that lays 
around as it's up to users/usage what is added, given that it fits into 
the model of context; we have the old units modules as starting point


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: \unit and Hertz, lux, and degrees/minutes/seconds
  2011-11-24 12:58       ` Wolfgang Schuster
@ 2011-11-25  9:29         ` Ian Lawrence
  2011-11-25 10:00           ` Hans Hagen
  0 siblings, 1 reply; 19+ messages in thread
From: Ian Lawrence @ 2011-11-25  9:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> 
> Maybe it’s possible with MkIV to check if the text before the \unit command was
> a number but of the number is part of the unit them put in the command, such
> things are always tricky with TeX and it’s better to force users to use proper input.
> 
>    Within \type{phys-dim.lua} all the units and all the prefixes seem to have
>    capitalised names; in fact, they should be all lowercase (even when they
>    are named after some person). The exception is Celsius.

I suggested a list to Hans some time ago, so more than one person has this opinion...
> 
> I think this is a feature because Hans saves also a lowercase version of all
> keywords and you can use both as input.

> 
>    I wonder whether \tex{unit} should only parse and format units, and have
>    another macro \tex{quan} or \tex{quantity} to handle number+unit combinations
>    (obviously using \tex{digit} and \tex{unit}).
> 

I put my solution to this (expressing physical quantities) on the wiki a while ago….

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: \unit and Hertz, lux, and degrees/minutes/seconds
  2011-11-25  9:29         ` Ian Lawrence
@ 2011-11-25 10:00           ` Hans Hagen
  0 siblings, 0 replies; 19+ messages in thread
From: Hans Hagen @ 2011-11-25 10:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 25-11-2011 10:29, Ian Lawrence wrote:
>
>>
>> Maybe it’s possible with MkIV to check if the text before the \unit command was
>> a number but of the number is part of the unit them put in the command, such
>> things are always tricky with TeX and it’s better to force users to use proper input.
>>
>>     Within \type{phys-dim.lua} all the units and all the prefixes seem to have
>>     capitalised names; in fact, they should be all lowercase (even when they
>>     are named after some person). The exception is Celsius.
>
> I suggested a list to Hans some time ago, so more than one person has this opinion...

The list is just an internal one. The reason for capatilzation is that 
in the old module we had \Bla \Foo etc an dI want to keep that property 
and it's easier to lowercase a string than to selectively uppercase it.

Also, for some cases Capitalization gives more robust parsing as we can 
have collapsed units.

Anyway, users can use lowercase so they can avoid it.

>> I think this is a feature because Hans saves also a lowercase version of all
>> keywords and you can use both as input.
>
>>
>>     I wonder whether \tex{unit} should only parse and format units, and have
>>     another macro \tex{quan} or \tex{quantity} to handle number+unit combinations
>>     (obviously using \tex{digit} and \tex{unit}).
>>
>
> I put my solution to this (expressing physical quantities) on the wiki a while ago….

First we need to get the parsing right, then we can look into other 
features and cultural issues.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: \unit and Hertz, lux, and degrees/minutes/seconds
  2011-11-25  8:18           ` Hans Hagen
@ 2011-11-25 13:54             ` Wolfgang Schuster
  0 siblings, 0 replies; 19+ messages in thread
From: Wolfgang Schuster @ 2011-11-25 13:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Pontus Lurcock


Am 25.11.2011 um 09:18 schrieb Hans Hagen:

> On 24-11-2011 21:18, Pontus Lurcock wrote:
>> On Thu 24 Nov 2011, Romain Diss wrote:
>> 
>>> - again in french, the liter symbol is lowercase l (althought the
>>> uppercase L is also temporarly accepted).
>> 
>> Not only in French, but in most of Europe, I think:
>> http://en.wikipedia.org/wiki/Litre#Symbol . Should probably be
>> explicitly configurable.
> 
> there is already some basic mechanism fro that
> 
> \startluacode
>    languages.data.labels.units.foo = {
>        Liter = "l"
>    }
>    languages.data.labels.units.bar = {
>        Liter = "L"
>    }
> \stopluacode
> 
> \starttext
> 
> \defineunits[lunit]            \lunit{10 l/s}\par
> \defineunits[funit][label=foo] \funit{10 l/s}\par
> \defineunits[bunit][label=bar] \bunit{10 l/s}\par
> 
> \stoptext

Maybe better:

\definelabelclass[unit]

…

\setupunittext[liter=l]

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: \unit and Hertz, lux, and degrees/minutes/seconds
  2011-11-25  8:29       ` Hans Hagen
@ 2011-11-27 10:59         ` Robin.Kirkham
  0 siblings, 0 replies; 19+ messages in thread
From: Robin.Kirkham @ 2011-11-27 10:59 UTC (permalink / raw)
  To: pragma; +Cc: ntg-context

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

On 25 November 2011, Hans Hagen [pragma@wxs.nl] wrote:

> I uploaded a new beta.
> ...

> - Hz, dB (actually deci + bel so megabel also works), lx, permille, t,
> k, Da added

Actually decibel is an odd one, a logarithmic unit, so prefixes other than
"deci" are never used. However the implementation is no problem.

> - ad 2: no looking back (would demand an extra correction pass
> elsewhere, maybe some day)

Here I meant just space within the argument to \unit{}. It seems to be
handled correctly now ...

> - ad 8: manipulating the input this way is somewhat beyond the purpose
> of a typesetting system

(Normalisation of numbers and unit prefixes). OK, just seeing where the line
was to be drawn. However, in the code a comment notes the possibility of
automatic conversions to imperial units, which is a step even further, actually.
Personally I don't think it's a good idea. [Or the b-grade movies].

> - ad 9: much will be configureable; see mkiv file for an example of
> defining extra units (\registerunit [units] [point=pt, basepoint=bp]);

Works, although 

> - I myself am not going to look in all kind of other tex stuff that lays
> around as it's up to users/usage what is added, given that it fits into
> the model of context; we have the old units modules as starting point

That was a note to self, but any takers ...

I attach a (much shorter) bunch of test cases (source and pdf again).

Thanks,

Robin



[-- Attachment #2: units2.tex --]
[-- Type: application/x-tex, Size: 2097 bytes --]

[-- Attachment #3: units2.pdf --]
[-- Type: application/pdf, Size: 28219 bytes --]

[-- Attachment #4: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: \unit and Hertz, lux, and degrees/minutes/seconds
  2011-11-18  7:26     ` Hans Hagen
@ 2011-11-18  9:28       ` Pontus Lurcock
  0 siblings, 0 replies; 19+ messages in thread
From: Pontus Lurcock @ 2011-11-18  9:28 UTC (permalink / raw)
  To: ntg-context

On Fri 18 Nov 2011, Hans Hagen wrote:

> so, best is that those asking for it come up with a list of issues:
> which symbols need this option, is it language related or whatever,
> so that i can do them all at once. We can already have different
> mapping sets so spacing could be part of that.

I don't personally have a need for units in the foreseeable future (I
was just nitpicking with Robin about spacing) so feel free to ignore
any of my suggestions, but I think the summary so far would be:

1. Spacing for almost all SI units should be the same and doesn't
   need special cases.

2. Geographical degrees/minutes/seconds should have no spaces.

3. Spacing for degrees temperature varies according to different style 
   guides -- both before and after the ° -- so ideally it would be
   possible to set these independently of the rest of the units.

For my own part I would add:

4. SI unit abbreviations are mostly capital letters, and look (to me)
   strange with old-style figures. I have seen books which used 
   old-style figures for page numbers, years, etc. but switched to
   lining figures when a unit was involved; this is also what I did
   in my thesis. So I think it would be useful to allow an automatic
   switch to lining figures to be configured when typesetting a unit.

Pont
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: \unit and Hertz, lux, and degrees/minutes/seconds
  2011-11-18  3:31   ` Pontus Lurcock
@ 2011-11-18  7:26     ` Hans Hagen
  2011-11-18  9:28       ` Pontus Lurcock
  0 siblings, 1 reply; 19+ messages in thread
From: Hans Hagen @ 2011-11-18  7:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Pontus Lurcock

On 18-11-2011 04:31, Pontus Lurcock wrote:
> On Fri 18 Nov 2011, Robin Kirkham wrote:
>
>>> Conventions for setting the degrees of temperature symbol vary; see
>>> http://en.wikipedia.org/wiki/Degree_symbol#Typography and references
>>> therein. In most professionally published works that I've seen, there
>>> is no space between the number and the °, or between the ° and the C.
>>
>> I agree they vary, and no space before the °C is quite common (and
>> frequently my own practice too). However in setting default
>> behaviour for Context I am inclined to favour conforming to
>> international standards, where they exist (but a \setupunits
>> override it probably called for).
>
> I have no opinion as to what the default behaviour should be, but it
> would certainly be useful to have spacing for ° temperature
> configurable separately from that for other units.

so, best is that those asking for it come up with a list of issues: 
which symbols need this option, is it language related or whatever, so 
that i can do them all at once. We can already have different mapping 
sets so spacing could be part of that.

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: \unit and Hertz, lux, and degrees/minutes/seconds
  2011-11-18  3:10 ` Robin Kirkham
@ 2011-11-18  3:31   ` Pontus Lurcock
  2011-11-18  7:26     ` Hans Hagen
  0 siblings, 1 reply; 19+ messages in thread
From: Pontus Lurcock @ 2011-11-18  3:31 UTC (permalink / raw)
  To: ntg-context

On Fri 18 Nov 2011, Robin Kirkham wrote:

> > Conventions for setting the degrees of temperature symbol vary; see
> > http://en.wikipedia.org/wiki/Degree_symbol#Typography and references
> > therein. In most professionally published works that I've seen, there
> > is no space between the number and the °, or between the ° and the C.
> 
> I agree they vary, and no space before the °C is quite common (and
> frequently my own practice too). However in setting default
> behaviour for Context I am inclined to favour conforming to
> international standards, where they exist (but a \setupunits
> override it probably called for).

I have no opinion as to what the default behaviour should be, but it
would certainly be useful to have spacing for ° temperature
configurable separately from that for other units.

Pont
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: \unit and Hertz, lux, and degrees/minutes/seconds
       [not found] <mailman.707.1321583719.4232.ntg-context@ntg.nl>
@ 2011-11-18  3:10 ` Robin Kirkham
  2011-11-18  3:31   ` Pontus Lurcock
  0 siblings, 1 reply; 19+ messages in thread
From: Robin Kirkham @ 2011-11-18  3:10 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1044 bytes --]

On 18/11/2011, Pontus Lurcock <pont@talvi.net> wrote:

>>> Degrees, minutes and seconds of arc (also degrees Celsius) are an
>>> exception and are not supposed to have any space between the 
>>> digits and the degree symbol [1], so to be correct, I think 
>>> Context should by default veto any space between digits and 
>>> numbers, in these cases only.
>> 
>> Correction, I should have written "(but not degrees Celsius)",
>> apologies.
> 
> Conventions for setting the degrees of temperature symbol vary; see
> http://en.wikipedia.org/wiki/Degree_symbol#Typography and references
> therein. In most professionally published works that I've seen, there
> is no space between the number and the °, or between the ° and the C.

Pont, 

I agree they vary, and no space before the °C is quite common (and frequently my own practice too). However in setting default behaviour for Context I am inclined to favour conforming to international standards, where they exist (but a \setupunits override it probably called for).

Robin

[-- Attachment #1.2: Type: text/html, Size: 3390 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: \unit and Hertz, lux, and degrees/minutes/seconds
  2011-11-18  2:12 ` Robin Kirkham
@ 2011-11-18  2:35   ` Pontus Lurcock
  0 siblings, 0 replies; 19+ messages in thread
From: Pontus Lurcock @ 2011-11-18  2:35 UTC (permalink / raw)
  To: ntg-context

On Fri 18 Nov 2011, Robin Kirkham wrote:

> > Degrees, minutes and seconds of arc (also degrees Celsius) are an
> > exception and are not supposed to have any space between the 
> > digits and the degree symbol [1], so to be correct, I think 
> > Context should by default veto any space between digits and 
> > numbers, in these cases only.
> 
> Correction, I should have written "(but not degrees Celsius)",
> apologies.

Conventions for setting the degrees of temperature symbol vary; see
http://en.wikipedia.org/wiki/Degree_symbol#Typography and references
therein. In most professionally published works that I've seen, there
is no space between the number and the °, or between the ° and the C.

Pont
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: \unit and Hertz, lux, and degrees/minutes/seconds
  2011-11-18  2:05 Robin Kirkham
@ 2011-11-18  2:12 ` Robin Kirkham
  2011-11-18  2:35   ` Pontus Lurcock
  0 siblings, 1 reply; 19+ messages in thread
From: Robin Kirkham @ 2011-11-18  2:12 UTC (permalink / raw)
  To: ntg-context

On 18/11/2011, at 1:05 PM, I wrote:

> Degrees, minutes and seconds of arc (also degrees Celsius) are an exception and are not supposed to have any space between the digits and the degree symbol [1], so to be correct, I think Context should by default veto any space between digits and numbers, in these cases only.

Correction, I should have written "(but not degrees Celsius)", apologies.

Robin
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* \unit and Hertz, lux, and degrees/minutes/seconds
@ 2011-11-18  2:05 Robin Kirkham
  2011-11-18  2:12 ` Robin Kirkham
  0 siblings, 1 reply; 19+ messages in thread
From: Robin Kirkham @ 2011-11-18  2:05 UTC (permalink / raw)
  To: ntg-context

Dear Hans,

Many thanks for implementing space=small in \setupunits. It works nicely for me.

However in the latest beta, Hertz is typeset as hz not Hz. It looks like the problem is line 154 of phys-dim.lua (it was typeset correctly a couple of days ago).

Also the symbol for lux (line 198) should be lx [2].

Degrees, minutes and seconds of arc (also degrees Celsius) are an exception and are not supposed to have any space between the digits and the degree symbol [1], so to be correct, I think Context should by default veto any space between digits and numbers, in these cases only.

BTW, NIST has a handy reference for anyone typesetting physical quantities [1], although the BIPM documentation is the canonical reference.

Robin

\starttext
\unit{1 Hz} (should be Hz)\par
\unit{180 deg} (should be no space)\par
\stoptext

[1] http://www.bipm.org/en/si/si_brochure/chapter5/5-3-2.html
[2] http://physics.nist.gov/cuu/Units/

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2011-11-27 10:59 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.0.1321614002.10878.ntg-context@ntg.nl>
2011-11-21  1:00 ` \unit and Hertz, lux, and degrees/minutes/seconds Robin Kirkham
2011-11-21  9:52   ` Hans Hagen
2011-11-24 12:36     ` Robin.Kirkham
2011-11-24 12:58       ` Wolfgang Schuster
2011-11-25  9:29         ` Ian Lawrence
2011-11-25 10:00           ` Hans Hagen
2011-11-24 13:42       ` Romain Diss
2011-11-24 20:18         ` Pontus Lurcock
2011-11-25  8:18           ` Hans Hagen
2011-11-25 13:54             ` Wolfgang Schuster
2011-11-25  8:29       ` Hans Hagen
2011-11-27 10:59         ` Robin.Kirkham
     [not found] <mailman.707.1321583719.4232.ntg-context@ntg.nl>
2011-11-18  3:10 ` Robin Kirkham
2011-11-18  3:31   ` Pontus Lurcock
2011-11-18  7:26     ` Hans Hagen
2011-11-18  9:28       ` Pontus Lurcock
2011-11-18  2:05 Robin Kirkham
2011-11-18  2:12 ` Robin Kirkham
2011-11-18  2:35   ` Pontus Lurcock

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).