[NTG-context] add more blank space when using \starteffect[hidden]

2021-03-12 Thread Jeong Dal
Hi,

Sometimes, I need to hide the solution of a problem.
So I use \doifmode{} and \starteffect[hidden] as in the following sample file.
Since I want to set more blank space if it is hidden, I add \blank[5cm] when it 
is in the \enablemode[hideSolution].
It works well except the figures and bars are not hidden. Only texts, even  in 
the mp part, are hidden.
It is OK for me.

However, it would be much better to set the height of blank space depends on 
the height of hidden texts.
Is there a way to set the variable height  using “overlay” stuff instead of 
\blank[5cm]?

Thank for reading.

Best regards,

Dalyoung


\startbuffer[circles]
draw fullcircle scaled 1cm;
draw fullcircle scaled 1cm shifted (2cm,0);
dotlabel.top(“O”,origin);
\stopbuffer

\def\StartHide{\doifmode{hideSolution}{\starteffect[hidden]}}   
\def\StopHide{\doifmode{hideSolution}{\stopeffect\blank[5cm]}}   

%\enablemode[hideSolution]

\starttext
\framed[]{This is what I want:}
\framedtext[]{
  \StartHide
  \samplefile{knuth}
 
 Overbar is not \overbar{hidden}.
  {\processMPbuffer[circles]}
  
  \StopHide
}
\stoptext

___
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] tlig feature sometimes does not work

2021-03-12 Thread Mohammad Hossein Bateni
Umm... the fallbacks are correct.  My conclusion is that tlig does not work
when the character is not in the font itself.  Is that the case?  Is this a
bug or a feature?

\starttext

 \definefontfallback[fall][dejavusansmono][0-0xf][check=yes,force=no]
 \definefontsynonym[Test][file:Mikhak-Medium.ttf][fallbacks=fall]
 \definefontfeature[tf][arabic][tlig=yes]
 \definedfont[Test*tf]
 foo--bar
 [\char"2013]
 [\char"2014]
\stoptext

On Fri, Mar 12, 2021 at 7:13 PM Mohammad Hossein Bateni 
wrote:

> Any idea why the ligature {U+647 and U+654 => U+6C0} does not kick in?
>
> On Fri, Mar 12, 2021 at 7:11 PM Mohammad Hossein Bateni 
> wrote:
>
>> That's bad.  It seems, I forgot to add the fallbacks properly.  I will
>> reach out to the designer to add those chars.
>>
>> On Fri, Mar 12, 2021 at 12:32 PM Hans Hagen  wrote:
>>
>>> On 3/11/2021 2:05 AM, Mohammad Hossein Bateni wrote:
>>> > Hi,
>>> >
>>> > Since most fonts do not have the standard tex ligatures built in, I
>>> tend
>>> > to add them when I load the fonts.  Once in a while, I run into fonts
>>> > where this does not work.
>>> >
>>> > See the attached tex/pdf files.  I basically load the font as follows:
>>> >
>>> > \definefontfeature[tf][arabic][tlig=yes]
>>> > \definedfont[dejavusansmono*tf]
>>> >
>>> > This works fine for DejaVuSansMono and for one Farsi font I use
>>> > (
>>> https://github.com/rastikerdar/vazir-font/blob/master/dist/Vazir-Regular.ttf
>>> > <
>>> https://github.com/rastikerdar/vazir-font/blob/master/dist/Vazir-Regular.ttf>)
>>>
>>> > but not for this other Farsi font
>>> > (
>>> https://github.com/aminabedi68/Mikhak/blob/master/Font/ttf/Mikhak-Medium.ttf
>>> > <
>>> https://github.com/aminabedi68/Mikhak/blob/master/Font/ttf/Mikhak-Medium.ttf>).
>>>
>>> > Perhaps this is because the last font is not standard, but
>>> > TrueType/OpenType standard is sometimes up for interpretation.
>>> >
>>> > I see two strange symptoms here:
>>> >
>>> > \showotfcomposition displays the tlig feature differently for the last
>>> > font.  It appears in the "extra" list, not in "basic".  Why is that?
>>> > What does this mean anyway?
>>>
>>> The font doesn't have endash and emdash so there is nothing to construct
>>> from the double -
>>>
>>> \starttext
>>>  \definedfont[file:Mikhak-Medium.ttf*default] foo--bar
>>>  [\char"2013]
>>>  [\char"2014]
>>> \stoptext
>>>
>>> Just ask the author to add these characters and you're fine.
>>>
>>> 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] tlig feature sometimes does not work

2021-03-12 Thread Mohammad Hossein Bateni
Any idea why the ligature {U+647 and U+654 => U+6C0} does not kick in?

On Fri, Mar 12, 2021 at 7:11 PM Mohammad Hossein Bateni 
wrote:

> That's bad.  It seems, I forgot to add the fallbacks properly.  I will
> reach out to the designer to add those chars.
>
> On Fri, Mar 12, 2021 at 12:32 PM Hans Hagen  wrote:
>
>> On 3/11/2021 2:05 AM, Mohammad Hossein Bateni wrote:
>> > Hi,
>> >
>> > Since most fonts do not have the standard tex ligatures built in, I
>> tend
>> > to add them when I load the fonts.  Once in a while, I run into fonts
>> > where this does not work.
>> >
>> > See the attached tex/pdf files.  I basically load the font as follows:
>> >
>> > \definefontfeature[tf][arabic][tlig=yes]
>> > \definedfont[dejavusansmono*tf]
>> >
>> > This works fine for DejaVuSansMono and for one Farsi font I use
>> > (
>> https://github.com/rastikerdar/vazir-font/blob/master/dist/Vazir-Regular.ttf
>> > <
>> https://github.com/rastikerdar/vazir-font/blob/master/dist/Vazir-Regular.ttf>)
>>
>> > but not for this other Farsi font
>> > (
>> https://github.com/aminabedi68/Mikhak/blob/master/Font/ttf/Mikhak-Medium.ttf
>> > <
>> https://github.com/aminabedi68/Mikhak/blob/master/Font/ttf/Mikhak-Medium.ttf>).
>>
>> > Perhaps this is because the last font is not standard, but
>> > TrueType/OpenType standard is sometimes up for interpretation.
>> >
>> > I see two strange symptoms here:
>> >
>> > \showotfcomposition displays the tlig feature differently for the last
>> > font.  It appears in the "extra" list, not in "basic".  Why is that?
>> > What does this mean anyway?
>>
>> The font doesn't have endash and emdash so there is nothing to construct
>> from the double -
>>
>> \starttext
>>  \definedfont[file:Mikhak-Medium.ttf*default] foo--bar
>>  [\char"2013]
>>  [\char"2014]
>> \stoptext
>>
>> Just ask the author to add these characters and you're fine.
>>
>> 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] tlig feature sometimes does not work

2021-03-12 Thread Mohammad Hossein Bateni
That's bad.  It seems, I forgot to add the fallbacks properly.  I will
reach out to the designer to add those chars.

On Fri, Mar 12, 2021 at 12:32 PM Hans Hagen  wrote:

> On 3/11/2021 2:05 AM, Mohammad Hossein Bateni wrote:
> > Hi,
> >
> > Since most fonts do not have the standard tex ligatures built in, I tend
> > to add them when I load the fonts.  Once in a while, I run into fonts
> > where this does not work.
> >
> > See the attached tex/pdf files.  I basically load the font as follows:
> >
> > \definefontfeature[tf][arabic][tlig=yes]
> > \definedfont[dejavusansmono*tf]
> >
> > This works fine for DejaVuSansMono and for one Farsi font I use
> > (
> https://github.com/rastikerdar/vazir-font/blob/master/dist/Vazir-Regular.ttf
> > <
> https://github.com/rastikerdar/vazir-font/blob/master/dist/Vazir-Regular.ttf>)
>
> > but not for this other Farsi font
> > (
> https://github.com/aminabedi68/Mikhak/blob/master/Font/ttf/Mikhak-Medium.ttf
> > <
> https://github.com/aminabedi68/Mikhak/blob/master/Font/ttf/Mikhak-Medium.ttf>).
>
> > Perhaps this is because the last font is not standard, but
> > TrueType/OpenType standard is sometimes up for interpretation.
> >
> > I see two strange symptoms here:
> >
> > \showotfcomposition displays the tlig feature differently for the last
> > font.  It appears in the "extra" list, not in "basic".  Why is that?
> > What does this mean anyway?
>
> The font doesn't have endash and emdash so there is nothing to construct
> from the double -
>
> \starttext
>  \definedfont[file:Mikhak-Medium.ttf*default] foo--bar
>  [\char"2013]
>  [\char"2014]
> \stoptext
>
> Just ask the author to add these characters and you're fine.
>
> 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] issue with \in and \xmlrefatt

2021-03-12 Thread Pablo Rodriguez
On 3/12/21 6:19 PM, Hans Hagen wrote:
> On 3/11/2021 8:17 PM, Pablo Rodriguez wrote:
>> [...]
>> I cannot provide a minimal sample and I wonder whether this could be
>> enough to find out what is missing.
> i need more info

I was able to reproduce the issue in Linux.

I have a minimal TeX environment, but the XML source is longer.

I’m sending both files to you in private.

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
___


[NTG-context] missing space after \date[] (was: printing the current date)

2021-03-12 Thread Peter Münster
On Wed, Jan 27 2021, Wolfgang Schuster wrote:

> When not all optional arguments are used the space after the last
> given argument is gobbled. This was normal behavior for a long time
> until you changed the code in MkIV to keep them.

Hi,

What does that mean? Is that going to be changed?
How should \date[] be used now in the text?
For now, I do it like "bla \date[d=3]\ bla".
Is there a nicer way?

TIA for any hints,
-- 
   Peter
___
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] tlig feature sometimes does not work

2021-03-12 Thread Hans Hagen

On 3/11/2021 2:05 AM, Mohammad Hossein Bateni wrote:

Hi,

Since most fonts do not have the standard tex ligatures built in, I tend 
to add them when I load the fonts.  Once in a while, I run into fonts 
where this does not work.


See the attached tex/pdf files.  I basically load the font as follows:

\definefontfeature[tf][arabic][tlig=yes]
\definedfont[dejavusansmono*tf]

This works fine for DejaVuSansMono and for one Farsi font I use 
(https://github.com/rastikerdar/vazir-font/blob/master/dist/Vazir-Regular.ttf 
) 
but not for this other Farsi font 
(https://github.com/aminabedi68/Mikhak/blob/master/Font/ttf/Mikhak-Medium.ttf 
).  
Perhaps this is because the last font is not standard, but 
TrueType/OpenType standard is sometimes up for interpretation.


I see two strange symptoms here:

\showotfcomposition displays the tlig feature differently for the last 
font.  It appears in the "extra" list, not in "basic".  Why is that?  
What does this mean anyway?


The font doesn't have endash and emdash so there is nothing to construct 
from the double -


\starttext
\definedfont[file:Mikhak-Medium.ttf*default] foo--bar
[\char"2013]
[\char"2014]
\stoptext

Just ask the author to add these characters and you're fine.

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] issue with \in and \xmlrefatt

2021-03-12 Thread Hans Hagen

On 3/11/2021 8:17 PM, Pablo Rodriguez wrote:

Hans,

after the fix in current latest (2021.03.09 11:42), I get the following
error when using \in[\xmlrefatt{#1}{href}] in Windows (Linux has no
problems).

The error message reads:

fatal lua error:
 run callback [6]: bad argument #2 to 'format' (number expected, got nil)
stack traceback:
 [C]: in function 'string.format'
 ?: in field '?'
 ...ext/tex/texmf-context/tex/context/base/mkxl/luat-log.lmt:178: in
upvalue 'report'
 ...ext/tex/texmf-context/tex/context/base/mkxl/luat-log.lmt:391: in
upvalue 'report'
 [string "
mtx-context | fatal error: return code: 1

I cannot provide a minimal sample and I wonder whether this could be
enough to find out what is missing.

i need more info

-
  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] Problem creating format file after downloading current version: 2021.03.09 11:42

2021-03-12 Thread Hans Hagen

On 3/11/2021 10:45 PM, Willi Egger wrote:

Hello,

todau I decided to upgrade my ConTeXt LMTX installation.
However I get troubles and can not make a format file due to a fatal error. 
Please see cont-en-error.log

mtxrun --generate?

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