Re: [NTG-context] Characters allowed in macro names

2018-04-22 Thread N. Raghavendra
At 2018-04-22T20:08:34+02:00, Wolfgang Schuster wrote:

> You can use the following example as test.
>
>  begin example
> \starttext
>
> \def\hello-1{Hello \letterhash 1}
>
> \def\hello-2{Hello \letterhash 2}
>
> \hello-1
>
> \hello-2
>
> \stoptext
>  end example
>
> Here I create a command named \hello which has to be followed by “-1"
> and "-2".
>
> When you run TeX on this example you get the following error message:
>
>  begin error message
> tex error   > tex error on line 7 in file /Users/wolf/TeX/test/
> test.tex: ! Use of \hello doesn't match its definition
>
> l.7 \hello-1
>  end error message

Yes, I get that error.  Thanks for the explanation.

Raghu.

--
N. Raghavendra , http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/
___
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
___

Re: [NTG-context] Characters allowed in macro names

2018-04-22 Thread N. Raghavendra
At 2018-04-22T18:04:28+02:00, Hans Hagen wrote:

>> 1. In general, what characters are allowed in macro names?  Are Unicode
>> characters admissible?
>
> letters are (and _ is not a letter, unless we're in unprotected mode)
>
>> 2. Apart from the fact that one can use whitespace freely in
>> \starttexdefinition, is there any reason to prefer it over \def?
>
> depends ... sometimes more readble ... spaces are ignores ... you can
> use named parameters

Thanks for the clarification.

Raghu.

--
N. Raghavendra , http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/
___
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
___

Re: [NTG-context] Characters allowed in macro names

2018-04-22 Thread Wolfgang Schuster




N. Raghavendra 
22. April 2018 um 17:23
I was wondering if it is alright to use underscores in the names of
macros, e.g, as in the following file. It looks like \startsetups, and
\def accept names with hyphens, underscores, and numerals, but
\starttexdefinition doesn't tolerate any of them.

1. In general, what characters are allowed in macro names? Are Unicode
characters admissible?

2. Apart from the fact that one can use whitespace freely in
\starttexdefinition, is there any reason to prefer it over \def?

Thanks,
Raghu.


\starttext

\startsetups [hello-world_1]
Hello, world 1!
\stopsetups

\setups [hello-world_1]

\def\hello-world_2{Hello, world 2!}
You’re defining a command named \hello which has to be followed by the 
string "-world_2".



You can use the following example as test.

 begin example
\starttext

\def\hello-1{Hello \letterhash 1}

\def\hello-2{Hello \letterhash 2}

\hello-1

\hello-2

\stoptext
 end example

Here I create a command named \hello which has to be followed by “-1" 
and "-2".


When you run TeX on this example you get the following error message:

 begin error message
tex error > tex error on line 7 in file /Users/wolf/TeX/test/test.tex: ! 
Use of \hello doesn't match its definition


l.7 \hello-1
 end error message

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

Re: [NTG-context] Fwd: Re: Math kerning broken in latest beta

2018-04-22 Thread Hans Hagen

On 4/20/2018 4:22 PM, Ulrike Fischer wrote:

Am Thu, 12 Apr 2018 10:06:17 +0200 schrieb Hans Hagen:


But with cambria the subscript isn't correct either when it is a
single char:

\setupbodyfont[cambria]
\starttext
   $\gamma_{ee} \gamma_{e}$

   $T_{\tf fluff}$

   $T_{\tf f}$
\stoptext



i'll look into it ... (but even cambria doesn't have all these kerns ..
as said: a mess)


With the newest context the problem is gone. In latex too if I use
luatex 1.08 instead of luatex 1.07. So I guess it was an engine bug
;-).
depends on ones view: it's controlled by a (yet another) variable now 
that default to 'just inject them' but interference with proper math 
kerns can happen in that case (it's just that not many fonts have both 
of them) ... so, at some point in context (when we have better math 
fonts) i'll add some checks and disable it selectively (because i don't 
want that interference)


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
___

Re: [NTG-context] Characters allowed in macro names

2018-04-22 Thread Hans Hagen

On 4/22/2018 5:23 PM, N. Raghavendra wrote:

I was wondering if it is alright to use underscores in the names of
macros, e.g, as in the following file.  It looks like \startsetups, and
\def accept names with hyphens, underscores, and numerals, but
\starttexdefinition doesn't tolerate any of them.

1. In general, what characters are allowed in macro names?  Are Unicode
characters admissible?


letters are (and _ is not a letter, unless we're in unprotected mode)


2. Apart from the fact that one can use whitespace freely in
\starttexdefinition, is there any reason to prefer it over \def?


depends ... sometimes more readble ... spaces are ignores ... you can 
use named parameters



Thanks,
Raghu.


\starttext

\startsetups [hello-world_1]
   Hello, world 1!
\stopsetups

\setups [hello-world_1]

\def\hello-world_2{Hello, world 2!}

\hello-world_2

\starttexdefinition helloWorld
   Hello, world!
\stoptexdefinition

\helloWorld

%% Doesn't work
%% \starttexdefinition fooBar1
%%   Foo, bar 1!
%% \stoptexdefinition
%%
%% \fooBar1

%% Doesn't work
%% \starttexdefinition foo_bar
%%   Foo, bar!
%% \stoptexdefinition
%%
%% \foo_bar

%% Doesn't work
%% \starttexdefinition foo-bar
%%   Foo, bar!
%% \stoptexdefinition
%%
%% \foo-bar

\stoptext

--
N. Raghavendra , http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/
___
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
___




--

-
  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
___

[NTG-context] Characters allowed in macro names

2018-04-22 Thread N. Raghavendra
I was wondering if it is alright to use underscores in the names of
macros, e.g, as in the following file.  It looks like \startsetups, and
\def accept names with hyphens, underscores, and numerals, but
\starttexdefinition doesn't tolerate any of them.

1. In general, what characters are allowed in macro names?  Are Unicode
   characters admissible?

2. Apart from the fact that one can use whitespace freely in
   \starttexdefinition, is there any reason to prefer it over \def?

Thanks,
Raghu.


\starttext

\startsetups [hello-world_1]
  Hello, world 1!
\stopsetups

\setups [hello-world_1]

\def\hello-world_2{Hello, world 2!}

\hello-world_2

\starttexdefinition helloWorld
  Hello, world!
\stoptexdefinition

\helloWorld

%% Doesn't work
%% \starttexdefinition fooBar1
%%   Foo, bar 1!
%% \stoptexdefinition
%%
%% \fooBar1

%% Doesn't work
%% \starttexdefinition foo_bar
%%   Foo, bar!
%% \stoptexdefinition
%%
%% \foo_bar

%% Doesn't work
%% \starttexdefinition foo-bar
%%   Foo, bar!
%% \stoptexdefinition
%%
%% \foo-bar

\stoptext

--
N. Raghavendra , http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/
___
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
___

Re: [NTG-context] trying out "plug mode" and the harfbuzz plugin

2018-04-22 Thread Hans Hagen

On 4/21/2018 10:42 PM, Ulrike Fischer wrote:

I read the guitex article about ffi and luatex and wanted to try if
I could run tests with harfbuzz and the plug-mode.

Looking in the newest context I found in onandon-ffi.tex a reference
to the module fonts-plugins. But this module loads a lua file which
isn't in context:

\registerctxluafile{font-phb}{} % harfbuzz plugin


which then indirectly loads some more code


Is this an oversight or is the code not meant to be used? Or is
there something newer somewhere else?
it's on my machine (and occasionally used when we test idris new fonts 
and do because engines can behave different so we can compare hb, 
uniscribe and context) ... when falling back on something else lots of 
other font related features in context will not work (apart from 
performence)


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
___