[NTG-context] Re: Animation using MetaFun

2025-07-18 Thread Mikael Sundqvist
Define the z[] values in the \startMPdefinitions block > 2. Modified the drawing method in \startMPbuffer > > When I run it, it doesn’t recognize the z[] values defined already. > I think that the z[] values are not delivered to \startbuffer. > I tried \startMPinclusions, \startMPinitia

[NTG-context] Animation using MetaFun

2025-07-18 Thread Jeong Dal via ntg-context
run it, it doesn’t recognize the z[] values defined already. I think that the z[] values are not delivered to \startbuffer. I tried \startMPinclusions, \startMPinitialization, but I couldn’t succeed. 1. How can I deliver the z[] values into the buffer? 2. What is wrong in the following code? Thank

[NTG-context] Fwd: Touch my cow: Overlaying a picture with links to text

2025-01-09 Thread Hans Hagen
=middleblue] \placebookmarks[section] \setupexternalfigures[location=default] \starttext \startMPinclusions color mycolor; def gridscaled = pair ur; ur = urcorner currentpicture; width := xpart ur; height := ypart ur; xstep := ceiling(width / 10); ystep := ceiling(height / 10

[NTG-context] Touch my cow: Overlaying a picture with links to text

2025-01-09 Thread Axel Kielhorn
-program = ConTeXt (LMTX) \setupinteraction[state=start, color=middleblue] \placebookmarks[section] \setupexternalfigures[location=default] \starttext \startMPinclusions color mycolor; def gridscaled = pair ur; ur = urcorner currentpicture; width := xpart ur; height := ypart ur; xstep

[NTG-context] Metafun : reuse a static picture

2024-11-24 Thread Fabrice L
« AnImage » and a random text in another picture called « AnotherImage », I can use these two pictures in the first page of the document, but only one of them appears in the second page of the document (with the same code). I know that if I replace startMPinclusions/stopMPinclusions by

[NTG-context] Re: Pocket Diary Photo Calendar: how to specify on which day the week begins?

2024-06-15 Thread Michael Guravage
://wiki.contextgarden.net > > ___ > % Metafun % filename: moons.tex % Boede 2021 % \setupbodyfont[plex,ss,14pt] \defineMPinstance [Moon] [metafun] [] \startMPinclusions[]{Moon} numeric w,h; path p[]; pai

[NTG-context] Re: Do we have a geometry library for Metafun?

2024-01-12 Thread Shiv Shankar Dayal
Dear Gavin, I have managed to create an implementation for these operations which I think I can convert into functions and put in startMPinclusions and then use them from. there. On Fri, Jan 12, 2024 at 9:42 PM Gavin via ntg-context wrote: > Hi Shiv, > > > Do we have a geometry

[NTG-context] Re: multipage metapost output from ConTeXt

2024-01-06 Thread Emanuel Han via ntg-context
also p[k]; endfor setbounds currentpicture to TheFrame ; desiredformat := 1080;% In pixels (will be converted by default at 72dpi) currentpicture := currentpicture xysized (desiredformat ,desiredformat ); \stopMPpage } \stoptext On Dez. 2 2023, at 7:46 pm, Mikael Sundqvist wrote: > Hi, > > I don

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-04 Thread Fabrice L
e > position should be visible, and the text "Mot 2" in position p2 should be > added. And so on. > > \startMPinclusions > > picture p[]; > path TheFrame ; > TheFrame := fullsquare scaled 5in ; > > z1 = (60,40); > z2 = (40,90); > z3

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-02 Thread Emanuel Han via ntg-context
Thank you Mikael, this works! Emanuel On Dez. 2 2023, at 7:46 pm, Mikael Sundqvist wrote: > Hi, > > I don't know if \startMPinclusions \stopMPinclusions shall work with > \startMPpage and \stopMPpage. In this case, one can use a separate > graphics: > > \startuseM

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-02 Thread Mikael Sundqvist
Hi, I don't know if \startMPinclusions \stopMPinclusions shall work with \startMPpage and \stopMPpage. In this case, one can use a separate graphics: \startuseMPgraphic{base} picture p[]; path TheFrame ; TheFrame := fullsquare scaled 5in ; z1 = (60,40); z2 = (40,90); z3 = (10,70); p1:=

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-02 Thread Emanuel Han via ntg-context
Hi Mikael, here's a very simple mwe for the label(textext()) issue. On page 1, the text "Word 1" should be drawn in position z1. On page 2, the same text in the same position should be visible, and the text "Mot 2" in position p2 should be added. And so on. \startMPinc

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-02 Thread Mikael Sundqvist
t [serif] [notonaskharabic] >> \usetypescript[serif][fallback] >> \definefontsynonym [Serif] [notonaskharabic-Light] >>[features=fea] >> \definefontsynonym [SerifItalic] [notonaskharabic-Italic] >> [features=fea]

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-02 Thread fv leung
askharabic-Bold-Italic] [features=fea] > \stoptypescript > > \starttypescript [notonaskharabic] > \definetypeface [notonaskharabic] [rm] [serif] [notonaskharabic] > [default] > \stoptypescript > > \usetypescript[notonaskharabic] > > \setupbodyfont [RomanFont] > > \usecolor

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-02 Thread Emanuel Han via ntg-context
> \definefontsynonym [SerifItalic] [notonaskharabic-Italic] [features=fea] > \definefontsynonym [SerifBold] [notonaskharabic-Bold] [features=fea] > \definefontsynonym [SerifBoldItalic] [notonaskharabic-Bold-Italic] > [features=fea] > \stoptypescript > > \starttypescript [notonask

[NTG-context] Re: multipage metapost output from ConTeXt

2023-11-29 Thread Emanuel Han via ntg-context
askharabic-Bold-Italic] [features=fea] \stoptypescript \starttypescript [notonaskharabic] \definetypeface [notonaskharabic] [rm] [serif] [notonaskharabic] [default] \stoptypescript \usetypescript[notonaskharabic] \setupbodyfont [RomanFont] \usecolors[crayola] \startMPinclusions picture p[]; path TheFrame ; T

[NTG-context] Re: multipage metapost output from ConTeXt

2023-11-27 Thread Fabrice L
nce \starttext % We can put in the inclusions the material we will use at each page, to declare things only one time. \startMPinclusions % the frame of the video ; path TheFrame ; TheFrame := fullsquare scaled 5in ; randomseed := 53 ; path TheBrownianMotion ; pair Coordinate[]; Coordinat

Re: [NTG-context] Feynman Diagrams

2023-04-12 Thread Aditya Mahajan via ntg-context
vconnect ("photon", __v1, __v2); vfreeze; vdraw; endsubgraph; endchar; % the end. end. endinput; So, I created a context file: \startMPinclusions input feynmp; require_RCS_revision "1.30"; \stopMPinclusions \starttext \sta

[NTG-context] ConTeXt meeting and the annotated cow

2022-09-18 Thread Axel Kielhorn via ntg-context
, these annotations are not translated. I have to prepare a set of pictures for every language. Well, that changed last week. Here is my first try (actually the 4th iteration): %%% \setupexternalfigures[location=default] \starttext \startMPinclusions %draft := 0

Re: [NTG-context] Metafun : save memory content ?

2022-07-18 Thread Fabrice L via ntg-context
e the position of all objects ; >> % File second2.pdf >> Read (access) the position of all objects from second 1(after frame 30); >> for frame =31 to 60 : >> simulate position of objects ; >> draw the frame ; >> endfor; >> save the position of al

Re: [NTG-context] Metafun : save memory content ?

2022-07-18 Thread Hans van der Meer via ntg-context
30); >> for frame =31 to 60 : >> simulate position of objects ; >> draw the frame ; >> endfor; >> save the position of all objects ; >> Etc... >> Does someone has an idea of how to do such a thing ? I can read text file in >> Context with no prob

Re: [NTG-context] Metafun : save memory content ?

2022-07-18 Thread Hans Hagen via ntg-context
the animation process with \startMPinclusions (…) \stopMPinclusions, but I did not find a way to write information from MetaFun to a text file. Is Lua the solution ? there's always an idea ... \starttext \startMPpage runscript("metapost.setparameterset('test', ta

Re: [NTG-context] Metafun : save memory content ?

2022-07-18 Thread Hans Hagen via ntg-context
problem and integrate them in the animation process with \startMPinclusions (…) \stopMPinclusions, but I did not find a way to write information from MetaFun to a text file. Is Lua the solution ? Lua is always the solution ;) but I don’t understand enough of both Lua and MetaFun... Maybe

Re: [NTG-context] Metafun : save memory content ?

2022-07-18 Thread Henning Hraban Ramm via ntg-context
\startMPinclusions (…) \stopMPinclusions, but I did not find a way to write information from MetaFun to a text file. Is Lua the solution ? Lua is always the solution ;) but I don’t understand enough of both Lua and MetaFun... Maybe there’s something in luametafun.pdf*? *) Hans, this is one of the

[NTG-context] Metafun : save memory content ?

2022-07-18 Thread Fabrice L via ntg-context
60 : simulate position of objects ; draw the frame ; endfor; save the position of all objects ; Etc... Does someone has an idea of how to do such a thing ? I can read text file in Context with no problem and integrate them in the animation process with \startMPinclusions

Re: [NTG-context] Pull quote between two column - trial

2022-05-28 Thread Garulfo via ntg-context
} \def\numB{4} \def\numC{8} \def\numD{14} \def\mygap{0.001pt} %=== \startMPinclusions path pleft ; path pright ; numeric LA ; LA := (\numA-1)*LineHeight + StrutHeight + StrutDepth + \mygap ; numeric LB ; LB := \numB *LineHeight

Re: [NTG-context] Rendering Standalone MetaPost Graphics with ConTeXt

2022-05-19 Thread Vincent Hennebert via ntg-context
On Thu, 2022-05-19 at 14:23 +0530, śrīrāma wrote: > On 5/19/22 1:53 PM Vincent Hennebert via ntg-context wrote: > > Looking at the wiki, it seems that \startMPinclusions is not meant > > to > > actually render any content, just to include MetaPost code like > > func

Re: [NTG-context] Rendering Standalone MetaPost Graphics with ConTeXt

2022-05-19 Thread śrīrāma via ntg-context
On 5/19/22 1:53 PM Vincent Hennebert via ntg-context wrote: > Looking at the wiki, it seems that \startMPinclusions is not meant to > actually render any content, just to include MetaPost code like > function definitions. I guess I would have expected \startMPpage > instead. >

[NTG-context] Rendering Standalone MetaPost Graphics with ConTeXt

2022-05-19 Thread Vincent Hennebert via ntg-context
scaled 10cm; Whether I run context metapost.mp or mtxrun --script metapost metapost.mp I get a PDF document that contains no page. The mtxrun version generates the following temp file: mptopdf-temp.tex \starttext \startMPinclusions fill fullcircle scaled 10cm; \stopMPinclusions

[NTG-context] Bug in mp-xbox.mpxl (circleit)

2021-12-22 Thread Jacob Kauffmann via ntg-context
Hi list, I realized that circleit throws an error. It works fine if I replace boxes_generic_declare by boxes_declare in line 244 in mp-xbox.mpxl rboxit is probably affected as well, but I did not test that. MWE: \startMPinclusions input boxes; \stopMPinclusions \startMPpage circleit.a(textext

[NTG-context] Solved: Making metafun pictures fainter

2021-10-12 Thread Gavin via ntg-context
hadow" macro that produces a shadow of any picture with an adjustable gray. I’m having lots of metafun! Gavin \startMPinclusions picture ball; ball := image( fill fullcircle scaled 1cm withshademethod "circular" withshadecenter (.25,.25) withshadeco

[NTG-context] Solved: Making metafun pictures fainter

2021-10-12 Thread Gavin via ntg-context
macro that produces a shadow of any picture with an adjustable gray.I’m having lots of metafun!Gavin\startMPinclusions  picture ball;  ball := image(    fill fullcircle scaled 1cm  withshademethod "circular"  withshadecenter (.25,.25)  withshadecolors (.8white, black);    draw f

Re: [NTG-context] Making metafun pictures fainter (shading, uncolored clash)

2021-10-11 Thread Hans Hagen via ntg-context
the fade. It works great with a picture that is made with fill and draw, but it doesn’t work with shading. The example below has a flat disk and a round ball. The disk looks fine, but the shaded ball is not surviving the application of inverted / uncolored. \startMPinclusions picture disk

Re: [NTG-context] Making metafun pictures fainter (shading, uncolored clash)

2021-10-10 Thread Gavin via ntg-context
the fade. It works great with a picture that is made with fill and draw, but it doesn’t work with shading. The example below has a flat disk and a round ball. The disk looks fine, but the shaded ball is not surviving the application of inverted / uncolored. \startMPinclusions picture disk

[NTG-context] Making metafun pictures fainter

2021-10-10 Thread Gavin via ntg-context
Hi list, I’m trying to produce figures like this, showing motion as a series of snap-shots, with the earlier moments more faint. PastedGraphic-1.pdf Description: Adobe PDF document Here are three examples of metafun code using transparency and “decorated". \startMPinclusions picture

Re: [NTG-context] Metafun's utflen not working in certain contexts

2021-10-04 Thread Jairo A. del Rio via ntg-context
m/questions/617597/how-can-i-use-luas-string-len-inside-a-metapost-function > > < > https://tex.stackexchange.com/questions/617597/how-can-i-use-luas-string-len-inside-a-metapost-function > >): > > > > \startMPinclusions > > > > vardef MotMystere(e

Re: [NTG-context] Metafun's utflen not working in certain contexts

2021-10-04 Thread Hans Hagen via ntg-context
can-i-use-luas-string-len-inside-a-metapost-function>): \startMPinclusions vardef MotMystere(expr taille, speciale, index) = save avant,apres,case; numeric avant,apres; path case; case := fullsquare scaled 13; avant := speciale-1; %For Unicode, use "utflen" instead apres

[NTG-context] Metafun's utflen not working in certain contexts

2021-10-03 Thread Jairo A. del Rio via ntg-context
Hi, list. The following works for MkIV, but not LMTX (adapted from here: https://tex.stackexchange.com/questions/617597/how-can-i-use-luas-string-len-inside-a-metapost-function ): \startMPinclusions vardef MotMystere(expr taille, speciale, index) = save avant,apres,case; numeric avant,apres

Re: [NTG-context] mp-geo Metapost package with ConTeXt

2021-07-26 Thread Gavin via ntg-context
not if the color is in a Lua variable. Any suggestions? Thanks! Gavin The code below produces four pie shape wedges to show the different results of handling the color. They should all be red, but the last two are black. \startMPinclusions color rouge; % To avoid changing the data

[NTG-context] LuaMetaFun MPinclusions doublefun

2021-05-02 Thread Fabrice L
Dear list, I’m experimenting LuaMetaFun. The following MWE example works as expected, but stop to work as soon as I uncomment the « doublefun » commands, like : \startMPinclusions{doublefun} (… ) \startMPpage[instance=doublefun] % MWE —— \startMPinclusions%{doublefun} vardef

Re: [NTG-context] possible problem with MPinstance or MPinclusions? works in 20200920 but not in the current 20210124 ...

2021-01-26 Thread Rudd, Kevin
if this information is not complete enough to identify the problem. Here is the MWE that I used for the input figure file that demonstrates the problem. \defineMPinstance[ns_hier] [ format=metafun, extensions=yes, initializations=yes, method=double, ] \startMPinclusions{ns_hier}

Re: [NTG-context] possible problem with MPinstance or MPinclusions? works in 20200920 but not in the current 20210124 ...

2021-01-26 Thread Rudd, Kevin
directory as the document but is in the >configured through the usepath/usesubpath interface from an environment file. I can put together and share a runnable MWE set of files if this information is not complete enough to identify the problem. Here is the MWE that I used for the inpu

Re: [NTG-context] possible problem with MPinstance or MPinclusions? works in 20200920 but not in the current 20210124 ...

2021-01-26 Thread Hans Hagen
I used for the input figure file that demonstrates the problem. \defineMPinstance[ns_hier] [     format=metafun,     extensions=yes,     initializations=yes,     method=double, ] \startMPinclusions{ns_hier}     input boxrow \stopMPinclusions \startMPdefinitions{ns_hier}     % nothi

[NTG-context] possible problem with MPinstance or MPinclusions? works in 20200920 but not in the current 20210124 ...

2021-01-26 Thread Rudd, Kevin
gure file that demonstrates the problem. \defineMPinstance[ns_hier] [ format=metafun, extensions=yes, initializations=yes, method=double, ] \startMPinclusions{ns_hier} input boxrow \stopMPinclusions \startMPdefinitions{ns_hier} % nothing to see here \stopMPdefinitions \startM

Re: [NTG-context] Import a metapost extension

2020-09-01 Thread Fabrice Couvreur
eter; endfig; end But what you are proposing unfortunately does not work. Fabrice Le mar. 1 sept. 2020 à 14:25, Taco Hoekwater a écrit : > Hi, > > I think you need this: > > \startMPinclusions > input mp-scratch; > \stopMPinclusions > > \startMPcode > Scra

Re: [NTG-context] Import a metapost extension

2020-09-01 Thread Taco Hoekwater
Hi, I think you need this: \startMPinclusions input mp-scratch; \stopMPinclusions \startMPcode Scratchversion:=3; …. If that also doesn’t work, perhaps attach the log file / terminal output to a new message. Best wishes, Taco > On 1 Sep 2020, at 13:07, Fabrice Couvreur wr

[NTG-context] Solved: Minimum example of problem getting curly braces printed in METAPOST

2020-04-03 Thread Gerben Wierda
Foo( 0, -75, 150, 50, \"%s\");", mpLabelString( > labelString)) > labelString = "3. Label \"a\" [Text]! OK" > warnAndConTeXt( "pic := Foo( 0, -150, 150, 50, \"%s\");", mpLabelString( > labelString)) > labelString = "4. {Label}

[NTG-context] Minimum example of problem getting curly braces printed in METAPOST

2020-04-02 Thread Gerben Wierda
:= Foo( 0, -300, 150, 50, \"%s\");", mpLabelString( labelString))  context( "drawdot (0,0) withpen pencircle scaled 4 withcolor red;")  context.stopMPpage()end\stopluacode\usemodule[article-basic]%\enabletrackers[metapost.tracingall,metapost.lua,metapost.runs,metapost.textexts,metapost.scri

Re: [NTG-context] Can I share METAPOST vardefs over multiple pages?

2020-03-16 Thread Gerben Wierda
ditya Mahajan wrote: >> On Fri, 13 Mar 2020, Taco Hoekwater wrote: >>> Hi, >>> >>> >>> >>>> On 13 Mar 2020, at 12:53, Gerben Wierda wrote: >>>> >>>> Suppose I have this code: >>>> >>>> &

Re: [NTG-context] Can I share METAPOST vardefs over multiple pages?

2020-03-14 Thread Gerben Wierda
t; >>>> Suppose I have this code: >>>> >>>> >>>> Can I reuse that varied across follow-up MPPages? >>> >>> Sure, put the vardef inside \startMPinclusions: >> or \startMPdefinitions ... \stopMPdefinitions (don't re

Re: [NTG-context] Can I share METAPOST vardefs over multiple pages?

2020-03-13 Thread Hans Hagen
On 3/13/2020 2:33 PM, Aditya Mahajan wrote: On Fri, 13 Mar 2020, Taco Hoekwater wrote: Hi, On 13 Mar 2020, at 12:53, Gerben Wierda wrote: Suppose I have this code: Can I reuse that varied across follow-up MPPages? Sure, put the vardef inside \startMPinclusions: or

Re: [NTG-context] Can I share METAPOST vardefs over multiple pages?

2020-03-13 Thread Gerben Wierda
gt; >> Can I reuse that varied across follow-up MPPages? > > Sure, put the vardef inside \startMPinclusions: > > \startMPinclusions > vardef MyShape(expr w, h) = > ... > enddef ; > \stopMPinclusions > \startMPpage > picture s ; s := MyShape(4cm, 2cm); >

Re: [NTG-context] Can I share METAPOST vardefs over multiple pages?

2020-03-13 Thread Aditya Mahajan
On Fri, 13 Mar 2020, Taco Hoekwater wrote: Hi, On 13 Mar 2020, at 12:53, Gerben Wierda wrote: Suppose I have this code: Can I reuse that varied across follow-up MPPages? Sure, put the vardef inside \startMPinclusions: or \startMPdefinitions ... \stopMPdefinitions (don't rem

Re: [NTG-context] Can I share METAPOST vardefs over multiple pages?

2020-03-13 Thread Taco Hoekwater
Hi, > On 13 Mar 2020, at 12:53, Gerben Wierda wrote: > > Suppose I have this code: > > > Can I reuse that varied across follow-up MPPages? Sure, put the vardef inside \startMPinclusions: \startMPinclusions vardef MyShape(expr w, h) = ... enddef ; \stopMPinclusions \s

[NTG-context] Strange behavior in somewhat complex layout (again)

2019-06-27 Thread Andres Conrado Montoya
ter a regular (even) page, everything works as expected (no color-filled page, no header in the start-chapter page). MWE: %% START MWE \definecolor[rojo][h=ED553B] \definehighlight[rojo][color=rojo] \startMPinclusions numeric u ; u := 1.125pt ; numeric i ;

[NTG-context] Strange behavior in somewhat complex layout

2019-06-23 Thread Andres Conrado Montoya
-chapter page). MWE: %% START MWE \definecolor[rojo][h=ED553B] \definehighlight[rojo][color=rojo] \startMPinclusions numeric u ; u := 1.125pt ; numeric i ; i := 0.125in ; string prevChapterTitle, currentChapterTitle; prevChapterTitle := "&

Re: [NTG-context] using metapost library makecirc with context.

2019-04-20 Thread Andrea De Michele
t;> >> FIRST EXAMPLE (No labels are displayed) >> ----- >> \starttext >> >> \startMPinclusions >>input makecirc; >> \stopMPinclusions >> >> >> \startstaticMPfigure{circ1} >> u:= 1cm ; >&

Re: [NTG-context] using metapost library makecirc with context.

2019-04-19 Thread Hans Hagen
ttext \startMPinclusions input makecirc; \stopMPinclusions \startstaticMPfigure{circ1} u:= 1cm ; source.e((0,0u),DC,90,"\Delta V","2V") ; resistor.a((2u,1u),normal,90,"R_1","1$\Omega$") ; resistor.b((2u,-1u),normal,90,&

[NTG-context] using metapost library makecirc with context.

2019-04-19 Thread Andrea De Michele
I'm trying to use with Context makecirc a metapost library to draw electric circuits, but I have problems with the labels of the circuits element that are not displayed correctly. FIRST EXAMPLE (No labels are displayed) - \starttext \startMPinclusions input mak

Re: [NTG-context] troubles with \MPinclusions

2019-02-21 Thread Taco Hoekwater
Pinclusions store path and not pairs. > > > (1) %% > \setuppapersize[A4,landscape] > > \startMPinclusions > u:=1mm ; > %fond > path p ; > p:= (0,0) -- (150u,0) -- (150u,95u) -- (0,95u) -- cycle ; > pair x[] ; > x[0]:=

Re: [NTG-context] troubles with \MPinclusions

2019-02-21 Thread Hans Hagen
On 2/21/2019 10:03 AM, Damien Thiriet wrote: Hi, Why does (1) compile, whereas (2) doesn't? I can't understand why can MPinclusions store path and not pairs. (1) %% \setuppapersize[A4,landscape] \startMPinclusions u:=1mm ; %fond path p

[NTG-context] troubles with \MPinclusions

2019-02-21 Thread Damien Thiriet
Hi, Why does (1) compile, whereas (2) doesn't? I can't understand why can MPinclusions store path and not pairs. (1) %% \setuppapersize[A4,landscape] \startMPinclusions u:=1mm ; %fond path p ; p:= (0,0) -- (150u,0) -- (150u,95u) -- (0,95u

Re: [NTG-context] Bug: \textext inside \*MPinclusions causes error

2017-02-15 Thread Sergey Slyusarev
\stoptext This is not much different from: \starttext \startMPinclusions string t; t := "foo"; \stopMPinclusions \startMPcode draw textext(t); \stopMPcode \startMPcode draw textext(t) rotated 45; \stopMPcode \stoptext but the problem was not with passing just te

Re: [NTG-context] Bug: \textext inside \*MPinclusions causes error

2017-02-14 Thread Hans Hagen
optext This is not much different from: \starttext \startMPinclusions string t; t := "foo"; \stopMPinclusions \startMPcode draw textext(t); \stopMPcode \startMPcode draw textext(t) rotated 45; \stopMPcode \stoptext but the problem was not with passing just

Re: [NTG-context] Bug: \textext inside \*MPinclusions causes error

2017-01-12 Thread Hans Hagen
performed (color=vacuous). Minimal example would be: \startMPinclusions picture p; p := image( draw textext("Foo"); ); \stopMPinclusions \startMPcode \stopMPcode tested on http://live.contextgarden.net/ you can use \startMPinitializations \stopMPinitializations as these are expanded ea

[NTG-context] Bug: \textext inside \*MPinclusions causes error

2017-01-11 Thread Sergey Slyusarev
: \startMPinclusions picture p; p := image( draw textext("Foo"); ); \stopMPinclusions \startMPcode \stopMPcode tested on http://live.contextgarden.net/ ___ If your question is of interest to others as well,

[NTG-context] .mp files in non-standard locations

2016-10-26 Thread Nicola
Hello, I have some documents that contain: \startMPinclusions input "mycode"; \stopMPinclusions where mycode.mp is somewhere in my project's directory. Is there a way to tell ConTeXt how to fi

Re: [NTG-context] MetaPost Question

2015-12-07 Thread Context NTG
I guess the code I am looking for is the below to hatch the cut-out section. How can I load the MetaPost hatching package in Context minimals so it understands the hatchfill command? Thanks Jeroen \startMPinclusions input hatching; \stopMPinclusions \starttext \placefigure[here,force

Re: [NTG-context] Loop and graphictext (Metafun)

2015-10-05 Thread Fabrice Couvreur
tried to write a loop to display the title, but it does not. How to >>>> do ? >>>> Thank you, >>>> Fabrice >>>> >>>> \setuppagenumbering[location=] >>>> >>>> \setupcolors >>>>[state=start] >>>> >>

Re: [NTG-context] Loop and graphictext (Metafun)

2015-10-05 Thread Fabrice Couvreur
> >>> \setupcolors >>>[state=start] >>> >>> \definecolor[pagecolor][s=.6] >>> \definecolor[textcolor][r=.6] >>> >>> >>> \startMPinclusions >>>color pagecolor ; pagecolor := \MPcolor{pagecolor} ; >>>colo

Re: [NTG-context] Loop and graphictext (Metafun)

2015-10-05 Thread Fabrice Couvreur
title, but it does not. How to do ? >> Thank you, >> Fabrice >> >> \setuppagenumbering[location=] >> >> \setupcolors >>[state=start] >> >> \definecolor[pagecolor][s=.6] >> \definecolor[textcolor][r=.6] >> >> >>

Re: [NTG-context] Loop and graphictext (Metafun)

2015-10-05 Thread Hans Hagen
On 10/5/2015 6:28 PM, Fabrice Couvreur wrote: Hi, I tried to write a loop to display the title, but it does not. How to do ? Thank you, Fabrice \setuppagenumbering[location=] \setupcolors [state=start] \definecolor[pagecolor][s=.6] \definecolor[textcolor][r=.6] \startMPinclusions

[NTG-context] Loop and graphictext (Metafun)

2015-10-05 Thread Fabrice Couvreur
Hi, I tried to write a loop to display the title, but it does not. How to do ? Thank you, Fabrice \setuppagenumbering[location=] \setupcolors [state=start] \definecolor[pagecolor][s=.6] \definecolor[textcolor][r=.6] \startMPinclusions color pagecolor ; pagecolor := \MPcolor{pagecolor

[NTG-context] Cover page (Metafun)

2015-08-14 Thread Fabrice Couvreur
uot;CONTEXTEN". Thank you, Fabrice \setuppagenumbering[location=] \setupcolors [state=start] \definecolor[maincolor][g=.6] \definecolor[pagecolor][s=.6] \definecolor[darkcolor][s=.2] \definecolor[textcolor][r=.6] \startMPinclusions color maincolor ; maincolor := \MPcolor{maincolor} ;

Re: [NTG-context] overlay

2014-11-24 Thread Peter Rolf
raphics. Using overlays is also possible (urcorner OverlayBox), but I see no real need or benefit to do so. HTH, Peter \startMPinclusions numeric lw; lw:= 1; numeric n; n:= 8; numeric u; u:= 1cm; \stopMPinclusions \starttext Before:\\ \startMPcode pickup pencircle scaled lw; draw unitsqu

[NTG-context] Draw eletrical circuits in ConTeXt (Circuitikz or mpcirc.mp)

2014-03-25 Thread DesdeChaves
int: english/english # with mpcirc.mp ## With this code: \startMPinclusions input mpcirc; \stopMPinclusions \starttext %\forceMPTEXgraphictrue %%% command don't work \startMPcode u:=10bp; % unit of length prepare(L,C,Vac); % mention your elements z0=(10u,10u); % lower

[NTG-context] glyph path

2014-02-19 Thread Peter Rolf
t preloaded languages > language 'en' is active (d:/mydocs/TeX/dokumente/D3/glyph.mkiv{R:/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map} fonts > preloading latin modern fonts (second stage) fonts > typescripts > unknown library 'loc&

[NTG-context] Strange output from linear_shade (METAPOST)

2014-02-14 Thread DesdeChaves
. What am I doing wrong? Thanks in advance Jorge \startMPinclusions def SoundEnergy = path pr ; pr := unitsquare xscaled .3cm yscaled 2cm ; currentpicture:=nullpicture; for i=0 step 2 until 10: linear_shade(pr shifted (i*.3cm,0),0,white,black); linear_shade(pr shifted ((i+1)*.3cm,0),0

Re: [NTG-context] MPpositiongraphic: I don't know when it's going to work and when it's not.

2014-01-27 Thread Hans Hagen
ourth overlay][\positionoverlay{my backgraphics}] \startpositionoverlay{my backgraphics} \setMPpositiongraphic{three}{mypos:circle}{mypos:circleradius=1cm,mypos:circlecolor=red} \setMPpositiongraphic{three}{mypos:circle}{mypos:circleradius=.5cm,mypos:circlecolor=green} \stoppositionoverlay \start

Re: [NTG-context] Statistical module for Metapost

2013-12-24 Thread DesdeChaves
. > > > What can coming from the module "mps-core.mp" that >> interfere with Metapost labels? >> > > If it's a big subsystem there might be conflicts; anyway, better load

Re: [NTG-context] Statistical module for Metapost

2013-12-24 Thread Hans Hagen
the module "mps-core.mp" that interfere with Metapost labels? If it's a big subsystem there might be conflicts; anyway, better load like this: \startMPinclusions input mps-core.mp ; \stopMPinclusions \startMPcode label.bot(btex Metapost and Statistics etex,(5mm,0)) ;

Re: [NTG-context] internal mptopdf converter skips some glyphs in labels

2013-08-09 Thread Aditya Mahajan
#x27;ll get inconsistent equations. [^2]: You also need to keep in mind that all metapost graphics are processed in a single run (think of a single mp file with multiple beginfigs). So you have to be careful with initializing and resetting variables (\startMPinclusions, \startMPinitializati

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] mp inclusions etc

2013-02-18 Thread Hans Hagen
Three ; ColorThree := blue ; \stopMPextensions \startMPextensions{doublefun} color ColorThree ; ColorThree := magenta ; \stopMPextensions \startMPinclusions def DoWhatever = draw textext("N") ; enddef ; \stopMPinclusions \startMPinclusions def DoWhatever = draw textex

Re: [NTG-context] MPinclusions, MPextensions, MPinitializations and MPinstances

2013-02-14 Thread Alan BRASLAU
tions, already, to which the user may wish to add his own MPinclusions (eventually several times using the [+] argument). \startMPinclusions{myinstance} does not work. Alan ___ If your question is of interest to othe

Re: [NTG-context] Numerical Calculations

2012-12-19 Thread Troy Henderson
s radius 1) \edef\N{10} % Number of frames in animation per hypocycloid "branch" \edef\K{1}\doloop{\ctxlua{commands.doifelse(math.abs(\K*\r - math.floor(\K*\r+0.5))<0.01)}{\exitloop}{\edef\K{\luaexpr{\K+1 \startMPinclusions[+] r:=\r; % Radius of smaller circle (larger cir

Re: [NTG-context] Save/Redraw labels as pictures

2012-12-08 Thread Hans Hagen
\starttext \startMPinclusions[+] picture J; \stopMPinclusions \startMPpage J:=thelabel(btex J etex scaled 2,origin); draw J; \stopMPpage \startMPpage draw J; \stopMPpage \stoptext \starttext \startMPinclusions[+] vardef J

Re: [NTG-context] Save/Redraw labels as pictures

2012-12-08 Thread Alan BRASLAU
gt; Troy Henderson > > \starttext > \startMPinclusions[+] > picture J; > \stopMPinclusions > \startMPpage > J:=thelabel(btex J etex scaled 2,origin); > draw J; > \stopMPpage >

[NTG-context] Save/Redraw labels as pictures

2012-12-08 Thread Troy Henderson
The following code produces the letter "J" on the first page, but does not draw that same picture on the second page. I would appreciate some advice on how to save and redraw this label in subsequence figures. Thanks, Troy Henderson \starttext \startMPinclusions[+]

Re: [NTG-context] Sequence of MetaPost Pages

2012-09-09 Thread Aditya Mahajan
That works great. Now I have defined a global numeric N:=8; in \startMPinclusions ... \stopMPinclusions at the be beginning of my document. All of my \startMPpage ... \stopMPpage environments understand this N, but how do I reference this value as the start value for \dostepwiserecurse? That

Re: [NTG-context] Sequence of MetaPost Pages

2012-09-09 Thread Troy Henderson
That works great. Now I have defined a global numeric N:=8; in \startMPinclusions ... \stopMPinclusions at the be beginning of my document. All of my \startMPpage ... \stopMPpage environments understand this N, but how do I reference this value as the start value for \dostepwiserecurse? That

Re: [NTG-context] Metapost/Metafun Q: using variables and "building blocks"?

2012-05-01 Thread Peter Rolf
> draw ll shifted (0mm,60mm) ; % fill both circles with blue > > > What is the shortest way of doing this? I don't mind writing > definitions earlier in the file, but I'd rather keep this part as > short as possible to be able to see the pattern at one glance. The >

Re: [NTG-context] Makempy ...

2012-01-07 Thread Willi Egger
h MKII there is a fatal error, which is after >> stoptext in the attached test-file. > > patch: > > \startMPinclusions >def graphictext primary t = >hide ( >if mfun_trial_run : >let mfun_graphic_text = mfun_no_graphic_text ; >

Re: [NTG-context] Makempy ...

2012-01-07 Thread Hans Hagen
stoptext in the attached test-file. patch: \startMPinclusions def graphictext primary t = hide ( if mfun_trial_run : let mfun_graphic_text = mfun_no_graphic_text ; else : let mfun_graphic_text = mfun_do_graphic_text

Re: [NTG-context] readfile not understood

2011-09-29 Thread Wolfgang Schuster
Am 29.09.2011 um 21:10 schrieb Meer, H. van der: > Finding the file works with \ReadFile{} works. But is generates another > problem because > > \input ../../../metapost-setup > and > \ReadFile{metapost-setup} > > behave differently! The \input process my \startMP

Re: [NTG-context] readfile not understood

2011-09-29 Thread Meer, H. van der
Finding the file works with \ReadFile{} works. But is generates another problem because \input ../../../metapost-setup and \ReadFile{metapost-setup} behave differently! The \input process my \startMPinclusions correctly but the ReadFile does not, because the following metapost has the

[NTG-context] MetaObj with labels in built-in objects (MetaObj Standard Library)

2011-09-20 Thread Stefan Müller
o the example from [1] works fine with the added boolean flag, but the following example (which means basically all built-in MetaObj objects with text) does not. It compiles well but there is no text. --8<start----8<-- \startMPinclusions[+] in

Re: [NTG-context] metafun shared code

2011-09-19 Thread Marcin Borkowski
like to have some MP code shared between unique graphics (in > >>> MkIV). > >>> > >>> One example: I'd like to have drawoptions for all > >>> graphics. > >> > >> \startMPinclusions > >>drawoptions(...) ; > >&g

Re: [NTG-context] metafun shared code

2011-09-19 Thread Aditya Mahajan
l graphics. \startMPinclusions drawoptions(...) ; \stopMPinclusions Thanks! Another one: I'd like to have two similar (but different) unique graphics, and I'd like them to share some code. \startuseMPgraphic{common} ... \stopuseMPgraphic \startuseMPgraphic{one} \inc

Re: [NTG-context] metafun shared code

2011-09-19 Thread Marcin Borkowski
Dnia 2011-09-19, pon o godzinie 11:19 -0400, Aditya Mahajan pisze: > On Mon, 19 Sep 2011, Marcin Borkowski wrote: > > > I'd like to have some MP code shared between unique graphics (in MkIV). > > > > One example: I'd like to have drawoptions for all

  1   2   3   >