ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Strange behavior in math mode: < and minus sign give leftarrow
@ 2019-04-10  7:21 Otared Kavian
  2019-04-10  7:40 ` Mikael P. Sundqvist
  0 siblings, 1 reply; 8+ messages in thread
From: Otared Kavian @ 2019-04-10  7:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Hans,

While testing old documents with lmtx, I noticed that with recent versions of mkiv, as well as LuaMetaTeX, there is a strange behavior in math mode: when the characters < and - follow each other one gets \leftarrow… This is embarrassing when one writes inequalities for negative numbers.
So one has to separate them in order to obtain with curly braces. Can this be fixed or is it intended ?

\starttext
$\alpha < -1$ 

$\alpha \leftarrow 1$

$\alpha < {-1}$

$\alpha {<} - 1$
\stoptext

Best regards: OK
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Strange behavior in math mode: < and minus sign give leftarrow
  2019-04-10  7:21 Strange behavior in math mode: < and minus sign give leftarrow Otared Kavian
@ 2019-04-10  7:40 ` Mikael P. Sundqvist
  2019-04-10  7:53   ` Hans Hagen
  2019-04-10  7:57   ` Otared Kavian
  0 siblings, 2 replies; 8+ messages in thread
From: Mikael P. Sundqvist @ 2019-04-10  7:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, Apr 10, 2019 at 9:21 AM Otared Kavian <otared@gmail.com> wrote:
>
> Hi Hans,
>
> While testing old documents with lmtx, I noticed that with recent versions of mkiv, as well as LuaMetaTeX, there is a strange behavior in math mode: when the characters < and - follow each other one gets \leftarrow… This is embarrassing when one writes inequalities for negative numbers.
> So one has to separate them in order to obtain with curly braces. Can this be fixed or is it intended ?
>
> \starttext
> $\alpha < -1$
>
> $\alpha \leftarrow 1$
>
> $\alpha < {-1}$
>
> $\alpha {<} - 1$
> \stoptext
>
> Best regards: OK
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

Hi!

I asked about this before, and it is a feature.

It can be switched off with

\setupmathematics[
collapsing=1,
]

Hope it helps!

/Mikael
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Strange behavior in math mode: < and minus sign give leftarrow
  2019-04-10  7:40 ` Mikael P. Sundqvist
@ 2019-04-10  7:53   ` Hans Hagen
  2019-04-10  8:09     ` Otared Kavian
  2019-04-10 12:19     ` Aditya Mahajan
  2019-04-10  7:57   ` Otared Kavian
  1 sibling, 2 replies; 8+ messages in thread
From: Hans Hagen @ 2019-04-10  7:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Mikael P. Sundqvist, Aditya Mahajan

On 4/10/2019 9:40 AM, Mikael P. Sundqvist wrote:
> On Wed, Apr 10, 2019 at 9:21 AM Otared Kavian <otared@gmail.com> wrote:
>>
>> Hi Hans,
>>
>> While testing old documents with lmtx, I noticed that with recent versions of mkiv, as well as LuaMetaTeX, there is a strange behavior in math mode: when the characters < and - follow each other one gets \leftarrow… This is embarrassing when one writes inequalities for negative numbers.
>> So one has to separate them in order to obtain with curly braces. Can this be fixed or is it intended ?
>>
>> \starttext
>> $\alpha < -1$
>>
>> $\alpha \leftarrow 1$
>>
>> $\alpha < {-1}$
>>
>> $\alpha {<} - 1$
>> \stoptext
>>
>> Best regards: OK
>> ___________________________________________________________________________________
>> 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://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki     : http://contextgarden.net
>> ___________________________________________________________________________________
> 
> Hi!
> 
> I asked about this before, and it is a feature.
> 
> It can be switched off with
> 
> \setupmathematics[
> collapsing=1,
> ]
> 
> Hope it helps!
Indeed. Aditya is in charge of decisions about these defaults so if you 
want it differently you need to convince him. (I'm not sure how many 
users depend on it.)

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Strange behavior in math mode: < and minus sign give leftarrow
  2019-04-10  7:40 ` Mikael P. Sundqvist
  2019-04-10  7:53   ` Hans Hagen
@ 2019-04-10  7:57   ` Otared Kavian
  1 sibling, 0 replies; 8+ messages in thread
From: Otared Kavian @ 2019-04-10  7:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Mikael,

Thanks for your quick reply.
Indeed I did not know about this feature, and setting collapsing=1 solves my problem…

Best regards: OK

> On 10 Apr 2019, at 09:40, Mikael P. Sundqvist <mickep@gmail.com> wrote:
> 
> On Wed, Apr 10, 2019 at 9:21 AM Otared Kavian <otared@gmail.com> wrote:
>> […]
> 
> Hi!
> 
> I asked about this before, and it is a feature.
> 
> It can be switched off with
> 
> \setupmathematics[
> collapsing=1,
> ]
> 
> Hope it helps!
> 
> /Mikael


___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Strange behavior in math mode: < and minus sign give leftarrow
  2019-04-10  7:53   ` Hans Hagen
@ 2019-04-10  8:09     ` Otared Kavian
  2019-04-10 14:41       ` Alan Braslau
  2019-04-10 12:19     ` Aditya Mahajan
  1 sibling, 1 reply; 8+ messages in thread
From: Otared Kavian @ 2019-04-10  8:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Thanks Hans for your attention!

The problem of such an usual default is also with newcomers who would not know about this feature in ConTeXt: when one writes maths one would not guess that typing an inequality like $n < -1$ would end up in $n \leftarrow 1$. And writing such inequalities is very common… while \leftarrow is used seldom in a mathematical text.
So I think having the default collapsing=1 would be more logical, and more in line with the spirit of TeX.

I hope Aditya will be convinced…

Best regards: OK

> On 10 Apr 2019, at 09:53, Hans Hagen <j.hagen@xs4all.nl> wrote:
> 
> On 4/10/2019 9:40 AM, Mikael P. Sundqvist wrote:
>> On Wed, Apr 10, 2019 at 9:21 AM Otared Kavian <otared@gmail.com> wrote:
>>> […
> Indeed. Aditya is in charge of decisions about these defaults so if you want it differently you need to convince him. (I'm not sure how many users depend on it.)
> 
> Hans
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Strange behavior in math mode: < and minus sign give leftarrow
  2019-04-10  7:53   ` Hans Hagen
  2019-04-10  8:09     ` Otared Kavian
@ 2019-04-10 12:19     ` Aditya Mahajan
  2019-04-10 21:01       ` Hans Hagen
  1 sibling, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2019-04-10 12:19 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users, Mikael P. Sundqvist

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

On Wed, 10 Apr 2019, Hans Hagen wrote:

> On 4/10/2019 9:40 AM, Mikael P. Sundqvist wrote:
>> On Wed, Apr 10, 2019 at 9:21 AM Otared Kavian <otared@gmail.com> wrote:
>>> 
>>> Hi Hans,
>>> 
>>> While testing old documents with lmtx, I noticed that with recent versions 
>>> of mkiv, as well as LuaMetaTeX, there is a strange behavior in math mode: 
>>> when the characters < and - follow each other one gets \leftarrow… This is 
>>> embarrassing when one writes inequalities for negative numbers.
>>> So one has to separate them in order to obtain with curly braces. Can this 
>>> be fixed or is it intended ?
>>> 
>>> \starttext
>>> $\alpha < -1$
>>> 
>>> $\alpha \leftarrow 1$
>>> 
>>> $\alpha < {-1}$
>>> 
>>> $\alpha {<} - 1$
>>> \stoptext
>>> 
>>> Best regards: OK
>> 
>> Hi!
>> 
>> I asked about this before, and it is a feature.
>> 
>> It can be switched off with
>> 
>> \setupmathematics[
>> collapsing=1,
>> ]
>> 
>> Hope it helps!
> Indeed. Aditya is in charge of decisions about these defaults so if you want 
> it differently you need to convince him. (I'm not sure how many users depend 
> on it.)

We can turn it off by default. But it might be better to have a more 
versbose interface:

   \setupmathematics[collapsing=yes|no]

with the default value being collapsing=no.

Aditya

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Strange behavior in math mode: < and minus sign give leftarrow
  2019-04-10  8:09     ` Otared Kavian
@ 2019-04-10 14:41       ` Alan Braslau
  0 siblings, 0 replies; 8+ messages in thread
From: Alan Braslau @ 2019-04-10 14:41 UTC (permalink / raw)
  To: Otared Kavian; +Cc: mailing list for ConTeXt users

On Wed, 10 Apr 2019 10:09:31 +0200
Otared Kavian <otared@gmail.com> wrote:

> The problem of such an usual default is also with newcomers who would not know about this feature in ConTeXt: when one writes maths one would not guess that typing an inequality like $n < -1$ would end up in $n \leftarrow 1$. And writing such inequalities is very common… while \leftarrow is used seldom in a mathematical text.
> So I think having the default collapsing=1 would be more logical, and more in line with the spirit of TeX.
> 
> I hope Aditya will be convinced…

And since we have utf-8 input, such "features" are anachronistic and should not be on by default. ←

Alan
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Strange behavior in math mode: < and minus sign give leftarrow
  2019-04-10 12:19     ` Aditya Mahajan
@ 2019-04-10 21:01       ` Hans Hagen
  0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2019-04-10 21:01 UTC (permalink / raw)
  To: Aditya Mahajan; +Cc: mailing list for ConTeXt users, Mikael P. Sundqvist

On 4/10/2019 2:19 PM, Aditya Mahajan wrote:
> On Wed, 10 Apr 2019, Hans Hagen wrote:
> 
>> On 4/10/2019 9:40 AM, Mikael P. Sundqvist wrote:
>>> On Wed, Apr 10, 2019 at 9:21 AM Otared Kavian <otared@gmail.com> wrote:
>>>>
>>>> Hi Hans,
>>>>
>>>> While testing old documents with lmtx, I noticed that with recent 
>>>> versions of mkiv, as well as LuaMetaTeX, there is a strange behavior 
>>>> in math mode: when the characters < and - follow each other one gets 
>>>> \leftarrow… This is embarrassing when one writes inequalities for 
>>>> negative numbers.
>>>> So one has to separate them in order to obtain with curly braces. 
>>>> Can this be fixed or is it intended ?
>>>>
>>>> \starttext
>>>> $\alpha < -1$
>>>>
>>>> $\alpha \leftarrow 1$
>>>>
>>>> $\alpha < {-1}$
>>>>
>>>> $\alpha {<} - 1$
>>>> \stoptext
>>>>
>>>> Best regards: OK
>>>
>>> Hi!
>>>
>>> I asked about this before, and it is a feature.
>>>
>>> It can be switched off with
>>>
>>> \setupmathematics[
>>> collapsing=1,
>>> ]
>>>
>>> Hope it helps!
>> Indeed. Aditya is in charge of decisions about these defaults so if 
>> you want it differently you need to convince him. (I'm not sure how 
>> many users depend on it.)
> 
> We can turn it off by default. But it might be better to have a more 
> versbose interface:
> 
>    \setupmathematics[collapsing=yes|no]
> 
> with the default value being collapsing=no.

we already have "none" and th enumbers represent:

1 specials
2 specials + mathlist
3 mathlist + specials

Now that Alan is entering his math in unicode symbols we can default to 
'none'.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2019-04-10 21:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-10  7:21 Strange behavior in math mode: < and minus sign give leftarrow Otared Kavian
2019-04-10  7:40 ` Mikael P. Sundqvist
2019-04-10  7:53   ` Hans Hagen
2019-04-10  8:09     ` Otared Kavian
2019-04-10 14:41       ` Alan Braslau
2019-04-10 12:19     ` Aditya Mahajan
2019-04-10 21:01       ` Hans Hagen
2019-04-10  7:57   ` Otared Kavian

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