Re: [NTG-context] SVG fonts not working properly

2021-02-05 Thread Jairo A. del Rio
svg=fixdepth breaks, with or without the patch.

fatal lua error:


run callback [6]: [string
"/home/coragyps/lmtx/tex/texmf-context/tex/con..."]:1587: attempt to
perform arithmetic on a nil value (field 'depth')

stack traceback:

[string "/home/coragyps/lmtx/tex/texmf-context/tex/con..."]:1587: in local
'glyphtopdf'

[string "/home/coragyps/lmtx/tex/texmf-context/tex/con..."]:1879: in local
'writer'

[string "/home/coragyps/lmtx/tex/texmf-context/tex/con..."]:2080: in field
'integer index'

[string "/home/coragyps/lmtx/tex/texmf-context/tex/con..."]:782: in upvalue
'run'

[string "/home/coragyps/lmtx/tex/texmf-context/tex/con..."]:811: in field
'finalizedocument'

[string "/home/coragyps/lmtx/tex/texmf-context/tex/con..."]:2958: in field
'?'

...mtx/tex/texmf-context/tex/context/base/mkiv/luat-run.lua:56: in function
<...mtx/tex/texmf-context/tex/context/base/mkiv/luat-run.lua:54>

Jairo

El vie, 5 de feb. de 2021 a la(s) 17:02, Hans Hagen (j.ha...@xs4all.nl)
escribió:

> On 2/5/2021 6:29 PM, Jairo A. del Rio wrote:
> > The following examples doesn't work as expected:
> >
> >
> > \definefontfeature[emojis][default,color:svg][script=latn,language=dflt]
> >
> > \definefont[gilbert][file:Gilbert-ColorBoldPreview5*emojis @ 13bp]
> >
> > \starttext
> >
> > {\gilbert abcdefghijklmnpqrstuvwxyz}
> >
> > \stoptext
> >
> > Letters are displayed correctly, but ascenders and descenders don't. It
> > looks like characters are inserted like images rather than actual
> > characters. Am I missing something? Thank you in advance.
> svg fonts are a bit of a mess adn there are not many (scaling, offset
> etc. and specs kind of fuzzy .. one needs for instance treat the visible
> area in a special way .. there is no metadata wrt the glyph involved so
> we need to experiment a bit (i don't want to end up with heuristics
> based on guesswork)
>
> anyway, them being svg they are actually images (there was time that
> acrobat has svg on board but that was dropped) so what we end up is with
> is a pdf stream but in such a way that they are actual characters
>
> you can try this:
>
> \definefontfeature[color:svg][ccmp=yes,dist=yes,svg=fixdepth]
>
> and patch lpdf-emb with
>
>   -- local y = - b[4] - b[2] - (d.depth
> or 0)
>  local y = - (d.depth or 0)
>
> and try some more (like emoji) ... no time now ... so you do the
> checking and later i will look at the result
>
> 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] composing commands

2021-02-05 Thread Hans Hagen

On 2/6/2021 12:01 AM, Thomas A. Schmitz wrote:


On 2/5/21 10:30 PM, Hans Hagen wrote:

Is this ok for you?

tex error   > tex error on line 6 in file ./oeps.tex: Undefined 
control sequence


 \v

  4
  5 \starttext
  6 >>  \v
  7 \stoptext
  8


Otared has already replied what I was thinking: would it be possible, 
for a certain period of time, to not stop compilation, but flag the 
issue on the console? When you say that such changes won't happen 
suddenly, this would be a wonderful compromise for me. My consolidated 
bibtex database began its life many many years ago, when bibtex was 
still pure 7bit, and you had to pepper your sources with all sorts of 
silly workarounds in order to get accents and umlauts and whatever you 
wanted. Those were the days - barefoot through the snow, and it was 
uphill both ways...

So how did you do the greek then?

I played a bit with an alternative implementation (same commands): less 
hash and mem, delegate more to lua. That way we can a less cost issue 
such a message (once only of course). There is of course a price to pay


% .16 sec per 10 \"u : old method (more mkii-ish)
% .25 sec per 10 \"u : new method (more lmtx-ish)

(actually with mkii in pdftex we need .3 seconds, xetex freezes with 
100K but needs 0.53 for 10K, luatex needs 0.18)


but I'm sure you don't care much about that so I just implements a 
variant with warning which takes .19 seconds per 100K so it's a nice 
compromise. (Probably less than half of that time on your machine.)


system  > instead of old school '\"u' you can input the utf 
sequence ü


(The old school narative is that context is slow, which is why we need 
to keep an eye on performance, right?)


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] composing commands

2021-02-05 Thread luigi scarso
On Fri, Feb 5, 2021 at 11:47 PM Hans Hagen  wrote:

>
> never call a diaeresis an umlaut and vise versa ...


hm
latin is  vice versa (or versa vice)
italian is viceversa
english is vice versa

https://forvo.com/word/vice_versa/
I think that  the latin one is the classic (or "restituta") pronunciation,
the
ecclesiastic should be more or less like the italian .

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


Re: [NTG-context] composing commands

2021-02-05 Thread Thomas A. Schmitz


On 2/5/21 10:30 PM, Hans Hagen wrote:

Is this ok for you?

tex error   > tex error on line 6 in file ./oeps.tex: Undefined 
control sequence


 \v

  4
  5 \starttext
  6 >>  \v
  7 \stoptext
  8


Otared has already replied what I was thinking: would it be possible, 
for a certain period of time, to not stop compilation, but flag the 
issue on the console? When you say that such changes won't happen 
suddenly, this would be a wonderful compromise for me. My consolidated 
bibtex database began its life many many years ago, when bibtex was 
still pure 7bit, and you had to pepper your sources with all sorts of 
silly workarounds in order to get accents and umlauts and whatever you 
wanted. Those were the days - barefoot through the snow, and it was 
uphill both ways...


Thomas
___
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] composing commands

2021-02-05 Thread Hans Hagen

On 2/5/2021 11:21 PM, Otared Kavian wrote:

Hi Hans,

I agree that nowadays most composed characters can be input directly from the 
keyboard (at least judging from my experience with MacOS), but nevertheless it 
may happen that one uses an old file used as an input source file (for instance 
extracting a math exercise from a database) in which there are old fashion 
composed characters. It would be hard to go back and replace those characters 
in each file.
Besides, with the traditional plain TeX composed characters something like

\"c


indeed, not in unicode ... so unlikely dealt with in fonts (i could of 
course support it as in mkii but in over a decade no one complained so ...)



would give a correct result (the character c with a kind of umlaut on top of it), 
but this cannot be input from the keyboard (and maybe it does not exist at all in 
UTF…). (Actually I just tried \"c with LMTX and mkiv and it does not give what 
is expected from TeX… I am sure it did work some years ago :-) )


never call a diaeresis an umlaut and vise versa ... some texies can get 
very emotional about that ... and you don't want to know how long 
winding and boring discussions about the distance between the base 
character and the accent can/has/might be (i remember some discussion 
about the umlaut being lower positioned given its historis origin, it 
being tiny letters) ... often discussions focused on computer modern 
because that was kind of under control (we had plenty of variants for 
each language, which is interesting because they actually could be in 
one font, but that (a new encoding as part of texgyre) happened just 
before we all went unicode and before the european union became larger



If, as you suggest, such composed characters maybe used at the cost of saying 
at the beginning of one's file:
\usemodule[oldschool]
then there is no real harm in removing composing commands, although I am not an 
enthusiastic supporter of removing them.

Well, that why I ask.

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] composing commands

2021-02-05 Thread Hans Hagen

On 2/5/2021 11:25 PM, Otared Kavian wrote:

On 5 Feb 2021, at 22:30, Hans Hagen  wrote:

[…]
Is this ok for you?

tex error   > tex error on line 6 in file ./oeps.tex: Undefined control 
sequence

 \v

4
5 \starttext
6 >>  \v
7 \stoptext
8


In that case the error message could say

tex error   > tex error on line 6 in file ./oeps.tex: Undefined control 
sequence: if you really mean it, then
tex error   > add \usemodule[oldschool] at the begiining of your file…

 \v


Sure but then we can as well keep them -) But maybe I will first redo 
them in a less old school way.


The reason i ask mostly relates to trying to classify such commands. It 
is easy to see that one should not redefine \relax (primitive) or 
\framed (permanent core macro) so we can protect these against 
overloading, while \temp is supposed to be mutable (\foo_bar are already 
hidden from the user to these i can skip).


There are (local) cases where we have \3 defined but what should it be 
otherwise? And commands like \n ? Commands like \NC have a meaning that 
depend on the specific environment so they change meaning but then still 
need to be protected against overload. Most is already dealt with so i'm 
now going through left-overs.


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] composing commands

2021-02-05 Thread Hans Hagen

On 2/5/2021 6:19 PM, Thomas A. Schmitz wrote:


On 2/5/21 5:38 PM, Hans Hagen wrote:
etc ... the ones that make 'composed characters'. I think that anyone 
who needs them uses utf . They can be in (say) m-oldschool.mkxl or so.


Objections? Hurt feelings? Sentiments?


No hurt feelings, but I know that in my bib files, there are a couple of 
old entries that still have these weird composed characters. So I'm fine 
with upgrading, but it would be nice if this could fail gracefully, with 
a nice and informative error message...
btw, something like that will never happen suddenly ... more a matter of 
declaring them obsolete, maybe move them so a module that we could still 
load by default and later maybe on demand


concerning bibtex files, that's another story ... in order to deal well 
with sorting etc quite a bit of sanitizing already takes place there 
(alan and i spent quite a bit of time on that); also there are ways to 
define extra only-used-in-bibtex commands, so we could actually just 
define them for bib stuff only


it's more about "what are the current habits" ... we have commands like 
\" (which is kind of intuitive) but \r and \v and such fall in the 
category, and there are more kind of accents than we currently have 
commands for anyway


a similar discussion (and we already exchanged some mails about that) 
are named glyphs ... we have quite some for latin, greek, cyrillic (like 
\eacute) but how about the rest of unicode


makes me wonder if we should have

  \chr{e"a'}

producing

  ëá

(using real combinings is ok already) which is trivial to implement so 
for the fun of it i might as well add that; i think most who deal with 
languages that have characters other than ascii will input in the most 
natural way so we're only talking of escapes for those who see accents 
and such as noise (yes we do have accents in dutch)


(in mkii we already had utf so then we actually did much of the 
transition but mkii is stone age in terms of software)


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] composing commands

2021-02-05 Thread Otared Kavian
On 5 Feb 2021, at 22:30, Hans Hagen  wrote:
> […]
> Is this ok for you?
> 
> tex error   > tex error on line 6 in file ./oeps.tex: Undefined control 
> sequence
> 
>  \v
> 
> 4
> 5 \starttext
> 6 >>  \v
> 7 \stoptext
> 8

In that case the error message could say 

tex error   > tex error on line 6 in file ./oeps.tex: Undefined control 
sequence: if you really mean it, then
tex error   > add \usemodule[oldschool] at the begiining of your file…

 \v
___
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] composing commands

2021-02-05 Thread Otared Kavian
Hi Hans,

I agree that nowadays most composed characters can be input directly from the 
keyboard (at least judging from my experience with MacOS), but nevertheless it 
may happen that one uses an old file used as an input source file (for instance 
extracting a math exercise from a database) in which there are old fashion 
composed characters. It would be hard to go back and replace those characters 
in each file.
Besides, with the traditional plain TeX composed characters something like

\"c

would give a correct result (the character c with a kind of umlaut on top of 
it), but this cannot be input from the keyboard (and maybe it does not exist at 
all in UTF…). (Actually I just tried \"c with LMTX and mkiv and it does not 
give what is expected from TeX… I am sure it did work some years ago :-) )

If, as you suggest, such composed characters maybe used at the cost of saying 
at the beginning of one's file:
\usemodule[oldschool]
then there is no real harm in removing composing commands, although I am not an 
enthusiastic supporter of removing them.

Best regards: Otared K.

> On 5 Feb 2021, at 17:38, Hans Hagen  wrote:
> 
> Hi,
> 
> As I'm going over the commands in lmtx, I wonder if we should keep
> 
> \c
> \d
> \k
> \r
> \u
> \v
> 
> \"
> \'
> \`
> \^
> 
> etc ... the ones that make 'composed characters'. I think that anyone who 
> needs them uses utf . They can be in (say) m-oldschool.mkxl or so.
> 
> Objections? Hurt feelings? Sentiments?
> 
> 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
> ___

___
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] SVG fonts not working properly

2021-02-05 Thread Hans Hagen

On 2/5/2021 6:29 PM, Jairo A. del Rio wrote:

The following examples doesn't work as expected:


\definefontfeature[emojis][default,color:svg][script=latn,language=dflt]

\definefont[gilbert][file:Gilbert-ColorBoldPreview5*emojis @ 13bp]

\starttext

{\gilbert abcdefghijklmnpqrstuvwxyz}

\stoptext

Letters are displayed correctly, but ascenders and descenders don't. It 
looks like characters are inserted like images rather than actual 
characters. Am I missing something? Thank you in advance.
svg fonts are a bit of a mess adn there are not many (scaling, offset 
etc. and specs kind of fuzzy .. one needs for instance treat the visible 
area in a special way .. there is no metadata wrt the glyph involved so 
we need to experiment a bit (i don't want to end up with heuristics 
based on guesswork)


anyway, them being svg they are actually images (there was time that 
acrobat has svg on board but that was dropped) so what we end up is with 
is a pdf stream but in such a way that they are actual characters


you can try this:

\definefontfeature[color:svg][ccmp=yes,dist=yes,svg=fixdepth]

and patch lpdf-emb with

 -- local y = - b[4] - b[2] - (d.depth 
or 0)

local y = - (d.depth or 0)

and try some more (like emoji) ... no time now ... so you do the 
checking and later i will look at the result


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] composing commands

2021-02-05 Thread Hans Hagen

On 2/5/2021 6:19 PM, Thomas A. Schmitz wrote:


On 2/5/21 5:38 PM, Hans Hagen wrote:
etc ... the ones that make 'composed characters'. I think that anyone 
who needs them uses utf . They can be in (say) m-oldschool.mkxl or so.


Objections? Hurt feelings? Sentiments?


No hurt feelings, but I know that in my bib files, there are a couple of 
old entries that still have these weird composed characters. So I'm fine 
with upgrading, but it would be nice if this could fail gracefully, with 
a nice and informative error message...

Is this ok for you?

tex error   > tex error on line 6 in file ./oeps.tex: Undefined 
control sequence


 \v

 4
 5 \starttext
 6 >>  \v
 7 \stoptext
 8

-
  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] composing commands

2021-02-05 Thread Hans Hagen

On 2/5/2021 5:49 PM, Jairo A. del Rio wrote:
I agree with the optional alternative. If LuaMetaTeX goes (c)leaner, it 
can get rid of obsolete constructions made for a pre-Unicode world. Some 
are already angry with primitives gone and I think that's positive, but 
it's only my opinion.
I never got saw angry mails here about gone primitives. Context commands 
 seldom go away; in the transition to mkiv some encoding stuff became 
obsolete and after many years might have been removed from mkiv because 
no use needed/used them anyway. New stuff gets added, old stuff stays or 
gets improved.


Primitives are an engine thing and there are differences between 
engines, for sure. When context overloads primitives (happens in a few 
cases) the original often is available as \normal.


There is a core set of primives (original tex, luametatex has dropped 
some backend related ones and nilled some prefixes that we never used in 
context anyway), some etex enhancements brought new primitives (some 
make no sense in the luametex universe but one can always fake 
something), some auxiliary pdftex primitives never were available in 
lua(meta)tex because we have lua, and from omega/aleph we ended up with 
nearly nothing (luametatex dropped some useless direction stuff). So: no 
real harm done. And then of course luametatex brought some new primitives.


When overloadmode is enabled one cannot redefine primitives and/or 
macros, depending on what property they have gotten (i'm now down to 
four pages todo).


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] SVG fonts not working properly

2021-02-05 Thread Jairo A. del Rio
The following examples doesn't work as expected:


\definefontfeature[emojis][default,color:svg][script=latn,language=dflt]

\definefont[gilbert][file:Gilbert-ColorBoldPreview5*emojis @ 13bp]

\starttext

{\gilbert abcdefghijklmnpqrstuvwxyz}

\stoptext

Letters are displayed correctly, but ascenders and descenders don't. It
looks like characters are inserted like images rather than actual
characters. Am I missing something? Thank you in advance.

Jairo :)
___
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] composing commands

2021-02-05 Thread Thomas A. Schmitz


On 2/5/21 5:38 PM, Hans Hagen wrote:
etc ... the ones that make 'composed characters'. I think that anyone 
who needs them uses utf . They can be in (say) m-oldschool.mkxl or so.


Objections? Hurt feelings? Sentiments?


No hurt feelings, but I know that in my bib files, there are a couple of 
old entries that still have these weird composed characters. So I'm fine 
with upgrading, but it would be nice if this could fail gracefully, with 
a nice and informative error message...


All best

Thomas
___
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: directionpoint gives unexpected point(?)

2021-02-05 Thread Mikael Sundqvist
Hi,

I was too quick to push send. This must be some rounding error.
Changing the instance fixes the problem. Sorry for the noise.

/Mikael

On Fri, Feb 5, 2021 at 5:48 PM Mikael Sundqvist  wrote:
>
> Hi,
>
> I get sometimes the wrong directionpoint. In the example below it
> works for all values of direx except between 0 and 90. If I put direx
> to something in this interval, it seems that the point between cs and
> cl are chosen.
>
> Is there a better way to construct the paths not to get this problem?
> Or some other way out?
>
> /Mikael
>
> \starttext
> \startMPpage[offset=3bp]
> u:=1cm;
> path cl,cs,rl,p[];
> z0 = (0,6/sqrt(3)*u);
> z1 = z0 rotated 120;
> cs := (fullcircle scaled 16u) shifted z1;
> cs := cs cutafter point 1/6 along cs;
> cl := (fullcircle scaled 4u) shifted z0;
> cl := cl cutbefore point 1/6 along cl cutafter point 2/6 along cl;
>
> p[0] = cs .. cl .. (cs rotated 120) .. (cl rotated 120) .. (cs rotated
> 240) .. (cl rotated 240) .. cycle;
>
> draw p[0];
>
> drawarrow cs withcolor darkblue;
> drawarrow cl withcolor darkred;
>
> direx=300;
> z11=directionpoint dir(direx) of p[0];
> drawarrow ((-u,0)--(u,0)) rotated direx shifted z11;
>
> \stopMPpage
> \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] composing commands

2021-02-05 Thread Jairo A. del Rio
I agree with the optional alternative. If LuaMetaTeX goes (c)leaner, it can
get rid of obsolete constructions made for a pre-Unicode world. Some are
already angry with primitives gone and I think that's positive, but it's
only my opinion.

Jairo :)

El vie., 5 de feb. de 2021 11:38 a. m., Hans Hagen 
escribió:

> Hi,
>
> As I'm going over the commands in lmtx, I wonder if we should keep
>
> \c
> \d
> \k
> \r
> \u
> \v
>
> \"
> \'
> \`
> \^
>
> etc ... the ones that make 'composed characters'. I think that anyone
> who needs them uses utf . They can be in (say) m-oldschool.mkxl or so.
>
> Objections? Hurt feelings? Sentiments?
>
> 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
>
> ___
>
___
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] Metapost: directionpoint gives unexpected point(?)

2021-02-05 Thread Mikael Sundqvist
Hi,

I get sometimes the wrong directionpoint. In the example below it
works for all values of direx except between 0 and 90. If I put direx
to something in this interval, it seems that the point between cs and
cl are chosen.

Is there a better way to construct the paths not to get this problem?
Or some other way out?

/Mikael

\starttext
\startMPpage[offset=3bp]
u:=1cm;
path cl,cs,rl,p[];
z0 = (0,6/sqrt(3)*u);
z1 = z0 rotated 120;
cs := (fullcircle scaled 16u) shifted z1;
cs := cs cutafter point 1/6 along cs;
cl := (fullcircle scaled 4u) shifted z0;
cl := cl cutbefore point 1/6 along cl cutafter point 2/6 along cl;

p[0] = cs .. cl .. (cs rotated 120) .. (cl rotated 120) .. (cs rotated
240) .. (cl rotated 240) .. cycle;

draw p[0];

drawarrow cs withcolor darkblue;
drawarrow cl withcolor darkred;

direx=300;
z11=directionpoint dir(direx) of p[0];
drawarrow ((-u,0)--(u,0)) rotated direx shifted z11;

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


[NTG-context] composing commands

2021-02-05 Thread Hans Hagen

Hi,

As I'm going over the commands in lmtx, I wonder if we should keep

\c
\d
\k
\r
\u
\v

\"
\'
\`
\^

etc ... the ones that make 'composed characters'. I think that anyone 
who needs them uses utf . They can be in (say) m-oldschool.mkxl or so.


Objections? Hurt feelings? Sentiments?

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
___