Re: [NTG-context] Automatic thousands separation in \unit

2019-02-09 Thread Marco Patzer
On Tue, 5 Feb 2019 12:22:29 +0100 Marco Patzer wrote: > Is there a way to hook the \spaceddigits into \unit somehow? I tried to add \spaceddigits to the \unit command, but it didn't work. If someone has an idea how to do that, I'd greatly appreciate. Ma

Re: [NTG-context] Automatic thousands separation in \unit

2019-02-05 Thread Marco Patzer
On Thu, 31 Jan 2019 13:43:13 +0100 Otared Kavian wrote: Sorry for the late response. > Can this give what you wish? > > \define[2]\myunit{\spaceddigits{#1}\unit{#2}} > \starttext > \myunit{123456789}{volt} > \stoptext That's a way to solve it, yes. But I'd prefer i

Re: [NTG-context] Automatic thousands separation in \unit

2019-02-02 Thread Axel Kielhorn
> Am 31.01.2019 um 15:00 schrieb Clyde Johnston : > > Maybe this should be a language specific parameter. How would you achieve a > similar result with the Indian numbering system, for instance? > > Also, decimal and thousands separators vary from country to country. In > France, for

Re: [NTG-context] Automatic thousands separation in \unit

2019-01-31 Thread Hans Åberg
> On 31 Jan 2019, at 15:00, Clyde Johnston wrote: > > Maybe this should be a language specific parameter. How would you achieve a > similar result with the Indian numbering system, for instance? It is an additional feature that may or may not be linked to language. For example, in Swedish

Re: [NTG-context] Automatic thousands separation in \unit

2019-01-31 Thread Clyde Johnston
omatic thousands separation in \unit Hi Marco, Can this give what you wish? \define[2]\myunit{\spaceddigits{#1}\unit{#2}} \starttext \myunit{123456789}{volt} \stoptext On 31 Jan 2019, at 13:28, Marco Patzer wrote: Hi! I'm wondering if there's a way to have automatic tho

Re: [NTG-context] Automatic thousands separation in \unit

2019-01-31 Thread Otared Kavian
Hi Marco, Can this give what you wish? \define[2]\myunit{\spaceddigits{#1}\unit{#2}} \starttext \myunit{123456789}{volt} \stoptext > On 31 Jan 2019, at 13:28, Marco Patzer wrote: > > Hi! > > I'm wondering if there's a way to have automatic thousands separation in the

[NTG-context] Automatic thousands separation in \unit

2019-01-31 Thread Marco Patzer
Hi! I'm wondering if there's a way to have automatic thousands separation in the \unit command? \spaceddigits does that, but it doesn't work inside \unit. And using both would be quite verbose to write. Example: \starttext %% no thousands separation \unit{123456789 volt} %% manual

Re: [NTG-context] Use \unit for value and uncertainty

2016-11-02 Thread Henri Menke
On 10/31/2016 05:30 PM, Florian Leupold wrote: > Hello! > > There does not seem to be a simple solution to using \unit with > uncertainties, see below. > > Could someone maybe point me to the relevant source code for the parser for > \unit in MKIV? Then I would try to mo

Re: [NTG-context] Use \unit for value and uncertainty

2016-10-31 Thread Florian Leupold
Hello! There does not seem to be a simple solution to using \unit with uncertainties, see below. Could someone maybe point me to the relevant source code for the parser for \unit in MKIV? Then I would try to modify/improve the code myself. Thanks a lot and best regards, Florian

[NTG-context] Use \unit for value and uncertainty

2016-09-25 Thread Florian Leupold
Dear list Is it possible to use the units module (in MKIV) for value plusminus uncertainty in a way similar to the \SI command in LaTeX, like \unit{(1.59\pm2)e-19 coulomb} or \unit{1.59(2)e-19 coulomb}? Thanks and best regards, Florian signature.asc Description: Message signed

Re: [NTG-context] siunitx feature in unit module

2015-03-03 Thread Hans Hagen
On 3/3/2015 6:47 PM, Andrea De Michele wrote: Romain Diss romain.d...@yahoo.fr writes: Hi, with siunitx LaTeX package its possible to obtain physics units like m/s printed in different way changing one option: e.g. \si{\metre\per\second} produce ms^{-1} \unit{10 meter inverse second

Re: [NTG-context] siunitx feature in unit module

2015-03-03 Thread Andrea De Michele
Romain Diss romain.d...@yahoo.fr writes: Hi, with siunitx LaTeX package its possible to obtain physics units like m/s printed in different way changing one option: e.g. \si{\metre\per\second} produce ms^{-1} \unit{10 meter inverse second} Thank you. \si[per-mode=symbol]{\metre\per

Re: [NTG-context] siunitx feature in unit module

2015-03-01 Thread Romain Diss
Hi, with siunitx LaTeX package its possible to obtain physics units like m/s printed in different way changing one option: e.g. \si{\metre\per\second} produce ms^{-1} \unit{10 meter inverse second} \si[per-mode=symbol]{\metre\per\second} produce m/s \unit{10 meter per second} \si[per-mode

[NTG-context] siunitx feature in unit module

2015-02-28 Thread Andrea De Michele
Hi, with siunitx LaTeX package its possible to obtain physics units like m/s printed in different way changing one option: e.g. \si{\metre\per\second} produce ms^{-1} \si[per-mode=symbol]{\metre\per\second} produce m/s \si[per-mode=fraction]{\metre\per\second} produce \frac{m}{s} have the unit

[NTG-context] Problem with astronomicalunit in \unit

2014-06-01 Thread Romain Diss
Hi all, It seems that the \unit parser doesn't recognize the 'astronomicalunit'. Minimal exemple: \starttext \unit{100 astronomicalunit} \stoptext % Rendering gives 100 as.t % One expect 100 au Thanks for help. -- Romain Diss

Re: [NTG-context] Problem with astronomicalunit in \unit

2014-06-01 Thread Hans Hagen
On 6/1/2014 10:48 PM, Romain Diss wrote: Hi all, It seems that the \unit parser doesn't recognize the 'astronomicalunit'. Minimal exemple: \starttext \unit{100 astronomicalunit} \stoptext % Rendering gives 100 as.t % One expect 100 au so what should be rendered

Re: [NTG-context] Problem with astronomicalunit in \unit

2014-06-01 Thread Hans Hagen
On 6/1/2014 10:48 PM, Romain Diss wrote: Hi all, It seems that the \unit parser doesn't recognize the 'astronomicalunit'. Minimal exemple: \starttext \unit{100 astronomicalunit} \unit { 100 astronomical unit} works ok ... I'll add the nonspaced one \stoptext % Rendering gives 100 as.t

Re: [NTG-context] Add new unit to \unit comand

2013-10-06 Thread Wolfgang Schuster
Am 03.10.2013 um 14:19 schrieb Giuseppe Fierro giuse...@fierro.org: Hi, I'm a civil engineer and I like to use ConTeXt to write my report etc. As engineer i use a lot of units in my writing and the \unit command works nice with this. What I need is a new unit, a quadratic unit like

[NTG-context] Add new unit to \unit comand

2013-10-04 Thread Giuseppe Fierro
Hi, I'm a civil engineer and I like to use ConTeXt to write my report etc. As engineer i use a lot of units in my writing and the \unit command works nice with this. What I need is a new unit, a quadratic unit like this: Area Moment of Inertia - Metric units mm4 cm4 m4 This kind of units

Re: [NTG-context] Add new unit to \unit comand

2013-10-04 Thread luigi scarso
On Thu, Oct 3, 2013 at 2:19 PM, Giuseppe Fierro giuse...@fierro.org wrote: Hi, I'm a civil engineer and I like to use ConTeXt to write my report etc. As engineer i use a lot of units in my writing and the \unit command works nice with this. What I need is a new unit, a quadratic unit like

Re: [NTG-context] Gray unit

2013-09-11 Thread Hans Hagen
On 9/10/2013 8:04 PM, Christian Prim wrote: Hello the physical unit Gray has Gy as symbol (see http://en.wikipedia.org/wiki/Gray_(unit) ). Context returns Gr. MWE: \starttext \unit{1 Gray} \stoptext Thanks for fixing this little bug. patched

[NTG-context] Gray unit

2013-09-10 Thread Christian Prim
Hello the physical unit Gray has Gy as symbol (see http://en.wikipedia.org/wiki/Gray_(unit) ). Context returns Gr. MWE: \starttext \unit{1 Gray} \stoptext Thanks for fixing this little bug. Christian ___ If your

[NTG-context] Some issues with \unit

2013-06-11 Thread Marco Patzer
Hi, most of these issues already have been discussed last year¹, but they don't seem to be solved, yet. 1) \unit{10^3} does display as 10✕10³. This is confusing and wrong. 2) Expressions like \unit{e3} result in ✕10³ instead of 10³. The multiplication sign should be dropped in this case. 3

Re: [NTG-context] [***SPAM***] Wrong °C symbol with \unit and dejavu font

2013-05-17 Thread Hans Hagen
On 5/17/2013 1:07 AM, luigi scarso wrote: On Fri, May 17, 2013 at 1:00 AM, Hans Hagen pra...@wxs.nl mailto:pra...@wxs.nl wrote: (for the first time i'm seriously thinking of replacing acrobat reader in my regular preview cycle, if only because there seems to be no robust way to

Re: [NTG-context] [***SPAM***] Wrong °C symbol with \unit and dejavu font

2013-05-17 Thread Alan BRASLAU
On Fri, 17 May 2013 09:53:48 +0200 Hans Hagen pra...@wxs.nl wrote: mupdf uses SIGHUP under linux -- does windows offer a similar way ? we only want to close a file, not the whole session Sending a SIGHUP signal to the mupdf process will also cause the viewed file to be reloaded

Re: [NTG-context] [***SPAM***] Wrong °C symbol with \unit and dejavu font

2013-05-17 Thread luigi scarso
On Fri, May 17, 2013 at 11:18 AM, Alan BRASLAU alan.bras...@cea.fr wrote: On Fri, 17 May 2013 09:53:48 +0200 Hans Hagen pra...@wxs.nl wrote: mupdf uses SIGHUP under linux -- does windows offer a similar way ? we only want to close a file, not the whole session Sending a SIGHUP signal

Re: [NTG-context] [***SPAM***] Wrong °C symbol with \unit and dejavu font

2013-05-17 Thread Hans Hagen
On 5/17/2013 11:18 AM, Alan BRASLAU wrote: On Fri, 17 May 2013 09:53:48 +0200 Hans Hagen pra...@wxs.nl wrote: mupdf uses SIGHUP under linux -- does windows offer a similar way ? we only want to close a file, not the whole session Sending a SIGHUP signal to the mupdf process will also cause

[NTG-context] [***SPAM***] Wrong °C symbol with \unit and dejavu font

2013-05-16 Thread Romain Diss
Hi all, With this minimal example: %%% start \setupbodyfont[dejavu] \starttext Temperature : \unit{100 celsius}. \stoptext %%% end I get the °F symbol instead of °C. With lmodern or pagella (I did not try other fonts) the right symbol (°C) is printed. Any idea of what goes wrong? -- Romain

Re: [NTG-context] Wrong °C symbol with \unit and dejavu font

2013-05-16 Thread Wolfgang Schuster
Am 16.05.2013 um 22:26 schrieb Romain Diss romain.d...@yahoo.fr: Hi all, With this minimal example: %%% start \setupbodyfont[dejavu] \starttext Temperature : \unit{100 celsius}. \stoptext %%% end I get the °F symbol instead of °C. With lmodern or pagella (I did not try other

Re: [NTG-context] [***SPAM***] Wrong °C symbol with \unit and dejavu font

2013-05-16 Thread Hans Hagen
On 5/16/2013 10:26 PM, Romain Diss wrote: Hi all, With this minimal example: %%% start \setupbodyfont[dejavu] \starttext Temperature : \unit{100 celsius}. \stoptext %%% end I get the °F symbol instead of °C. With lmodern or pagella (I did not try other fonts) the right symbol (°C

Re: [NTG-context] [***SPAM***] Wrong °C symbol with \unit and dejavu font

2013-05-16 Thread Peter Rolf
Am 16.05.2013 23:56, schrieb Hans Hagen: On 5/16/2013 10:26 PM, Romain Diss wrote: Hi all, With this minimal example: %%% start \setupbodyfont[dejavu] \starttext Temperature : \unit{100 celsius}. \stoptext %%% end I get the °F symbol instead of °C. With lmodern or pagella (I did

Re: [NTG-context] [***SPAM***] Wrong °C symbol with \unit and dejavu font

2013-05-16 Thread Hans Hagen
On 5/17/2013 12:39 AM, Peter Rolf wrote: Am 16.05.2013 23:56, schrieb Hans Hagen: On 5/16/2013 10:26 PM, Romain Diss wrote: Hi all, With this minimal example: %%% start \setupbodyfont[dejavu] \starttext Temperature : \unit{100 celsius}. \stoptext %%% end I get the °F symbol instead of °C

Re: [NTG-context] [***SPAM***] Wrong °C symbol with \unit and dejavu font

2013-05-16 Thread luigi scarso
On Fri, May 17, 2013 at 1:00 AM, Hans Hagen pra...@wxs.nl wrote: (for the first time i'm seriously thinking of replacing acrobat reader in my regular preview cycle, if only because there seems to be no robust way to open/close docs i.e. pdfopen has to be adapted each time) mupdf uses SIGHUP

Re: [NTG-context] calculating with dimension unit

2013-04-23 Thread Jan Heinen
Ok, I now put the \ctxlua into an other chapter: http://wiki.contextgarden.net/Calculating_with_dimension_units Can you say something to the missing points there? Wich meethod?, \the and Expanding If you don't know how to edit the context-wiki, please write your information here in the

Re: [NTG-context] calculating with dimension unit

2013-04-22 Thread Wolfgang Schuster
Am 22.04.2013 um 01:13 schrieb Jan Heinen jahei...@gmx.de: In a book I produced with ConTeXt last year, I did a lot of calculation to be able to change the layout dynamicaly. With the actual version of ConTeXt I can't compile the book. I have tried a lot of things today ... without

Re: [NTG-context] calculating with dimension unit

2013-04-22 Thread Hans Hagen
On 4/22/2013 8:48 AM, Wolfgang Schuster wrote: Am 22.04.2013 um 01:13 schrieb Jan Heinen jahei...@gmx.de: In a book I produced with ConTeXt last year, I did a lot of calculation to be able to change the layout dynamicaly. With the actual version of ConTeXt I can't compile the book. I have

Re: [NTG-context] calculating with dimension unit

2013-04-22 Thread Hans Hagen
On 4/22/2013 1:13 AM, Jan Heinen wrote: %\externalfigure[cow][width=\ColumnABiii] Already for quite a while some commands that take a dimension as well as a keyword need a verbose dimension (so \the\ColumnABiii in your case) because it's handled at the lua end (where at this moment we

Re: [NTG-context] calculating with dimension unit

2013-04-22 Thread Wolfgang Schuster
Am 22.04.2013 um 10:14 schrieb Hans Hagen pra...@wxs.nl: On 4/22/2013 8:48 AM, Wolfgang Schuster wrote: Am 22.04.2013 um 01:13 schrieb Jan Heinen jahei...@gmx.de: In a book I produced with ConTeXt last year, I did a lot of calculation to be able to change the layout dynamicaly. With

Re: [NTG-context] calculating with dimension unit

2013-04-22 Thread Jan Heinen
Hello, thanks for the helpfull tipps. Only one wasn't working: \defineexpandable\ColumnABii {\ctxlua{context([==[\ColumnA + \ColumnB]==])}} ColumnABii: \ColumnABii The result is: ColumnABii: 30mm+ 40mm And it should be ColumnABii: 70mm And in the other cases I get back:

Re: [NTG-context] calculating with dimension unit

2013-04-22 Thread Aditya Mahajan
I think this calculating with dimension is not very well documented in the context-wiki. Thus I would like to write a small article about Calculating with dimension units in the wiki.contextgarden.net to help others a bit. Or is there already an article somewhere? Such an article will be

Re: [NTG-context] calculating with dimension unit

2013-04-22 Thread Aditya Mahajan
On 2013-04-22, at 6:43 AM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: (I've been wondering if we should make measured \the\dimexpr..\relax internally which can save dimexpr at the user end.) +1 +1 from me as well. Having to use \dimexpr...\relax in definemeasure ISS bit

Re: [NTG-context] calculating with dimension unit

2013-04-22 Thread luigi scarso
On Mon, Apr 22, 2013 at 1:31 PM, Jan Heinen jahei...@gmx.de wrote: Hello, thanks for the helpfull tipps. Only one wasn't working: \defineexpandable\ColumnABii {\ctxlua{context([==[\ColumnA + \ColumnB]==])}} ColumnABii: \ColumnABii The result is: ColumnABii: 30mm+ 40mm And it

Re: [NTG-context] calculating with dimension unit

2013-04-22 Thread Jan Heinen
Thank you all!! My book from last year (15.000 lines text + context-code and 1.500 lines macro-code now was compiled without no further problems! I only had to change all \define\variable ... to \defineexpandable\variable ... I think, now I understand a little bit more about ConTeXt

Re: [NTG-context] calculating with dimension unit

2013-04-22 Thread Wolfgang Schuster
Am 22.04.2013 um 23:28 schrieb Jan Heinen jahei...@gmx.de: Thank you all!! My book from last year (15.000 lines text + context-code and 1.500 lines macro-code now was compiled without no further problems! I only had to change all \define\variable ... to

[NTG-context] calculating with dimension unit

2013-04-21 Thread Jan Heinen
In a book I produced with ConTeXt last year, I did a lot of calculation to be able to change the layout dynamicaly. With the actual version of ConTeXt I can't compile the book. I have tried a lot of things today ... without success. I hope my minimal-example helps you to understand, what I

Re: [NTG-context] calculating with dimension unit

2013-04-21 Thread luigi scarso
\starttext \setupexternalfigures[location={local,global,default}] \defineexpandable\ColumnA{30mm} \defineexpandable\ColumnB{40mm} \defineexpandable\ColumnABi{\the\dimexpr(\ColumnA + \ColumnB)} \defineexpandable\ColumnABii {\ctxlua{context([==[\ColumnA + \ColumnB]==])}}

Re: [NTG-context] \unit problem with powers of ten.

2012-11-24 Thread Hans Hagen
On 11/24/2012 1:48 AM, Sietse Brouwer wrote: The '^' and 'e' all print a '10 ×' at the begining. It's what is expected for 'e' but not for '^'. Did I miss something? well, until now ^ and e were equivalent so if that has to change (say ^ no 10) then there need to be agreement about this as

Re: [NTG-context] \unit problem with powers of ten.

2012-11-24 Thread Romain Diss
^2 ^3 ^4 ^5 ... and what about ^1.2 I don't know everyone's use of \units but for physicists I think that the only case where it should be usefull is for 10^something (like \unit{10^-12 second} ;). Maybe the informaticians need 2^something… The other cases are probably marginals. then, what

Re: [NTG-context] \unit problem with powers of ten.

2012-11-23 Thread Sietse Brouwer
needs testing as usual (and wiki adaption as well) http://wiki.contextgarden.net/Command/unit Wiki: adapted. (Page created, actually, as there was none.) Using the fancy-schmancy {{since|2012|text=nov 2012}} template, which (1) marks this as a recent feature, and as such not in the stable yet

Re: [NTG-context] \unit problem with powers of ten.

2012-11-23 Thread Romain Diss
Hi, Le jeudi 22 novembre 2012, Hans Hagen a écrit : On 11/19/2012 11:44 PM, Romain Diss wrote: Hi all, I got some problems to express powers of ten in the \unit command. See the strange behaviour with these two minimal examples. \starttext \unit{10^2 meter}\\ \unit{10^{-12

Re: [NTG-context] \unit problem with powers of ten.

2012-11-23 Thread Hans Hagen
On 11/23/2012 8:25 PM, Romain Diss wrote: Hi, Le jeudi 22 novembre 2012, Hans Hagen a écrit : On 11/19/2012 11:44 PM, Romain Diss wrote: Hi all, I got some problems to express powers of ten in the \unit command. See the strange behaviour with these two minimal examples. \starttext \unit{10

Re: [NTG-context] \unit problem with powers of ten.

2012-11-23 Thread Sietse Brouwer
The '^' and 'e' all print a '10 ×' at the begining. It's what is expected for 'e' but not for '^'. Did I miss something? well, until now ^ and e were equivalent so if that has to change (say ^ no 10) then there need to be agreement about this as it's an incompatible change I, for one,

Re: [NTG-context] \unit problem with powers of ten.

2012-11-23 Thread Romain Diss
Le samedi 24 novembre 2012, Sietse Brouwer a écrit : The '^' and 'e' all print a '10 ×' at the begining. It's what is expected for 'e' but not for '^'. well, until now ^ and e were equivalent so if that has to change (say ^ no 10) then there need to be agreement about this as it's

Re: [NTG-context] \unit problem with powers of ten.

2012-11-22 Thread Romain Diss
Hi all, Le mardi 20 novembre 2012, Romain Diss a écrit : Le lundi 19 novembre 2012, Romain Diss a écrit : I got some problems to express powers of ten in the \unit command. See the strange behaviour with these two minimal examples. \starttext \unit{10^2 meter}\\ \unit{10^{-12

Re: [NTG-context] \unit problem with powers of ten.

2012-11-22 Thread luigi scarso
to express powers of ten in the \unit command. See the strange behaviour with these two minimal examples. \starttext \unit{10^2 meter}\\ \unit{10^{-12} second} \stoptext Is this a bug or are these expressions not supported? I'm not an expert neither in TeX nor Lua, but I quickly

Re: [NTG-context] \unit problem with powers of ten.

2012-11-22 Thread Hans Hagen
On 11/19/2012 11:44 PM, Romain Diss wrote: Hi all, I got some problems to express powers of ten in the \unit command. See the strange behaviour with these two minimal examples. \starttext \unit{10^2 meter}\\ \unit{10^{-12} second} \stoptext However, there is no problem with this one: \unit{1e

Re: [NTG-context] \unit problem with powers of ten.

2012-11-20 Thread Romain Diss
Le lundi 19 novembre 2012, Romain Diss a écrit : I got some problems to express powers of ten in the \unit command. See the strange behaviour with these two minimal examples. \starttext \unit{10^2 meter}\\ \unit{10^{-12} second} \stoptext Is this a bug or are these expressions

[NTG-context] \unit problem with powers of ten.

2012-11-19 Thread Romain Diss
Hi all, I got some problems to express powers of ten in the \unit command. See the strange behaviour with these two minimal examples. \starttext \unit{10^2 meter}\\ \unit{10^{-12} second} \stoptext However, there is no problem with this one: \unit{1e-4 kilogram}. Is this a bug

[NTG-context] Wrong \unit spacing

2012-11-17 Thread Marco Patzer
Hi, the \unit command produces wrong spacing when only the unit is given without a value. Is there a way to improve the \unit command to not print this space? \starttext \starttabulate \NC wrong spacing \EQ (\unit{micro mol}) \NC\NR \NC spacing OK\EQ (µmol) \NC\NR \NC spacing

Re: [NTG-context] \unit and french

2012-10-10 Thread Sietse Brouwer
Hi Romain, If inputting in the English format is an option, this works: \setupunit[method=3] % comma as decimal mark, thin space for digits seperator \units{12,345.00} %-- 12 345,00 The problem is that inputting in the French format does not work: there seems to be a bug when order=reverse. %

Re: [NTG-context] \unit and french

2012-10-10 Thread Romain Diss
Hi, Thanks for the response. If inputting in the English format is an option, this works: \setupunit[method=3] % comma as decimal mark, thin space for digits seperator \units{12,345.00} %-- 12 345,00 Yes, I confirm it works (with \unit{12,345.00}). I'd prefer inputting in french

Re: [NTG-context] \unit and french

2012-10-10 Thread Wolfgang Schuster
it works (with \unit{12,345.00}). I'd prefer inputting in french but this should do the job. % doesn't work correctly: comma is accepted as decimal mark at parse time, % but then printed as thin space anyway. ?!? \setupunit[method=3, order=reverse] \units{12.345,00} %-- 12,345 00 This one should

Re: [NTG-context] \unit and french

2012-10-10 Thread Sietse Brouwer
work correctly: % 3: decimal comma, digits space % 4: decimal point, digits space % English input (order=normal) \setupunits[method=3] \unit{11,122.13 micro mol per second} \par \setupunits[method=4] \unit{21,222.23 micro mol per second} \par % French input (order

Re: [NTG-context] \unit and french

2012-10-09 Thread Wolfgang Schuster
Am 09.10.2012 um 21:04 schrieb Romain Diss romain.d...@yahoo.fr: Hi all, As you know, the french number format is almost opposite to the english one: period and comma have opposite roles. My question concerns the way to render properly numbers in french with the \unit command. I

Re: [NTG-context] \unit and french

2012-10-09 Thread Wolfgang Schuster
concerns the way to render properly numbers in french with the \unit command. I already tried different combinations of \setupunit[method=,order=] but I can’t find the right way. I tried even to type french or english format as input for \unit but none output is right (actually I'd prefer

Re: [NTG-context] \unit and french

2012-10-09 Thread Marco Patzer
2012-10-09 Wolfgang Schuster: Can you explain which numbers this should represent: \m{12\,345,567\,89}~kg 12345.56789 kg \m{345,567\,89}~kg 345.56789 kg Marco ___ If your question is of interest to others

Re: [NTG-context] \unit and french

2012-10-09 Thread Wolfgang Schuster
Am 09.10.2012 um 22:11 schrieb Marco Patzer home...@lavabit.com: 2012-10-09 Wolfgang Schuster: Can you explain which numbers this should represent: \m{12\,345,567\,89}~kg 12345.56789 kg \m{345,567\,89}~kg 345.56789 kg Thanks but I realized it myself (I guess I need sleep), The

Re: [NTG-context] \unit and french

2012-10-09 Thread Marco Patzer
2012-10-09 Wolfgang Schuster: The problem is that Hans number parser doesn’t check for a separator in the decimal numbers. If the unit code is being touched maybe you can address this one as well: http://article.gmane.org/gmane.comp.tex.context/78251 Marco

Re: [NTG-context] \unit and french

2012-10-09 Thread Romain Diss
Le mardi 09 octobre 2012, Wolfgang Schuster a écrit : Am 09.10.2012 um 22:11 schrieb Marco Patzer home...@lavabit.com: 2012-10-09 Wolfgang Schuster: Can you explain which numbers this should represent: \m{12\,345,567\,89}~kg 12345.56789 kg \m{345,567\,89}~kg 345.56789 kg

Re: [NTG-context] Wrong spacing in \unit

2012-09-17 Thread Marco Patzer
2012-09-13 Marco Patzer home...@lavabit.com: when \unit is used just with a unit, without a number, the spacing at the left is wrong. Still the same in 2012.09.16 23:18, it doesn't seem that hard to fix. Maybe just an if-statement to check if the number is provided and add a space in that case

[NTG-context] Wrong spacing in \unit

2012-09-13 Thread Marco Patzer
Hi, when \unit is used just with a unit, without a number, the spacing at the left is wrong. Example: \starttext % wrong spacing (\unit{micro mol per second}) % spacing OK (\unit{3 micro mol per second}) \stoptext Marco

[NTG-context] \setupbodyfont restricted to pt as unit

2012-05-17 Thread Marco
Hi! Is it by design, that \setupbodyfont only accepts “pt” as unit? %\setupbodyfont [18pt] % pt works \setupbodyfont [18bp]% bp fails \definefont [testbp] [Serif at 18bp] % bp works \setupinterlinespace [line=24bp] % bp works \starttext Foo\testbp Bar

Re: [NTG-context] \setupbodyfont restricted to pt as unit

2012-05-17 Thread Wolfgang Schuster
Am 16.05.2012 um 21:24 schrieb Marco: Hi! Is it by design, that \setupbodyfont only accepts “pt” as unit? %\setupbodyfont [18pt] % pt works \setupbodyfont [18bp]% bp fails \definefont [testbp] [Serif at 18bp] % bp works \setupinterlinespace [line=24bp

[NTG-context] Number formatting in \unit

2011-12-11 Thread Robin.Kirkham
All, I have put together some suggestions to extend the number formatting capability in \unit, particularly for scientific and engineering purposes, including basic support for tolerances and uncertainties. It is a bit long, so source is attached and a PDF is at http://dl.dropbox.com/u/36891398

Re: [NTG-context] Number formatting in \unit

2011-12-11 Thread Xenia
Am 11.12.2011 11:25, schrieb robin.kirk...@csiro.au: All, I have put together some suggestions to extend the number formatting capability in \unit, particularly for scientific and engineering purposes, including basic support for tolerances and uncertainties. It is a bit long, so source

Re: [NTG-context] Number formatting in \unit

2011-12-11 Thread Marco
On 2011-12-11 robin.kirk...@csiro.au wrote: Automatic thousands grouping (again with some style variants) My main objection is that one seems to have to insert thousands separators into the input oneself, which is rather unnatural; Context could and should do this itself.

Re: [NTG-context] Number formatting in \unit

2011-12-11 Thread Robin Kirkham
On 11 December 2011, Xenia yor...@googlemail.com wrote: Am 11.12.2011 11:25, schrieb robin.kirk...@csiro.au: All, I have put together some suggestions to extend the number formatting capability in \unit, particularly for scientific and engineering purposes, including basic support

Re: [NTG-context] Possible bug in \unit

2011-12-09 Thread Hans Hagen
On 7-12-2011 22:27, Marco wrote: There seems to be a bug in the new unit system for \unit{kbit}: % bit \unit{kilo bit} % kbit \unit{kilobit} % kbit \unit{kbit} % kB, shouldn't this be kbit? Another thing: \unit{3.4e-5} yields to 3.4⁻⁵ that's expected according to the manual. But how

Re: [NTG-context] Possible bug in \unit

2011-12-09 Thread Marco
On 2011-12-09 Hans Hagen pra...@wxs.nl wrote: \unit{3.4e-5} yields to 3.4⁻⁵ that's expected according to the manual. But how to get 3.4·10⁻⁵ (either with \cot or \times)? indeed .. here's the fix \unexpanded\def\digitspower#1% {\times10\digits_raised{#1}} \unexpanded\def

Re: [NTG-context] Possible bug in \unit

2011-12-09 Thread Hans Hagen
On 9-12-2011 20:41, Marco wrote: One feature request: Could it be make configurable to either insert a \times or a \cdot? is already possible - Hans Hagen | PRAGMA ADE

Re: [NTG-context] Possible bug in \unit

2011-12-09 Thread Marco
On 2011-12-09 Hans Hagen pra...@wxs.nl wrote: On 9-12-2011 20:41, Marco wrote: One feature request: Could it be make configurable to either insert a \times or a \cdot? is already possible How? ___ If

Re: [NTG-context] Possible bug in \unit

2011-12-09 Thread Hans Hagen
On 9-12-2011 22:01, Marco wrote: On 2011-12-09 Hans Hagenpra...@wxs.nl wrote: On 9-12-2011 20:41, Marco wrote: One feature request: Could it be make configurable to either insert a \times or a \cdot? is already possible How?

Re: [NTG-context] Possible bug in \unit

2011-12-08 Thread Ian Lawrence
I solved this = getting what I wanted by writing my own macro: \define[3]\physicalquantitye{\hbox{#1 \times \unit{10^#2 #3}}} % \physicalquantitye{number}{exponent}{unit} -- gives short form of unit That makes sense to me and is working fine. There are a few more like this on the wiki (units

[NTG-context] Possible bug in \unit

2011-12-07 Thread Marco
There seems to be a bug in the new unit system for \unit{kbit}: % bit \unit{kilo bit} % kbit \unit{kilobit} % kbit \unit{kbit} % kB, shouldn't this be kbit? Another thing: \unit{3.4e-5} yields to 3.4⁻⁵ that's expected according to the manual. But how to get 3.4·10⁻⁵ (either with \cot

Re: [NTG-context] Possible bug in \unit

2011-12-07 Thread Mojca Miklavec
On Wed, Dec 7, 2011 at 22:27, Marco net...@lavabit.com wrote: There seems to be a bug in the new unit system for \unit{kbit}: % bit \unit{kilo bit}  % kbit \unit{kilobit}   % kbit \unit{kbit}      % kB, shouldn't this be kbit? kB is kilobyte, not kilobit, but kb is probably also valid

Re: [NTG-context] Possible bug in \unit

2011-12-07 Thread Marco
On 2011-12-07 Mojca Miklavec mojca.miklavec.li...@gmail.com wrote: On Wed, Dec 7, 2011 at 22:27, Marco net...@lavabit.com wrote: There seems to be a bug in the new unit system for \unit{kbit}: % bit \unit{kilo bit}  % kbit \unit{kilobit}   % kbit \unit{kbit}      % kB, shouldn't

Re: [NTG-context] Possible bug in \unit

2011-12-07 Thread Mojca Miklavec
On Thu, Dec 8, 2011 at 00:12, Marco wrote: On 2011-12-07 Mojca Miklavec wrote: \unit{3.4e-5}   yields   to  3.4⁻⁵   that's   expected according to the manual. But the behaviour is wrong. I don't know if it's wrong. But 5e3 would render 5^3 which is hopefully still 125. It's very non

Re: [NTG-context] Possible bug in \unit

2011-12-07 Thread Mikael P. Sundqvist
On Thu, Dec 8, 2011 at 12:20 AM, Mojca Miklavec mojca.miklavec.li...@gmail.com wrote: On Thu, Dec 8, 2011 at 00:12, Marco wrote: On 2011-12-07 Mojca Miklavec wrote: \unit{3.4e-5}   yields   to  3.4⁻⁵   that's   expected according to the manual. But the behaviour is wrong. I don't know

Re: [NTG-context] \unit and Hertz, lux, and degrees/minutes/seconds

2011-11-27 Thread Robin.Kirkham
On 25 November 2011, Hans Hagen [pra...@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

Re: [NTG-context] \unit and Hertz, lux, and degrees/minutes/seconds

2011-11-25 Thread 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

Re: [NTG-context] \unit and Hertz, lux, and degrees/minutes/seconds

2011-11-25 Thread Hans Hagen
On 24-11-2011 13:36, robin.kirk...@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

Re: [NTG-context] \unit and Hertz, lux, and degrees/minutes/seconds

2011-11-25 Thread Ian Lawrence
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

Re: [NTG-context] \unit and Hertz, lux, and degrees/minutes/seconds

2011-11-25 Thread Hans Hagen
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

Re: [NTG-context] \unit and Hertz, lux, and degrees/minutes/seconds

2011-11-25 Thread Wolfgang Schuster
\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

Re: [NTG-context] \unit and Hertz, lux, and degrees/minutes/seconds

2011-11-24 Thread Wolfgang Schuster
Am 24.11.2011 um 13:36 schrieb robin.kirk...@csiro.au robin.kirk...@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

Re: [NTG-context] \unit and Hertz, lux, and degrees/minutes/seconds

2011-11-24 Thread Romain Diss
Le jeudi 24 novembre 2011, robin.kirk...@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

Re: [NTG-context] \unit and Hertz, lux, and degrees/minutes/seconds

2011-11-24 Thread Pontus Lurcock
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

Re: [NTG-context] \unit and Hertz, lux, and degrees/minutes/seconds

2011-11-21 Thread Hans Hagen
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

Re: [NTG-context] \unit and Hertz, lux, and degrees/minutes/seconds

2011-11-20 Thread Robin Kirkham
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

Re: [NTG-context] \unit and Hertz, lux, and degrees/minutes/seconds

2011-11-18 Thread Pontus Lurcock
. 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

  1   2   >