}{MATHEMATIQUES}
\starttext
\startuseMPgraphic{test}
picture pic ;
pic := image(graphictext \MPstring{text}
withdrawcolor red
withpen pencircle scaled 1pt ; ) ;
addto currentpicture also pic ;
\stopuseMPgraphic
\stoptext
color pagecolor ; pagecolor := \MPcolor{pagecolor} ;
color darkcolor ; darkcolor := \MPcolor{darkcolor} ;
color textcolor ; textcolor := \MPcolor{textcolor} ;
\stopMPinclusions
\startuseMPgraphic{CoverPage}
path p ; p := OverlayBox xyscaled (1/2,1/7) ;
fill OverlayBox withcolor pagecolor ;
location=left,
>style=italic]
>
> \defineoverlay
> [MyFrame]
> [\useMPgraphic{MyFrame}]
>
> \definelabel
> [Définition]
> [headstyle=\bf\smallcaps]
>
> \startuseMPgraphic{MyFrame}
> path b ;
> picture p ;
> p := textext.rt("\white\Définiti
[MyColorA][.75(MyColorB,white)]
\defineframedtext
[MyText]
[frame=off,
background=MyFrame,
width=\textwidth,
height=fit,
location=left,
style=italic]
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\definelabel
[Définition]
[headstyle=\bf\smallcaps]
\startuseMPgraphic
>height=fit,
>location=left,
>style=italic]
>
> \defineoverlay
> [MyFrame]
> [\useMPgraphic{MyFrame}]
>
> \definelabel
> [Définition]
> [headstyle=\bf\smallcaps]
>
> \startuseMPgraphic{MyFrame}
> path b ;
> picture p ;
> p :
[MyText]
[frame=off,
background=MyFrame,
width=\textwidth,
height=fit,
location=left,
style=italic]
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\definelabel
[Définition]
[headstyle=\bf\smallcaps]
\startuseMPgraphic{MyFrame}
path b ;
picture p ;
p
definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
> > \definecolor[MyColorA][.75(MyColorB,white)]
> >
> > \defineframedtext
> > [MyText]
> > [frame=off,
> >background=MyFrame,
> >width=\textwidth,
> >location=right]
> >
> > \defineov
efinecolor[MyColorA][.75(MyColorB,white)]
>
> \defineframedtext
> [MyText]
> [frame=off,
>background=MyFrame,
>width=\textwidth,
>location=right]
>
> \defineoverlay
> [MyFrame]
> [\useMPgraphic{MyFrame}]
>
> \definelabel
>
,
location=right]
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\definelabel
[Définition]
[headstyle=\bf\smallcaps]
\startuseMPgraphic{MyFrame}
path b ;
picture p ;
p := textext.rt("\white\Définition") ;
p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.
twidth,
>> location=right]
>>
>> \defineoverlay[MyFrame][\useMPgraphic{MyFrame}]
>>
>> \def\StartFrame{\startMyText}
>> \def\StopFrame{\startMyText}
>>
>> \def\FrameTitle#1{\setMPtext{MyFrame}{\hbox spread
>> 1em{\hss\strut{\bf\feature[+][f:sm
#1{\setMPtext{MyFrame}{\hbox spread
1em{\hss\strut{\bf\feature[+][f:smallcaps]}#1\hss}}}
\setMPtext{MyFrame}{}
\startuseMPgraphic{MyFrame}
path a ;
path b ;
picture p ;
o := BodyFontSize ;
p :=textext.rt(\MPstring{MyFrame}) ;
p := p shifted (2o,OverlayHeight-ypart center p) ;
a := unitsquare
{\bf\feature[+][f:smallcaps]}#1\hss}}}
\setMPtext{MyFrame}{}
\startuseMPgraphic{MyFrame}
path a ;
path b ;
picture p ;
o := BodyFontSize ;
p :=textext.rt(\MPstring{MyFrame}) ;
p := p shifted (2o,OverlayHeight-ypart center p) ;
a := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
fill a
20:08 GMT+02:00 Hans Hagen :
> On 8/4/2015 5:04 PM, Fabrice Couvreur wrote:
>
>> Hi,
>> How to have Definition 1, Definition 2, Definition 3 ...?
>>
>> Is it possible to translate the image p until the left edge of the text
>> area ?
>>
>
>
> \
On 8/4/2015 5:04 PM, Fabrice Couvreur wrote:
Hi,
How to have Definition 1, Definition 2, Definition 3 ...?
Is it possible to translate the image p until the left edge of the text
area ?
\startuseMPgraphic{MyFrame}
picture p ;
p := textext.rt(\MPstring{MyFrame}) ;
p := p shifted
\StopFrame{\startMyText}
\setMPtext{MyFrame}{\hbox spread 1em {\hss\strut
{\bf\feature[+][f:smallcaps] Définition 1 }\hss}}}
\startuseMPgraphic{MyFrame}
path a ;
path b ;
picture p ;
o := BodyFontSize ;
p :=textext.rt(\MPstring{MyFrame}) ;
p := p shifted (0,OverlayHeight-ypart center p) ;
a
\feature[+][f:smallcaps]},
>headcommand=\ACFRAME,
>numberconversionset=ACCONVERSION,
>inbetween={\blank[big]},
>]
>
> \starttext
> \startexemple
> \dorecurse{10}{blabla}
> \stopexemple
> \stoptext
Use MetaPost.
\startuseMPgraphic{ACFRAME}
fill Ov
Hi,
Wolfgang wrote, there was some time already, a nice macro to draw a brace.
In the code below, how to have the arrow and the text to the right of the
brace ?
Best regards,
Fabrice
\startuseMPgraphic{accolade}
z1 = (-233,0) ;
z2 = (-220,22) ;
z3 = (-155,211) ;
z4 = (-200,690) ;
z5
sired).
When I use
\setupbackgrounds[page][background=MyLayer]
this problem does not occur. But I have to shift the figure to place it in
the leftmargin.
I tried to use another concept like
\definelayer[test]
\startuseMPgraphic{oeps}
register ("somepos-1",0cm,0cm,center
Hi,
Macro written by Hans does not work.
Best regards,
Fabrice
% macros=mkvi
\starttext
\starttexdefinition MyOtherHeader #where #day #month #year #title
\defineoverlay[whatever][\useMPgraphic{whatever}]
\startuseMPgraphic{whatever}
path p;
p:=fullsquare xyscaled (\overlaywidth
On Mon, 10 Nov 2014, Wolfgang Schuster wrote:
Am 10.11.2014 um 19:18 schrieb Fabrice Couvreur :
Hi,
With the book Metafun I created a marker with metapost. How to add a counter ?
Best regards,
Fabrice
\startuseMPgraphic{itemize:fuzzy}
numeric u;
u:=0.5cm;
save p; path p;
p := fullcircle
> Am 10.11.2014 um 19:18 schrieb Fabrice Couvreur :
>
> Hi,
> With the book Metafun I created a marker with metapost. How to add a counter ?
> Best regards,
> Fabrice
>
> \startuseMPgraphic{itemize:fuzzy}
> numeric u;
> u:=0.5cm;
> save p; path p;
> p := full
ter solution?
Alan
\startMPdefinitions
numeric counter; counter := 1;
\stopMPdefinitions
\startuseMPgraphic{itemize:fuzzy}
numeric u; u:=0.5cm;
save p; path p; p := fullcircle xyscaled (u,u) randomized 2pt;
pickup pencircle scaled 1pt;
fill p withcolor green;
draw p withcolor blue;
draw textext(dec
Hi,
With the book Metafun I created a marker with metapost. How to add a counter
?
Best regards,
Fabrice
\startuseMPgraphic{itemize:fuzzy}
numeric u;
u:=0.5cm;
save p; path p;
p := fullcircle xyscaled (u,u) randomized 2pt;
pickup pencircle scaled 1pt;
fill p withcolor green;
draw p withcolor blue
Dear Wolfgang,
According to your advice, I am able to make a working example as following.
\usemodule[animation]
\setupinteraction[state=start]
\startuseMPgraphic{Circles}{s}
numeric sn, L, N;
path p, q;
p := fullcircle scaled 72;
L:=length p;
N:=20;
sn := \MPvar{s};
q := subpath (0, sn/N*L
> Am 21.10.2014 um 14:08 schrieb Jeong Dal :
>
> Dear Wolfgang,
>
> Thank you for a nice solution.
>
> I applied your method to produce an animation which draw a circle using the
> following:
>
>
> \usemodule[animation]
> \setupinteraction[state
Dear Wolfgang,
Thank you for a nice solution.
I applied your method to produce an animation which draw a circle using the
following:
\usemodule[animation]
\setupinteraction[state=start]
\startuseMPgraphic{Circles}{s}
numeric sn, L, N;
path p, q;
p := fullcircle scaled 72;
L:=length p
ation
\dorecurse{5}
{\startexpanded
\startframe
\setupMPvariables[Circles][s=\recurselevel]
\processMPbuffer [Circles]
\stopframe
\stopexpanded}
\stopanimation
\stoptext
Variant 2:
\usemodule[animation]
\setupinteraction[state=start]
\startuseMPgraphic{Circles}{
age 168 I have assigned different
> > pairs to the two overlays:
> > \startuseMPgraphic{right page}
> > ...
> > \stopuseMPgraphic
> >
> > and
> > \startuseMPgraphic{left page}
> > \stopuseMPgraphic
> >
> > In the left hand area I
Am 03.06.2014 16:27, schrieb john Culleton:
>
> I need a graphic (a thumbnail) on the right hand
> pages but not on the left hand pages. Following
> the instructions in the Metafun Manual page 168 I
> have assigned different pairs to the two
> overlays:
> \startus
I need a graphic (a thumbnail) on the right hand
pages but not on the left hand pages. Following
the instructions in the Metafun Manual page 168 I
have assigned different pairs to the two
overlays:
\startuseMPgraphic{right page}
...
\stopuseMPgraphic
and
\startuseMPgraphic{left page
Am 21.04.2014 um 15:46 schrieb Jeong Dal :
> Dear all,
>
> For \startuseMPgraphic, there is a way to do that (found in metafun book) as
> following:
>
> \startuseMPgraphic{Labels}{s, t}
> numeric u; u:= 1cm;
>
> for i=0 upto 7:
> label (textext("$v_{"
Dear all,
For \startuseMPgraphic, there is a way to do that (found in metafun book) as
following:
\startuseMPgraphic{Labels}{s, t}
numeric u; u:= 1cm;
for i=0 upto 7:
label (textext("$v_{" & decimal (i) & "}$" ), \MPvar{s}[origin,3u*dir(30*i)]) ;
label
w textext("some text") ;
\stopMPcode
% a graphic that uses a custom instance
% This does not work with the current stable version
\startuseMPgraphic{veryimportant::mygraphic}
draw textext("some text") ;
\stopuseMPgraphic
\useMPgraphic{veryimportant
Hi Jan,
Am 05.04.2014 15:48, schrieb Jan Heinen:
> \startuseMPgraphic{rotatedHeadline}
> % Text "Headline" in a box which is rotated
> draw btex {\strut\tfd Headline} etex;
setbounds currentpicture to boundingbox currentpicture enlarged 2mm;
The following code is based on
nning:
\startuseMPgraphic{rotatedHeadline}
% Text "Headline" in a box which is rotated
draw btex {\strut\tfd Headline} etex;
% rectangle with rounded corners
path p;
p := llcorner currentpicture+(0mm,3mm){down}..{right}llcorner
currentpicture+(3mm,0mm)--
lrcorner currentpicture+(-3mm,0
Ten years ago I made a book with ConText and some Metapost.
I made a circle and wrote the number into it:
\startuseMPgraphic{Pagenumber}
defaultfont := "pxb";
defaultscale := 1.5;
fill fullcircle scaled 36pt withcolor .75white;
numeric i;
string pagex;
i := PageNumber;
pagenum =
ced!
mtx-context | fatal error: return code: 1
[fin]
Greetings, Peter
\startuseMPgraphic{path:ivy}
%drawoptions (withcolor (0.792157,0.831373,0.654902));
linecap := butt;
linejoin := mitered;
path p;
p:= (176.858994,1.214840)..controls (166.410004,16.378901) and
(164.914001,3
title #number
\defineoverlay[whatever][\useMPgraphic{whatever}]
\startuseMPgraphic{whatever}
path p;
p:=fullsquare xyscaled (\overlaywidth,\overlayheight) squeezed 1pt;
fill p withcolor white ;
draw p withpen pencircle scaled 2pt withcolor 0.625white ;
picture d ;
d :=
textext("\quad#w
x file with this line:
% macros=mkvi
\starttext
\starttexdefinition MyOtherHeader #where #day #month #year #title
#number
\defineoverlay[whatever][\useMPgraphic{whatever}]
\startuseMPgraphic{whatever}
draw OverlayBox withpen pencircle scaled .5pt da
es:contrastcolor]
154 \definecolor [simpleslides:textcolor] [simpleslides:altcontrastcolor]
155
156 \setupcolors[textcolor=simpleslides:textcolor]
157
158 %D We use \METAPOST\ to draw backgrounds.
159
160 \startuseMPgraphic{simpleslides:MP:horizontal}
\ctxcommand #1^^@-\directlua {c
rawing
\resetMPdrawing
\egroup}
\def\followtokengraphicscale#1{%%
\startuseMPgraphic {followtokenscentred}
path RotPath; RotPath := reverse halfcircle scaled #1 ;
setbounds currentpicture to boundingbox fullcircle scaled 12cm ;
\stopuseMPgraphic}
\starttext
\startoverla
Thanks for the code, the stretching is ok (can be hand-tuned) but I find
the positioning a bit odd. Look at the additions to your example:
--
\starttext
\useMPlibrary[txt]
\startsetups text-a
\startuseMPgraphic{followtokens}
path RotPath ; RotPath := reverse
g/upload/images/whp_in_general/determinants_of_health/determinants_of_health.jpg
> >
> >How can this achieved?
>
> a bit clumsy but workable
>
> \starttext
>
> \useMPlibrary[txt]
>
> \startsetups text-a
> \startuseMPgraphic{followtokens}
> pa
workable
\starttext
\useMPlibrary[txt]
\startsetups text-a
\startuseMPgraphic{followtokens}
path RotPath ; RotPath := reverse halfcircle xyscaled 5cm ;
draw RotPath ;
\stopuseMPgraphic
\followtokens{some text but not that long{\hskip1em}}
\stopsetups
\startsetups
·
> On 10/11/2013 1:00 PM, Philipp Gesang wrote:
> > ·
> >
> >>
> >> I noticed something unexpected with the following code:
> >>
> >> \enabletrackers[metapost.showlog]
> >>
> >> \startuseMPgraphic{heading:
On 10/11/2013 1:00 PM, Philipp Gesang wrote:
·
I noticed something unexpected with the following code:
\enabletrackers[metapost.showlog]
\startuseMPgraphic{heading:ThemeTitleStyle}
show "HEADING:THEMETITLESTYLE";
show \MPstring{heading:title};
draw textext(
On 2013–10–10 Thangalin wrote:
> I noticed something unexpected with the following code:
>
> \enabletrackers[metapost.showlog]
>
> \startuseMPgraphic{heading:ThemeTitleStyle}
> show "HEADING:THEMETITLESTYLE";
> show \MPstring{heading:title};
>
>
·
>
> I noticed something unexpected with the following code:
>
> \enabletrackers[metapost.showlog]
>
> \startuseMPgraphic{heading:ThemeTitleStyle}
> show "HEADING:THEMETITLESTYLE";
> show \MPstring{heading:title};
>
> draw texte
Hi,
I noticed something unexpected with the following code:
\enabletrackers[metapost.showlog]
\startuseMPgraphic{heading:ThemeTitleStyle}
show "HEADING:THEMETITLESTYLE";
show \MPstring{heading:title};
draw textext( \MPstring{heading:title} ) rotated 5
with
Hi,
>From the October 8, 2010 context mkiv MetaFun manual (section 8.6),
the following example does not produce any output beyond the caption:
\startuseMPgraphic{quotation}
picture one ;
one := image(
graphictext \MPstring{inputtext}
scaled 1.5
withdrawcolor .625b
%
frameradius=0.38cm,backgroundcorner=round,style=\bf] %
%
\defineframedtext[CapsaVermella][width=0.75\textwidth, %
background=color,backgroundcolor=lightred, %
foregroundc
t there is some
> sensible way to pass info and real need for it)
No, I don't need it.
> \definetextbackground [mybackgroundOverlay] [mp=mpos:region:whatever]
>
> \startuseMPgraphic{mpos:region:whatever}
> for i=1 upto nofmultipars :
> draw textext("\exte
=color works
\startmybackgroundColour
\input knuth
\stopmybackgroundColour
%% overlay is missing
\startmybackgroundOverlay
\input knuth
\stopmybackgroundOverlay
\stoptext
\definetextbackground [mybackgroundOverlay] [mp=mpos:region:whatever]
\startuseMPgraphic
emove this effect? Or maybe there
is another way to achieve the desired border? Thanks.
\startuseMPgraphic{MP:thickBtm}
draw (0,2pt)--(OverlayWidth,2pt) withpen pensquare scaled 1pt withcolor red;
clip currentpicture to OverlayBox;
setbounds currentpicture to OverlayBox;
\stopuseMPgr
pace[line=2.8ex]
\starttext
%\showlayout[in,pt]
\setupMPinstance
[metafun]
[extensions=yes,
initializations=yes]
\startuseMPgraphic{Example}
u:=1cm;
pickup pencircle scaled 1pt;
draw (5u,0u) {dir 90}..(0u,5u) {dir 180};
draw (0u,5u) .. (-1.5u,10.5u) {dir 90} .. (0u,16u
drawing with all of its text
labels so that I can scale appropriately to different page sizes, and
also incorporate the illustration with other document elements.
From what I have read at:
http://wiki.contextgarden.net/MetaPost_in_ConTeXt
I think what I need is something akin to \startuseMPgr
so that I can scale appropriately to different page sizes, and
also incorporate the illustration with other document elements.
>From what I have read at:
http://wiki.contextgarden.net/MetaPost_in_ConTeXt
I think what I need is something akin to \startuseMPgraphic with a
scaling option if I want to
the TexLive 2012
version!
So something is astray! I do know that we are using a newer Metapost, but
I assume the problem is the library or how the temporary files are generated
or used.
Any help would be nice.
regards
Keith.
\useMPlibrary[txt]
\startuseMPgraphic{shape}
% Shape of the
On 2013–05–09 Meer, H. van der wrote:
> I am a bit confused about the metafum graphis. In the manual (2012) I read
> (screen version after page 203 section 3.3) the following.
>
> \startuseMPgraphic-\useMPgraphic "this graphic is calculated each time it is
> placed".
I am a bit confused about the metafum graphis. In the manual (2012) I read
(screen version after page 203 section 3.3) the following.
\startuseMPgraphic-\useMPgraphic "this graphic is calculated each time it is
placed".
\startreusableMPgraphic-\reuseMPgraphic "for graphics th
be omitted
\startuseMPgraphic{}{}
..
\stopuseMPgraphic
<= cannot be omitted
\stopbuffer
But it does not work when the content is not enclosed in a node, which is my
input case:
\startbuffer[ychannel]
\startuseMPgraphic{}{}
..
\stopuseMPgraphic
\stopbuffer
Now the xml is judged invalid by r
On 5/7/2013 2:18 PM, Meer, H. van der wrote:
I have some difficulties understanding the intake of ConTeXt-code in an XML
processing environment.
The setup is as follows.
\startbuffer[buffername]
\startuseMPgraphic{graphicname}{}
...
\stopuseMPgraphic
\stopbuffer
Processing inside xmlsetup
I have some difficulties understanding the intake of ConTeXt-code in an XML
processing environment.
The setup is as follows.
\startbuffer[buffername]
\startuseMPgraphic{graphicname}{}
..
\stopuseMPgraphic
\stopbuffer
Processing inside xmlsetup:
\startxmlsetups xmlcommon:mpgraphic
Here I want
s be done without
>> resorting to an external pdf? That is, can I pick up the result of
>> \useMPgraphic somewhere, then put this in \useexternalfigure and
>> apply everything possible there to the figure.
>
> You could use \scale :
>
> \startuseMPgraphi
can this be done without
> resorting to an external pdf? That is, can I pick up the result of
> \useMPgraphic somewhere, then put this in \useexternalfigure and
> apply everything possible there to the figure.
You could use \scale :
\startuseMPgraphic{foo}
fill unitcircle scaled 1cm;
rm...@uva.nl>> wrote:
This is but a partial solution in my case, for two reasons:
1. \textstyle=\small gives few control, I tried textstyle=5pt without result
2. the setup cannot be placed inside \startuseMPgraphic, where I need it most.
I skimmed through meta-ini.mkiv, but did not find
This is but a partial solution in my case, for two reasons:
1. \textstyle=\small gives few control, I tried textstyle=5pt without result
2. the setup cannot be placed inside \startuseMPgraphic, where I need it most.
I skimmed through meta-ini.mkiv, but did not find a solution.
It is however quite
ks very much.
>
These are only simple styles but the show how you can customize the heading and
pagenumber.
\define[2]\ChapterCommand
{\startframed[frame=off,bottomframe=on,framecolor=orange,width=fit]
#1\hspace[medium]#2
\stopframed}
\setuphead[chapter][command=\ChapterCommand]
\
Am 01.05.2013 um 11:48 schrieb "Meer, H. van der" :
> I used to pass (color) parameters to \startuseMPgraphic with:
>
> \startuseMPgraphic{square}{acolor}
>draw unitsquare withcolor \MPvar{acolor}; % or \MPcolor{acolor}
>
> In both cases I get the fo
some things still didn't
>> look right; didn't manage to fix everything, alas.) It scales with the
>> font size.
>>
>> Cheers,
>> Sietse
>>
>> \setuppapersize[A7][A7]
>> \setuppagenumber[state=stop]
>> \setupbodyfont[cambria,40pt]
>>
>>
I used to pass (color) parameters to \startuseMPgraphic with:
\startuseMPgraphic{square}{acolor}
draw unitsquare withcolor \MPvar{acolor}; % or \MPcolor{acolor}
In both cases I get the following error:
metapost> initializing instance 'metafun' using format '
ing them because some things still didn't
> look right; didn't manage to fix everything, alas.) It scales with the
> font size.
>
> Cheers,
> Sietse
>
> \setuppapersize[A7][A7]
> \setuppagenumber[state=stop]
> \setupbodyfont[cambria,40pt]
>
> \show
ooking in with FontForge and copying the glyph
dimensions. (And then tweaking them because some things still didn't
look right; didn't manage to fix everything, alas.) It scales with the
font size.
Cheers,
Sietse
\setuppapersize[A7][A7]
\setuppagenumber[state=stop]
\setupbodyfont[cambr
he only place I can find code mentioning "NOfTextColumns-1" is in
mp-core.mpii, where it's commented out!
% \startuseMPgraphic{whatever}
% for i=1 upto NOfTextColumns-1 :
% draw (rightboundary TextColumns[i]) shifted ...
But maybe I just haven't been look
fTextColumns-1" is in
mp-core.mpii, where it's commented out!
% \startuseMPgraphic{whatever}
% for i=1 upto NOfTextColumns-1 :
% draw (rightboundary TextColumns[i]) shifted ...
But maybe I just haven't been looking in the right places.
b) The place in my .tex
ions
>> a := \abc;
>> color b;
>> b := \MPcolor{currentcolor};
>> \stopMPextensions
>>
>> \startuseMPgraphic{bla}
>> fill fullcircle scaled a withcolor b;
>> \stopuseMPgraphic
>>
>> \def\abc{3cm}\color[blue]{\useMPgraphic{bla}}
>>
>> %
On 2013–04–19 Mojca Miklavec wrote:
> Dear Hans,
>
> please consider the following example in MKII:
>
> \setupcolors[state=start]
>
> \starttext
>
> \startMPextensions
> a := \abc;
> color b;
> b := \MPcolor{currentcolor};
> \stopMPextensions
>
&
Dear Hans,
please consider the following example in MKII:
\setupcolors[state=start]
\starttext
\startMPextensions
a := \abc;
color b;
b := \MPcolor{currentcolor};
\stopMPextensions
\startuseMPgraphic{bla}
fill fullcircle scaled a withcolor b;
\stopuseMPgraphic
\def\abc{3cm}\color[blue
and now style and color parameters work.
even if it would expand, then we still can have an issue when the
definer uses a macro as that one doesn't get expanded either, like:
\starttext
\def\xxx{x}
\startuseMPgraphic {\xxx 1} draw fullcircle scaled 1cm ;
\stopuseMPgraphic
\sta
On 3/27/2013 7:55 PM, Marco Patzer wrote:
I maintain a small list of bugs and quirks which I would like to
share. I don't know if the issues are considered bugs or not. I
%
%% MetaPost Location throws error
\startuseMPgraphi
ation works, but looks awkward
\startplacetable
\startCSV
alpha, 10
beta, 20
gamma, 30
\stopCSV
\stopplacetable
\stoptext
%
%% MetaPost Location throws error
\startuseMPgraphic{foo
On 2013–03–23 Wolfgang Schuster wrote:
> […]
> \startuseMPgraphic{framed:background}
> fill unitsquare xyscaled(OverlayWidth,OverlayHeight) leftenlarged 1cm
> withcolor \MPcolor{lightgray};
> setbounds currentpicture to OverlayBox ;
> \stopuseMPgraphic
> […]
> \startfoo [backgroundoffset=0cm, loffset=1cm]
>\input ward
> \stopfoo
> \stopnarrower
>
> \stoptext
\startuseMPgraphic{framed:background}
fill unitsquare xyscaled(OverlayWidth,OverlayHeight) leftenlarged 1cm
withcolor \MPcolor{lightgray};
setbounds currentpicture to Ov
Hi,
You know the price you have to pay: wikifying ..
\setuplayout
[header=0cm,
topspace=1.625cm,
footer=0cm,
width=fit,
height=fit]
\startMPinclusions
numeric MyTitlePageDone[] ;
\stopMPinclusions
\startuseMPgraphic{background:normal}
StartPage ;
fill
looking for, I hope.
Thanks, and all best
Thomas
\setuplayout [header=0cm,
topspace=1.625cm,
footer=0cm,
width=fit,
height=fit]
\definecolor [color:background] [r=0.86,g=0.61,b=0.54]
\definecolor [color:title] [r=0.91,g=0.75,b=0.7]
\st
\startuseMPgraphic{alpha}
fill unitcircle scaled size;
\stopuseMPgraphic
\starttext
\def\somesize{1cm}
\useMPgraphic{alpha} %% diameter = 1cm
\def\somesize{2cm}
\useMPgraphic{alpha} %% diameter = 1cm
\stoptext
I looked into \setupMPvariables, but I couldn't manage to assign them to an
MP var
5mm,#2]}
>
> \setupMPvariables
> [mycircle]
> [diameter=\Circlediameter,
> ]
>
> \startuseMPgraphic{mycircle}
> fill unitcircle scaled \MPvar{diameter} withcolor red ;
> \stopuseMPgraphic
The above works in the larger document, but a construct like this
fails:
\startu
here is an
example how you could do this with \MPvars:
\def\Circlediameter{15mm}
\def\setupCircle#1[#2]%
{\getparameters[Circle][diameter=15mm,#2]}
\setupMPvariables
[mycircle]
[diameter=\Circlediameter,
]
\startuseMPgraphic{mycircle}
fill unitcircle scaled \MPvar{diameter} wit
Hi,
I am looking for a way to assign the value of a TeX macro to an MP variable.
However, this only works the first time, then the value is not updated any
longer. Example:
\startMPdefinitions
size = \somesize ;
\stopMPdefinitions
\startuseMPgraphic{alpha}
fill unitcircle scaled size
Using \startuseMPgraphic is the correct way, since you want the
graphic to be recalculated every time. I have no clue why this
fails at the moment. It works fine in older versions, so I assume
it's a bug.
Marco
_
and then gave the same result
>> everytime used.
>
> http://thread.gmane.org/gmane.comp.tex.context/79507/focus=79538
>
>> In any case: Is there a way to get different frames for every page in
>> a random way?
>
> Using \startuseMPgraphic is the correct way, since you wa
omp.tex.context/79507/focus=79538
> In any case: Is there a way to get different frames for every page in
> a random way?
Using \startuseMPgraphic is the correct way, since you want the
graphic to be recalculated every time. I have no clue why this
fails at the moment. It works fine in older
On Fri, Feb 15, 2013 at 4:02 PM, Marco Patzer wrote:
> On 2013–02–15 Mikael P. Sundqvist wrote:
>
>> with the (almost minimal) example below,
>
> I reduced your minimal example slightly further:
>
> \startuseMPgraphic{figram}
> StartPage; fill Field[Text][Text]; St
On 2013–02–15 Mikael P. Sundqvist wrote:
> with the (almost minimal) example below,
I reduced your minimal example slightly further:
\startuseMPgraphic{figram}
StartPage; fill Field[Text][Text]; StopPage;
\stopuseMPgraphic
\starttext
\useMPgraphic{figram}
%% using the graphic a sec
sible?
Something between a dream and nightmare :
\startuseMPgraphic{smile}
draw image (
path p ; p := (0,2) .. (2,2) .. (0,-2) ;
draw p randomized .5 ;
draw (0.5,1) ;
draw (0.5,-1) ;
) xsized EmWidth ;
\stopuseMPgraphic
\definesymbol[smile][\useMPgraphic{
cuments), there is three examples, but
> they are not able to be compiled by the latest context version 2012.12.28
> 20:30, I hope to get some advanced examples
Can be a problem with uniqueMPgraphic because useMPgraphic works.
\startuseMPgraphic{wrong or right}
pickup pe
p value *before* it is passed to metapost, see
below.
\usemodule[animation]
\setupinteraction[state=start]
\startuseMPgraphic{circles}{counter}
path p;
numeric n, u;
u := 1cm;
n:=\MPvar{counter}*u;
p := fullcircle scaled n;
draw p;
\stopuseMPgraph
tance]
[metafun]
\startuseMPgraphic{alpha}
draw textext("alpha") ;
\stopuseMPgraphic
\startuseMPgraphic{myinstance::beta}
draw textext("beta") ;
\stopuseMPgraphic
\starttext
\useMPgraphic{alpha}
\useMPgraphic{myinstance::beta}
\startMPcode{myinstance}
On 2012–11–25 Marco Patzer wrote:
> in one of the last few betas the MetaPost instance
> mechanism broke.
Did the interface change again? The following does not work on
today's beta, only “alpha” and “gamma” are printed.
\defineMPinstance
[myinstance]
[metafun]
\startuseMPgr
could add this info to the proper page(s)?
Thanks. I added some info about the change mentioned in this thread.
Also: a question about
\startuseMPgraphic and
\startuniqueMPgraphic.
Both are supposed to be recompiled at every usage, so how are they
different? Actually trying it out suggests th
401 - 500 of 1079 matches
Mail list logo