ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Issue with setupMPvariables
@ 2022-09-03 16:48 Alexandre Christe via ntg-context
  2022-09-03 18:09 ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Christe via ntg-context @ 2022-09-03 16:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Alexandre Christe


[-- Attachment #1.1: Type: text/plain, Size: 248 bytes --]

Dear all,

I'm trying to reuse some MP code for several custom enumeration.

However I can't make the overall setup work, needless to say different
border colors for each enumeration though setupMPvariables. What am I
missing?

MWE: see attachment

[-- Attachment #1.2: Type: text/html, Size: 350 bytes --]

[-- Attachment #2: testColorParagraphs.tex --]
[-- Type: application/x-tex, Size: 1051 bytes --]

[-- Attachment #3: Type: text/plain, Size: 496 bytes --]

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

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Issue with setupMPvariables
  2022-09-03 16:48 Issue with setupMPvariables Alexandre Christe via ntg-context
@ 2022-09-03 18:09 ` Hans Hagen via ntg-context
  2022-09-03 18:31   ` Alexandre Christe via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen via ntg-context @ 2022-09-03 18:09 UTC (permalink / raw)
  To: Alexandre Christe via ntg-context; +Cc: Hans Hagen

On 9/3/2022 6:48 PM, Alexandre Christe via ntg-context wrote:
> Dear all,
> 
> I'm trying to reuse some MP code for several custom enumeration.
> 
> However I can't make the overall setup work, needless to say different 
> border colors for each enumeration though setupMPvariables. What am I 
> missing?\startuseMPgraphic{mp:textFrame}
begingroup;
	path p ;
	for i = 1 upto nofmultipars :
		p := (ulcorner multipars[i]) -- (llcorner multipars[i]) -- (llcorner 
multipars[i] xshifted .25cm) -- (ulcorner multipars[i] xshifted .25cm) 
-- cycle ;
		fill p withcolor boxfillcolor ;
		draw p withcolor boxlinecolor ;
	endfor;
endgroup;
\stopuseMPgraphic


-----------------------------------------------------------------
                                           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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Issue with setupMPvariables
  2022-09-03 18:09 ` Hans Hagen via ntg-context
@ 2022-09-03 18:31   ` Alexandre Christe via ntg-context
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Christe via ntg-context @ 2022-09-03 18:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Alexandre Christe


[-- Attachment #1.1: Type: text/plain, Size: 1847 bytes --]

Thanks Hans!

For sake of completeness a MWE is attached, in case someone needs it one
day.

Le sam. 3 sept. 2022 à 20:10, Hans Hagen via ntg-context <ntg-context@ntg.nl>
a écrit :

> On 9/3/2022 6:48 PM, Alexandre Christe via ntg-context wrote:
> > Dear all,
> >
> > I'm trying to reuse some MP code for several custom enumeration.
> >
> > However I can't make the overall setup work, needless to say different
> > border colors for each enumeration though setupMPvariables. What am I
> > missing?\startuseMPgraphic{mp:textFrame}
> begingroup;
>         path p ;
>         for i = 1 upto nofmultipars :
>                 p := (ulcorner multipars[i]) -- (llcorner multipars[i]) --
> (llcorner
> multipars[i] xshifted .25cm) -- (ulcorner multipars[i] xshifted .25cm)
> -- cycle ;
>                 fill p withcolor boxfillcolor ;
>                 draw p withcolor boxlinecolor ;
>         endfor;
> endgroup;
> \stopuseMPgraphic
>
>
> -----------------------------------------------------------------
>                                            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 /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : https://contextgarden.net
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 2960 bytes --]

[-- Attachment #2: testColorParagraphs.tex --]
[-- Type: application/x-tex, Size: 1161 bytes --]

[-- Attachment #3: Type: text/plain, Size: 496 bytes --]

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

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-03 18:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-03 16:48 Issue with setupMPvariables Alexandre Christe via ntg-context
2022-09-03 18:09 ` Hans Hagen via ntg-context
2022-09-03 18:31   ` Alexandre Christe via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).