[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 geom

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

2024-01-06 Thread Emanuel Han via ntg-context
rentpicture 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't know if \startMPinclusions

[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 = (10

[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: > > \startuseMPgrap

[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:=image

[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. \startMPinclusio

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

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

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

2023-12-02 Thread fv leung
=fea] > \definefontsynonym [SerifItalic] > [notonaskharabic-Italic] [features=fea] > \definefontsynonym [SerifBold] > [notonaskharabic-Bold][features=fea] > \definefontsynonym [SerifBoldItalic] > [notonaskharabic-Bold-Italic] [features=fea] > \stoptypescri

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

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

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

2023-11-29 Thread Emanuel Han via ntg-context
fea] \stoptypescript \starttypescript [notonaskharabic] \definetypeface [notonaskharabic] [rm] [serif] [notonaskharabic] [default] \stoptypescript \usetypescript[notonaskharabic] \setupbodyfont [RomanFont] \usecolors[crayola] \startMPinclusions picture p[]; path TheFrame ; TheFrame := fullsquare scaled 5

[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
0); >> 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 problem a

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

2022-07-18 Thread Hans Hagen via ntg-context
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 ? there's always an idea ... \starttext \startMPpage runscript("metapost.setparameterset('test', table.load('mydat

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

2022-07-18 Thread Hans Hagen via ntg-context
with no 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
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 there’s something in luametafun.pdf*? *) Hans, this is one

[NTG-context] Metafun : save memory content ?

2022-07-18 Thread Fabrice L via ntg-context
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 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
uot; 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-05 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
and 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
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} input boxrow \stopMPinclusions \startMPdefinitions{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
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 input figure file that demonstrates the problem. \defineMP

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

2021-01-26 Thread Hans Hagen
le 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 \stopMPdefi

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

2021-01-26 Thread Rudd, Kevin
e 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 \startMPcode{ns_hier} make_B

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
elString( > labelString)) > labelString = "4. {Label} [Text]! MISSING curly braces" > warnAndConTeXt( "pic := Foo( 0, -225, 150, 50, \"%s\");", mpLabelString( > labelString)) > labelString = "5. {Label} \"a\" [Text]! MISSING curly braces" > warnAndCon

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

2020-04-02 Thread Gerben Wierda
uot;4. {Label} [Text]! MISSING curly braces"  warnAndConTeXt( "pic := Foo( 0, -225, 150, 50, \"%s\");", mpLabelString( labelString))  labelString = "5. {Label} \"a\" [Text]! MISSING curly braces"  warnAndConTeXt( "pic := Foo( 0, -300, 150, 50, \&

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 remembe

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

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 remember

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
, 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 ; i := 0.125in ; string

[NTG-context] Strange behavior in somewhat complex layout

2019-06-23 Thread Andres Conrado Montoya
: %% 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 := ""; currentCh

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

2019-04-20 Thread Andrea De Michele
;> >> 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
\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 makecirc

Re: [NTG-context] troubles with \MPinclusions

2019-02-21 Thread Taco Hoekwater
usions 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]:= (20u,

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 ; p:= (0,0

[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) -- cycle

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

2017-02-15 Thread Sergey Slyusarev
text 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 text, b

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

2017-02-14 Thread Hans Hagen
t 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 text

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

2017-01-12 Thread Hans Hagen
be 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
be: \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 find it

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 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

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

2015-10-05 Thread Fabrice Couvreur
oop 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] >> >&

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

2015-10-05 Thread Fabrice Couvreur
reur wrote: >>> >>>> Hi, >>>> I tried to write a loop to display the title, but it does not. How to >>>> do ? >>>> Thank you, >>>> Fabrice >>>> >>>> \setuppagenumbering[location=] >>>> >>>&g

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

2015-10-05 Thread Fabrice Couvreur
; \setuppagenumbering[location=] >>> >>> \setupcolors >>>[state=start] >>> >>> \definecolor[pagecolor][s=.6] >>> \definecolor[textcolor][r=.6] >>> >>> >>> \startMPinclusions >>>color pagecolor ; pagec

[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
\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} ; color pagecolor ; pagecolor := \MPcolor

Re: [NTG-context] overlay

2014-11-24 Thread Peter Rolf
centimeter, objects are cut off after you reach that 'invisible' border around the boundingbox. I would use uniqueMPgraphic with proper parameters for the graphics. Using overlays is also possible (urcorner OverlayBox), but I see no real need or benefit to do so. HTH, Peter \startMPinclusions

[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 right

[NTG-context] glyph path

2014-02-19 Thread Peter Rolf
loading 'metafun' as 'R:/tex/texmf-context/metapost/context/base/metafun.mpiv' using method 'default' metapost initializing number mode 'scaled' mtx-context | fatal error: return code: -1073741819 \startMPinclusions fontmapfile =lm-ec.map; \stopMPinclusions \startuniqueMPgraphic

[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
} \setMPpositiongraphic{three}{mypos:circle}{mypos:circleradius=1cm,mypos:circlecolor=red} \setMPpositiongraphic{three}{mypos:circle}{mypos:circleradius=.5cm,mypos:circlecolor=green} \stoppositionoverlay \startMPinclusions if unknown context_apos : input mp-apos.mpiv ; fi ; if unknown

Re: [NTG-context] Statistical module for Metapost

2013-12-24 Thread Hans Hagen
-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)) ; \stopMPcode because you only want

Re: [NTG-context] Statistical module for Metapost

2013-12-24 Thread DesdeChaves
a ; on the input line so it could be some read-ahead issue. 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 like this: \startMPinclusions input mps-core.mp ; \stopMPinclusions

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

2013-08-09 Thread Aditya Mahajan
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, \startMPinitializations, \startMPdefinitions, see

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
; ColorThree := blue ; \stopMPextensions \startMPextensions{doublefun} color ColorThree ; ColorThree := magenta ; \stopMPextensions \startMPinclusions def DoWhatever = draw textext(N) ; enddef ; \stopMPinclusions \startMPinclusions def DoWhatever = draw textext(Y) ; enddef ; \stopMPinclusions

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

2013-02-14 Thread Alan BRASLAU
, 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 others

Re: [NTG-context] Numerical Calculations

2012-12-19 Thread Troy Henderson
) \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 circle has radius 1) u:=70

[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[+] picture J

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

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

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

2012-12-08 Thread Hans Hagen
\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 = thelabel

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

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

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

2012-05-01 Thread Peter Rolf
. And on the whole I'd prefer to make sure I apply the fill only locally per each half-loop and not all over the place... donno what is the shortest way, but this looks at least handy... \startMPinclusions patternsize:= 20mm; def lhl(expr ca,cb,sx,sy) = picture lefthandloop; lefthandloop

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] Makempy ...

2012-01-07 Thread Willi Egger
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 ; fi

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

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 \startMPinclusions correctly

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

2011-09-20 Thread Stefan Müller
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. --8start8-- \startMPinclusions[+] input metaobj

Re: [NTG-context] metafun shared code

2011-09-19 Thread Aditya Mahajan
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 something for all graphics. \startMPinclusions drawoptions(...) ; \stopMPinclusions Another one: I'd like to have two similar

Re: [NTG-context] metafun shared code

2011-09-19 Thread Meer, H. van der
I am using code between \startMPinclusions .. \stopMPinclusions while later additions can be accumulated with \startMPinclusions[+] .. \stopMPinclusions Hans van der Meer On 19 sep. 2011, at 17:01, Marcin Borkowski wrote: Hi all, I'd like to have some MP code shared between unique graphics

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 something for all graphics. \startMPinclusions

Re: [NTG-context] metafun shared code

2011-09-19 Thread Aditya Mahajan
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} \includeMPgraphic{common

Re: [NTG-context] metafun shared code

2011-09-19 Thread Marcin Borkowski
unique graphics (in MkIV). One example: I'd like to have drawoptions something for all 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

Re: [NTG-context] boxes package exhaust the system memory

2011-04-25 Thread Wolfgang Schuster
Am 25.04.2011 um 05:00 schrieb Joshua Lee: Hi All, Here's a little file that hang up the system and exhaust the memory. \starttext \startMPpage input boxes; boxit a(btex Hello etex); a.c = (0, 0); drawboxed(a); \stopMPpage \stoptext \startMPinclusions[+] input boxes

Re: [NTG-context] boxes package exhaust the system memory??

2011-04-25 Thread Joshua Lee
Hello etex); a.c = (0, 0); drawboxed(a); \stopMPpage \stoptext \startMPinclusions[+] input boxes; \stopMPinclusions \starttext \startMPpage[offset=1ex] boxit a(btex Hello etex); a.c = (0, 0); drawboxed(a); \stopMPpage \stoptext Wolfgang

Re: [NTG-context] How to add metapost 3rd party modules????

2011-04-20 Thread Joshua Lee
--generate But it run into compiling error. For you convenience, append the sources for mpost and context. joshua@josh-dev ~/tmp $ cat activity.tex \startMPinclusions input metauml; \stopMPinclusions \startMPpage Activity.A(Learn MetaUML

Re: [NTG-context] How to add metapost 3rd party modules??

2011-04-19 Thread Aditya Mahajan
activity.tex \startMPinclusions input metauml; \stopMPinclusions \startMPpage Activity.A(Learn MetaUML -, the MetaPost UML library); drawObject(A); \stopMPpage \stoptext I don't know the internal details

  1   2   3   >