Re: [NTG-context] thumb index: \setlayer on every odd/even page?

2019-05-13 Thread Wolfgang Schuster

Henning Hraban Ramm schrieb am 13.05.2019 um 23:17:

Hai,

how must I setup layers that get repeated on every even/odd page?
Or should I use \doifoddpageelse with \setlayer?

Or do you have a different suggestion for thumb index “boxes”?

https://wiki.contextgarden.net/Thumb_index

You can also set backgrounds only for left or right pages.

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] thumb index: \setlayer on every odd/even page?

2019-05-13 Thread Henning Hraban Ramm
Hai,

how must I setup layers that get repeated on every even/odd page?
Or should I use \doifoddpageelse with \setlayer?

Or do you have a different suggestion for thumb index “boxes”?

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

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

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


Re: [NTG-context] Alignment

2019-05-13 Thread Wolfgang Schuster



Fabrice Couvreur schrieb am 13.05.2019 um 22:45:

Hi,
Not having too many ideas, I did this: is there not a more elegant way ?

\definemathmatrix [pmatrix] [matrix:parentheses] [simplecommand=MATRIX]

\starttext

\startformula
  \startmathalignment
  \NC P \times M = P \NC \iff \MATRIX{x,y} \times 
\MATRIX{0.22,0.78;0.53,0.47} = \MATRIX{x,y} \NR

  \NC    \NC \iff
    \startmathcases
    \NC 0.22x + 0.53y = x \NR
    \NC 0.78x + 0.47y = y \NR
    \stopmathcases
  \NR
  \NC    \NC \iff 0.78x - 0.53y = 0 \NR
  \NC    \NC \iff   78x -   53y = 0 \NR
  \stopmathalignment
\stopformula

\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] Alignment

2019-05-13 Thread Fabrice Couvreur
Hi,
Not having too many ideas, I did this: is there not a more elegant way ?
Thank you.
Fabrice

\definemathmatrix [pmatrix][matrix:parentheses][simplecommand=MATRIX]
\starttext
\startmidaligned
\startxtable[align={middle,lohi},frame=off,offset=0.8ex]
  \startxrow
\startxcell
  \m{P\times M=P}
\stopxcell
\startxcell
  \math{\iff}
\stopxcell
\startxcell
  \m{\MATRIX{x,y}\times
\MATRIX{0.22,0.78;0.53,0.47}=\MATRIX{x,y}}
\stopxcell
  \stopxrow
  \startxrow
\startxcell

\stopxcell
\startxcell
  \m{\iff}
\stopxcell
\startxcell[align=right]
  \math{\startmathcases
 \NC 0.22x+0.53y=x\NR
 \NC 0.78x+0.47y=y \NR
 \stopmathcases}
\stopxcell
  \stopxrow
  \startxrow
\startxcell

\stopxcell
\startxcell
  \m{\iff}
\stopxcell
\startxcell[align=right]
  \m{0.78x-0.53y=0}
\stopxcell
  \stopxrow
  \startxrow
\startxcell

\stopxcell
\startxcell
  \m{\iff}
\stopxcell
\startxcell[align=right]
 \m{78x-53y=0}
\stopxcell
  \stopxrow
\stopxtable
  \stopmidaligned
\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] about \startMPanimation

2019-05-13 Thread Jeong Dal
Dear Hans,

Thank you for the clear explanation.
I thought “” is appeared because of the font problem in my system.

I did something wrong when I run the sample code, which didn’t work.

Yes, it is working well in my code now.
It makes the procedure of creating animation simpler.

Thank you and thanks Wolfgang!

Best regards,

Dalyoung 


> 2019. 5. 13. 오후 10:04, Hans Hagen  작성:
> 
> On 5/13/2019 2:14 PM, Jeong Dal wrote:
>> Dear Wolfgang,
>> I found the following code with a comment “code by Wolfgang” at
>> https://adityam.github.io/context-blog/post/metapost-animation/
>> |\unprotect|
>> |\installnamespace{MPanimationvariables}\unexpanded\def\startMPanimation{\dodoublegroupempty\meta_start_animation}
>>  
>> \def\meta_start_animation#1%{\normalexpanded{\meta_start_animation_indeed{#1}}}
>>  
>> \unexpanded\def\meta_start_animation_indeed#1#2#3\stopMPanimation{\doifsomething{#2}{\getparameters[\MPanimationvariables#1:][#2]}%\setgvalue{\??mpgraphic
>>  
>> animation:#1}{\meta_handle_use_graphic{#1}{n,t}{#3}}}\let\stopMPanimation\relax\unexpanded\def\useMPanimation%{\dosingleargument\use_meta_animation}\def\use_meta_animation[#1]#2%{\edef\c_MP_animation_frames{\getvalue{\MPanimationvariables#2:n}}%\startanimation[#1]\dorecurse{\c_MP_animation_frames}{\expanded{\frame{\useMPgraphic{animation:#2}{n=\c_MP_animation_frames,t=\recurselevel\stopanimation}\protect|
>> In the code, there are many “”.(\MPanimationvariables#1, 
>> {\??mpgraphic animation:#1})
>> I wonder it is correct or not.
>> Would you please check it?
> these ??  etc indicate (protected) namespaces so it's correct
> 
> 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] Questions on columnsetspan (and grids and backgrounds)

2019-05-13 Thread Mikael P. Sundqvist
Den lör 11 maj 2019 10:28Mikael P. Sundqvist  skrev:

> Hi,
>
> I have for some hours tried to understand how to work with
> columnsetspans (I'm trying with an updated lmtx), and have some
> questions.
>
> 1) Is it only the floats that has the long list of placement options
> (given on p. 18 in the columnsets manual), or should they also apply
> to columnsetspans and columnsetareas? (I cannot get it to work with
> "default=fxtb:2*10" and similar options for other elements than
> floats). It would be useful to have it for other type of elements as
> well.
>
> 2) What is the current correct way to get back on grid after formulas?
> The only key that had lead me to something that seems to work in
> \setupformulas is "option=depth". Is that the way to go?
>
> 3) This is a bit unrelated, but is it possible to set page backgrounds
> on specific page. Something like \setupbackgrounds[page][page=3, ...]
> (I cannot find any keys for this in setup-en.pdf). Right now I can set
> it for an odd and an even page, but then if I want a background on the
> page after that, I have to put that code at the place where it will be
> used. (I got an error with \startpostponing[+1] ... \stoppostponing)
>
> 4) To be a bit more concrete on the first issue: In the example below,
> how can I place the columnsetspan at the bottom right? Second and
> third column, 10 lines down? I attach the result of running this file.
>
> /Mikael
>
> \setuplayout[grid=yes]
> \showgrid
> \definecolumnset[three][n=3]
>
> \definecolumnsetspan[two][
> n=2,
> background=color,
> backgroundcolor=lightgray,
> ]
>
> \starttext
> \startcolumnset[three]
> \samplefile{knuth}
>
> \startcolumnsetspan[two][default=btrl]
> \samplefile{ward}
> \stopcolumnsetspan
>
> \dorecurse{5}{\samplefile{knuth}\par}
> \stopcolumnset
> \stoptext
>

Hi!

I have looked more carefully at the columnsets manual, and it looks like
(parts of) the columnsets mechanism is somehow broken at the moment, since
some of the examples there are not showing what they are supposed to.

Can this be confirmed? Is there a plan to get it to work soon again?

Best regards, Mikael

>
___
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] about \startMPanimation

2019-05-13 Thread Hans Hagen

On 5/13/2019 2:14 PM, Jeong Dal wrote:

Dear Wolfgang,

I found the following code with a comment “code by Wolfgang” at
https://adityam.github.io/context-blog/post/metapost-animation/

|\unprotect|

|\installnamespace{MPanimationvariables}\unexpanded\def\startMPanimation{\dodoublegroupempty\meta_start_animation} 
\def\meta_start_animation#1%{\normalexpanded{\meta_start_animation_indeed{#1}}} 
\unexpanded\def\meta_start_animation_indeed#1#2#3\stopMPanimation{\doifsomething{#2}{\getparameters[\MPanimationvariables#1:][#2]}%\setgvalue{\??mpgraphic 
animation:#1}{\meta_handle_use_graphic{#1}{n,t}{#3}}}\let\stopMPanimation\relax\unexpanded\def\useMPanimation%{\dosingleargument\use_meta_animation}\def\use_meta_animation[#1]#2%{\edef\c_MP_animation_frames{\getvalue{\MPanimationvariables#2:n}}%\startanimation[#1]\dorecurse{\c_MP_animation_frames}{\expanded{\frame{\useMPgraphic{animation:#2}{n=\c_MP_animation_frames,t=\recurselevel\stopanimation}\protect|



In the code, there are many “”.(\MPanimationvariables#1, 
{\??mpgraphic animation:#1})

I wonder it is correct or not.

Would you please check it?

these ??  etc indicate (protected) namespaces so it's correct

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] about \startMPanimation

2019-05-13 Thread Jeong Dal
Dear Wolfgang,

I found the following code with a comment “code by Wolfgang” at 
https://adityam.github.io/context-blog/post/metapost-animation/ 


\unprotect
\installnamespace{MPanimationvariables}

\unexpanded\def\startMPanimation
{\dodoublegroupempty\meta_start_animation}

\def\meta_start_animation#1%
{\normalexpanded{\meta_start_animation_indeed{#1}}}

\unexpanded\def\meta_start_animation_indeed#1#2#3\stopMPanimation
{\doifsomething{#2}{\getparameters[\MPanimationvariables#1:][#2]}%
 \setgvalue{\??mpgraphic 
animation:#1}{\meta_handle_use_graphic{#1}{n,t}{#3}}}

\let\stopMPanimation\relax

\unexpanded\def\useMPanimation%
{\dosingleargument\use_meta_animation}

\def\use_meta_animation[#1]#2%
{\edef\c_MP_animation_frames{\getvalue{\MPanimationvariables#2:n}}%
 \startanimation[#1]
\dorecurse{\c_MP_animation_frames}

{\expanded{\frame{\useMPgraphic{animation:#2}{n=\c_MP_animation_frames,t=\recurselevel
 \stopanimation}

\protect

In the code, there are many “”.(\MPanimationvariables#1, {\??mpgraphic 
animation:#1})
I wonder it is correct or not.

Would you please check it?

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
___