Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-20 Thread Hans Åberg

> On 15 May 2016, at 19:32, Hans Åberg  wrote:
> 
>> On 15 May 2016, at 19:14, Hans Hagen  wrote:
>> 
>> On 5/15/2016 2:33 PM, Hans Åberg wrote:

>>> Maybe a way to distinguish between unary prefix operator “-“, and binary 
>>> infix operator “-“: {} is interpreted as an empty operand, thus infix “-", 
>>> whereas \relax is removed from the input meaning no operand, so prefix “-“. 
>>> But \relax can have sub-/super-scripts, just as {}, and then in both cases, 
>>> “–“ becomes binary:
>>> 
>>> \startformula {}^2 - a \stopformula
>>> \startformula \relax^2 - a \stopformula
>> 
>> why not use something more natural unicode
>> 
>> \startformula  \zwnj^2 - a \stopformula
> 
> The TeX Book recommends using {} for superscripts to the lefts side, eg.
> \startformula  {}_a^b C_d^e \stopformula

In addition to this usage, one can use {} for tensor-component notation:

\setupbodyfont[xits,10pt]

\setupmathematics[integral=nolimits]

The Ricci tensor
\startformula\relax
   R^i{}_{ikj}
\stopformula


There might be module or page for tensor component notation, if somebody would 
request it:

There is a standard ISO 8-2 [1-2] for natural sciences and technology, but 
not for pure math then, which I recall call for tensors expanded into 
components to be typed in sans-serif. In pure math, one is using serifs as 
always, with some other differences, usually sticking to a mathematically 
complete description with summation signs and basis.

1. http://www.ise.ncsu.edu/jwilson/files/mathsigns.pdf
2. https://en.wikipedia.org/wiki/ISO_8-2


___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-20 Thread Hans Åberg

> On 15 May 2016, at 20:00, Hans Hagen  wrote:
> 
> On 5/15/2016 7:44 PM, Hans Åberg wrote:

>> Invisibles of different semantic meaning are pretty tricky to use in the 
>> input, because it is hard to detect errors.
> 
> a proper monospace editor font would show it

In the Xcode text editor, one can show invisibles, but it does not tell which 
one, just showing a diamond, except for the NO-BREAK SPACE U+00A0, shown just 
as a space. In the mono-space font they are equal. If switching to the STIX 
fonts, suitable for math, then there is no THIN SPACE U+2009, so the editor 
switches to Lucida, in which it is nearly as wide as the no-break space.

Otherwise, this editor has good Unicode support. So \, and \! will prevail, 
though it might be nice to have visually less intrusive commands.


___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-20 Thread Hans Åberg

> On 13 May 2016, at 12:22, Hans Hagen  wrote:

> in principle one can make ∫ and \int but that has other side effects

> \appendtoks
>\catcode`∫=\activecatcode
> \to \everymathematics

One should add
  \def\∫{∫}
before the code above. This way one can use both. For example:

\setupbodyfont[xits,10pt]

\def\∫{∫}

\appendtoks
\catcode`∫=\activecatcode
\letcharcode `∫ \int
\to \everymathematics

\setupmathematics[integral=nolimits]

Nolimits $\int_0^∞ f ω$, and $∫_0^∞ f ω$, and $\∫_0^∞ f ω$.

\startformula\relax
   ∫_0^∞ f ω, \quad \∫_0^∞ f ω, \quad \int_0^∞ f ω
\stopformula



___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-15 Thread Hans Hagen

On 5/15/2016 7:44 PM, Hans Åberg wrote:



On 15 May 2016, at 19:35, Wolfgang Schuster  wrote:


Hans Åberg 15. Mai 2016 um 19:32

What is \zwnj?

zero width non-joiner


OK. Invisibles of different semantic meaning are pretty tricky to use in the 
input, because it is hard to detect errors.


a proper monospace editor font would show it


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-15 Thread Hans Åberg

> On 15 May 2016, at 19:14, Hans Hagen  wrote:
> 
> On 5/15/2016 2:33 PM, Hans Åberg wrote:
>> 
>>> On 14 May 2016, at 23:26, Aditya Mahajan  wrote:
>> 
>>> Be careful with empty group in math mode:
>>> 
>>> \startformula{} -a \stopformula
>>> \startformula\relax -a \stopformula
>> 
>> Maybe a way to distinguish between unary prefix operator “-“, and binary 
>> infix operator “-“: {} is interpreted as an empty operand, thus infix “-", 
>> whereas \relax is removed from the input meaning no operand, so prefix “-“. 
>> But \relax can have sub-/super-scripts, just as {}, and then in both cases, 
>> “–“ becomes binary:
>> 
>> \startformula {}^2 - a \stopformula
>> \startformula \relax^2 - a \stopformula
> 
> why not use something more natural unicode
> 
> \startformula  \zwnj^2 - a \stopformula

The TeX Book recommends using {} for superscripts to the lefts side, eg.
\startformula  {}_a^b C_d^e \stopformula

What is \zwnj?


___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-15 Thread Hans Åberg

> On 15 May 2016, at 19:35, Wolfgang Schuster  
> wrote:
> 
>> Hans Åberg 15. Mai 2016 um 19:32
>> 
>> What is \zwnj?
> zero width non-joiner

OK. Invisibles of different semantic meaning are pretty tricky to use in the 
input, because it is hard to detect errors.


___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-15 Thread Wolfgang Schuster

Hans Åberg 
15. Mai 2016 um 19:32

What is \zwnj?

zero width non-joiner

Wolfgang
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-15 Thread Hans Åberg

> On 15 May 2016, at 19:14, Hans Hagen  wrote:
> 
> On 5/15/2016 2:33 PM, Hans Åberg wrote:
>> 
>>> On 14 May 2016, at 23:26, Aditya Mahajan  wrote:
>> 
>>> Be careful with empty group in math mode:
>>> 
>>> \startformula{} -a \stopformula
>>> \startformula\relax -a \stopformula
>> 
>> Maybe a way to distinguish between unary prefix operator “-“, and binary 
>> infix operator “-“: {} is interpreted as an empty operand, thus infix “-", 
>> whereas \relax is removed from the input meaning no operand, so prefix “-“. 
>> But \relax can have sub-/super-scripts, just as {}, and then in both cases, 
>> “–“ becomes binary:
>> 
>> \startformula {}^2 - a \stopformula
>> \startformula \relax^2 - a \stopformula
> 
> why not use something more natural unicode
> 
> \startformula  \zwnj^2 - a \stopformula

The TeX Book recommends using {} for superscripts to the lefts side, eg.
\startformula  {}_a^b C_d^e \stopformula

What is \zwnj?


___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-15 Thread Hans Hagen

On 5/15/2016 2:33 PM, Hans Åberg wrote:



On 14 May 2016, at 23:26, Aditya Mahajan  wrote:



Be careful with empty group in math mode:

\startformula{} -a \stopformula
\startformula\relax -a \stopformula


Maybe a way to distinguish between unary prefix operator “-“, and binary infix 
operator “-“: {} is interpreted as an empty operand, thus infix “-", whereas 
\relax is removed from the input meaning no operand, so prefix “-“. But \relax can 
have sub-/super-scripts, just as {}, and then in both cases, “–“ becomes binary:

\startformula {}^2 - a \stopformula
\startformula \relax^2 - a \stopformula


why not use something more natural unicode

\startformula  \zwnj^2 - a \stopformula


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-15 Thread Hans Åberg

> On 14 May 2016, at 23:26, Aditya Mahajan  wrote:

> Be careful with empty group in math mode:
> 
> \startformula{} -a \stopformula
> \startformula\relax -a \stopformula

Maybe a way to distinguish between unary prefix operator “-“, and binary infix 
operator “-“: {} is interpreted as an empty operand, thus infix “-", whereas 
\relax is removed from the input meaning no operand, so prefix “-“. But \relax 
can have sub-/super-scripts, just as {}, and then in both cases, “–“ becomes 
binary:

\startformula {}^2 - a \stopformula
\startformula \relax^2 - a \stopformula


___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-15 Thread luigi scarso
On Sun, May 15, 2016 at 10:10 AM, Hans Åberg  wrote:

>
> > On 14 May 2016, at 23:26, Aditya Mahajan  wrote:
>
> >>> Use
> >>> \startformula\relax
> >>> ...
> >>> \stopformula
> >>
> >> Just about anything seems to work:
> >> I put in an empty group
> >> \startformula{}
> >> ...
> >> \stopformula
> >
> > Be careful with empty group in math mode:
> >
> > \startformula{} -a \stopformula
> > \startformula\relax -a \stopformula
>
> A good example, illustrating a difference between \relax and {}, whatever
> it may be. I used it just to save some typing in a workaround. It must
> start with an integral sign having at least one limit:
> \startformula   ∫_a f φ\stopformula
> \startformula{} ∫_a f φ\stopformula
> \startformula\, ∫_a f φ\stopformula
> \startformula\relax ∫_a f φ\stopformula
>
> Without limits, I get too much space after the integral sign:
> \startformula   ∫ f φ\stopformula
>
>
Maybe it's a little unkown but under
standalone-mkiv-experimental/tex/texmf-context/tex/context/interface/mkiv
there is i-formula.xml
$>context i-formula.xml


-- 
luigi
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-15 Thread Hans Åberg

> On 14 May 2016, at 23:26, Aditya Mahajan  wrote:

>>> Use
>>> \startformula\relax
>>> ...
>>> \stopformula
>> 
>> Just about anything seems to work:
>> I put in an empty group
>> \startformula{}
>> ...
>> \stopformula
> 
> Be careful with empty group in math mode:
> 
> \startformula{} -a \stopformula
> \startformula\relax -a \stopformula

A good example, illustrating a difference between \relax and {}, whatever it 
may be. I used it just to save some typing in a workaround. It must start with 
an integral sign having at least one limit:
\startformula   ∫_a f φ\stopformula
\startformula{} ∫_a f φ\stopformula
\startformula\, ∫_a f φ\stopformula
\startformula\relax ∫_a f φ\stopformula

Without limits, I get too much space after the integral sign:
\startformula   ∫ f φ\stopformula


___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-14 Thread Aditya Mahajan

On Sat, 14 May 2016, Hans Åberg wrote:


On 14 May 2016, at 18:41, Aditya Mahajan  wrote:

On Sat, 14 May 2016, Hans Åberg wrote:




On 14 May 2016, at 01:25, Hans Hagen  wrote:



installing and running the garden distribution is quite simple (as is updating) 
.. there are less files too (so no big burden to have it alongside tex live)


With this installation, I get a strange bug:

In the example below, the first integral gets ‘limits' in the displayed 
formula, as though ‘nolimits’ has not been defined. It works if one puts a 
character before the first integral sign. So it seems that the \startformula 
command misses the ∫ definition on the first non-space character.


I haven't debugged this, but my guess is that the int symbol is read before 
\everymathematics is executed (because \startformula is looking ahead for the 
optional arguments in [...] and the only way to do so is read the next symbol 
and check if it is [).

Use
\startformula\relax
...
\stopformula


Just about anything seems to work:
I put in an empty group
\startformula{}
...
\stopformula


Be careful with empty group in math mode:

\startformula{} -a \stopformula
\startformula\relax -a \stopformula

Aditya___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-14 Thread Hans Åberg

> On 14 May 2016, at 18:41, Aditya Mahajan  wrote:
> 
> On Sat, 14 May 2016, Hans Åberg wrote:
> 
>> 
>>> On 14 May 2016, at 01:25, Hans Hagen  wrote:
>> 
>>> installing and running the garden distribution is quite simple (as is 
>>> updating) .. there are less files too (so no big burden to have it 
>>> alongside tex live)
>> 
>> With this installation, I get a strange bug:
>> 
>> In the example below, the first integral gets ‘limits' in the displayed 
>> formula, as though ‘nolimits’ has not been defined. It works if one puts a 
>> character before the first integral sign. So it seems that the \startformula 
>> command misses the ∫ definition on the first non-space character.
> 
> I haven't debugged this, but my guess is that the int symbol is read before 
> \everymathematics is executed (because \startformula is looking ahead for the 
> optional arguments in [...] and the only way to do so is read the next symbol 
> and check if it is [).
> 
> Use
> \startformula\relax
> ...
> \stopformula

Just about anything seems to work: I put in an empty group
\startformula{}
...
\stopformula


___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-14 Thread Aditya Mahajan

On Sat, 14 May 2016, Hans Åberg wrote:




On 14 May 2016, at 01:25, Hans Hagen  wrote:



installing and running the garden distribution is quite simple (as is updating) 
.. there are less files too (so no big burden to have it alongside tex live)


With this installation, I get a strange bug:

In the example below, the first integral gets ‘limits' in the displayed 
formula, as though ‘nolimits’ has not been defined. It works if one puts 
a character before the first integral sign. So it seems that the 
\startformula command misses the ∫ definition on the first non-space 
character.


I haven't debugged this, but my guess is that the int symbol is read 
before \everymathematics is executed (because \startformula is looking 
ahead for the optional arguments in [...] and the only way to do so is 
read the next symbol and check if it is [).


Use
\startformula\relax
...
\stopformula

Aditya___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-14 Thread Hans Åberg

> On 14 May 2016, at 01:25, Hans Hagen  wrote:

> installing and running the garden distribution is quite simple (as is 
> updating) .. there are less files too (so no big burden to have it alongside 
> tex live)

With this installation, I get a strange bug:

In the example below, the first integral gets ‘limits' in the displayed 
formula, as though ‘nolimits’ has not been defined. It works if one puts a 
character before the first integral sign. So it seems that the \startformula 
command misses the ∫ definition on the first non-space character.



\setupbodyfont[xits,10pt]

\appendtoks
\catcode`∫=\activecatcode
\letcharcode `∫ \int
\to \everymathematics

\setupmathematics[integral=nolimits]

Nolimits $\int_0^∞ f ω$, and $∫_0^∞ f ω$

\startformula
   ∫_0^∞ f ω, \quad ∫_0^∞ f ω, \quad \int_0^∞ f ω
\stopformula



___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-14 Thread Hans Åberg

> On 13 May 2016, at 12:22, Hans Hagen  wrote:
> 
> in principle one can make ∫ and \int but that has other side effects

What side effect do you have in mind here?


___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-14 Thread Hans Åberg

> On 14 May 2016, at 01:25, Hans Hagen  wrote:

> installing and running the garden distribution is quite simple (as is 
> updating) .. there are less files too (so no big burden to have it alongside 
> tex live)

I installed it on OS X 10.11.5 Beta in /Applications/ConTeXt. Then it turns out 
that adding ‘context’ to the PATH by a script
  exec /Applications/ConTeXt/tex/texmf-osx-64/bin/context "$@“
isn’t enough, because it gets hold of the older LuaTeX version from TeX Live 
2015 which is also in the path. However, running ‘setuptex’ works.

One can download a LilyPond binary to /Applications/, and its binaries then has 
lookup paths set properly to itself. Then scripts as those above have the 
advantage of not interfering with other binaries with the same name.


___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-13 Thread Hans Hagen

On 5/13/2016 11:35 PM, Hans Åberg wrote:



On 13 May 2016, at 22:53, Hans Hagen  wrote:



Tex Live 2016 is about to be released in few weeks time [1], so hopefully, it 
has a later version. Final updates May 16.

1. https://www.tug.org/texlive/


you can install the version from the context garden alongside (independent) ... 
that way you're always up to date


Thanks for the tip. I have done such manual updates in the past, with package 
chasing including recursive packages, but a down period right now. Even a 
developer of Bison uses GCC from MacPorts.

Perhaps there should be a live update of TeX Live instead.


installing and running the garden distribution is quite simple (as is 
updating) .. there are less files too (so no big burden to have it 
alongside tex live)


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-13 Thread Hans Åberg

> On 13 May 2016, at 22:53, Hans Hagen  wrote:

>> Tex Live 2016 is about to be released in few weeks time [1], so hopefully, 
>> it has a later version. Final updates May 16.
>> 
>> 1. https://www.tug.org/texlive/
> 
> you can install the version from the context garden alongside (independent) 
> ... that way you're always up to date

Thanks for the tip. I have done such manual updates in the past, with package 
chasing including recursive packages, but a down period right now. Even a 
developer of Bison uses GCC from MacPorts.

Perhaps there should be a live update of TeX Live instead.


___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-13 Thread Hans Hagen

On 5/13/2016 10:22 PM, Hans Åberg wrote:



On 13 May 2016, at 21:46, Hans Hagen  wrote:




This example generates an error (ConTeXt 0.61 with TeX Live 2015):



for older engines

\installanddefineactivecharacter `∫ {\int}

\appendtoks
 \catcode`∫=\activecatcode
\to \everymathematics


That does not work either. I can hack it up though using
\catcode`\∫=\active
\let∫\int



but best you can update as most here run the latest version


Tex Live 2016 is about to be released in few weeks time [1], so hopefully, it 
has a later version. Final updates May 16.

1. https://www.tug.org/texlive/


you can install the version from the context garden alongside 
(independent) ... that way you're always up to date


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-13 Thread Hans Åberg

> On 13 May 2016, at 21:46, Hans Hagen  wrote:
> 

>> This example generates an error (ConTeXt 0.61 with TeX Live 2015):

> for older engines
> 
> \installanddefineactivecharacter `∫ {\int}
> 
> \appendtoks
>  \catcode`∫=\activecatcode
> \to \everymathematics

That does not work either. I can hack it up though using
\catcode`\∫=\active
\let∫\int


> but best you can update as most here run the latest version

Tex Live 2016 is about to be released in few weeks time [1], so hopefully, it 
has a later version. Final updates May 16.

1. https://www.tug.org/texlive/


___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-13 Thread Hans Hagen

On 5/13/2016 6:32 PM, Hans Åberg wrote:



On 13 May 2016, at 17:51, Aditya Mahajan  wrote:

On Fri, 13 May 2016, Hans Åberg wrote:


There may not be so many symbols: the “large operators" in the Tex Book, p. 
435, though Unicode have more, and some others like √ U+221A for \sqrt.


If you want, you can collect such mappings in a separate module.


That would be a good idea if it should become a part of a ConTeXt distribution.




I could not make your code working - does it require a later LuaTex version 
(than 0.80.0)?


Here is a complete working example


This example generates an error (ConTeXt 0.61 with TeX Live 2015):


tex error   > error on line 10 in file limits0.tex: ! Undefined control 
sequence

 ...ries \catcode `∫=\activecatcode \letcharcode
  `∫ \int
 ...\vcenter \normalvcenter \the \everymathematics
  \setfalse \indisplaymath

\int
l.10 Nolimits $\int
 _0^∞ f ω$, and $∫_0^∞ f ω$



(OT: The location of the limit is still ugly with xits fonts)


for older engines

\installanddefineactivecharacter `∫ {\int}

\appendtoks
  \catcode`∫=\activecatcode
\to \everymathematics

but best you can update as most here run the latest version


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-13 Thread Hans Åberg

> On 13 May 2016, at 17:51, Aditya Mahajan  wrote:
> 
> On Fri, 13 May 2016, Hans Åberg wrote:
> 
>> There may not be so many symbols: the “large operators" in the Tex Book, p. 
>> 435, though Unicode have more, and some others like √ U+221A for \sqrt.
> 
> If you want, you can collect such mappings in a separate module.

That would be a good idea if it should become a part of a ConTeXt distribution.

> 
>> I could not make your code working - does it require a later LuaTex version 
>> (than 0.80.0)?
> 
> Here is a complete working example

This example generates an error (ConTeXt 0.61 with TeX Live 2015):


tex error   > error on line 10 in file limits0.tex: ! Undefined control 
sequence

 ...ries \catcode `∫=\activecatcode \letcharcode 
  `∫ \int 
 ...\vcenter \normalvcenter \the \everymathematics 
  \setfalse \indisplaymath 
 
\int 
l.10 Nolimits $\int
 _0^∞ f ω$, and $∫_0^∞ f ω$


> (OT: The location of the limit is still ugly with xits fonts)

Also long spacing after the integral sign if there are no limits.


___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-13 Thread Aditya Mahajan

On Fri, 13 May 2016, Hans Åberg wrote:

There may not be so many symbols: the “large operators" in the Tex Book, 
p. 435, though Unicode have more, and some others like √ U+221A for 
\sqrt.


If you want, you can collect such mappings in a separate module.

I could not make your code working - does it require a later LuaTex 
version (than 0.80.0)?


Here is a complete working example (OT: The location of the limit is still 
ugly with xits fonts)


\setupbodyfont[xits,10pt]

\appendtoks
 \catcode`∫=\activecatcode
 \letcharcode `∫ \int
\to \everymathematics
\setupmathematics[integral=nolimits]

Nolimits $\int_0^∞ f ω$, and $∫_0^∞ f ω$

\startformula
\int_0^∞ f ω,\quad ∫_0^∞ f ω
\stopformula___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-13 Thread Hans Åberg

> On 13 May 2016, at 14:08, Hans Hagen  wrote:
> 
> On 5/13/2016 1:55 PM, Hans Åberg wrote:
>> 
>>> On 13 May 2016, at 13:35, Hans Hagen  wrote:
>>> 
>>> On 5/13/2016 1:07 PM, Hans Åberg wrote:
 
> On 13 May 2016, at 12:22, Hans Hagen  wrote:
> 
> in principle one can make∫and \int but that has other side effects
 
 What side effect do you have in mind here?
>>> 
>>> using it as normal character .. it's often harder to turn off features than 
>>> to turn on
>>> 
>>> and making all those characters active by default is not a good idea
>> 
>> The use in the source code helps readability of math formulas, though.
> 
> it's no problem to make a module that supports that but it will never be 
> default (some \mathcommand's represent base characters then become larger for 
> instance while the corresponding base character is fixed in size), so ∫ by 
> default is the character and not the 'adapting construct' (tex often has many 
> commands for the same symbol doing different things)

Currently, there is a problem with the lack of efficient Unicode input methods: 
symbol table and copy-paste are slow. But perhaps in the future, more might 
want to use it.

There may not be so many symbols: the “large operators" in the Tex Book, p. 
435, though Unicode have more, and some others like √ U+221A for \sqrt.

I could not make your code working - does it require a later LuaTex version 
(than 0.80.0)?


___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-13 Thread Hans Hagen

On 5/13/2016 1:55 PM, Hans Åberg wrote:



On 13 May 2016, at 13:35, Hans Hagen  wrote:

On 5/13/2016 1:07 PM, Hans Åberg wrote:



On 13 May 2016, at 12:22, Hans Hagen  wrote:

in principle one can make ∫ and \int but that has other side effects


What side effect do you have in mind here?


using it as normal character .. it's often harder to turn off features than to 
turn on

and making all those characters active by default is not a good idea


The use in the source code helps readability of math formulas, though.


it's no problem to make a module that supports that but it will never be 
default (some \mathcommand's represent base characters then become 
larger for instance while the corresponding base character is fixed in 
size), so ∫ by default is the character and not the 'adapting construct' 
(tex often has many commands for the same symbol doing different things)


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-13 Thread Hans Åberg

> On 13 May 2016, at 13:35, Hans Hagen  wrote:
> 
> On 5/13/2016 1:07 PM, Hans Åberg wrote:
>> 
>>> On 13 May 2016, at 12:22, Hans Hagen  wrote:
>>> 
>>> in principle one can make ∫ and \int but that has other side effects
>> 
>> What side effect do you have in mind here?
> 
> using it as normal character .. it's often harder to turn off features than 
> to turn on
> 
> and making all those characters active by default is not a good idea

The use in the source code helps readability of math formulas, though.




___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-13 Thread Hans Hagen

On 5/13/2016 1:07 PM, Hans Åberg wrote:



On 13 May 2016, at 12:22, Hans Hagen  wrote:

in principle one can make ∫ and \int but that has other side effects


What side effect do you have in mind here?


using it as normal character .. it's often harder to turn off features 
than to turn on


and making all those characters active by default is not a good idea

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-13 Thread Hans Åberg

> On 13 May 2016, at 12:22, Hans Hagen  wrote:
> 
> in principle one can make ∫ and \int but that has other side effects

What side effect do you have in mind here?


___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Nolimits not working with Unicode characters

2016-05-13 Thread Hans Hagen

On 5/13/2016 10:27 AM, Hans Åberg wrote:

\setupbodyfont[xits,10pt]
%\setupbodyfont[stix,10pt]

\setupmathematics[integral=nolimits]

Nolimits $\int_0^∞ f ω$, and $∫_0^∞ f ω$

\startformula
\int_0^∞ f ω,\quad ∫_0^∞ f ω
\stopformula


different meanings

\show \int
\show ∫

in principle one can make ∫ and \int but that has other side effects

% \letcharcode `∫ \int
% \installanddefineactivecharacter `∫ {\int}

\appendtoks
\catcode`∫=\activecatcode
\to \everymathematics

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___