[NTG-context] About graphictext macro (Metafun)

2015-08-26 Thread Fabrice Couvreur
}{MATHEMATIQUES} \starttext \startuseMPgraphic{test} picture pic ; pic := image(graphictext \MPstring{text} withdrawcolor red withpen pencircle scaled 1pt ; ) ; addto currentpicture also pic ; \stopuseMPgraphic \stoptext

[NTG-context] Cover page (Metafun)

2015-08-14 Thread Fabrice Couvreur
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 ;

Re: [NTG-context] Text around a figure in a framedtext

2015-08-14 Thread Fabrice Couvreur
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

Re: [NTG-context] Text around a figure in a framedtext

2015-08-13 Thread Rik Kabel
[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

Re: [NTG-context] Text around a figure in a framedtext

2015-08-13 Thread Fabrice Couvreur
>height=fit, >location=left, >style=italic] > > \defineoverlay > [MyFrame] > [\useMPgraphic{MyFrame}] > > \definelabel > [Définition] > [headstyle=\bf\smallcaps] > > \startuseMPgraphic{MyFrame} > path b ; > picture p ; > p :

Re: [NTG-context] Text around a figure in a framedtext

2015-08-13 Thread Fabrice Couvreur
[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

Re: [NTG-context] Text around a figure in a framedtext

2015-08-08 Thread Fabrice Couvreur
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

Re: [NTG-context] Text around a figure in a framedtext

2015-08-07 Thread Otared Kavian
efinecolor[MyColorA][.75(MyColorB,white)] > > \defineframedtext > [MyText] > [frame=off, >background=MyFrame, >width=\textwidth, >location=right] > > \defineoverlay > [MyFrame] > [\useMPgraphic{MyFrame}] > > \definelabel >

[NTG-context] Text around a figure in a framedtext

2015-08-07 Thread Fabrice Couvreur
, 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+.

Re: [NTG-context] Some questions about an environment (Metafun)

2015-08-07 Thread Fabrice Couvreur
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

Re: [NTG-context] Some questions about an environment (Metafun)

2015-08-07 Thread Hans Hagen
#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

Re: [NTG-context] Some questions about an environment (Metafun)

2015-08-06 Thread Fabrice Couvreur
{\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

Re: [NTG-context] Some questions about an environment (Metafun)

2015-08-04 Thread Fabrice Couvreur
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 ? >> > > > \

Re: [NTG-context] Some questions about an environment (Metafun)

2015-08-04 Thread 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 ? \startuseMPgraphic{MyFrame} picture p ; p := textext.rt(\MPstring{MyFrame}) ; p := p shifted

[NTG-context] Some questions about an environment (Metafun)

2015-08-04 Thread Fabrice Couvreur
\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

Re: [NTG-context] Frame and rulethickness

2015-03-28 Thread Wolfgang Schuster
\feature[+][f:smallcaps]}, >headcommand=\ACFRAME, >numberconversionset=ACCONVERSION, >inbetween={\blank[big]}, >] > > \starttext > \startexemple > \dorecurse{10}{blabla} > \stopexemple > \stoptext Use MetaPost. \startuseMPgraphic{ACFRAME} fill Ov

[NTG-context] How to place text to the right of a brace

2015-02-01 Thread Fabrice Couvreur
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

[NTG-context] Problems with repeating layers

2014-12-07 Thread Reza Housseini
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

[NTG-context] Strange behavior of a macro with ConTeXt ver : 2014.11.12 9:46 p.m. MKIV beta

2014-11-15 Thread Fabrice Couvreur
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

Re: [NTG-context] Create an item marker with a counter with Metapost

2014-11-10 Thread Aditya Mahajan
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

Re: [NTG-context] Create an item marker with a counter with Metapost

2014-11-10 Thread Wolfgang Schuster
> 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

Re: [NTG-context] Create an item marker with a counter with Metapost

2014-11-10 Thread Alan BRASLAU
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

[NTG-context] Create an item marker with a counter with Metapost

2014-11-10 Thread 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 xyscaled (u,u) randomized 2pt; pickup pencircle scaled 1pt; fill p withcolor green; draw p withcolor blue

Re: [NTG-context] \startanimation and \dorecurse

2014-10-22 Thread Jeong Dal
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

Re: [NTG-context] \startanimation and \dorecurse

2014-10-21 Thread Wolfgang Schuster
> 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

Re: [NTG-context] \startanimation and \dorecurse

2014-10-21 Thread 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=start] \startuseMPgraphic{Circles}{s} numeric sn, L, N; path p, q; p := fullcircle scaled 72; L:=length p

Re: [NTG-context] \startanimation and \dorecurse

2014-10-20 Thread Wolfgang Schuster
ation \dorecurse{5} {\startexpanded \startframe \setupMPvariables[Circles][s=\recurselevel] \processMPbuffer [Circles] \stopframe \stopexpanded} \stopanimation \stoptext Variant 2: \usemodule[animation] \setupinteraction[state=start] \startuseMPgraphic{Circles}{

Re: [NTG-context] blank overlay

2014-06-03 Thread john Culleton
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

Re: [NTG-context] blank overlay

2014-06-03 Thread Peter Rolf
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

[NTG-context] blank overlay

2014-06-03 Thread 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: \startuseMPgraphic{right page} ... \stopuseMPgraphic and \startuseMPgraphic{left page

Re: [NTG-context] passing arguments to \processMPbuffer

2014-04-21 Thread Wolfgang Schuster
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_{"

[NTG-context] passing arguments to \processMPbuffer

2014-04-21 Thread 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_{" & decimal (i) & "}$" ), \MPvar{s}[origin,3u*dir(30*i)]) ; label

[NTG-context] textcolor not working with MPinstance

2014-04-15 Thread Aditya Mahajan
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

Re: [NTG-context] Metapost: I only need a little bit padding

2014-04-05 Thread Peter Rolf
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

[NTG-context] Metapost: I only need a little bit padding

2014-04-05 Thread Jan Heinen
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

[NTG-context] label in Metapost

2014-04-03 Thread Jan Heinen
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 =

[NTG-context] MP bounding box

2014-03-12 Thread Peter Rolf
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

[NTG-context] Problem with an environment

2014-03-06 Thread Fabrice Couvreur
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

Re: [NTG-context] New header

2014-01-20 Thread Hans Hagen
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

[NTG-context] SimpleSlides

2013-11-01 Thread Vyatcheslav Y.
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

Re: [NTG-context] Calling \followtokens from with in metapost

2013-10-14 Thread Marco Patzer
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

Re: [NTG-context] Calling \followtokens from with in metapost

2013-10-14 Thread Magnus J
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

Re: [NTG-context] Calling \followtokens from with in metapost

2013-10-13 Thread Marco Patzer
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

Re: [NTG-context] Calling \followtokens from with in metapost

2013-10-13 Thread Hans Hagen
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

Re: [NTG-context] Code Called Twice?

2013-10-11 Thread Philipp Gesang
· > On 10/11/2013 1:00 PM, Philipp Gesang wrote: > > · > > > >> > >> I noticed something unexpected with the following code: > >> > >> \enabletrackers[metapost.showlog] > >> > >> \startuseMPgraphic{heading:

Re: [NTG-context] Code Called Twice?

2013-10-11 Thread Hans Hagen
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(

Re: [NTG-context] Code Called Twice?

2013-10-11 Thread Marco Patzer
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}; > >

Re: [NTG-context] Code Called Twice?

2013-10-11 Thread Philipp Gesang
· > > I noticed something unexpected with the following code: > > \enabletrackers[metapost.showlog] > > \startuseMPgraphic{heading:ThemeTitleStyle} > show "HEADING:THEMETITLESTYLE"; > show \MPstring{heading:title}; > > draw texte

[NTG-context] Code Called Twice?

2013-10-10 Thread Thangalin
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

[NTG-context] graphictext bug?

2013-10-10 Thread Thangalin
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

[NTG-context] Undefined \continueifinputfile on presentation

2013-08-13 Thread Pau
% frameradius=0.38cm,backgroundcorner=round,style=\bf] % % \defineframedtext[CapsaVermella][width=0.75\textwidth, % background=color,backgroundcolor=lightred, % foregroundc

Re: [NTG-context] Overlays as background in textbackground

2013-07-15 Thread Marco Patzer
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

Re: [NTG-context] Overlays as background in textbackground

2013-07-15 Thread Hans Hagen
=color works \startmybackgroundColour \input knuth \stopmybackgroundColour %% overlay is missing \startmybackgroundOverlay \input knuth \stopmybackgroundOverlay \stoptext \definetextbackground [mybackgroundOverlay] [mp=mpos:region:whatever] \startuseMPgraphic

[NTG-context] [***SPAM***] Shifting table header when using overlay

2013-07-14 Thread Dmitriy Tokarev
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

[NTG-context] Portrait vs. landscape orientation for Tabloid paper

2013-06-25 Thread Pavneet Arora
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

Re: [NTG-context] [***SPAM***] Scaling large (annotated) MetaFun drawing

2013-06-18 Thread Hans Hagen
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

[NTG-context] [***SPAM***] Scaling large (annotated) MetaFun drawing

2013-06-18 Thread Pavneet Arora
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

[NTG-context] MPLibrabray "txt" broken!?

2013-05-14 Thread Keith J. Schultz
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

Re: [NTG-context] mpgraphics confusion

2013-05-09 Thread Marco Patzer
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".

[NTG-context] mpgraphics confusion

2013-05-09 Thread Meer, H. van der
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

Re: [NTG-context] makeing xml-node

2013-05-07 Thread Meer, H. van der
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

Re: [NTG-context] inclusion of tex code in xml context

2013-05-07 Thread Hans Hagen
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

[NTG-context] inclusion of tex code in xml context

2013-05-07 Thread Meer, H. van der
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

Re: [NTG-context] fontsize drawing in metapost

2013-05-07 Thread Meer, H. van der
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

Re: [NTG-context] fontsize drawing in metapost

2013-05-07 Thread Marco Patzer
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;

Re: [NTG-context] fontsize drawing in metapost

2013-05-06 Thread Meer, H. van der
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

Re: [NTG-context] fontsize drawing in metapost

2013-05-06 Thread Meer, H. van der
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

Re: [NTG-context] METAFUN+CONTEXT+CUSTOMIZE

2013-05-02 Thread Wolfgang Schuster
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] \

Re: [NTG-context] parameters in startuseMPgraphic

2013-05-01 Thread Wolfgang Schuster
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

Re: [NTG-context] square in Cambria font

2013-05-01 Thread Sietse Brouwer
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] >> >>

[NTG-context] parameters in startuseMPgraphic

2013-05-01 Thread 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 following error: metapost> initializing instance 'metafun' using format '

Re: [NTG-context] square in Cambria font

2013-05-01 Thread Meer, H. van der
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

[NTG-context] square in Cambria font

2013-04-30 Thread Sietse Brouwer
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

Re: [NTG-context] error: terminal: >> NOfTextColumns-1, ! Improper final value has been replaced by 0

2013-04-26 Thread Hans Hagen
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

[NTG-context] error: terminal: >> NOfTextColumns-1, ! Improper final value has been replaced by 0

2013-04-24 Thread Lars Huttar
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

[NTG-context] gnuplot module fixed (was: gnuplot module broken)

2013-04-19 Thread Mojca Miklavec
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}} >> >> %

Re: [NTG-context] gnuplot module broken

2013-04-19 Thread Marco Patzer
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 > &

Re: [NTG-context] gnuplot module broken

2013-04-19 Thread Mojca Miklavec
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

Re: [NTG-context] Visualcounter: style parameter not working as expected

2013-04-02 Thread Hans Hagen
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

Re: [NTG-context] List of bugs and quirks

2013-03-27 Thread Hans Hagen
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

[NTG-context] List of bugs and quirks

2013-03-27 Thread Marco Patzer
ation works, but looks awkward \startplacetable \startCSV alpha, 10 beta, 20 gamma, 30 \stopCSV \stopplacetable \stoptext % %% MetaPost Location throws error \startuseMPgraphic{foo

[NTG-context] [***SPAM***] Re: Framed: Individual background offsets

2013-03-23 Thread Marco Patzer
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 > […]

Re: [NTG-context] Framed: Individual background offsets

2013-03-23 Thread Wolfgang Schuster
> \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

Re: [NTG-context] different page background for chapter title page

2013-03-23 Thread Hans Hagen
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

[NTG-context] different page background for chapter title page

2013-03-23 Thread Thomas A. Schmitz
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

Re: [NTG-context] TeX macro to MP variable

2013-03-16 Thread Hans Hagen
\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

Re: [NTG-context] TeX macro to MP variable

2013-03-16 Thread Marco Patzer
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

Re: [NTG-context] TeX macro to MP variable

2013-03-16 Thread Thomas A. Schmitz
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

[NTG-context] TeX macro to MP variable

2013-03-16 Thread Marco Patzer
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

Re: [NTG-context] recalculate background on every page with \uniqueMPgraphic?

2013-02-26 Thread Hans Hagen
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 _

Re: [NTG-context] recalculate background on every page with \uniqueMPgraphic?

2013-02-26 Thread Mikael P. Sundqvist
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

Re: [NTG-context] recalculate background on every page with \uniqueMPgraphic?

2013-02-18 Thread Marco Patzer
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

Re: [NTG-context] recalculate background on every page with \uniqueMPgraphic?

2013-02-18 Thread Mikael P. Sundqvist
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

Re: [NTG-context] recalculate background on every page with \uniqueMPgraphic?

2013-02-15 Thread Marco Patzer
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

Re: [NTG-context] Emoticons ;-)

2013-02-12 Thread Hans Hagen
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{

Re: [NTG-context] how to implement buttons, navigator in context's presentation

2013-01-07 Thread Wolfgang Schuster
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

Re: [NTG-context] MetaPost Animations

2012-12-31 Thread Wolfgang Schuster
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

Re: [NTG-context] MetaPost instance mechanism broken

2012-12-06 Thread Hans Hagen
tance] [metafun] \startuseMPgraphic{alpha} draw textext("alpha") ; \stopuseMPgraphic \startuseMPgraphic{myinstance::beta} draw textext("beta") ; \stopuseMPgraphic \starttext \useMPgraphic{alpha} \useMPgraphic{myinstance::beta} \startMPcode{myinstance}

Re: [NTG-context] MetaPost instance mechanism broken

2012-12-06 Thread Marco Patzer
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

Re: [NTG-context] MetaPost instance mechanism broken

2012-11-26 Thread Hans Hagen
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

<    1   2   3   4   5   6   7   8   9   10   >