Re: [NTG-context] TOC- removing Contents 0

2020-04-21 Thread Henning Hraban Ramm


> Am 22.04.2020 um 02:44 schrieb jbf :
> 
> A simple question, but I have not found an answer to it as yet:
> 
> \completecontent does everything it is supposed to, including providing the 
> title 'Contents' on the ToC page, but it also gives me as the first line in 
> the ToC:
> 
> Contents  0
> 
> In fact the ToC appears on page 1, but regardless of the page it is appearing 
> on, is there a way I can prevent that line from being produced as part of the 
> ToC? I assume it would be something I need to do in the following setup:
> 
> \setupcombinedlist
>   [content]
>   [list={chapter,section,title,subject,subsection}]
> \setuplist[chapter][style=normal,alternative=b, before=]
> 
> Grateful for any help with this,

Usually the unnnumbered headers aren’t part of any ToC, but since you include 
title, you also get the ToC title. (title = unnumbered chapter)

If you need chapters without numbers, use \setuphead[chapter][number=no].
If you need some titles to appear in the ToC, you can use 
\definehead[MyTitle][chapter] etc.

You can also replace \completecontent with \MySpecialTitle{Contents} 
\placecontent[...].

Best, Hraban
___
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] lmtx & lohit-devanagari fonts

2020-04-21 Thread Henning Hraban Ramm


> Am 21.04.2020 um 15:32 schrieb Wolfgang Schuster 
> :
> 
> You have to set a font which has the required glyphs but you can also use 
> different fonts for both scripts and combine them.
> 
> \definefallbackfamily [mainface] [ss] [Noto Sans Devanagari]
>  [range={devanagari,devanagariextended},
>   features=devanagari-two]

Does that mean that indic scripts/languages are now fully supported? (Or maybe 
just scripts, not languages? Do Hindi or Urdu need hyphenation patterns?) I 
remember this was an open issue.

Best, Hraban
___
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] lmtx & lohit-devanagari fonts

2020-04-21 Thread Henning Hraban Ramm


> Am 22.04.2020 um 07:43 schrieb Saša Janiška :
> 
>> This works for me with LMTX in Fedora.
>> 
>> Add to ~/.bashrc "export OSFONTDIR=~/.fonts/:/usr/share/fonts/" (log
>> out and log in) 
> 
> I'm using fish shell, but here is my env:
> 
> $ env | grep OSFONTDIR
> OSFONTDIR=/home/gour/.fonts/ /usr/share/fonts/

Can you spot the difference?
I don’t know about fish, but I guess even there a space is not a valid path 
separator.


BTW: For me on MacOS Mojave, installing in texmf-fonts is unreliable, while 
installing in one of the OSFONTDIRs works.

Best, Hraban
___
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] lmtx & lohit-devanagari fonts

2020-04-21 Thread Saša Janiška
On Tue, 21 Apr 2020 23:07:48 +0200
Pablo Rodriguez  wrote:

Hello Pablo,

thank you for your assistance!

> This works for me with LMTX in Fedora.
> 
> Add to ~/.bashrc "export OSFONTDIR=~/.fonts/:/usr/share/fonts/" (log
> out and log in) 

I'm using fish shell, but here is my env:

$ env | grep OSFONTDIR
OSFONTDIR=/home/gour/.fonts/ /usr/share/fonts/

Now I changed local one to ~/.local/share/fonts, but it is empty and my
fonts are in:

$ fc-cache -v | grep google-noto
/usr/share/fonts/google-noto
/usr/share/fonts/google-noto-cjk
/usr/share/fonts/google-noto-emoji
/usr/share/fonts/google-noto-vf
/usr/share/fonts/google-noto: skipping, existing cache is valid: 76
fonts, 0 dirs /usr/share/fonts/google-noto-cjk: skipping, existing
cache is valid: 45 fonts, 0 dirs /usr/share/fonts/google-noto-emoji:
skipping, existing cache is valid: 1 fonts, 0 dirs
/usr/share/fonts/google-noto-vf: skipping, existing cache is valid: 146
fonts, 0 dirs /usr/share/fonts/google-noto: skipping, looped directory
detected /usr/share/fonts/google-noto-cjk: skipping, looped directory
detected /usr/share/fonts/google-noto-emoji: skipping, looped directory
detected /usr/share/fonts/google-noto-vf: skipping, looped directory
detected /usr/share/fonts/google-noto /usr/share/fonts/google-noto-cjk
/usr/share/fonts/google-noto-emoji
/usr/share/fonts/google-noto-vf
/usr/share/fonts/google-noto: skipping, existing cache is valid: 76
fonts, 0 dirs /usr/share/fonts/google-noto-cjk: skipping, existing
cache is valid: 45 fonts, 0 dirs /usr/share/fonts/google-noto-emoji:
skipping, existing cache is valid: 1 fonts, 0 dirs
/usr/share/fonts/google-noto-vf: skipping, existing cache is valid: 146
fonts, 0 dirs /usr/share/fonts/google-noto: skipping, looped directory
detected /usr/share/fonts/google-noto-cjk: skipping, looped directory
detected /usr/share/fonts/google-noto-emoji: skipping, looped directory
detected /usr/share/fonts/google-noto-vf: skipping, looped directory
detected

> and repeat the three other steps from my previous
> message.

Here they are:

> 1. Remove "/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/".

$ rm -rf /home/gour/opt/lmtx/tex/texmf-cache/luatex-cache

> 2. Run "mtxrun --generate".

$ mtxrun --generate
resolvers   | resolving | variable 'SELFAUTOLOC' set to
'/home/gour/opt/lmtx/bin' resolvers   | resolving | variable
'SELFAUTODIR' set to '/home/gour/opt/lmtx' resolvers   | resolving
| variable 'SELFAUTOPARENT' set to '/home/gour/opt' resolvers   |
resolving | variable 'TEXMFCNF' set to '' resolvers   | resolving |
variable 'TEXMF' set to '' resolvers   | resolving | variable
'TEXOS' set to 'lmtx' resolvers   | resolving |
resolvers   | resolving | using configuration specification
'home:texmf/web2c;selfautoparent:/texmf-local/web2c;selfautoparent:/texmf-context/web2c;selfautoparent:/texmf-dist/web2c;selfautoparent:/texmf/web2c'
resolvers   | resolving | resolvers   | resolving | looking for
regular 'texmfcnf.lua' on given path '/home/gour/texmf/web2c' from
specification 'home:texmf/web2c' resolvers   | resolving | looking
for regular 'texmfcnf.lua' on given path
'/home/gour/opt/texmf-local/web2c' from specification
'selfautoparent:/texmf-local/web2c' resolvers   | resolving |
looking for regular 'texmfcnf.lua' on given path
'/home/gour/opt/texmf-context/web2c' from specification
'selfautoparent:/texmf-context/web2c' resolvers   | resolving |
looking for regular 'texmfcnf.lua' on given path
'/home/gour/opt/texmf-dist/web2c' from specification
'selfautoparent:/texmf-dist/web2c' resolvers   | resolving |
looking for regular 'texmfcnf.lua' on given path
'/home/gour/opt/texmf/web2c' from specification
'selfautoparent:/texmf/web2c' resolvers   | resolving | looking for
fallback 'contextcnf.lua' on given path '/home/gour/texmf/web2c' from
specification 'home:texmf/web2c' resolvers   | resolving | looking
for fallback 'contextcnf.lua' on given path
'/home/gour/opt/texmf-local/web2c' from specification
'selfautoparent:/texmf-local/web2c' resolvers   | resolving |
looking for fallback 'contextcnf.lua' on given path
'/home/gour/opt/texmf-context/web2c' from specification
'selfautoparent:/texmf-context/web2c' resolvers   | resolving |
looking for fallback 'contextcnf.lua' on given path
'/home/gour/opt/texmf-dist/web2c' from specification
'selfautoparent:/texmf-dist/web2c' resolvers   | resolving |
looking for fallback 'contextcnf.lua' on given path
'/home/gour/opt/texmf/web2c' from specification
'selfautoparent:/texmf/web2c' resolvers   | resolving | resolvers
| resolving | warning: no lua configuration files found resolvers
| resolving | no texmf paths are defined (using TEXMF) resolvers
   | resolving | mtxrun  | mtxrun  | elapsed lua time:
0.019 seconds

and I notice that after that 

/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/ is empty?

My $PATH is:

$ env | grep PATH
PATH=

[NTG-context] TOC- removing Contents 0

2020-04-21 Thread jbf

A simple question, but I have not found an answer to it as yet:

\completecontent does everything it is supposed to, including providing 
the title 'Contents' on the ToC page, but it also gives me as the first 
line in the ToC:


Contents  0

In fact the ToC appears on page 1, but regardless of the page it is 
appearing on, is there a way I can prevent that line from being produced 
as part of the ToC? I assume it would be something I need to do in the 
following setup:


\setupcombinedlist
  [content]
  [list={chapter,section,title,subject,subsection}]
\setuplist[chapter][style=normal,alternative=b, before=]

Grateful for any help with this,

Julian


___
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] lmtx & lohit-devanagari fonts

2020-04-21 Thread Pablo Rodriguez
On 4/21/20 9:32 PM, Saša Janiška wrote:
> On Tue, 21 Apr 2020 18:27:22 +0200 Wolfgang Schuster wrote:
>
>> ConTeXt doesn't use system fonts on Linux by default but you have to set them
>> yourself, the following should also work on Fedora
>
> Thank you. Is there some documented procedure which does work with LMTX?

Didn’t it work for you in Fedora?

This works for me with LMTX in Fedora.

Add to ~/.bashrc "export OSFONTDIR=~/.fonts/:/usr/share/fonts/" (log out
and log in) and repeat the three other steps from my previous message.

This should work for you (provided that you installed the fonts in any
of the directories added to OSFONTDIR.

I hope it helps,

Pablo

PS: you can also avoid adding anything to ~/.bashrc by adding soft
symlinks for each font to tex/texmf-fonts/. But you have to add the
links to each font file, not to any directory (for some strange reason,
this doesn’t work in Fedora [at least, for me]).
--
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] Setting up macvim in mac os catalina to work with LMTX

2020-04-21 Thread Jan-Erik Hägglöf
Hi !

I am curious about testing macvim and it seems doing fine in edit mode. But how 
do i set up the typesetting engine?

As far as I understand, there is, the command :ConteXt with guidance from the 
wiki https://wiki.contextgarden.net/Vim 

But I do not understand how to customize it to be directed to the path to my 
engine

I’ve installed the LMTX in /Users/janneman/context-osx-64/



The installation works fine in TeXshop but still an error shows up in macvim 
and the message dissappears very quick so there is not much time to read the 
cause of error.

I have created the subdirectory .vim/ftplugin/ and put the context.vim file 
there
also the corresponding in .vim/compiler/context.vim 

which is copied from the program located in 
/usr/local/Cellar/macvim/8.2-163/MacVim.app/Contents/Resources/vim/runtime

So, how do I get this up and running?

Thanks in advance

Regards

/Janne



___
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] lmtx & lohit-devanagari fonts

2020-04-21 Thread Saša Janiška
On Tue, 21 Apr 2020 18:27:22 +0200
Wolfgang Schuster  wrote:

> ConTeXt doesn't use system fonts on Linux by default but you have to set them
> yourself, the following should also work on Fedora

Thank you. Is there some documented procedure which does work with LMTX?


Sincerely,
Gour

-- 
He who is satisfied with gain which comes of its own accord, who
is free from duality and does not envy, who is steady in both
success and failure, is never entangled, although performing actions.


___
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] lmtx & lohit-devanagari fonts

2020-04-21 Thread Wolfgang Schuster

Saša Janiška schrieb am 21.04.2020 um 17:35:

On Tue, 21 Apr 2020 15:32:24 +0200
Wolfgang Schuster  wrote:

Hello Wolfgang,

thank you very much for prompt reply!


You have to set a font which has the required glyphs but you can also
use different fonts for both scripts and combine them.


I understand that the font was not set... tried with your example...



\definefallbackfamily [mainface] [ss] [Noto Sans Devanagari]
[range={devanagari,devanagariextended},
 features=devanagari-two]

\definefontfamily [mainface] [ss] [Noto Sans]

\setupbodyfont[mainface]

\starttext

ध्यायतो विषयान्पुंसः सङ्गस्तेषूपजायते ।
सङ्गात्सञ्जायते कामः कामात्क्रोधोऽभिजायते ॥ ६२ ॥

dhyāyato viṣayān puṁsaḥ
saṅgas teṣūpajāyate
saṅgāt sañjāyate kāmaḥ
kāmāt krodho ’bhijāyate

\stoptext


...but although I've installed all the google-noto-serif-devanagari-fonts
available for Fedora,  it still does not work:


ConTeXt doesn't use system fonts on Linux by default but you have to set 
them yourself, the following should also work on Fedora


https://wiki.contextgarden.net/Ubuntu#With_ConTeXt_Standalone_.E2.80.93_should_work_with_all_Ubuntu_versions

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] METAPOST: How do I get this 'max' cutafter to work?

2020-04-21 Thread Hans Hagen

On 4/21/2020 5:52 PM, Gerben Wierda wrote:

Pretty deep into MP now. Even looked up the reference in John Hobby’s 
manual to the METAFONT book, but that reference did not help.
in the end it all has to do with accuracy and rounding ... the 
intersection_point trickery is probably less sensitive for that


but it's so long ago that i mp-tool was written that that part of my 
mind probably has been overwritten, obscured or wiped


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] lmtx & lohit-devanagari fonts

2020-04-21 Thread Saša Janiška
On Tue, 21 Apr 2020 17:58:05 +0200
Pablo Rodriguez  wrote:

> The easiest way to achieve that is:
> 
> 1. Remove "/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/".
> 2. Run "mtxrun --generate".
> 3. Run "context t.tex"
> 
> Now the glyphs should be there.

That didn't work either - same symptom as before. :-(


Sincerely,
Gour

-- 
Even if you are considered to be the most sinful of all sinners,
when you are situated in the boat of transcendental knowledge
you will be able to cross over the ocean of miseries.


___
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] METAPOST: How do I get this 'max' cutafter to work?

2020-04-21 Thread Gerben Wierda


> On 21 Apr 2020, at 14:41, Hans Hagen  wrote:
> 
> On 4/21/2020 1:29 PM, Gerben Wierda wrote:
[snip]
> 
> \startMPpage[instance=doublefun]
> 
> path arrowHead;
> arrowHead :=
>(542,-77.000186920166016)..controls 
> (545.37,-77.000186920166016) and
>(548.63,-77.000186920166016) 
> ..(552,-77.000186920166016)..controls
>(550.37,-73.666853586832687) and
>(548.63,-70.333520253499344) 
> ..(547,-67.000186920166016)..controls
>(545.37,-70.333520253499344) and
>(543.63,-73.666853586832687) ..cycle;
> 
> path connection;
> connection :=
>  (420.4959106445,-367)..controls (420.66670256708773,-367) and
>  (421.55543111,-367) ..(422.0851913427,-367)..controls
>  (425.3917170194,-367) and (428.698242696,-367)
>  ..(432.0047683727,-367)..controls (442.0015894574,-367) and
>  (451.9984105426,-367) ..(461.9952316273,-367)..controls
>  (464.76142345324098,-367) and (467,-364.76142382108867)
>  ..(467,-361.9997656772)..controls (467,-293.218926) and
>  (467,-226.781074) ..(467,-158.0002343228)..controls
>  (467,-155.23857623850762) and (469.23857634039018,-153)
>  ..(472.0014901161,-153)..controls (495.3338300389,-153) and
>  (518.6661699617,-153) ..(541.9985098839,-153)..controls
>  (544.76142368504975,-153) and (547,-150.76142367339932)
>  ..(547,-147.9983662815)..controls (547,-125.9994554271) and
>  (547,-104.0005445727) ..(547,-82.00163371837)..controls
>  (547,-78.68047283764) and (547,-75.35931195691)
>  ..(547,-72.03815107618)..controls (547,-70.98183460417) and
>  (547,-68.666792551813217) ..(547,-67.000186920166016);
> 
> pair a ; a := arrowHead intersection_point connection ;
> 
> draw connection cutafter arrowHead   withcolor red   withpen 
> pencircle scaled 2mm ;
> draw connection cutafter (reverse arrowHead) withcolor green withpen 
> pencircle scaled 1mm ;
> 
> draw arrowHead;
> 
> draw a withcolor blue withpen pencircle scaled 3mm ;
> 
> currentpicture := currentpicture shifted (-bbwidth(currentpicture), 0) ;
> 
> draw connection cutafter a ;
> 
> draw arrowHead;
> 
> 
> \stopMPpage

Hi Hans, thanks.

I am completely in the dark why your intersection_point works (and thus if it 
will keep working in all circumstances).

I’d like to understand what is going on here. Why does intersection_point work 
where cutafter does not? After all, both are based on the same 
intersectiontimes primitive to find the intersection and they should thus find 
the same one: the ’perfect’ intersection which is the end point of the path 
that is to be cut. 

I’d like to understand this, because otherwise I might run into the same 
problem again later with slightly different paths involved. The first algo that 
I was using worked fine in most cases, as well, then I created one that worked 
with paths with ‘internal spikes’ and now I run into this where two comparable 
situations behaved differently and my question copied the one that didn’t work. 
And while this example from you works, I need to have something that is 100% 
reliable.

What METAPOST comes with is:

path cuttings;  % what got cut off

tertiarydef a cutbefore b =  % tries to cut as little as possible
  begingroup save t;
  (t, whatever) = a intersectiontimes b;
  if t<0:
cuttings:=point 0 of a;
a
  else: cuttings:= subpath (0,t) of a;
subpath (t,length a) of a
  fi
  endgroup
enddef;

tertiarydef a cutafter b =
  reverse (reverse a  cutbefore  b)
  hide(cuttings:=reverse cuttings)
enddef;

secondarydef p intersectionpoint q =
 begingroup save x_,y_; (x_,y_)=p intersectiontimes q;
 if x_<0: errmessage("The paths don't intersect"); origin
 else: .5[point x_ of p, point y_ of q] fi endgroup
enddef;

What is in MetaFun is:

boolean intersection_found ;

secondarydef p intersection_point q =
begingroup
save x_, y_ ;
(x_,y_) = p intersectiontimes q ;
if x_< 0 :
intersection_found := false ;
center p % origin
else :
intersection_found := true ;
.5[point x_ of p, point y_ of q]
fi
endgroup
enddef ;

The thing I can think of is cutting a bit, trying if it still intersects and if 
it does repeat and if it doesn’t take the previous result. I can’t rely on the 
length of cuttings being 0, because this is true in the case of no intersection 
(cuttings equals (0,0)) as well as a ‘perfect’ intersection at the end of the 
path (cuttings is the point at the end of the path). I could rely on cuttings 
being the path (0,0) but how do I compare paths (and not pairs)?

G 

Pretty deep into MP now. Even looked up the reference in John Hobby’s manual to 
the METAFONT book, but that reference did not help.


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / h

Re: [NTG-context] lmtx & lohit-devanagari fonts

2020-04-21 Thread Pablo Rodriguez
On 4/21/20 5:35 PM, Saša Janiška wrote:
> [...]
> ...but although I've installed all the google-noto-serif-devanagari-fonts
> available for Fedora,  it still does not work:

You have to update the font cache, since the font isn’t found, according
to the following message:

> selectfont  > the requested fallback font 'Noto Sans Devanagari' for 
> typeface 'mainface' style 'ss' was ignored because no files where found.
> selectfont  > the requested font 'Noto Sans' has no files for the 'tf' 
> alternative, Latin Modern is used instead.

The easiest way to achieve that is:

1. Remove "/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/".
2. Run "mtxrun --generate".
3. Run "context t.tex"

Now the glyphs should be there.

I hope it helps,

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] lmtx & lohit-devanagari fonts

2020-04-21 Thread Saša Janiška
On Tue, 21 Apr 2020 15:32:24 +0200
Wolfgang Schuster  wrote:

Hello Wolfgang,

thank you very much for prompt reply!

> You have to set a font which has the required glyphs but you can also 
> use different fonts for both scripts and combine them.

I understand that the font was not set... tried with your example...


> \definefallbackfamily [mainface] [ss] [Noto Sans Devanagari]
>[range={devanagari,devanagariextended},
> features=devanagari-two]
> 
> \definefontfamily [mainface] [ss] [Noto Sans]
> 
> \setupbodyfont[mainface]
> 
> \starttext
> 
> ध्यायतो विषयान्पुंसः सङ्गस्तेषूपजायते ।
> सङ्गात्सञ्जायते कामः कामात्क्रोधोऽभिजायते ॥ ६२ ॥
> 
> dhyāyato viṣayān puṁsaḥ
> saṅgas teṣūpajāyate
> saṅgāt sañjāyate kāmaḥ
> kāmāt krodho ’bhijāyate
> 
> \stoptext

...but although I've installed all the google-noto-serif-devanagari-fonts
available for Fedora,  it still does not work:

$ context t.tex

resolvers   | formats | executing runner 'run luametatex format': 
/home/gour/opt/lmtx/tex/texmf-linux-64/bin/luametatex --jobname="t" 
--fmt=/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
 
--lua=/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
 cont-yes.mkiv --c:currentrun=1 --c:fulljobname="./t.tex" --c:input="./t.tex" 
--c:kindofrun=1 --c:maxnofruns=9 
--c:texmfbinpath="/home/gour/opt/lmtx/tex/texmf-linux-64/bin"
This is LuaMetaTeX, Version 2.05.02 
open source > level 1, order 1, name 'cont-yes.mkiv'
system  > 
system  > ConTeXt  ver: 2020.04.19 19:43 MKIV beta  fmt: 2020.4.21  
int: english/english
system  > 
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name 
'/home/gour/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name 
'/home/gour/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 't', input './t', result 't'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name './t.tex'
selectfont  > the requested fallback font 'Noto Sans Devanagari' for 
typeface 'mainface' style 'ss' was ignored because no files where found.
selectfont  > the requested font 'Noto Sans' has no files for the 'tf' 
alternative, Latin Modern is used instead.
fonts   > preloading modern-designsize (math)
fonts   > typescripts > unknown library 'modern-designsize'
fonts   > 'fallback modern-designsize mm 12pt' is loaded
fonts   > preloading modern-designsize (mono)
fonts   > 'fallback modern-designsize tt 12pt' is loaded
fonts   > checking > char ध (U+00927) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char ् (U+0094D) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char य (U+0092F) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char ा (U+0093E) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char त (U+00924) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char ो (U+0094B) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char व (U+00935) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char ि (U+0093F) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char ष (U+00937) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char न (U+00928) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char प (U+0092A) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char ु (U+00941) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char ं (U+00902) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char स (U+00938) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char ः (U+00903) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char ङ (U+00919) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char ग (U+00917) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char े (U+00947) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char ू (U+00942) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char ज (U+0091C) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char । (U+00964) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char ञ (U+0091E) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checking > char क (U+00915) in font 'LMSans10-Regular' with 
id 1: missing
fonts   > checkin

Re: [NTG-context] lmtx & lohit-devanagari fonts

2020-04-21 Thread Wolfgang Schuster

Saša Janiška schrieb am 21.04.2020 um 15:06:

Hello!

I'm working on a small presentation for an upcoming video meeting and started
writing some points in Markdown. After using Pandoc to convert I noticed that
*.pptx file does contain everything, but if I try with ConTexT, then Devanagi
and some diacritics are missing.

By inspecting *.pdf file produced by: Pandoc --> PPTX --> LibreOffice --> PDF

I can see that Lohit-Devanagari font is used for Sanskrit and I have it
installed on my Fedora (fc32) desktop machine.

Here is the test file:

\starttext
ध्यायतो विषयान्पुंसः सङ्गस्तेषूपजायते ।
सङ्गात्सञ्जायते कामः कामात्क्रोधोऽभिजायते ॥ ६२ ॥

dhyāyato viṣayān puṁsaḥ
saṅgas teṣūpajāyate
saṅgāt sañjāyate kāmaḥ
kāmāt krodho ’bhijāyate

Translation: ``While contemplating the objects of the senses, a person
develops attachment for them, and from such attachment lust develops,
and from lust anger arises.''

\stoptext

which I would like to quote - I am somewhat familiar with latin transliteration
via diacritics, but completely ignorant in regard to Devanagari - but wonder
what is required to make ConText (lmtx) typeset it?


You have to set a font which has the required glyphs but you can also 
use different fonts for both scripts and combine them.


\definefallbackfamily [mainface] [ss] [Noto Sans Devanagari]
  [range={devanagari,devanagariextended},
   features=devanagari-two]

\definefontfamily [mainface] [ss] [Noto Sans]

\setupbodyfont[mainface]

\starttext

ध्यायतो विषयान्पुंसः सङ्गस्तेषूपजायते ।
सङ्गात्सञ्जायते कामः कामात्क्रोधोऽभिजायते ॥ ६२ ॥

dhyāyato viṣayān puṁsaḥ
saṅgas teṣūpajāyate
saṅgāt sañjāyate kāmaḥ
kāmāt krodho ’bhijāyate

\stoptext

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
___


[NTG-context] lmtx & lohit-devanagari fonts

2020-04-21 Thread Saša Janiška
Hello!

I'm working on a small presentation for an upcoming video meeting and started
writing some points in Markdown. After using Pandoc to convert I noticed that
*.pptx file does contain everything, but if I try with ConTexT, then Devanagi
and some diacritics are missing.

By inspecting *.pdf file produced by: Pandoc --> PPTX --> LibreOffice --> PDF

I can see that Lohit-Devanagari font is used for Sanskrit and I have it
installed on my Fedora (fc32) desktop machine.

Here is the test file:

\starttext
ध्यायतो विषयान्पुंसः सङ्गस्तेषूपजायते ।
सङ्गात्सञ्जायते कामः कामात्क्रोधोऽभिजायते ॥ ६२ ॥

dhyāyato viṣayān puṁsaḥ
saṅgas teṣūpajāyate
saṅgāt sañjāyate kāmaḥ
kāmāt krodho ’bhijāyate

Translation: ``While contemplating the objects of the senses, a person
develops attachment for them, and from such attachment lust develops,
and from lust anger arises.''

\stoptext

which I would like to quote - I am somewhat familiar with latin transliteration
via diacritics, but completely ignorant in regard to Devanagari - but wonder
what is required to make ConText (lmtx) typeset it?

Here is the log file:

$ context t.tex

resolvers   | formats | executing runner 'run luametatex format': 
/home/gour/opt/lmtx/tex/texmf-linux-64/bin/luametatex --jobname="t" 
--fmt=/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
 
--lua=/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
 cont-yes.mkiv --c:currentrun=1 --c:fulljobname="./t.tex" --c:input="./t.tex" 
--c:kindofrun=1 --c:maxnofruns=9 
--c:texmfbinpath="/home/gour/opt/lmtx/tex/texmf-linux-64/bin"
This is LuaMetaTeX, Version 2.05.02 
open source > level 1, order 1, name 'cont-yes.mkiv'
system  > 
system  > ConTeXt  ver: 2020.04.19 19:43 MKIV beta  fmt: 2020.4.21  
int: english/english
system  > 
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name 
'/home/gour/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name 
'/home/gour/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 't', input './t', result 't'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name './t.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
fonts   > checking > char ध (U+00927) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char ् (U+0094D) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char य (U+0092F) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char ा (U+0093E) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char त (U+00924) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char ो (U+0094B) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char व (U+00935) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char ि (U+0093F) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char ष (U+00937) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char न (U+00928) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char प (U+0092A) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char ु (U+00941) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char ं (U+00902) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char स (U+00938) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char ः (U+00903) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char ङ (U+00919) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char ग (U+00917) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char े (U+00947) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char ू (U+00942) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char ज (U+0091C) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char । (U+00964) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char ञ (U+0091E) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char क (U+00915) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char म (U+0092E) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char र (U+00930) in font 'LMRoman12-Regular' with 
id 1: missing
fonts   > checking > char ऽ (U+009

Re: [NTG-context] METAPOST: How do I get this 'max' cutafter to work?

2020-04-21 Thread Hans Hagen

On 4/21/2020 1:29 PM, Gerben Wierda wrote:
I have these two paths, but cutting doesn’t work because the path to be 
cut takes the wrong intersection regardless of how I direct the path to 
be cut after (reverse or not).


The path to cut after is a triangle with the base horizontal and the 
path to cut is a vertical line. The top of the triangle is the endpoint 
of the line and is selected as intersection by cutafter. This happens 
also if I reverse the triangle path, strangely enough. I have an 
alternative cutting algorithm, but that cuts as long as the length of 
cuttings is not 0, which is the case at the top too, so it won’t cut 
further.


I need a reliable algorithm to make a ‘maximum cutafter’. What might be 
a good approach?


G

path arrowHead;
arrowHead :=
   (542,-77.000186920166016)..controls 
(545.37,-77.000186920166016) and 
(548.63,-77.000186920166016)
   ..(552,-77.000186920166016)..controls 
(550.37,-73.666853586832687)

   and (548.63,-70.333520253499344)
   ..(547,-67.000186920166016)..controls 
(545.37,-70.333520253499344)

   and (543.63,-73.666853586832687)
   ..cycle;

path connection;
connection :=
   (420.4959106445,-367)..controls (420.66670256708773,-367) and 
(421.55543111,-367)
   ..(422.0851913427,-367)..controls (425.3917170194,-367) and 
(428.698242696,-367)
   ..(432.0047683727,-367)..controls (442.0015894574,-367) and 
(451.9984105426,-367)
   ..(461.9952316273,-367)..controls (464.76142345324098,-367) and 
(467,-364.76142382108867)
   ..(467,-361.9997656772)..controls (467,-293.218926) and 
(467,-226.781074)
   ..(467,-158.0002343228)..controls (467,-155.23857623850762) and 
(469.23857634039018,-153)
   ..(472.0014901161,-153)..controls (495.3338300389,-153) and 
(518.6661699617,-153)
   ..(541.9985098839,-153)..controls (544.76142368504975,-153) and 
(547,-150.76142367339932)
   ..(547,-147.9983662815)..controls (547,-125.9994554271) and 
(547,-104.0005445727)
   ..(547,-82.00163371837)..controls (547,-78.68047283764) and 
(547,-75.35931195691)
   ..(547,-72.03815107618)..controls (547,-70.98183460417) and 
(547,-68.666792551813217)

   ..(547,-67.000186920166016);

show connection cutafter arrowHead;
show connection cutafter (reverse arrowHead);


\startMPpage[instance=doublefun]

path arrowHead;
arrowHead :=
(542,-77.000186920166016)..controls 
(545.37,-77.000186920166016) and
(548.63,-77.000186920166016) 
..(552,-77.000186920166016)..controls

(550.37,-73.666853586832687) and
(548.63,-70.333520253499344) 
..(547,-67.000186920166016)..controls

(545.37,-70.333520253499344) and
(543.63,-73.666853586832687) ..cycle;

path connection;
connection :=
  (420.4959106445,-367)..controls (420.66670256708773,-367) and
  (421.55543111,-367) ..(422.0851913427,-367)..controls
  (425.3917170194,-367) and (428.698242696,-367)
  ..(432.0047683727,-367)..controls (442.0015894574,-367) and
  (451.9984105426,-367) ..(461.9952316273,-367)..controls
  (464.76142345324098,-367) and (467,-364.76142382108867)
  ..(467,-361.9997656772)..controls (467,-293.218926) and
  (467,-226.781074) ..(467,-158.0002343228)..controls
  (467,-155.23857623850762) and (469.23857634039018,-153)
  ..(472.0014901161,-153)..controls (495.3338300389,-153) and
  (518.6661699617,-153) ..(541.9985098839,-153)..controls
  (544.76142368504975,-153) and (547,-150.76142367339932)
  ..(547,-147.9983662815)..controls (547,-125.9994554271) and
  (547,-104.0005445727) ..(547,-82.00163371837)..controls
  (547,-78.68047283764) and (547,-75.35931195691)
  ..(547,-72.03815107618)..controls (547,-70.98183460417) and
  (547,-68.666792551813217) ..(547,-67.000186920166016);

pair a ; a := arrowHead intersection_point connection ;

draw connection cutafter arrowHead   withcolor red   withpen 
pencircle scaled 2mm ;
draw connection cutafter (reverse arrowHead) withcolor green withpen 
pencircle scaled 1mm ;


draw arrowHead;

draw a withcolor blue withpen pencircle scaled 3mm ;

currentpicture := currentpicture shifted (-bbwidth(currentpicture), 0) ;

draw connection cutafter a ;

draw arrowHead;


\stopMPpage

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

[NTG-context] METAPOST: How do I get this 'max' cutafter to work?

2020-04-21 Thread Gerben Wierda
I have these two paths, but cutting doesn’t work because the path to be cut 
takes the wrong intersection regardless of how I direct the path to be cut 
after (reverse or not).

The path to cut after is a triangle with the base horizontal and the path to 
cut is a vertical line. The top of the triangle is the endpoint of the line and 
is selected as intersection by cutafter. This happens also if I reverse the 
triangle path, strangely enough. I have an alternative cutting algorithm, but 
that cuts as long as the length of cuttings is not 0, which is the case at the 
top too, so it won’t cut further.

I need a reliable algorithm to make a ‘maximum cutafter’. What might be a good 
approach?

G

path arrowHead;
arrowHead :=
  (542,-77.000186920166016)..controls (545.37,-77.000186920166016) 
and (548.63,-77.000186920166016)
  ..(552,-77.000186920166016)..controls (550.37,-73.666853586832687)
  and (548.63,-70.333520253499344)
  ..(547,-67.000186920166016)..controls (545.37,-70.333520253499344)
  and (543.63,-73.666853586832687)
  ..cycle;

path connection;
connection :=
  (420.4959106445,-367)..controls (420.66670256708773,-367) and 
(421.55543111,-367)
  ..(422.0851913427,-367)..controls (425.3917170194,-367) and 
(428.698242696,-367)
  ..(432.0047683727,-367)..controls (442.0015894574,-367) and 
(451.9984105426,-367)
  ..(461.9952316273,-367)..controls (464.76142345324098,-367) and 
(467,-364.76142382108867)
  ..(467,-361.9997656772)..controls (467,-293.218926) and 
(467,-226.781074)
  ..(467,-158.0002343228)..controls (467,-155.23857623850762) and 
(469.23857634039018,-153)
  ..(472.0014901161,-153)..controls (495.3338300389,-153) and 
(518.6661699617,-153)
  ..(541.9985098839,-153)..controls (544.76142368504975,-153) and 
(547,-150.76142367339932)
  ..(547,-147.9983662815)..controls (547,-125.9994554271) and 
(547,-104.0005445727)
  ..(547,-82.00163371837)..controls (547,-78.68047283764) and 
(547,-75.35931195691)
  ..(547,-72.03815107618)..controls (547,-70.98183460417) and 
(547,-68.666792551813217)
  ..(547,-67.000186920166016);

show connection cutafter arrowHead;
show connection cutafter (reverse arrowHead);


___
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] animation using \startuseMPgraphic

2020-04-21 Thread Jeong Dal
Dear Hans,

I have not experienced a bottleneck when running ConTeXt.
It is stable and fast. 

I am satisfied with ConTeXt except there are many features and commands which 
are not explained.
Frankly speaking, I don’t need that much commands for my job. 
Also it is not the problem because there are many experts who willingly give 
the solutions in the list mail

I appreciate you and your team.

Best regards,

Dalyoung

> 2020. 4. 21. 오전 2:19, Hans Hagen  작성:
> 
> On 4/20/2020 4:40 PM, Jeong Dal wrote:
> 
>> Of course, it runs so fast that it is meaningless to shorten the runtime.
>> It is my old habit to check the algorithmic efficiency.
> 
> We share the same habit ... unfortunately there is not much performance to 
> gain after all these years. Of course users are invited to tell me where they 
> see a (real) bottleneck that doesn't make sense to them.
> 
> 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
___