Re: [NTG-context] issues with \scitebuffer and \sciteinlinebuffer

2017-09-05 Thread Hans Hagen

On 9/5/2017 11:20 PM, Pablo Rodriguez wrote:

On 09/05/2017 09:31 PM, Hans Hagen wrote:

On 9/5/2017 6:33 PM, Pablo Rodriguez wrote:

[...]
4. \setuptyping and \setuptype don’t work with the scite buffers.

well, it's a different (basically unrelated) mechanism that kicks in ...
one can't have it all


Weird, I thought ConTeXt followed this design philosophy:
https://www.youtube.com/watch?v=hFDcoX7s6rE :-).


https://www.youtube.com/watch?v=ywcqultfYaM


I realize that my timing is bad, since next meeting needs preparation.

Could we discuss the main issue (a broader one) after the meeting (by
the end of the month)?
depends on what the broader issue is ... supporting margin is no big 
deal but the other setuptyping things (escapes and such) are rather 
bound to the default visualizer and while the scite ones are more 
advanced wrt lexing they are also isolated from the default visualizers 
(they get hooked into the typing mechanism but follow a different route 
from source to rendering)


my main reason for making the m-scite module was that i wanted to use 
the mixed lexer i also use for editing (which btw is not always best for 
typesetting) and i might add features when i need them but there is no 
real plan there


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
___

[NTG-context] Substituting Greek characters in math mode

2017-09-05 Thread Alan Bowen
I should like to have the Brill font substitute for the Greek alphabet
(upper and lower cases) as well for the numerals in Tex Gyre Termes Math.

So far, I have been able to get the Brill numerals (oldstyle) but nothing
more: the Greek letters in math mode are from Termes Math.

Here is what I have:

\definefontfamily[mainface][serif][Brill]
[protrusion=quality,
expansion=quality,
mode=node,
force=yes,
]

\definefallbackfamily[mainface][mm][Brill][range={0030-0039, 0391-03A9,
03B1-03C9}, scale=1]

\definefallbackfamily [mainface] [mm] [Brill]
[preset=math:lowercasegreeknormal]
\definefallbackfamily [mainface] [mm] [BrillItalic]
[preset=math:lowercasegreekitalic]
\definefallbackfamily [mainface] [mm] [Brill]
[preset=math:uppercasegreeknormal]
\definefallbackfamily [mainface] [mm] [BrillItalic]
[preset=math:uppercasegreekitalic]


\definefontfamily[mainface][mm][TeX Gyre Termes Math][scale=0.94]
\setupmathematics[autopunctuation={all}, ucgreek=normal, lcgreek=italic]

\setupbodyfont[mainface,10pt]

\starttext

A~B~C~a~b~c

\emph{A~B~C~a~b~c}\quad math: \m{A~B~C~a~b~c}

0123456789\quad math: \m{0123456789}

δ \emph{δ}\quad math: \m{δ}

π \emph{π}\quad math: \m{π}

Π \emph{ Π}\quad math: \m{Π}

\stoptext

Any suggestions or pointers will be most welcome.

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
___

Re: [NTG-context] issues with \scitebuffer and \sciteinlinebuffer

2017-09-05 Thread Pablo Rodriguez
On 09/05/2017 09:31 PM, Hans Hagen wrote:
> On 9/5/2017 6:33 PM, Pablo Rodriguez wrote:
>> [...]
>> 4. \setuptyping and \setuptype don’t work with the scite buffers.
> well, it's a different (basically unrelated) mechanism that kicks in ... 
> one can't have it all

Weird, I thought ConTeXt followed this design philosophy:
https://www.youtube.com/watch?v=hFDcoX7s6rE :-).

I realize that my timing is bad, since next meeting needs preparation.

Could we discuss the main issue (a broader one) after the meeting (by
the end of the month)?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
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] issues with \scitebuffer and \sciteinlinebuffer

2017-09-05 Thread Hans Hagen

On 9/5/2017 6:33 PM, Pablo Rodriguez wrote:

Hans,

after updating to latest beta (from 2017.09.05 15:10) to enjoy the new
none method in the scite buffers, I have the following sample:

 \setupindenting[yes, always, big]
 \usemodule[scite]
 \setuptyping[margin=2cm]
 \startbuffer[typebuffer]
 | \ConTeXt\ \ConteXt \par
 \stopbuffer
 \starttext
 \scitebuffer[typebuffer]

 \scitebuffer[none][typebuffer]

 \letterbar a \sciteinlinebuffer[typebuffer]. b
 \stoptext

And I’m experiencing the following issues:

1. "|" breaks compilation when method is set to "none".


i'll look at it later


2. "\sciteinlinebuffer" adds always an extra blank space after it.

3. Method "none" treats spaces as linebreaks and removes "\".

4. \setuptyping and \setuptype don’t work with the scite buffers.
well, it's a different (basically unrelated) mechanism that kicks in ... 
one can't have it all


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] Fwd: Re: The binomial coefficients do not look optimal

2017-09-05 Thread Mikael P. Sundqvist
On Sat, Sep 2, 2017 at 6:36 PM, Hans Hagen  wrote:

>
>
>
>  Forwarded Message 
> Subject: Re: [NTG-context] The binomial coefficients do not look optimal
> Date: Sat, 2 Sep 2017 18:35:53 +0200
> From: Hans Hagen 
> To: Mikael P. Sundqvist 
>
> On 9/2/2017 4:58 PM, Mikael P. Sundqvist wrote:
>
>> On Fri, Sep 1, 2017 at 7:49 PM, Hans Hagen  pra...@wxs.nl>> wrote:
>>
>> On 9/1/2017 1:56 PM, Mikael P. Sundqvist wrote:
>>
>> Hi,
>>
>> I stumbled upon this (see the attached file for the result):
>>
>> %%% Test file
>> \setupbodyfont[10pt]
>> \starttext
>> \startTEXpage[offset=10pt]
>> \type{\tbinom{n}{k}}: $\tbinom{n}{k}$, (does not look good, the
>> vertical space between $n$ and $k$ is too big) \par
>> \type{\binom{n}{k}}: $\binom{n}{k}$ (looks fine to me)\par
>> \type{\dbinom{n}{k}}: $\dbinom{n}{k}$ (does not look good, too
>> big parenthesis, even for displayed formulas).\par
>> \stopTEXpage
>> \stoptext
>> %%% End of test file
>>
>> I think something should be changed to get the binomial
>> coefficients to look better. In particular I am concerned about
>> the rather big parenthesis in displaystyle (and not so much
>> about the vertical space issue in \tbinom).
>>
>> /Mikael
>>
>> PS The result looked better if I used the lucida fonts, if that
>> helps.
>>
>> This is indeed font dependent. These binoms use a low level tex
>> primitive that uses a threshold for steps and that one is part of
>> the math parameters of a font and these are not that good for lm. As
>> I'm looking into some other low level side effect I was in the mood
>> for a configuration option for \setupmathfractions.
>>
>> So, in the next beta you can get the effects iof the attached:
>>
>> - relate the threshold to the bodyfont size
>> - use normal left/right fences instead
>>
>> fwiw, cambria and pagella look better too. Upto you to wikify 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
>> 
>> ___
>>
>>
>> Thank you very much, I'm looking forward to the next beta, and I will try
>> to wikify it when I have tried it out. Also lucida looks better than latin
>> modern does at the moment.
>>
>> I am a bit confused about the different versions. I would have guessed
>> that there was \tbinom and \dbinom and that \binom used one of them
>> depending on if one is in text mode or in display mode (just as I would
>> expect \frac to behave like \tfrac in text mode and \dfrac in display
>> mode). But \tbinom looks very different from \binom in text mode (with more
>> vertical space).  Is this on purpose? Have I missed something?
>>
> One can configure those things but the absense of rules and presence of
> fences matters too (all kind of inter-this-or-that and
> above-below-this-or-that playts a role).
>
> 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/list
> info/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> 
> ___



Today the new beta 

[NTG-context] issues with \scitebuffer and \sciteinlinebuffer

2017-09-05 Thread Pablo Rodriguez
Hans,

after updating to latest beta (from 2017.09.05 15:10) to enjoy the new
none method in the scite buffers, I have the following sample:

\setupindenting[yes, always, big]
\usemodule[scite]
\setuptyping[margin=2cm]
\startbuffer[typebuffer]
| \ConTeXt\ \ConteXt \par
\stopbuffer
\starttext
\scitebuffer[typebuffer]

\scitebuffer[none][typebuffer]

\letterbar a \sciteinlinebuffer[typebuffer]. b
\stoptext

And I’m experiencing the following issues:

1. "|" breaks compilation when method is set to "none".

2. "\sciteinlinebuffer" adds always an extra blank space after it.

3. Method "none" treats spaces as linebreaks and removes "\".

4. \setuptyping and \setuptype don’t work with the scite buffers.

What am I doing wrong?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
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] Tagging and Math Matrix

2017-09-05 Thread Hans Hagen

On 8/30/2017 9:45 AM, Christoph Reller wrote:
On Mon, Dec 28, 2015 at 3:45 PM Christoph Reller 
>   wrote:


There seems to be a problem with the structure information added
when using
\startmatrix:

\setuptagging[state=start]
\starttext
\math{
   \startmatrix
     \NC A \NR
     \NC B \NR
   \stopmatrix}
\stoptext

The log reports an open chain: document>1 => mtr>1 => mtd>1 => mtr>2 =>
mtd>2 => mtr>3
This may be a bug.


This is clearly a bug. The resulting structure tree of the above MWE is 
as follows (sorry for the ASCII art):



'-
   '-
     |-
     | '-
     |   |-
     |   | '-
     |   |   |-
     |   |   | '-
     |   |   |   '-
     |   |   |     '-
     |   |   |       |-
     |   |   |       '-
     |   |   '-
     |   |     '-
     |   |       '-
     |   |         |-
     |   |         '-
     |   '-
     |     '-
     |       '-
     |         '-"B"
     '-
       '-
         '-
           '-"A"

A fix would be very much appreciated.


should be ok now


--

-
  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] MS Office Chinese fonts in ConTeXt

2017-09-05 Thread Hans Hagen

On 9/5/2017 3:18 AM, Martin Bruchanov wrote:

Hi Hans,

Thank you for your help! I have switched to \usetypescriptfile[mscore].

However, I do not understand one thing, I am using envvar in Linux 
`OSFONTDIR` and all font file names are in upper case. When 
\usetypescriptfile[mscore] is set, ConTeXt cannot find font files, when 
I have renamed all files to lower case, then it works.


If I will query font cache with: `mtxrun --script font --list --all 
--pattern=stsong`, it will return correct path to font file and it does 
not depend on case.


Is it a feature?
indeed, to avoid issues we do lookups in lowercase (often mixed case 
works but is more sensitive to the os)


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] MS Office Chinese fonts in ConTeXt

2017-09-05 Thread Henning Hraban Ramm
Am 2017-09-05 um 03:18 schrieb Martin Bruchanov :

> However, I do not understand one thing, I am using envvar in Linux 
> `OSFONTDIR` and all font file names are in upper case. When 
> \usetypescriptfile[mscore] is set, ConTeXt cannot find font files, when I 
> have renamed all files to lower case, then it works.

I had this experience also with other fonts on OSX. Regardless of the spelling 
in my typescripts, fonts were only found if I renamed them to all-lowercase.
I guess the problem is not current any more, but since I use mostly the same 
fonts since years, I’m not sure. No time to check at the moment.

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

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