[NTG-context] units related to paper size

2023-09-21 Thread Pablo Rodriguez
Dear Hans, I wonder whether it would be possible to have both units for page width and page height (I guess, pw and ph would be fine). This would be similar to tw and th. Many thanks for your help, Pablo ___ If

[NTG-context] units module for LMTX?

2023-08-13 Thread Xavier B.
I see there is no units module available anymore [1][2]: mtxrun --script install-modules --list [xan@coronari apunts-espa]$ mtxrun --script install-modules --list mtx-install-modules | loading entries from file

Re: [NTG-context] Units for volts and Ohms

2023-05-04 Thread Hans Hagen via ntg-context
On 5/2/2023 8:09 AM, Aditya Mahajan via ntg-context wrote: Hi, As I was testing circuitikz, I realized that the following don't work: \unit{1V} \unit{100 kΩ} In phys-dim.lmt, we need to change line 467: v = "volt", to V = "volt", and perhaps add (not sure if lua allows utf

[NTG-context] Units for volts and Ohms

2023-05-02 Thread Aditya Mahajan via ntg-context
Hi, As I was testing circuitikz, I realized that the following don't work: \unit{1V} \unit{100 kΩ} In phys-dim.lmt, we need to change line 467: v = "volt", to V = "volt", and perhaps add (not sure if lua allows utf variable names) Ω = "ohm",

Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun

2020-11-27 Thread Keith McKay
Thanks Taco! I understand much better now. I think it's best to leave the units out until the drawing stage as you suggest. Thanks again Keith McKay On Fri, 27 Nov 2020, 08:30 Taco Hoekwater, wrote: > > > > On 26 Nov 2020, at 16:09, Keith McKay wrote: > > > > Hi, > > > > I have been using

Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun

2020-11-27 Thread Taco Hoekwater
> On 26 Nov 2020, at 16:09, Keith McKay wrote: > > Hi, > > I have been using xpart and ypart to extract these values from pairs of > points in a path but I wasn't getting the correct result. I was expecting: > > pair (2cm, 11cm) to give xpart 2 and ypart 11 As explained by various people,

Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun

2020-11-26 Thread Keith McKay
/First « //uniformdeviate(1) - 0.5// » could be modified to « //uniformdeviate(0.5)//»./ / / /To add noise, you can use the randomized function of Metafun. For exemple, you can write:/ / / /draw pp randomized 1cm ;/ / / That's true Fabrice but in this use case I wanted a random number between

Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun

2020-11-26 Thread Keith McKay
Thanks again Hans and Fabrice, for the time you have both taken with my question and thanks for the code snippet Hans. Just one last confirmation from the snippet. Hans uses the correction factor cf on the x and yparts of a[i]. I taking this as meaning that this has to be done because the x

Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun

2020-11-26 Thread Fabrice L
Keith, > Le 26 nov. 2020 à 12:12, Keith McKay a écrit : > Thanks Fabrice and Hans. > > I now see I can simplify some lines of the code: > > pp := ((xpart a[i])/cf*cm, (ypart a[i])/cf*cm); now becomes pp:= a[i]; > > and > > pp := pp --- ((xpart a[i+1]/cf)*cm, (ypart a[i+1])/cf*cm); now

Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun

2020-11-26 Thread Hans Hagen
On 11/26/2020 6:12 PM, Keith McKay wrote: Thanks Fabrice and Hans. I now see I can simplify some lines of the code: pp := ((xpart a[i])/cf*cm, (ypart a[i])/cf*cm); now becomes pp:= a[i]; and pp := pp --- ((xpart a[i+1]/cf)*cm, (ypart a[i+1])/cf*cm); now becomes pp := pp --- a[i +1] ;

Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun

2020-11-26 Thread Keith McKay
Thanks Fabrice and Hans. I now see I can simplify some lines of the code: pp := ((xpart a[i])/cf*cm, (ypart a[i])/cf*cm); now becomes pp:= a[i]; and pp := pp --- ((xpart a[i+1]/cf)*cm, (ypart a[i+1])/cf*cm); now becomes pp := pp --- a[i +1] ; However I still have the problem in the

Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun

2020-11-26 Thread Hans Hagen
On 11/26/2020 4:09 PM, Keith McKay wrote: Hi, I have been using xpart and ypart to extract these values from pairs of points in a path but I wasn't getting the correct result. I was expecting: pair (2cm, 11cm) to give xpart 2 and ypart 11 However I was getting: pair (2cm, 11cm) -> xpart

Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun

2020-11-26 Thread Fabrice L
Hi keith, > Le 26 nov. 2020 à 10:09, Keith McKay a écrit : > > Hi, > > I have been using xpart and ypart to extract these values from pairs of > points in a path but I wasn't getting the correct result. I was expecting: > > pair (2cm, 11cm) to give xpart 2 and ypart 11 > > However I was

[NTG-context] Units of xpart and ypart of a pair in MetaFun

2020-11-26 Thread Keith McKay
Hi, I have been using xpart and ypart to extract these values from pairs of points in a path but I wasn't getting the correct result. I was expecting: pair (2cm, 11cm) to give xpart 2 and ypart 11 However I was getting: pair (2cm, 11cm) -> xpart 56.6929 and ypart 311.8096 After much head

Re: [NTG-context] Units or px

2012-05-10 Thread Hans Hagen
On 10-5-2012 00:39, Kip Warner wrote: Hey list, ConTeXt 2012.05.08 13:45 reports that the units module is deprecated and to use the px module in its place. Is it telling the truth or is this a px? the message is: The units module is obsolete because functionality is built into the core.

Re: [NTG-context] Units or px

2012-05-10 Thread Kip Warner
On Thu, 2012-05-10 at 09:55 +0200, Hans Hagen wrote: On 10-5-2012 00:39, Kip Warner wrote: Hey list, ConTeXt 2012.05.08 13:45 reports that the units module is deprecated and to use the px module in its place. Is it telling the truth or is this a px? the message is: The units module

[NTG-context] Units or px

2012-05-09 Thread Kip Warner
Hey list, ConTeXt 2012.05.08 13:45 reports that the units module is deprecated and to use the px module in its place. Is it telling the truth or is this a harmless warning? -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com signature.asc

Re: [NTG-context] Units or px

2012-05-09 Thread Wolfgang Schuster
Am 10.05.2012 um 00:39 schrieb Kip Warner: Hey list, ConTeXt 2012.05.08 13:45 reports that the units module is deprecated and to use the px module in its place. Is it telling the truth or is this a harmless warning? True and true. I guess you mean this message: “The units module is

Re: [NTG-context] Units or px

2012-05-09 Thread Kip Warner
On Wed, 2012-05-09 at 15:39 -0700, Kip Warner wrote: Hey list, ConTeXt 2012.05.08 13:45 reports that the units module is deprecated and to use the px module in its place. Is it telling the truth or is this a harmless warning? Nevermind. I'm a fool. It was a Gtk runtime that was issuing an

Re: [NTG-context] Units or px

2012-05-09 Thread Kip Warner
On Thu, 2012-05-10 at 00:50 +0200, Wolfgang Schuster wrote: True and true. I guess you mean this message: The units module is obsolete because functionality is built into the core. What the sentence tells you is that you dont need the units module because the core has a similar function

[NTG-context] Units module and unbowed letters ..

2012-04-29 Thread Jaroslav Hajtmar
Hello ConTeXist. When I work with Units module, I gain at the output of the greek mi letter an italic font. It seems strange. It is so in terms of typography correctly or not? Can also be used for typing (with units module) unbowed letters? Thanx Jaroslav Hajtmar Here is my example:

Re: [NTG-context] Units module and unbowed letters ..

2012-04-29 Thread Marco
On 2012-04-29 Jaroslav Hajtmar hajt...@gyza.cz wrote: When I work with Units module, I gain at the output of the greek mi letter an italic font. It seems strange. It is so in terms of typography correctly or not? I can't help you with that, since I don't use the module. An

[NTG-context] units

2011-11-17 Thread Hans Hagen
Hi, The next beta will have some fixes, additional units and provide \unit{35 kilogram cubic meter}\par \setupunits[unit][space=normal] \unit{35 kilogram cubic meter}\par \setupunits[unit][space=big]\unit{35 kilogram cubic meter}\par

Re: [NTG-context] units

2011-11-17 Thread Romain Diss
Hi, Le jeudi 17 novembre 2011, Hans Hagen a écrit : The next beta will have some fixes, additional units and provide Thanks for the new beta which fixes the strange behaviours precedently mentioned (milli prefix, disparition of some unit symbols). However, I inadvertently found a small bug:

Re: [NTG-context] Units misbehaving, I think

2011-09-14 Thread Ian Lawrence
Thanks Hans.. This now seems fixed. Ian On 12 Aug 2011, at 17:50, Hans Hagen wrote: On 10-8-2011 6:50, Ian Lawrence wrote: I don't think the /unit and /lunit command like a quantity that starts with a zero.. Any one else? First two work fine, last one causes all kinds of grief, in

Re: [NTG-context] Units misbehaving, I think

2011-08-10 Thread Wolfgang Schuster
Am 10.08.2011 um 18:50 schrieb Ian Lawrence: I don't think the /unit and /lunit command like a quantity that starts with a zero.. Any one else? First two work fine, last one causes all kinds of grief, in lists, lines etc. The leading zero and decimal point are zapped. \unit{1.0

Re: [NTG-context] Units fonts and spacing

2010-09-12 Thread Hans Hagen
On 11-9-2010 4:00, Wolfgang Schuster wrote: Am 11.09.2010 um 11:33 schrieb Hans Hagen: Will siunits module be used as a base for this or will this be something completely new? I don't know what you mean with siunits. Wolfgangs module? We have unit support in context for along time (also

Re: [NTG-context] Units fonts and spacing

2010-09-11 Thread Hans Hagen
On 11-9-2010 12:13, Vedran Miletić wrote: 2010/9/10 Hans Hagenpra...@wxs.nl: Is the new module with the old syntax (10 \Meter etc.) or a new one. first I'm redoing digits with regards to the units themselves, we can do both: \Meter \Per \Second and m/s) .. i'm still considering doing it at

Re: [NTG-context] Units fonts and spacing

2010-09-11 Thread Wolfgang Schuster
Am 11.09.2010 um 00:40 schrieb Vedran Miletić: To add a bit to this thread: just checked the siunits module, it's awesome. Spacing is right, sans font units work out of the box, no need for \ after the units and syntax for adding new units is very simple. You should notice the module is

Re: [NTG-context] Units fonts and spacing

2010-09-11 Thread Wolfgang Schuster
Am 11.09.2010 um 11:33 schrieb Hans Hagen: Will siunits module be used as a base for this or will this be something completely new? I don't know what you mean with siunits. Wolfgangs module? We have unit support in context for along time (also as part of some mathml extensions). So,

Re: [NTG-context] Units fonts and spacing

2010-09-11 Thread Alan BRASLAU
On Saturday 11 September 2010 16:00:58 Wolfgang Schuster wrote: I’m not a friend of the ”m/s” input because you can’t say where a units starts/ends without adding separators between them, here is a example from latex’s siunitx package which supports both methods but although the first is

Re: [NTG-context] Units fonts and spacing

2010-09-11 Thread Wolfgang Schuster
Am 11.09.2010 um 16:24 schrieb Alan BRASLAU: My two bits, for what it is worth... I have never liked the \kilo\gram\meter\per\square\second particularly as we now have utf8 input. To be most readable, kg.m/s² is far superior. (and to be digestable by non-TeX users, as yes,

Re: [NTG-context] Units fonts and spacing

2010-09-10 Thread Vedran Miletić
2010/9/9 Wolfgang Schuster schuster.wolfg...@googlemail.com: \textdimensionstrue Awesome. Are there any other useful switches? -- Vedran Miletić ___ If your question is of interest to others as well, please add an

Re: [NTG-context] Units fonts and spacing

2010-09-10 Thread Wolfgang Schuster
Am 10.09.2010 um 10:03 schrieb Vedran Miletić: 2010/9/9 Wolfgang Schuster schuster.wolfg...@googlemail.com: \textdimensionstrue Awesome. Are there any other useful switches? Beside \textdimension(true|false) there is \spaceddimensions(true|false) to add a small space between dimension.

Re: [NTG-context] Units fonts and spacing

2010-09-10 Thread Hans Hagen
On 10-9-2010 4:58, Wolfgang Schuster wrote: Am 10.09.2010 um 10:03 schrieb Vedran Miletić: 2010/9/9 Wolfgang Schusterschuster.wolfg...@googlemail.com: \textdimensionstrue Awesome. Are there any other useful switches? Beside \textdimension(true|false) there is

Re: [NTG-context] Units fonts and spacing

2010-09-10 Thread Wolfgang Schuster
Am 10.09.2010 um 17:01 schrieb Hans Hagen: With MkIV we have a powerful tool to do this because Lua make it so easy to parse and format numbers and units, see here: http://bitbucket.org/wolfs/units/src/tip/files/ I actually have a mkiv variant somewhere and will pick up that thread soon.

Re: [NTG-context] Units fonts and spacing

2010-09-10 Thread Hans Hagen
On 10-9-2010 5:06, Wolfgang Schuster wrote: Am 10.09.2010 um 17:01 schrieb Hans Hagen: With MkIV we have a powerful tool to do this because Lua make it so easy to parse and format numbers and units, see here: http://bitbucket.org/wolfs/units/src/tip/files/ I actually have a mkiv variant

Re: [NTG-context] Units fonts and spacing

2010-09-10 Thread Vedran Miletić
2010/9/10 Hans Hagen pra...@wxs.nl: Is the new module with the old syntax (10 \Meter etc.) or a new one. first I'm redoing digits with regards to the units themselves, we can do both: \Meter \Per \Second and m/s) .. i'm still considering doing it at the node end .. typical dark winternight

Re: [NTG-context] Units fonts and spacing

2010-09-10 Thread Vedran Miletić
To add a bit to this thread: just checked the siunits module, it's awesome. Spacing is right, sans font units work out of the box, no need for \ after the units and syntax for adding new units is very simple. I have a couple of questions: 1. How to change decimal separator and thousand separator?

[NTG-context] Units fonts and spacing

2010-09-09 Thread Vedran Miletić
Hello, can m-units be made to adjust it's font style to local font? For example \usemodule[units] \starttext \ss 1 \Bit\Per\Second \stoptext will still use serif font for units. Also, can m-units be set up to use spacing like 1\,\Bit\Per\Second instead of normal spacing? I saw there are some

Re: [NTG-context] Units fonts and spacing

2010-09-09 Thread Wolfgang Schuster
Am 09.09.2010 um 11:22 schrieb Vedran Miletić: Hello, can m-units be made to adjust it's font style to local font? For example \usemodule[units] \starttext \ss 1 \Bit\Per\Second \stoptext will still use serif font for units. Add \textdimensionstrue to your preamble. Wolfgang

[NTG-context] Units module - bug?

2008-09-22 Thread Marcin Borkowski
Hi, I see that the units module puts a nonstretchable/nonshrinkable space between the number and the unit. Is that ok? Perhaps the space should be thin (this is what Knuth recommends in The TeXbook, and I guess it looks nicer)? Greets -- Marcin Borkowski

Re: [NTG-context] units module has bug with markIV?

2008-09-20 Thread Aditya Mahajan
On Sat, 20 Sep 2008, Chen Shen wrote: Hi all, I wonder if anyone could help with this problem with Units in mkiv. Thanks a lot. regards, shenchen On Wed, Sep 3, 2008 at 9:36 AM, Chen Shen [EMAIL PROTECTED] wrote: Hi all, \Micro in the units module failed, while \Nano and \Milli works fine.

Re: [NTG-context] units module has bug with markIV?

2008-09-20 Thread Taco Hoekwater
Aditya Mahajan wrote: I am just writing to say that I looked at your original message, but could not figure out what is going wrong. \Micro is expanded to μ, but then something goes wrong. Hans, Taco, can you see what is happening here? That took some thinking. The error is caused by

Re: [NTG-context] units module has bug with markIV?

2008-09-20 Thread Chen Shen
On Sat, Sep 20, 2008 at 6:28 PM, Taco Hoekwater [EMAIL PROTECTED] wrote: And as an aside, it would be nicer to use U+00B5 (mu latin) in the units module instead of U+03BC (mu greek). \def\Micro {\dimensionprefix{\iftextdimensions u\else\hbox{µ}\fi}} The \hbox is needed because \fam11 is

Re: [NTG-context] units module has bug with markIV?

2008-09-19 Thread Chen Shen
Hi all, I wonder if anyone could help with this problem with Units in mkiv. Thanks a lot. regards, shenchen On Wed, Sep 3, 2008 at 9:36 AM, Chen Shen [EMAIL PROTECTED] wrote: Hi all, \Micro in the units module failed, while \Nano and \Milli works fine. $\mu$ works, so it doesn't look like a

[NTG-context] units module has bug with markIV?

2008-09-02 Thread Chen Shen
Hi all, \Micro in the units module failed, while \Nano and \Milli works fine. $\mu$ works, so it doesn't look like a font problem. The following code works with pdftex/MarkII, but fails under Luatex 0.29beta/MarkIV. \usemodule[units] \starttext Hello world! $1\Micro\Meter$ $1\Micro\Second$

[NTG-context] units: \spacedimensionstrue fails when using unit powers

2006-08-02 Thread Sanjoy Mahajan
I'm considering switching from my units macros to the units module. In doing that I'm trying \spaceddimensionstrue (found in the m-units.tex source), which is the most common convention in physics tables and books, rather than using \Times to separate quantities with a dot. But it seems not to

Re: [NTG-context] units: \spacedimensionstrue fails when using unit powers

2006-08-02 Thread Hans Hagen
Sanjoy Mahajan wrote: I'm considering switching from my units macros to the units module. In doing that I'm trying \spaceddimensionstrue (found in the m-units.tex source), which is the most common convention in physics tables and books, rather than using \Times to separate quantities with a

Re: [NTG-context] Units and XML

2006-04-11 Thread Hans Hagen
Johannes Graumann wrote: Something else: How to define a custom unit (basepairs, bp) with physml/units? something \unit [Basepairs] {bp} {Base Pairs} \defineXMLsingular [Basepairs] {\handlePMLunit\Basepairs} -

Re: [NTG-context] Units and XML

2006-04-10 Thread Hans Hagen
Johannes Graumann wrote: Hans, Since you seem to be working on this: when using inline physml I noticed that physapplyunit/cn1/cncsymbolMicro/Gram/Per/Milli/Liter//csymbol/apply/phys when used in a figure caption formated like this: \setupcaptions[style=small,width=\textwidth] does not

Re: [NTG-context] Units and XML

2006-04-10 Thread Johannes Graumann
Hans Hagen wrote: what you need is a full switch: style=smallbodyfont (or as command \smallbodyfont) \setupcaptions[style=smallbodyfont,width=\textwidth] did it. Thanks. ... wikify ... Thesis first than this ;0) How would I add singlespacedness to the command above? Joh

Re: [NTG-context] Units and XML

2006-04-10 Thread Hans Hagen
Johannes Graumann wrote: How would I add singlespacedness to the command above? i dunno what that is Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt |

Re: [NTG-context] Units and XML

2006-04-10 Thread Johannes Graumann
Hans Hagen wrote: How would I add singlespacedness to the command above? i dunno what that is Serves me right ... coming up with my own lingo ... my document is doubly spaced (\setupinterlinespace[line=2\bodyfontsize]) and I was trying to get the float captions singly spaced. Have stuffed

Re: [NTG-context] Units and XML

2006-04-10 Thread Hans Hagen
Johannes Graumann wrote: Hans Hagen wrote: How would I add singlespacedness to the command above? i dunno what that is Serves me right ... coming up with my own lingo ... my document is doubly spaced (\setupinterlinespace[line=2\bodyfontsize]) and I was trying to get the

Re: [NTG-context] Units and XML

2006-04-09 Thread Johannes Graumann
Hans Hagen wrote: newmmu is now newpml and works with newmml (the old and new methods cannot be used mixed because they use completely different internals [direct xml handling using stacks versus xml-tex expansion] system : module newpml not found system : module newmml not

Re: [NTG-context] Units and XML

2006-04-09 Thread Hans Hagen
Johannes Graumann wrote: Hans Hagen wrote: newmmu is now newpml and works with newmml (the old and new methods cannot be used mixed because they use completely different internals [direct xml handling using stacks versus xml-tex expansion] system : module newpml not found

Re: [NTG-context] Units and XML

2006-04-09 Thread Johannes Graumann
Hans, Since you seem to be working on this: when using inline physml I noticed that physapplyunit/cn1/cncsymbolMicro/Gram/Per/Milli/Liter//csymbol/apply/phys when used in a figure caption formated like this: \setupcaptions[style=small,width=\textwidth] does not scale properly - it remains at

Re: [NTG-context] Units and XML

2006-04-08 Thread Hans Hagen
Johannes Graumann wrote: physapplyunit/cn4/cncsymbolDegrees/Celsius//csymbol/apply/phys works with physml, but not with newmmu. newmmu is now newpml and works with newmml (the old and new methods cannot be used mixed because they use completely different internals [direct xml handling

[NTG-context] Units and XML

2006-04-07 Thread Johannes Graumann
Hello, Has anyone come up with a sense making way of coding units in XML and mapping them onto ConTeXt's 'units' module ... makes a knot in my brain ... Thnaks, Joh ___ ntg-context mailing list ntg-context@ntg.nl

Re: [NTG-context] Units and XML

2006-04-07 Thread Hans Hagen
Johannes Graumann wrote: Hello, Has anyone come up with a sense making way of coding units in XML and mapping them onto ConTeXt's 'units' module ... makes a knot in my brain ... there is a manual on the website ... physml the old module: \usemodule[physml] the new one (newmml):

Re: [NTG-context] Units and XML

2006-04-07 Thread Johannes Graumann
physapplyunit/cn4/cncsymbolDegrees/Celsius//csymbol/apply/phys works with physml, but not with newmmu. Geee, looks like I'm starting to find things in the guts of this ;0) Joh P.S.: What's your favorite beer/drink? Joh ___ ntg-context mailing list

Re: [NTG-context] Units and XML

2006-04-07 Thread Johannes Graumann
Something else: How to define a custom unit (basepairs, bp) with physml/units? Joh Johannes Graumann wrote: physapplyunit/cn4/cncsymbolDegrees/Celsius//csymbol/apply/phys works with physml, but not with newmmu. Geee, looks like I'm starting to find things in the guts of this ;0) Joh

[NTG-context] Units -- a few things

2006-01-20 Thread Ville Voipio
There seems to be a small glitch in m-units.tex. The unit \Bit typesets Bit. This is wrong, as bits are always in lowercase first letter: a single bit: bit a byte: B It is also possible to use b (for bit) and Byte (for B). However, bits are always small and Bytes large. The best practice

Re: [NTG-context] Units -- a few things

2006-01-20 Thread Hans Hagen
Ville Voipio wrote: Well, then to a more practical thing... This is a very trivial question, but still. When writing a number and the unit, it would be nice to have automatic formatting. What I mean is that when I have a million two hundred thousand kilograms, I would like it to be typeset: