Re: [NTG-context] animation using \startuseMPgraphic

2020-04-19 Thread Jeong Dal
Dear Aditya,

Thank you for your link.
It is good to see your nice code.

I’ll see how to apply \startMPanimation … \stopMPanimation to my sample.

Thank you again.

Best regards,

Dalyoung

___
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-19 Thread Hans Hagen

On 4/19/2020 9:02 PM, Jeong Dal wrote:

Dear Wolfgang,

I’d like to ask you one more.

To make an animation, almost same graphics are drawn repeatedly.
In my code, for example,
The base figure(two circles, line, boundingbox) is fixed and only points 
are moved.

But it draws the base figure every time and it is not inefficient.


In what sense? Runtime? Even moving the definitions doesn't really save 
cpu cycles. MP runtime is normally not the bottleneck in a run.


\startMPextensions
vardef findPointD(expr C, Q, r) =
numeric dist, ang;
pair X, Y;
dist := r**2/sqrt((xpart Q - xpart C)**2 + (ypart Q - ypart C)**2);
ang := angle(Q - C);
Y := C + dir(ang)*dist;
Y
enddef;
\stopMPextensions

Is there a way to draw the base figure once, and draw the points only at 
each frame?
I guess you could stack them on top of a base background image but I 
wonder if it's worth the trouble.


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] Passing the parameters of a frame in an environment \startMPcode ... \stopMPcode

2020-04-19 Thread Fabrice Couvreur
Hi,
I try to reproduce the figure as faithfully as possible. I tried for the
rounded corners to put the key corner = round, but it does not work.
Thanks for your help.
Fabrice

\usecolors[xwi]
\definecolor [prune] [r=1.29,g=.20,b=.83]
\starttext
\setupframed[frameletter][corner=round,align=normal]

\startMPcode

 draw outlinetext.f
 ("\framed[frameletter]{A}")
 (withcolor darkred withpen pencircle scaled 1/10)
  rotated 5 xsized 2cm ;

 draw outlinetext.f
 ("\framed[frameletter]{L}")
 (withcolor green withpen pencircle scaled 1/10)
  rotated -5 xsized 2cm shifted (2cm,0);

 draw outlinetext.f
 ("\framed[frameletter]{E}")
 (withcolor \MPcolor{blueviolet} withpen pencircle scaled 1/10)
  rotated 5 xsized 2cm shifted (4.5cm,0);

 draw outlinetext.f
 ("\framed[frameletter]{A}")
 (withcolor \MPcolor{prune} withpen pencircle scaled 1/10)
  rotated -5 xsized 2cm shifted (6.5cm,0);

\stopMPcode

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

2020-04-19 Thread Jeong Dal
Dear Wolfgang,

I’d like to ask you one more.

To make an animation, almost same graphics are drawn repeatedly.
In my code, for example,
The base figure(two circles, line, boundingbox) is fixed and only points are 
moved.
But it draws the base figure every time and it is not inefficient.

Is there a way to draw the base figure once, and draw the points only at each 
frame?

Thank you.
Best regards,

Dalyoung

\startuseMPgraphic{inversionPoint}{n}
vardef findPointD(expr C, Q, r) = 
numeric dist, ang;
pair X, Y;
dist := r**2/sqrt((xpart Q - xpart C)**2 + (ypart Q - ypart C)**2);
ang := angle(Q - C);
Y := C + dir(ang)*dist;
Y
enddef;

numeric radius, now, move;
pair A,B,C,P,Q;
path p,q;
   radius := 2cm;
   C := origin;
   p := fullcircle scaled (2*radius);
   z[1] = point 6 of p;
   z[2] = point .8 of p;

   q := (1.5*z1 - .5*z2) -- (-.5z1 + 1.5*z2);
   %q := fullcircle scaled radius shifted (2cm, 1cm);
   draw p;
   draw q; 

% end of base figure
% draw points

move := 0.1;
now := move*\MPvar{n};
P := point now along q;
Q := findPointD(C, P, radius);
drawdot P;
drawdot Q withcolor .625red;
dotlabel.lft(textext("P"),P);
dotlabel.rt(textext("Q"),Q) withcolor .625red;
\stopuseMPgraphic

___
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-19 Thread Aditya Mahajan

On Sun, 19 Apr 2020, Jeong Dal wrote:


Dear all,

I am trying to make an animation using the animation module.
But it draws 10 figures instead of creating animation.
Is there anything I have to do more?
Or, is there a better way to do this?

Thank you for reading.

Best regards,

Dalyoung


\startuseMPgraphic{inversionPoint}{n}
vardef findPointD(expr C, Q, r) =
   numeric dist, ang;
   pair X, Y;
   dist := r**2/sqrt((xpart Q - xpart C)**2 + (ypart Q - ypart C)**2);
   ang := angle(Q - C);
   Y := C + dir(ang)*dist;
   Y
enddef;
numeric radius, now, move;
pair A,B,C,P,Q;
path p,q;

radius := 2cm;
C := origin;
p := fullcircle scaled (2*radius);
z[1] = point 6 of p;
z[2] = point .8 of p;

q := (1.5*z1 - .5*z2) -- (-.5z1 + 1.5*z2);
%q := fullcircle scaled radius shifted (2cm, 1cm);
draw p;
draw q;
%for i := 0 step 0.1 until 1:
   move := 0.1;
   now := move*\MPvar{n};
   P := point now along q;
   Q := findPointD(C, P, radius);
   drawdot P;
   drawdot Q withcolor .625red;
   dotlabel.lft(textext("P"),P);
   dotlabel.rt(textext("Q"),Q) withcolor .625red;
%endfor;
\stopuseMPgraphic

\usemodule[animation]
\setupinteraction[state=start]

\starttext
%\startplacefigure[]
   \startanimation[menu=yes]
   \dorecurse{10}{
   \useMPgraphic{inversionPoint}{n=\recurselevel}
   }
   \stopanimation
%\stopplacefigure
\stoptext


Also see my simple wrapper around this:

https://adityam.github.io/context-blog/post/metapost-animation/

Aditya
___
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] New installation setup

2020-04-19 Thread Hans Hagen

On 4/19/2020 12:44 PM, Henning Hraban Ramm wrote:




Am 19.04.2020 um 11:57 schrieb Hans Hagen :



As a side note: a while ago mojca and i discussed the future repository and 
installation setup which will use github repositories

(1) - context (including luametatex sources)
(2) - binaries (for a subset of platforms)
(3) - resources (like fonts and such)
(4) - modules (stable ones pushed from the main garden repos)

but we simply didn't find time to follow up on that. We have to adapt 
installers too and we want to do it right from the start.

Now, we're not in a particular hurry, but in playing with all this it can 
happen that the current distributions get flaws.

(As a side effect the more or less official release of luametatex has been 
postponed a few times because it depends on (1) which in turn depends on 
pushing older context distributions etc. But then, due to the current health 
crisis, time has slowed down anyway.)


Sounds good. Is documentation part of (3) or can it be another section?


It's part of (1) as it is now but of course we can have an additional 
one (5) for extra documentation.



While I want to install "everything" on my work machine, it would make sense to 
restrict a server installation (or a beta version for tests) to the bare minimum (without 
docs, but maybe with fonts).


Nowadays even 'everything' is not that much is it? not compared to the 
whole of tex live. There was a time that a tex installation was 
considered large but nowadays many single task programs come with a 
larger installation.



I also would very much appreciate to be able to install older versions (like "in the 
old times") to check when some changes happened. Git repositories serve the same 
purpose, probably even better.

I’d suggest to keep those sections in separate repositories and install them as 
texmf-context, texmf-fonts, texmf-docs or the like (similar to the current state, but 
selectable). Git submodules *should* work to combine several repos, but the 
implementation has flaws (e.g. "git submodule update" tries to access all 
submodules at once, and if you must enter credentials, the prompts get mixed up).

Basically we're talking

(1) texmf-context(tex, mp, lua sources, documentation, luametatex code)
(2) texmf- (luametatex and luatex bin)
(3) texmf(mostly fonts as it is now)
(4) texmf-modules(from the garden)

and if you want

(5) texmf-docs

but context documentation goes into texmf-context.

We're not going top be too clever ... these systems come and go (as do 
some 'standards') so any installation model should be simple kind of 
'copy/fetch something' (with no dependencies on anything we don't have 
in the repository either, apart from a compiler is one wants to compile 
luametatex for some platform we don't provide).


Keep in mind that for specific usage demands are too different so all we 
can do is provide what there is.


Also keep in mind that too much split also makes for tricky 
dependencies, for instance binaries are the latest so when you want an 
older context - something that you can do now too when you use the 
existing github repository - you have to make sure you have the right 
binary. This is why (1) will have the engine source code: integrity 
(don't worry the source code compresses to < 2 meg and uncompressed is 
less that some of these large fonts).


Anyway, once we have it we can always make clever installers. Actually 
when you want to go real small it's easier to just install and wipe what 
you don't need.


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] Use a counter in a reference?

2020-04-19 Thread Kevin Kenan
The label mechanism worked great.

Thanks!

-kk

> On Apr 13, 2020, at 1:20 PM, Thomas A. Schmitz  
> wrote:
> 
> On 4/13/20 10:13 PM, Kevin Kenan wrote:
>> I have a need to tag elements in a text in a way that they are sequentially 
>> numbered and can have references to refer to them. Something like:
>> Here is some \tag[tagref]{\bf text} that is tagged.
>> .
>> .
>> .
>> Refer to tag \tagnumber[tagref] on page \at[tagref].
>> What is the best way to do this in ConTeXt? I’ve got a counter for tag 
>> number, but I’m not sure how to use \reference so that it uses my tag 
>> number. For instance:
>> \definecounter[myTagCounter]
>> .
>> .
>> .
>> \reference[tagref]{\rawcountervalue[myTagCounter]}
>> Doesn’t work. But perhaps I’m going about this incorrectly?
>> Thanks in advance!
> 
> Are you looking for this: https://wiki.contextgarden.net/Command/definelabel 
>  ?
> 
> HTH
> 
> 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 
> ___

___
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] Unexpected result when using PaperHeight and MetaFUun

2020-04-19 Thread Keith McKay

Thank you Wolfgang!

I thought it must be simple! And if I had stayed the course and got to 
the end of the MetaFun manual I would have found it.


Thanks for your help.

Keith

On 19/04/2020 13:04, Wolfgang Schuster wrote:

Keith McKay schrieb am 19.04.2020 um 13:15:

Dear All

I have problem understanding what is happening in the MWE below which 
is different from what I expected.


I have created a shaded background using MetaFun with dimensions 
PaperWidth by PaperHeight which mimics \setuppapersize[A4,landscape} 
as expected.  I then within \starttext \startMPpage... \stopMPpage 
\stoptext created a stripe of the shaded background, xscaled 2cm y 
scaled PaperHeight, but reversed, expecting it to cover the 
background top to bottom. However the top of the stripe seems to 
start at 10.5cm which is suspiciously half the height of A4, 
Landscape i.e. 21cm. I confirmed this by changing the shifted command 
to, shifted (19cm,10.5cm), and the stripe is positioned as expected.


Am I missing something obvious in how MetaFun handles coordinates? I 
have asumed that in MetaFun, (0,0) is the bottom left corner. Or is 
it how I applied the shifted command?


1. When you need page backgrounds you can use a overlay and don't have 
to create a layer for it.


2. Use unitsquare for your bars which has the origin in the lower left 
corner because fullsquare has the origin in the center (look at page 
383 in the metafun manual).


\setuppapersize [A4,landscape]

\startuniqueMPgraphic{blueShade}
draw lmt_shade [
    path    = fullsquare xyscaled (OverlayWidth,OverlayHeight) ,
    direction   = "up",
    alternative = "linear",
    colors  = { "red", "blue" },
] ;
\stopuniqueMPgraphic

\defineoverlay [mybg] [\uniqueMPgraphic{blueShade}]

\setupbackgrounds [page] [background=mybg]

\starttext

\startMPpage
StartPage ;
    % Result Left
    draw lmt_shade [
    path    = unitsquare xscaled 2cm yscaled PaperHeight,
    direction   = "down",
    alternative = "linear",
    colors  = { "red", "blue" },
    ] shifted (12cm,0) ;
    % Result Right
    draw lmt_shade [
    path    = unitsquare xscaled 2cm yscaled PaperHeight,
    direction   = "down",
    alternative = "linear",
    colors  = { "red", "blue" },
    ] shifted (19cm,0cm) ;
StopPage ;
\stopMPpage

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


Re: [NTG-context] Unexpected result when using PaperHeight and MetaFUun

2020-04-19 Thread Wolfgang Schuster

Keith McKay schrieb am 19.04.2020 um 13:15:

Dear All

I have problem understanding what is happening in the MWE below which is 
different from what I expected.


I have created a shaded background using MetaFun with dimensions 
PaperWidth by PaperHeight which mimics \setuppapersize[A4,landscape} as 
expected.  I then within \starttext \startMPpage... \stopMPpage 
\stoptext created a stripe of the shaded background, xscaled 2cm y 
scaled PaperHeight, but reversed, expecting it to cover the background 
top to bottom. However the top of the stripe seems to start at 10.5cm 
which is suspiciously half the height of A4, Landscape i.e. 21cm. I 
confirmed this by changing the shifted command to, shifted 
(19cm,10.5cm), and the stripe is positioned as expected.


Am I missing something obvious in how MetaFun handles coordinates? I 
have asumed that in MetaFun, (0,0) is the bottom left corner. Or is it 
how I applied the shifted command?


1. When you need page backgrounds you can use a overlay and don't have 
to create a layer for it.


2. Use unitsquare for your bars which has the origin in the lower left 
corner because fullsquare has the origin in the center (look at page 383 
in the metafun manual).


\setuppapersize [A4,landscape]

\startuniqueMPgraphic{blueShade}
draw lmt_shade [
path= fullsquare xyscaled (OverlayWidth,OverlayHeight) ,
direction   = "up",
alternative = "linear",
colors  = { "red", "blue" },
] ;
\stopuniqueMPgraphic

\defineoverlay [mybg] [\uniqueMPgraphic{blueShade}]

\setupbackgrounds [page] [background=mybg]

\starttext

\startMPpage
StartPage ;
% Result Left
draw lmt_shade [
path= unitsquare xscaled 2cm yscaled PaperHeight,
direction   = "down",
alternative = "linear",
colors  = { "red", "blue" },
] shifted (12cm,0) ;
% Result Right
draw lmt_shade [
path= unitsquare xscaled 2cm yscaled PaperHeight,
direction   = "down",
alternative = "linear",
colors  = { "red", "blue" },
] shifted (19cm,0cm) ;
StopPage ;
\stopMPpage

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


Re: [NTG-context] animation using \startuseMPgraphic

2020-04-19 Thread Jeong Dal
Dear Wolfgang,

Thank you for your help.
It works fine.

As you said, I need to use boundingbox for stable animation.

Thank you again.

Best regards,

Dalyoung


> 2020. 4. 19. 오후 4:19, Wolfgang Schuster  
> 작성:
> 
> Jeong Dal schrieb am 19.04.2020 um 07:08:
>> Dear all,
>> I am trying to make an animation using the animation module.
>> But it draws 10 figures instead of creating animation.
>> Is there anything I have to do more?
> 
> You have to put each animation step in a frame environment. I recommend also 
> to set the boundingbox to the same size for each frame, otherwise your 
> graphic jumps around.
> 
> When you use \recurselevel you have to use this:
> 
> \startanimation[menu=yes]
>  \dorecurse{10}
>{\startexpanded
>   \startframe
> \useMPgraphic{inversionPoint}{n=\recurselevel}%
>   \stopframe
> \stopexpanded}
> \stopanimation
> 
> or use #1 to access the counter level and get rid of \startexpanded:
> 
> \startanimation[menu=yes]
>  \dorecurse{10}
>{\startframe
>   \useMPgraphic{inversionPoint}{n=#1}%
> \stopframe}
> \stopanimation
> 
> 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] Unexpected result when using PaperHeight and MetaFUun

2020-04-19 Thread Keith McKay

Dear All

I have problem understanding what is happening in the MWE below which is 
different from what I expected.


I have created a shaded background using MetaFun with dimensions 
PaperWidth by PaperHeight which mimics \setuppapersize[A4,landscape} as 
expected.  I then within \starttext \startMPpage... \stopMPpage 
\stoptext created a stripe of the shaded background, xscaled 2cm y 
scaled PaperHeight, but reversed, expecting it to cover the background 
top to bottom. However the top of the stripe seems to start at 10.5cm 
which is suspiciously half the height of A4, Landscape i.e. 21cm. I 
confirmed this by changing the shifted command to, shifted 
(19cm,10.5cm), and the stripe is positioned as expected.


Am I missing something obvious in how MetaFun handles coordinates? I 
have asumed that in MetaFun, (0,0) is the bottom left corner. Or is it 
how I applied the shifted command?


I'm using LuaMetaTex Version 2.05.01 ConTeXt ver: 2020.04.03 10:31 MKIV 
beta fmt: 2020.4.6 int: english/english


Thanks and stay safe.

Best Wishes

Keith McKay

%%% MWE %%% \setuppapersize[A4,landscape]

\definelayer[mybg]

[x=0mm, y=0mm,

width=\paperwidth, height=\paperheight] % let the layer cover the full paper

\startuniqueMPgraphic{blueShade}

draw lmt_shade [

path = fullsquare xyscaled(PaperWidth,PaperHeight),

direction = "up",

alternative = "linear",

colors = { "red", "blue" },

];

\stopuniqueMPgraphic

\setlayer[mybg]{\uniqueMPgraphic{blueShade}}

\setupbackgrounds[page][background={mybg}]

\starttext

\startMPpage

StartPage ;

%Result Left

draw lmt_shade [

path = fullsquare xscaled 2cm yscaled PaperHeight,

direction = "down",

alternative = "linear",

colors = { "red", "blue" },

]shifted (12cm,0cm);

%Result Right

draw lmt_shade [

path = fullsquare xscaled 2cm yscaled PaperHeight,

direction = "down",

alternative = "linear",

colors = { "red", "blue" },

] shifted (19cm,10.5cm);

StopPage ;

\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] New installation setup (was: Cannot build plain format)

2020-04-19 Thread Henning Hraban Ramm


> Am 19.04.2020 um 11:57 schrieb Hans Hagen :

> As a side note: a while ago mojca and i discussed the future repository and 
> installation setup which will use github repositories
> 
> (1) - context (including luametatex sources)
> (2) - binaries (for a subset of platforms)
> (3) - resources (like fonts and such)
> (4) - modules (stable ones pushed from the main garden repos)
> 
> but we simply didn't find time to follow up on that. We have to adapt 
> installers too and we want to do it right from the start.
> 
> Now, we're not in a particular hurry, but in playing with all this it can 
> happen that the current distributions get flaws.
> 
> (As a side effect the more or less official release of luametatex has been 
> postponed a few times because it depends on (1) which in turn depends on 
> pushing older context distributions etc. But then, due to the current health 
> crisis, time has slowed down anyway.)

Sounds good. Is documentation part of (3) or can it be another section?

While I want to install "everything" on my work machine, it would make sense to 
restrict a server installation (or a beta version for tests) to the bare 
minimum (without docs, but maybe with fonts).

I also would very much appreciate to be able to install older versions (like 
"in the old times") to check when some changes happened. Git repositories serve 
the same purpose, probably even better.

I’d suggest to keep those sections in separate repositories and install them as 
texmf-context, texmf-fonts, texmf-docs or the like (similar to the current 
state, but selectable). Git submodules *should* work to combine several repos, 
but the implementation has flaws (e.g. "git submodule update" tries to access 
all submodules at once, and if you must enter credentials, the prompts get 
mixed up).

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] Question: Are there any ConTeXt aware scientific pulishers yet

2020-04-19 Thread Hans Hagen

On 4/16/2020 2:03 PM, denis.maier.li...@mailbox.org wrote:


Yeah, it seems so. I'm much more afraid of getting Arabic and Judeo-Arabic 
right...
Well, just try it, and when it fails we figure it out. I don't know what 
the difference is between those two arabics but in the end it's all 
about jugling glyphs and some typographic conventions / differences I 
guess.


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] Cannot build plain format

2020-04-19 Thread Hans Hagen

On 4/17/2020 1:51 AM, Henri Menke wrote:

On 16/04/20, 12:35, Hans Hagen wrote:

On 4/16/2020 10:51 AM, Henri Menke wrote:

Dear list,

I'm trying to build the plain format but it fails with

  $ mtxrun --script plain --make
  [...]
  ! I can't find file `luatex-plain.tex'.

but mtxrun can find the file.

  $ mtxrun --find-file "luatex-plain.tex"
  /opt/context/tex/texmf-context/tex/generic/context/luatex/luatex-plain.tex

What am I doing wrong?

Also another question: Does LMTX come with a plain format?


currently not but as i for now also have added luatex to it (as it's handy
for testing) i can also add plain related files (these depend on luatex)


Thanks, but what about the first part of my email?  Why can't I build
the plain format in ConTeXt standalone (MkIV, not LMTX) even though
mtxrun can locate the file?
Because the plain files are not there (I did a fresh install). I'll fix 
that. It's a side effect of a change in generating the archives (i use a 
- lua - definition file for that in which is specified what ends up in 
the main garden distribution and what in the smaller lmtx one).


As a side note: a while ago mojca and i discussed the future repository 
and installation setup which will use github repositories


(1) - context (including luametatex sources)
(2) - binaries (for a subset of platforms)
(3) - resources (like fonts and such)
(4) - modules (stable ones pushed from the main garden repos)

but we simply didn't find time to follow up on that. We have to adapt 
installers too and we want to do it right from the start.


Now, we're not in a particular hurry, but in playing with all this it 
can happen that the current distributions get flaws.


(As a side effect the more or less official release of luametatex has 
been postponed a few times because it depends on (1) which in turn 
depends on pushing older context distributions etc. But then, due to the 
current health crisis, time has slowed down anyway.)


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] Introducing myself

2020-04-19 Thread Rudolf Bahr

On Sat, Apr 18, 2020 at 05:37:07PM +0200, David van Diepen wrote:
> Dear everybody,
> 
> I don't have a particular question for the moment but I thought it
> would be nice to introduce myself as I have just joined the email list.
> 
> My name is David van Diepen, 49 years old. I am a process engineer. I
> have two children.
> 
> A few months ago my son had to prepare his thesis and that's when I
> thought latex would be applicable. Very many years ago I learned to
> work with latex during my education, so I thought that it wouldn't be
> too hard to help him out with that. At the end of the day it actually
> was hard work to get to grisps again but after 10 days we had prepared
> a very good-looking thesis and that's what counts.
> 
> In the line of my work I regularly have to prepare technical documents.
> So I thought it's perhaps a good idea to start using latex for that
> too. My teamleader has given me some space to do that even though latex
> is completely unsupported at work, so I'm doing all that from home. The
> first document was recieved quite wel actually. 
> 
> As you'll probably understand my collegues have difficulty appreciating
> the value of a properly designed document. Everybody seems to agree to
> a similar and often poor appearance. I am the son of a graphic
> designer, so maybe that's why I do care what the documents I produce
> look like. For instance, I have a couple of nice books with examples of
> typefaces (letterproeven) lying about that I inherited, these are an
> inspiration too. Also I think a well designed document conveys the
> content better. So I'm glad that I am allowed start with this
> development even though the benefits are very abstract still.
> 
> That's when I thought whether it would be a good idea to continue
> investing time in latex, or whether it would be better to go with the
> new developments, that being the luatex/context combination. So I
> thought I should at least give it a try. 
> 
> That try was actually harder than I expected. On hindsight I think it
> could have been easier if I had found the right channels to
> documentation sooner. There is a lot of information on context to be
> found but that includes a lot of information that's already superseded.
> So a couple of times it took me quite some time before I realized there
> was a newer and easier method. Anyway I'm well on my way now with my
> first technical ducument in context. The thing I like most about
> context is that the structure makes good sense. In latex there have
> been so many additions troughout the years that it has become quite
> messy really. In the longer run I think the greater array of
> possibilities is going to pay off for my purposes too.
> 
> So I would like to thank you all for allowing me to use this great
> software. I expect that I may post questions in the future because I am
> planning to try more things. For now it's maybe a good idea if I put
> some contributions in the wiki. As a newby I have struggled at some
> points and maybe some howto's with that perspective can be helpful for
> other newcomers.
> 
> For now, thanks again, yours faithfully, David
> 


Hello David!

Thank you for introducing yourself!
It's indeed so, as you pointed out, a lot of information about ConTeXt
is a bit outdated. But, as every programmer knows, it's hard after finishing
a program to find the time to document it. And ConTeXt is developing quickly.

For the same reason as you I left LaTeX four or five years ago and began
to use ConTeXt. And peu à peu I changed even all my elder LaTeX-programs
to ConTeXt.

If you have trouble to find a solution to a problem ask the list. There
are very friendly and highly experienced people and you certainly will be
astonished how quick you shall get an answer in most cases. But always
send a so called MWE (Minimal Working Example) along with your question. 

Good luck with ConTeXt and give it more than just a try!

Best wishes,

Rudolf
___
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-19 Thread Wolfgang Schuster

Jeong Dal schrieb am 19.04.2020 um 07:08:

Dear all,

I am trying to make an animation using the animation module.
But it draws 10 figures instead of creating animation.
Is there anything I have to do more?


You have to put each animation step in a frame environment. I recommend 
also to set the boundingbox to the same size for each frame, otherwise 
your graphic jumps around.


When you use \recurselevel you have to use this:

\startanimation[menu=yes]
  \dorecurse{10}
{\startexpanded
   \startframe
 \useMPgraphic{inversionPoint}{n=\recurselevel}%
   \stopframe
 \stopexpanded}
\stopanimation

or use #1 to access the counter level and get rid of \startexpanded:

\startanimation[menu=yes]
  \dorecurse{10}
{\startframe
   \useMPgraphic{inversionPoint}{n=#1}%
 \stopframe}
\stopanimation

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Fwd: Adding optional enumeration text to framed enumeration header

2020-04-19 Thread Aditya Mahajan

On Sun, 19 Apr 2020, Jairo A. del Rio wrote:


I've seen the following solution in Stack Exchange to add referenceable
enumeration labels to a framed enumeration environment:

https://tex.stackexchange.com/questions/438588/context-and-metafun-framed-enumeration-with-counter-as-part-of-overlay

It uses \wrappedcurrentconstruction. However, it only prints the counter
label and the counter name. What if I need the text enclosed by braces in
the frame header too? E. g. \starttheorem[thm1]{Residue theorem} so the
framed title includes "Residue theorem" also. Thank you in advance.


It works out of the box but you have to enable enumeration titles using 
`title=yes` key while defining the enumeration...


\startuseMPgraphic{FunnyFrame}
picture p ; numeric w, h, o ;
p := textext.rt("\wrappedcurrentconstruction");

w := OverlayWidth ; h := OverlayHeight ; o := BodyFontSize ;
p := p shifted (2o,h-ypart center p);
draw p ;

path b;
b := boundingbox p enlarged (o/10);

drawoptions (withpen pencircle scaled 1pt withcolor .625red) ;
draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner b,h) ;
draw b;

setbounds currentpicture to OverlayBox ;
\stopuseMPgraphic

\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]

\defineframedtext
  [FunnyFramedText]
  [
frame=off,
background=FunnyFrame,
offset=\bodyfontsize,
width=\textwidth,
  ]

\defineenumeration[Counter]
  [
title=yes,
alternative=empty,
before=\startFunnyFramedText,
after=\stopFunnyFramedText,
  ]

\starttext
\startCounter[title={Residue Theorem}]
  Coming back to the use of typefaces in electronic
  publishing: many of the new typographers receive their
  knowledge and information about the rules of typography from
  books, from computer magazines or the instruction manuals
  which they get with the purchase of a PC or software.
\stopCounter

\startCounter
  Coming back to the use of typefaces in electronic
  publishing: many of the new typographers receive their
  knowledge and information about the rules of typography from
  books, from computer magazines or the instruction manuals
  which they get with the purchase of a PC or software.
\stopCounter
\stoptext

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