[NTG-context] Re: \unit{mercury} renders as m (meter) and \unit{millimetermercury} doesn't work as expected

2023-12-05 Thread Marco Patzer
On Tue, 5 Dec 2023 20:06:46 +0100 Wolfgang Schuster wrote: > > That doesn't make sense, inch and mm are different units. I'd rather > > add: > > > >\registerunit > > [inHg=inchmercury] > > > >\setupunittext > > [en] > >

[NTG-context] Re: \unit{mercury} renders as m (meter) and \unit{millimetermercury} doesn't work as expected

2023-12-05 Thread Wolfgang Schuster
Marco Patzer schrieb am 05.12.2023 um 19:58: \setupunittext[en][millimetermercury=inHg] That doesn't make sense, inch and mm are different units. I'd rather add: \registerunit [inHg=inchmercury] \setupunittext [en] [inchmercury=inHg] It's just a stupid example to show

[NTG-context] Re: \unit{mercury} renders as m (meter) and \unit{millimetermercury} doesn't work as expected

2023-12-05 Thread Marco Patzer
ick reply. > \setupunittext[en][millimetermercury=inHg] That doesn't make sense, inch and mm are different units. I'd rather add: \registerunit [inHg=inchmercury] \setupunittext [en] [inchmercury=

[NTG-context] Re: \unit{mercury} renders as m (meter) and \unit{millimetermercury} doesn't work as expected

2023-12-05 Thread Wolfgang Schuster
[physics.units] %% inch should render as “in” %% \setupunittext [inch=in] \starttext \unit{mercury}\crlf %% renders: mm · m \unit{12 millimetermercury}\crlf %% renders: mm · m \unit{12 inchmercury}\crlf%% renders: in · m %% why is this necessary to get mercury rendered as Hg

[NTG-context] \unit{mercury} renders as m (meter) and \unit{millimetermercury} doesn't work as expected

2023-12-05 Thread Marco Patzer
, not as mmHg \unit{millimetermercury} How to get millimetermercury render as mmHg? And “inch mercury” render as inHg? I can't find “inchmercury” in phys-dim.lua, only “millimetermercury”, should it be added? Example: %% \enabletrackers [physics.units] %% inch should render as “in” %% \setupunittext

[NTG-context] Re: Using Farad with \unit messes up feet, µ not recognised as prefix

2023-10-03 Thread Wolfgang Schuster
Marco Patzer schrieb am 03.10.2023 um 12:31: Hi! I struggle using the unit Farad (unit of capacitance): The unit "farad" exists. \starttext %% prints 10 10 ft \unit{10 F} \unit{20 ft} \registerunit [F=Farad] \setupunittext [Farad=F] %% prints 10 F 20 F⋅t \unit{10 F} \

[NTG-context] Using Farad with \unit messes up feet, µ not recognised as prefix

2023-10-03 Thread Marco Patzer
Hi! I struggle using the unit Farad (unit of capacitance): \starttext %% prints 10 10 ft \unit{10 F} \unit{20 ft} \registerunit [F=Farad] \setupunittext [Farad=F] %% prints 10 F 20 F⋅t \unit{10 F} \unit{20 ft} \stoptext When registering Farad as new unit it messes up feet. This looks like

Re: [NTG-context] \unit parser ignoring case, in some cases.

2023-03-14 Thread Hans Hagen via ntg-context
ing at why my \registerunit attempt failed, I found that when you register a unit, both your capitalization, and an all lowercase version are registered. Here is an example, where I register “ReTeM” but \unit{1 retem} also works. \starttext \registerunit[unit][ReTeM=myunit] \setupunittext[myun

Re: [NTG-context] \unit parser ignoring case, in some cases.

2023-03-14 Thread Gavin via ntg-context
ing now. Looking at why my \registerunit attempt failed, I found that when you register a unit, both your capitalization, and an all lowercase version are registered. Here is an example, where I register “ReTeM” but \unit{1 retem} also works. \starttext \registerunit[unit][ReTeM=myunit] \se

Re: [NTG-context] Spacing in \unit - degrees

2022-10-12 Thread Gavin via ntg-context
quires mucking around in phys-dim.lua, which I’m not going to touch. Use \unit{135 celsius} if you want the space, and 135\unit{celsius} if you don’t. Or you can add your favorite abbreviations: \registerunit[ °C=°C, ] \setupunittext[ °C=℃, ] Then use \unit{135°C} if you want the space a

Re: [NTG-context] A problem with units

2012-11-23 Thread Romain Diss
with \registerunit[unit] and \setupunittext (see line 652 in phys-dim.mkiv): \starttext \registerunit [unit] [minute=minute] \setupunittext [minute=min] \unit{45 minute} \stoptext However, I'm unable to explain what exactly \registerunit or \setupunittext does. -- Romain Diss romain.d...@yahoo.fr

Re: [NTG-context] built-in units command (mkiv) fails

2012-08-26 Thread Wolfgang Schuster
kilometersolidushour ConTeXt: ver: 2012.08.16 22:20 MKIV fmt: 2012.8.22 phys-dim.mkiv %\ctxlua{ %languages.labels.define(setupprefixtext,prefixes)% %languages.labels.define(setupunittext,units)% %languages.labels.define(setupoperatortext,operators)% %languages.labels.define

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