Re: [NTG-context] integer displayed as .0 float in Lua-5.3

2018-08-12 Thread Arthur Reutenauer
On Sat, Aug 11, 2018 at 11:29:41AM +0200, Pablo Rodriguez wrote: > I realize that the fault is mine, but with backwards compatibility I > meant that the same operation (10 + "10") gives different results with > different Lua versions. It doesn’t, it returns 10 in both cases. The difference is

Re: [NTG-context] integer displayed as .0 float in Lua-5.3

2018-08-12 Thread Hans Hagen
On 8/11/2018 11:33 AM, Pablo Rodriguez wrote: On 08/09/2018 10:20 PM, Hans Åberg wrote: On 9 Aug 2018, at 21:20, Pablo Rodriguez wrote: [...] My background is in humanities and I don’t understand the exponent for being a float ("10²" contains an exponent

Re: [NTG-context] integer displayed as .0 float in Lua-5.3

2018-08-11 Thread Alan Braslau
On Sat, 11 Aug 2018 11:29:41 +0200 Pablo Rodriguez wrote: > On 08/09/2018 10:16 PM, Alan Braslau wrote: > > On Thu, 9 Aug 2018 22:00:48 +0200 > > Pablo Rodriguez wrote: > > > >> I guess that backwards compatibility should be important here, but I > >> hope there are stronger reasons for

Re: [NTG-context] integer displayed as .0 float in Lua-5.3

2018-08-11 Thread Hans Åberg
> On 11 Aug 2018, at 11:33, Pablo Rodriguez wrote: > > On 08/09/2018 10:20 PM, Hans Åberg wrote: >>> On 9 Aug 2018, at 21:20, Pablo Rodriguez wrote: >>> [...] >>> My background is in humanities and I don’t understand the exponent for >>> being a float ("10²" contains an exponent >>>

Re: [NTG-context] integer displayed as .0 float in Lua-5.3

2018-08-11 Thread Pablo Rodriguez
On 08/09/2018 10:25 PM, Hans Hagen wrote: > In addition to what others already explained, you should not depend on > features that are implementation dependent or might disappear. Many thanks for your detailed explanation, Hans. I had no idea that the automatic conversion from string to number

Re: [NTG-context] integer displayed as .0 float in Lua-5.3

2018-08-11 Thread Pablo Rodriguez
On 08/09/2018 10:20 PM, Hans Åberg wrote: >> On 9 Aug 2018, at 21:20, Pablo Rodriguez wrote: >> [...] >> My background is in humanities and I don’t understand the exponent for >> being a float ("10²" contains an exponent >> [https://www.m-w.com/dictionary/exponent], but I would say is an integer

Re: [NTG-context] integer displayed as .0 float in Lua-5.3

2018-08-11 Thread Pablo Rodriguez
On 08/09/2018 10:16 PM, Alan Braslau wrote: > On Thu, 9 Aug 2018 22:00:48 +0200 > Pablo Rodriguez wrote: > >> I guess that backwards compatibility should be important here, but I >> hope there are stronger reasons for breaking it. > > tonumber() provides backwards compatibility. And the

Re: [NTG-context] integer displayed as .0 float in Lua-5.3

2018-08-09 Thread Hans Hagen
On 8/9/2018 10:00 PM, Pablo Rodriguez wrote: On 08/09/2018 09:34 PM, Alan Braslau wrote: The lua manual also states that one should NOT rely on the implicit conversion of a string to its numerical value, and suggests the systematic use of tonumber(). Many thanks for your reply, Alan. I guess

Re: [NTG-context] integer displayed as .0 float in Lua-5.3

2018-08-09 Thread Hans Åberg
> On 9 Aug 2018, at 21:20, Pablo Rodriguez wrote: > > A numeric constant with a radix point or an exponent denotes a > float; otherwise, if its value fits in an integer, it denotes an > integer. > > Well, "10.0" contains the radix point, but with no arithmetical relevance. > > My

Re: [NTG-context] integer displayed as .0 float in Lua-5.3

2018-08-09 Thread Alan Braslau
On Thu, 9 Aug 2018 22:00:48 +0200 Pablo Rodriguez wrote: > I guess that backwards compatibility should be important here, but I > hope there are stronger reasons for breaking it. tonumber() provides backwards compatibility. And the recommendation to use it was in the third edition (of the lua

Re: [NTG-context] integer displayed as .0 float in Lua-5.3

2018-08-09 Thread Pablo Rodriguez
On 08/09/2018 09:34 PM, Alan Braslau wrote: > The lua manual also states that one should NOT rely on the implicit > conversion of a string to its numerical value, and suggests the > systematic use of tonumber(). Many thanks for your reply, Alan. I guess that backwards compatibility should be

Re: [NTG-context] integer displayed as .0 float in Lua-5.3

2018-08-09 Thread Alan Braslau
The lua manual also states that one should NOT rely on the implicit conversion of a string to its numerical value, and suggests the systematic use of tonumber(). Alan On Thu, 9 Aug 2018 21:20:54 +0200 Pablo Rodriguez wrote: > On 08/09/2018 08:12 PM, Wolfgang Schuster wrote: > > Use

Re: [NTG-context] integer displayed as .0 float in Lua-5.3

2018-08-09 Thread Pablo Rodriguez
On 08/09/2018 08:12 PM, Wolfgang Schuster wrote: > Use tonumber. Many thanks for your reply, Wolfgang. The issue is in Lua itself: print(5+"5") In versions prior to 5.3, result is "10". From version 5.3, result is "10.0", I would say this might be a bug. According to the “Lua 5.3 Reference

Re: [NTG-context] integer displayed as .0 float in Lua-5.3

2018-08-09 Thread Wolfgang Schuster
Use tonumber. %% \starttext \cldcontext{\lastpage + 1} \cldcontext{"\lastpage" + 1} \cldcontext{tonumber("\lastpage") + 1} \stoptext %% Wolfgang Pablo Rodriguez schrieb am 09.08.18 um 20:02: Dear list, I have the following sample \starttext \startTEXpage[offset=1em]

[NTG-context] integer displayed as .0 float in Lua-5.3

2018-08-09 Thread Pablo Rodriguez
Dear list, I have the following sample \starttext \startTEXpage[offset=1em] Pages: \ctxlua{context([[\lastpage]])}. Next page: \ctxlua{context([[\lastpage]] + 1)}. (Lua \luaversion) \stopTEXpage \stoptext With Lua-5.2 (ConTeXt with JIT), I get the expected results.

Re: [NTG-context] ⅛ not displayed

2011-10-30 Thread Wolfgang Schuster
Am 29.10.2011 um 18:27 schrieb Paul Menzel: Dear ConTeXt folks, some fractions (input using Compose) are not displayed in the resulting PDF files. \starttext ⅛ ist $\frac18$. ½, ⅓, ¼, ⅕, ⅙, ⅛ \stoptext I guess this is a font problem, but maybe fall

Re: [NTG-context] ⅛ not displayed

2011-10-30 Thread luigi scarso
On Sun, Oct 30, 2011 at 9:44 AM, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 29.10.2011 um 18:27 schrieb Paul Menzel: Dear ConTeXt folks, some fractions (input using Compose) are not displayed in the resulting PDF files.        \starttext        ⅛ ist $\frac18$.      

Re: [NTG-context] ⅛ not displayed

2011-10-30 Thread Wolfgang Schuster
Am 30.10.2011 um 09:49 schrieb luigi scarso: On Sun, Oct 30, 2011 at 9:44 AM, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 29.10.2011 um 18:27 schrieb Paul Menzel: Dear ConTeXt folks, some fractions (input using Compose) are not displayed in the resulting PDF files.

Re: [NTG-context] ⅛ not displayed

2011-10-30 Thread Hans Hagen
On 30-10-2011 09:44, Wolfgang Schuster wrote: Am 29.10.2011 um 18:27 schrieb Paul Menzel: Dear ConTeXt folks, some fractions (input using Compose) are not displayed in the resulting PDF files. \starttext ⅛ ist $\frac18$. ½, ⅓, ¼, ⅕, ⅙, ⅛ \stoptext I guess

[NTG-context] ⅛ not displayed

2011-10-29 Thread Paul Menzel
Dear ConTeXt folks, some fractions (input using Compose) are not displayed in the resulting PDF files. \starttext ⅛ ist $\frac18$. ½, ⅓, ¼, ⅕, ⅙, ⅛ \stoptext I guess this is a font problem, but maybe fall backs could be added? Thanks, Paul

Re: [NTG-context] ⅛ not displayed in Latin Modern

2011-10-29 Thread Paul Menzel
Dear ConTeXt folks, Am Samstag, den 29.10.2011, 18:27 +0200 schrieb Paul Menzel: some fractions (input using Compose) are not displayed in the resulting PDF files. \starttext ⅛ ist $\frac18$. ½, ⅓, ¼, ⅕, ⅙, ⅛ \stoptext I guess this is a font

Re: [NTG-context] ⅛ not displayed in Latin Modern

2011-10-29 Thread Paul Menzel
Dear ConTeXt folks, I forgot to append the links. Am Samstag, den 29.10.2011, 23:12 +0200 schrieb Paul Menzel: Am Samstag, den 29.10.2011, 18:27 +0200 schrieb Paul Menzel: some fractions (input using Compose) are not displayed in the resulting PDF files. \starttext