Re: [NTG-context] Edit the arrows default Metapost

2014-05-23 Thread Fabrice
Hi, Thank you Hans. I saw on the net a macro created by Hans van der Meer (hvdm.mp). Do you have an example of its use? Fabrice ___ If your question is of interest to others as well, please add an entry to the Wiki!

[NTG-context] Pass a lua table to metapost

2014-12-07 Thread DesdeChaves
I would like to pass the lua table keys and values to metapost. In the keys i have information about the paths names and in the values i have information about the label that should be draw in the center of each path (unitsquare). In my code (see attach) the table in question is

[NTG-context] Hatch an area with Metapost (Metafun)

2015-02-09 Thread Fabrice Couvreur
Hi, How hatched trapezoid MBCD ? Best regards, Fabrice \starttext \startMPcode path p ; p=unitsquare scaled 4cm ; draw p ; pair z ; z=point 3.6 of p ; draw z--urcorner p ; label.llft(btex B etex,llcorner p) ; label.lrt(btex C etex,lrcorner p) ; label.ulft(btex A etex,ulcorner p) ; label.urt(btex

Re: [NTG-context] Update text variables inside metapost

2015-03-07 Thread Aditya Mahajan
On Sat, 7 Mar 2015, DesdeChaves wrote: Why the metapost not updated the value of text variables that are generated inside luacode environment? In the code below, If I have \startitemize[columns,two] then metapost draw: 1. \Bolha[size=6cm]{text1}{text2}{text3}, 2. and four \Bolha[size=4cm

Re: [NTG-context] Update text variables inside metapost

2015-03-07 Thread DesdeChaves
Aditaya, thanks for the clarification. Now it works perfectly. Jorge 2015-03-07 23:57 GMT+00:00 Aditya Mahajan : > On Sat, 7 Mar 2015, DesdeChaves wrote: > > Why the metapost not updated the value of text variables that are >> generated >> inside luacode environment? &g

Re: [NTG-context] Update text variables inside metapost

2015-03-08 Thread Hans Hagen
On 3/8/2015 12:57 AM, Aditya Mahajan wrote: On Sat, 7 Mar 2015, DesdeChaves wrote: Why the metapost not updated the value of text variables that are generated inside luacode environment? In the code below, If I have \startitemize[columns,two] then metapost draw: 1. \Bolha[size=6cm]{text1

[NTG-context] MetaPost and externalfigure() REQUEST FOR COMMENTS

2016-01-10 Thread Alan BRASLAU
Hello, INTRODUCTION MetaPost, in fact Metafun, has extensions to include external figures as well as typeset text. For example: \startMPcode draw externalfigure("cow") ; \stopMPcode would be the equivalent to the ConTeXt command. \externalfigure [cow] However, for historical reaso

Re: [NTG-context] new error in Context-Metapost

2016-02-17 Thread Hans Hagen
have \{ and \} have a different meaning when we flush metapost text (makes me wonder if that is still needed) this helps \installmathfencepair \letteropenbrace \Lbrace \letterclosebrace \Rbrace Here a minimal example, the output of the ConTeXt run and the error on the MPpage run. Has some

Re: [NTG-context] new error in Context-Metapost

2016-02-17 Thread Meer, Hans van der
t that have \{ and \} have a different meaning when we flush metapost text (makes me wonder if that is still needed) this helps \installmathfencepair \letteropenbrace \Lbrace \letterclosebrace \Rbrace ___ If your que

[NTG-context] Setting expansion depth limit for metapost

2016-02-18 Thread Michal Suszko
I'm preparing quite long presentation -- nearly 3000 sides, 900 figures (500 distinct PNG files). I'm using ConTeXt MkIV installed using minimals (2010.03.12 19:49). Recently I'm hitting MetaPost capacity limit on expansion depth: !mplib : mp terminal: ! MetaPost ca

[NTG-context] Buffered metapost function freezes random numbers

2016-05-25 Thread DesdeChaves
For educational purposes I try to simulate a ammeter for reading practice. I would like create six or more ammeter with different readings, but i'm not able to do that because metapost create the same random number every time I call the buffer that defines my ammeter. How can I fix that? T

[NTG-context] Randomize control points in metapost/metafun?

2016-07-31 Thread Mikael P. Sundqvist
Hi! I look for a way to randomize control points of a path, leaving the coordinates themselves untouched. The reason is the following: I want to draw (for example) a circle with a triangle inside, and I want them to look slightly randomized. If I do (see attached pdf for a typical result of this)

[NTG-context] Asymptote or Metapost and ConTeXt parameters.

2016-12-18 Thread Jaroslav Hajtmar
... I suppose the impossibility of combining asymptote code and such Lua code (or not?). There is a similar possibility, at least in Metapost? For simpler pictures it would probably suffice Thanx Jaroslav Hajtmar

Re: [NTG-context] Fatal error with followtokens (metapost)

2018-04-07 Thread Hans Hagen
On 4/7/2018 12:59 PM, Gerhard Kugler wrote: Hi, If change the content of the first followtokens the error disappears. i'll send you a patch - Hans Hagen | PRAGMA ADE Ridder

Re: [NTG-context] Fatal error with followtokens (metapost)

2018-04-07 Thread Pablo Rodriguez
On 04/07/2018 12:59 PM, Gerhard Kugler wrote: > Hi, > > the code: > > - > > \mainlanguage[de] > \enableregime[utf-8] In ConTeXt MkIV, UTF-8 is the default encoding for source files. The second line isn’t required. Just incase it helps, Pablo -- http://www.ousia.tk ___

Re: [NTG-context] Fatal error with followtokens (metapost)

2018-04-07 Thread Hans Hagen
On 4/7/2018 6:34 PM, Pablo Rodriguez wrote: On 04/07/2018 12:59 PM, Gerhard Kugler wrote: Hi, the code: - \mainlanguage[de] \enableregime[utf-8] In ConTeXt MkIV, UTF-8 is the default encoding for source files. The second line isn’t required. Just incase it helps, also i often see color

[NTG-context] MetaPost shading broken with latest beta

2018-06-23 Thread Adam Reviczky
Hi, Using the shading function in a metapost image the whole page is filled in instead of the figure that defines it. Minimal example as from the metafun manual 8.3.3 (http://www.pragma-ade.nl/general/manuals/metafun-p.pdf): \starttext \startMPcode fill fullsquare xyscaled (1cm,1cm

[NTG-context] MetaPost shading broken with latest beta

2018-06-23 Thread Akira Kakuto
With this, I get a full A4 page with the shading colors. This worked until the beta 2018-06-22 16:02 and the desired output is shown when using live.contextgarden.net. Even in the previous mtx-context | current version: 2018.06.22 15:55 I get a full A4 page with the shading colors if I use L

[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] MetaPost with Multiple Variable Sections

2019-09-18 Thread Aditya Mahajan
On Wed, 18 Sep 2019, Jeroen wrote: \startMPcode pair a; a := 2cm; You define a to be a pair and then assign it to a number. Metapost is telling you that you cannot do that: (xpart a,ypart a) 56.6929 ! Equation cannot be performed (pair=numeric). ; <*> pair a; a := 2cm; draw full

Re: [NTG-context] MetaPost with Multiple Variable Sections

2019-09-18 Thread Jeong Dal
Dear Jeroen, If you change “pair a;” to “numeric a;” in the second MPcode, it draws a circle without error. Best regards, Dalyoung > > \placefloatright{}{ > \startMPcode > pair a; numeric a; > a := 2cm; > draw fullcircle scaled (2*a); > \stopMPcode} > > \stoptext > __

[NTG-context] Size of the font (Metapost + xtable)

2019-09-23 Thread Fabrice Couvreur
Hello, I can not change the font size of my figures in the table. Thank you Fabrice \usecolors[xwi] \startbuffer[myfigure] \dontleavehmode \startMPcode defaultfont := "texgyrepagella-regular*default" ; defaultscale :=0.8 ;

Re: [NTG-context] A question about whatever (Metapost)

2020-01-26 Thread Alan Braslau
What error are you getting? (perhaps you need "save carre,p,a,b,c,d,N,P,M ;") A perpendicular line is also the line "rotated 90" (about the intersection point). Alan On Sun, 26 Jan 2020 00:09:38 +0100 Fabrice Couvreur wrote: > Hi, > The point M is such that the line (CM) is perpendicular to

[NTG-context] macro that does not work (Metapost)

2020-02-11 Thread Fabrice Couvreur
Hi, I have some problems with the following macro : tex error > mp error on line 23 in file /home/viserion/macro.tex: ! Missing argument to suite. { <*> suite{ 1,0}; suite(2,1); ; That macro has more parameters than you thought. I'll continue by pretending that each missing argument is eit

[NTG-context] Metapost and TikZ color code equivalent

2020-02-13 Thread Fabrice Couvreur
Hi, How to have the color defined by {yellow!60!black} with Metapost ? Thank you. Fabrice ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http

[NTG-context] Using transparency in METAPOST within textext()

2020-05-14 Thread Gerben Wierda
Is it possible to get a transparent background in a textext()? The following minimal example doesn’t work. \starttext \setupMPpage [background=color, backgroundcolor=gray] \startMPpage draw textext("\definecolor[labelbackground][a=0.2,r=1,g=1,b=1]\framed[height=1.2em,background=color,backgr

Re: [NTG-context] 'debug' version of METAPOST draw?

2020-05-28 Thread Keith McKay
Would Chapter 11, section 11.1 Showing Paths of the MetaPost manual, be any help here? Below is a MWE of a random path of curves and straight lines. The points are shown using drawpoints. The arrow path and control lines are also shown and are better described in the Metapost manual

Re: [NTG-context] mtxrun --script metapost and fonts?

2011-05-10 Thread Hans Hagen
On 10-5-2011 3:29, Michal Kvasnička wrote: Hallo. I've got a problem with metapost -> pdf translation. Since mptopdf is still broken in the last ConTeXt beta in the minimal distribution, I use "mtxrun --script metapost --split". It works well, only it ignores font setting. My

Re: [NTG-context] MetaPost visibly drawing at 0pt

2011-09-19 Thread Peter Rolf
Am 19.09.2011 14:31, schrieb Meer, H. van der: > I used to put an invisible frame around figures in MetaPost by setting a pen > scaled at 0pt. That left no trace, but defined the area. > However I (now) see a thin line drawn by code: > > pickup pencircle scaled 0p

[NTG-context] metapost to pdf on the fly

2011-09-29 Thread Meer, H. van der
I would like to generate metapost figures in separate pdf-files (in some convenient directory, they are reused elsewhere). This as part of a project structure. I know that on a separate run such a pdf can be generated with: context figurefile running on input \input some-metapost-inclusions

Re: [NTG-context] Arrows and boxes in metapost.

2011-11-17 Thread Hans Hagen
On 14-11-2011 20:31, Christian wrote: Hello, I need a simple graphic that shows some boxes (frames) with text in it and has some arrows pointing to and from these boxes. (examples 267 and 268 on this page [1]) I was hoping to do this in MetaPost. Earlier this year this question went un

Re: [NTG-context] Commands with arguments with MetaPost

2012-04-25 Thread Alan BRASLAU
On Wed, 25 Apr 2012 11:15:10 -0500 Troy Henderson wrote: > I would like to be able to do something like this > > \def\foo#1{ > \startMPcode > fill (0,0)--(598,0)--(598,50)--(0,50)--cycle withcolor green; > label.rt(btex #1 etex),(50,25); > \stopMPcode > } > > and then use

Re: [NTG-context] Commands with arguments with MetaPost

2012-04-25 Thread Rogers, Michael K
On Apr 25, 2012, at 12:15 PM, Troy Henderson wrote: > I would like to be able to do something like this > > \def\foo#1{ >\startMPcode >fill (0,0)--(598,0)--(598,50)--(0,50)--cycle withcolor green; >label.rt(btex #1 etex),(50,25); > \stopMPcode > } > Looks like a misplaced p

[NTG-context] Minimum METAPOST code produces problematic PDF

2020-07-07 Thread Gerben Wierda
The following code: \startMPpage[instance=doublefun] draw (0,0)--(100,0) dashed withdots; \stopMPpage When run through LuaMetaTeX produces a PDF about which Acrobat complains: The dimensions of this page are out-of-range. Page content might be truncated. and Adobe InDesign cannot han

Re: [NTG-context] embed metapost figure into document

2020-11-09 Thread Jairo A. del Rio
oad a Metapost graphic externally generated, you should have something like: %nice.mp %"begin ... endfig", as well as "end" are important beginfig (1); draw fullcircle scaled cm %withcolor black ; endfig; end so when you compile it via mpost nice.mp (obviously supposing you have M

Re: [NTG-context] embed metapost figure into document

2020-11-09 Thread Sylvain Hubert
info here: > https://wiki.contextgarden.net/MetaFun_-_MetaPost_in_ConTeXt > To actually answer your question, if you actually want to load a Metapost > graphic externally generated, you should have something like: > > %nice.mp > %"begin ... endfig", as well as "end"

Re: [NTG-context] drop shadows with metapost/ metafun

2020-12-31 Thread Aditya Mahajan
On Tue, 29 Dec 2020, Garulfo wrote: > Which process would you advice to add « drop shadows » to any kind of metafun > / metapost figures like: > picture p; > p := textext("MetaPost is fun!") shifted (10cm,10cm); > > My current understanding of the required steps

Re: [NTG-context] drop shadows with metapost/ metafun

2020-12-31 Thread Aditya Mahajan
On Fri, 1 Jan 2021, Aditya Mahajan wrote: > On Tue, 29 Dec 2020, Garulfo wrote: > > > Which process would you advice to add « drop shadows » to any kind of > > metafun / metapost figures like: > > > Actually, all this seems long and tedious, and contrasts with the

Re: [NTG-context] drop shadows with metapost/ metafun

2021-01-02 Thread Henning Hraban Ramm
> Am 29.12.2020 um 22:56 schrieb Garulfo : > > Which process would you advice to add « drop shadows » to any kind of metafun > / metapost figures like: > picture p; > p := textext("MetaPost is fun!") shifted (10cm,10cm); > > > My current understanding of

Re: [NTG-context] metapost graph and ConTeXt LMTX

2021-01-03 Thread Hans Hagen
On 1/3/2021 7:12 PM, Jean-Philippe Rey wrote: Dear List, I have used TikZ and pgfplots for a few years and I am considering switching to metapost/metafun which appears more efficient with LMTX. I have already designed several figures with metapost/metafun and some with the help of metaobj

Re: [NTG-context] metapost graph and ConTeXt LMTX

2021-01-03 Thread Jean-Philippe Rey
Le 3 janv. 2021 à 19:21, Hans Hagen <j.ha...@xs4all.nl> a écrit :On 1/3/2021 7:12 PM, Jean-Philippe Rey wrote:Dear List,I have used TikZ and pgfplots for a few years and I am considering switching to metapost/metafun which appears more efficient with LMTX. I have already designed several f

Re: [NTG-context] Metapost: directionpoint gives unexpected point(?)

2021-02-05 Thread Mikael Sundqvist
Hi, I was too quick to push send. This must be some rounding error. Changing the instance fixes the problem. Sorry for the noise. /Mikael On Fri, Feb 5, 2021 at 5:48 PM Mikael Sundqvist wrote: > > Hi, > > I get sometimes the wrong directionpoint. In the example below it > works for all values o

Re: [NTG-context] Metapost: directionpoint gives unexpected point(?)

2021-02-11 Thread Mikael Sundqvist
Hi, since I already started this thread, I continue here. My metapost code is still not always working, and I do not understand what is going wrong. In the example below, I draw two curves of constant width (p1 and p2), one rotated 180 degrees around the origin. Then I draw the curve (p3

Re: [NTG-context] Metapost: directionpoint gives unexpected point(?)

2021-02-11 Thread Hans Hagen
On 2/11/2021 2:45 PM, Mikael Sundqvist wrote: Hi, since I already started this thread, I continue here. My metapost code is still not always working, and I do not understand what is going wrong. In the example below, I draw two curves of constant width (p1 and p2), one rotated 180 degrees

Re: [NTG-context] Metapost: directionpoint gives unexpected point(?)

2021-02-11 Thread Mikael Sundqvist
, 2021 at 3:54 PM Hans Hagen wrote: > > On 2/11/2021 2:45 PM, Mikael Sundqvist wrote: > > Hi, > > > > since I already started this thread, I continue here. My metapost code > > is still not always working, and I do not understand what is going > > wrong. In the

Re: [NTG-context] Metapost: directionpoint gives unexpected point(?)

2021-02-12 Thread Taco Hoekwater
Hi, > On 11 Feb 2021, at 17:41, Mikael Sundqvist wrote: > > Thanks for your investigation and extended example! > > So, if I understand it correctly, the problem occurs where the > different circles are glued together with the .. construction. Took me a while to get it, but the problem is the

Re: [NTG-context] Metapost: directionpoint gives unexpected point(?)

2021-02-12 Thread Mikael Sundqvist
Hi Taco, thanks, from your observation and the way I build the paths, I found out that I can avoid the problem by shortening the paths I join just slightly: cl := (fullcircle scaled 4u) shifted z0; cl := cl cutbefore point (1/6+epsilon) along cl cutafter point (2/6-epsilon) along cl; cs := (fullc

Re: [NTG-context] Metapost: directionpoint gives unexpected point(?)

2021-02-12 Thread Hans Hagen
On 2/12/2021 9:35 AM, Taco Hoekwater wrote: Hi, On 11 Feb 2021, at 17:41, Mikael Sundqvist wrote: Thanks for your investigation and extended example! So, if I understand it correctly, the problem occurs where the different circles are glued together with the .. construction. Took me a whil

Re: [NTG-context] Metapost: directionpoint gives unexpected point(?)

2021-02-12 Thread Taco Hoekwater
eps to be just a ’small enough value that a human will not notice it’ where epsilon is intended as ’the smallest representable value’. Neither really work that way because depending on how you use metapost eps can be quite visible (especially in non-scaled number systems) and (more important

Re: [NTG-context] Metapost: directionpoint gives unexpected point(?)

2021-02-12 Thread Hans Hagen
Hi, Like this: metapost.registerscript("scrutenized", function() local p = mp.scan.path() local r = math.round local d = 10^mp.scan.numeric() for i=1,#p do local pi = p[i] pi[1] = r(pi[1] * d) / d pi[2] = r(pi[2] * d) / d end local x1 = r(p[1][1])

[NTG-context] Conflict between MetaPost (LMTX) and cmarrows

2021-04-25 Thread Jairo A. del Rio
ompiles perfectly with ConTeXt MkIV. With LMTX, however, the following happens: metapost > initializing instance 'metafun:1' using format 'metafun' and method 'default' metapost > loading 'metafun' as 'metafun.mpxl' using method 'default&#x

Re: [NTG-context] Hand Style Sketching in Metapost

2021-05-20 Thread Aditya Mahajan
. Aditya hatch.pdf Description: Adobe PDF document hatch.tex Description: TeX document %D \module %D [ file=mp-sketch.mp %Dversion=2021.05.13 %D title=\CONTEXT\ \METAPOST\ graphics, %D subtitle=Sketch drawing, %D author=Aditya Mahajan, %D date=\curren

Re: [NTG-context] Hand Style Sketching in Metapost

2021-05-21 Thread Jeroen
I have updated LMTX and indeed seems to be working now Thanks Op do 20 mei 2021 om 21:05 schreef Aditya Mahajan : > On Thu, 20 May 2021, Jeroen wrote: > > > I have the following working example with hatching. This works fine, but > > when I uncomment the sketching commands, no figure is rendered

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

2021-07-14 Thread Gavin
Hello ConTeXters, I’d like to use the mp-geo Metapost package with ConTeXt to draw simple globes viewed from various directions. The package is here: https://melusine.eu.org/syracuse/poulecl/mp-geo/ It looks like the last update was 2008 and I don’t read French, so I though my chances

Re: [NTG-context] Use MetaPost to distort images?

2021-09-03 Thread Bruce Horrocks via ntg-context
> On 3 Sep 2021, at 11:28, Henning Hraban Ramm via ntg-context > wrote: > > Hi, is it possible to apply geometric transformations to images using > MetaPost? > > This is again way over my head, but I’m still trying different methods to let > a ConTeXt docum

Re: [NTG-context] Use MetaPost to distort images?

2021-09-04 Thread Henning Hraban Ramm via ntg-context
> Am 04.09.2021 um 00:16 schrieb Bruce Horrocks via ntg-context > : > > > >> On 3 Sep 2021, at 11:28, Henning Hraban Ramm via ntg-context >> wrote: >> >> Hi, is it possible to apply geometric transformations to images using >> MetaPost? >>

Re: [NTG-context] Use MetaPost to distort images?

2021-09-04 Thread Henning Hraban Ramm via ntg-context
> Am 03.09.2021 um 18:24 schrieb Hans Hagen via ntg-context > : > > On 9/3/2021 12:28 PM, Henning Hraban Ramm via ntg-context wrote: >> Hi, is it possible to apply geometric transformations to images using >> MetaPost? >> This is again way over my head, but I’m

Re: [NTG-context] Use MetaPost to distort images?

2021-09-04 Thread Hans Hagen via ntg-context
On 9/4/2021 2:18 PM, Henning Hraban Ramm via ntg-context wrote: I guess it’s on me to write a wiki page about GM. you can then also add some comparison with im (i.e. what does it offer more than gm) Hans -

Re: [NTG-context] Use MetaPost to distort images?

2021-09-05 Thread Henning Hraban Ramm via ntg-context
> Am 04.09.2021 um 19:06 schrieb Hans Hagen : > > On 9/4/2021 2:18 PM, Henning Hraban Ramm via ntg-context wrote: > >> I guess it’s on me to write a wiki page about GM. > > you can then also add some comparison with im (i.e. what does it offer more > than gm) Oh no... IM and GM have a histo

Re: [NTG-context] Use MetaPost to distort images?

2021-09-05 Thread Hans Hagen via ntg-context
On 9/5/2021 9:40 AM, Henning Hraban Ramm via ntg-context wrote: Am 04.09.2021 um 19:06 schrieb Hans Hagen : On 9/4/2021 2:18 PM, Henning Hraban Ramm via ntg-context wrote: I guess it’s on me to write a wiki page about GM. you can then also add some comparison with im (i.e. what does it of

Re: [NTG-context] Use MetaPost to distort images?

2021-09-05 Thread Hans Hagen via ntg-context
On 9/5/2021 9:40 AM, Henning Hraban Ramm via ntg-context wrote: OTOH IM offers much more features (e.g. the geometric transformations I inquired about), and you can find lots of interesting examples (including the scripts Bruce mentioned). I couldn’t find another CLI tool that can do most of

Re: [NTG-context] Use MetaPost to distort images?

2021-09-05 Thread Henning Hraban Ramm via ntg-context
> Am 05.09.2021 um 10:10 schrieb Hans Hagen : > > On 9/5/2021 9:40 AM, Henning Hraban Ramm via ntg-context wrote: >>> Am 04.09.2021 um 19:06 schrieb Hans Hagen : >>> >>> On 9/4/2021 2:18 PM, Henning Hraban Ramm via ntg-context wrote: >>> I guess it’s on me to write a wiki page about GM. >>

Re: [NTG-context] Use MetaPost to distort images?

2021-09-05 Thread Aditya Mahajan via ntg-context
On Sun, 5 Sep 2021, Henning Hraban Ramm via ntg-context wrote: > > > Am 05.09.2021 um 10:10 schrieb Hans Hagen : > >> BTW, here’s my script: > >> Here are some results: > > > > Did you try that with the filter module? It would make it more portable > > I completely forgot I could do that (and I

Re: [NTG-context] Use MetaPost to distort images?

2021-09-06 Thread Henning Hraban Ramm via ntg-context
> Am 06.09.2021 um 04:13 schrieb Aditya Mahajan via ntg-context > : > > On Sun, 5 Sep 2021, Henning Hraban Ramm via ntg-context wrote: > >> >>> Am 05.09.2021 um 10:10 schrieb Hans Hagen : BTW, here’s my script: Here are some results: >>> >>> Did you try that with the filter module?

Re: [NTG-context] Standalone MetaPost Graphics from ConTeXt

2012-08-30 Thread luigi scarso
On Thu, Aug 30, 2012 at 10:57 PM, Troy Henderson wrote: > Is there a way to output several MetaPost PDF graphics from a single > ConTeXt source file. For example, > > \startMPpage > draw fullcircle scaled 72; > \stopMPpage > > \startMPpage > draw unitsquare scale

Re: [NTG-context] Standalone MetaPost Graphics from ConTeXt

2012-08-30 Thread Aditya Mahajan
On Thu, 30 Aug 2012, Troy Henderson wrote: Is there a way to output several MetaPost PDF graphics from a single ConTeXt source file. For example, \starttext \startMPpage draw fullcircle scaled 72; \stopMPpage \startMPpage draw unitsquare scaled 72; \stopMPpage \stoptext and have a

Re: [NTG-context] Standalone MetaPost Graphics from ConTeXt

2012-08-30 Thread Troy Henderson
Thank you both! Troy ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma

Re: [NTG-context] [NTG-Context] MetaPost capacity exceeded.

2012-11-15 Thread Hans Hagen
On 11/15/2012 12:27 PM, Alan BRASLAU wrote: ! MetaPost capacity exceeded, sorry [expansion depth=1]. this normally points to an error in mp code, not to instances I have come across this error previously with run-away \dorecurse loops I now have this message with a document that makes

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

2013-10-13 Thread Magnus J
Hello list, How can I call the \followtokens macro (or a similar solution) from within metapost? Specifically, I want to integrate text between the semi-circle arcs in a rainbow-like structure (with the text placed inbetween the arcs, that should alsó be drawn). The text should not be stretched

Re: [NTG-context] functions and paths in metapost

2013-10-14 Thread Hans Hagen
On 10/14/2013 2:38 PM, Jean Magnan de Bornier wrote: Hello all, Is it possible to define a path in metapost-metafun using "function"? In the metafun manual (chapter on Functions) the examples shown are all of the type "draw function ...". I wonder if it is possible to

[NTG-context] Problem with metapost textbackgrounds on Windows

2009-08-04 Thread Kevin D. Robbins
Hello all, In the example below, I mean for a gray box with rounded corners to be placed behind \startC ... \stopC blocks. This example compiles properly on Linux with the latest ConTeXt beta and LuaTeX synced from the minimals just minutes ago. On Windows, also updated from minimals this morning

Re: [NTG-context] Multi-line labels in MetaPost

2009-08-12 Thread Wolfgang Schuster
Am 12.08.2009 um 18:09 schrieb richard.steph...@converteam.com: Hello, Is it possible to generate multi-line labels in MetaPost? I have naively tried the following hoping to get a line feed between the two words, but it doesn't work! label.rt( btex One \crlf Two etex,

Re: [NTG-context] Multi-line labels in MetaPost

2009-08-13 Thread richard . stephens
> > Hello, > > > > Is it possible to generate multi-line labels in MetaPost?  I have   > > naively tried the following hoping to get a line feed between the   > > two words, but it doesn't work! > > > > label.rt( btex One \crlf Two etex, (0,0)); &g

Re: [NTG-context] Multi-line labels in MetaPost

2009-08-13 Thread Aditya Mahajan
On Thu, 13 Aug 2009, richard.steph...@converteam.com wrote: > > Hello, > > > > Is it possible to generate multi-line labels in MetaPost?  I have   > > naively tried the following hoping to get a line feed between the   > > two words, but it doesn't work! &

Re: [NTG-context] Multi-line labels in MetaPost

2009-08-14 Thread richard . stephens
> > > > Hello, > > > > > > > > Is it possible to generate multi-line labels in MetaPost?  I have   > > > > naively tried the following hoping to get a line feed between the   > > > > two words, but it doesn

Re: [NTG-context] Multi-line labels in MetaPost

2009-08-14 Thread Thomas A. Schmitz
On Aug 14, 2009, at 10:54 AM, richard.steph...@converteam.com wrote: For the record, after reading Mojca's MyWay, and noting that textext is deprecated except in certain circumstances, Well, it's a bit more complicated: in mkii, sometxt was the easiest solution because it was flexible a

Re: [NTG-context] Multi-line labels in MetaPost

2009-08-22 Thread Michail Vidiassov
Dear All, I have fixed this by using: label.rt(textext("\framed[frame=off,align=right]{One\\Two}"),origin); And what about proper tables there? Replacing One\\Two in the above code with $ \startmathmatrix \NC 1 \NC 1 \NR \NC 1 \NC 1 \NR \stopmathmatrix $ or \starttable{|cm|cm|} \NC 1 \NC 1

Re: [NTG-context] Multi-line labels in MetaPost

2009-08-22 Thread Aditya Mahajan
\NC 1 \NR \stopmathmatrix $ All metapost environments expand their arguments, so anything looking for an optional argument fails. There are workarounds, though \unexpanded\def\MYMATRIX% {$\startmathmatrix \NC 1 \NC 1 \NR \NC 1 \NC 1 \NR \stopmathmatrix$} \starttext \startMPcode label.r

Re: [NTG-context] Multi-line labels in MetaPost

2009-08-22 Thread Hans Hagen
Aditya Mahajan wrote: Hans, should we add this to strc-ali? sure, i'll also do the same with getbuffer, as often using buffere is convenient in such cases: \unexpanded\def\getbuffer {\dodoubleempty\dogetbuffer} \starttext \startbuffer[a] $\startmathmatrix \NC 1 \NC 1 \NR \NC 1 \NC

Re: [NTG-context] Using MetaPost to create fonts

2009-09-24 Thread luigi scarso
On Thu, Sep 24, 2009 at 11:41 AM, Alain Delmotte wrote: > Hi! > > I have the impression that I did see that MetaPost can be used to create > full fonts and not only pictures. (In fact to keep the potential of METAFONT, but extending it to OpenType > /PostScript/TrueType (??) f

Re: [NTG-context] Using MetaPost to create fonts

2009-09-24 Thread Hans Hagen
Alain Delmotte wrote: Hi! I have the impression that I did see that MetaPost can be used to create full fonts and not only pictures. (In fact to keep the potential of METAFONT, but extending it to OpenType /PostScript/TrueType (??) fonts.) I even think there was mention about Perl in this

Re: [NTG-context] Using MetaPost to create fonts

2009-09-24 Thread Alain Delmotte
Thanks to both of you Luigi and Hans. Alain Hans Hagen a écrit : Alain Delmotte wrote: Hi! I have the impression that I did see that MetaPost can be used to create full fonts and not only pictures. (In fact to keep the potential of METAFONT, but extending it to OpenType /PostScript

Re: [NTG-context] MetaPost broken mkiv latest minimals

2009-11-24 Thread luigi scarso
On Tue, Nov 24, 2009 at 9:05 PM, Alan BRASLAU wrote: > MetaPost is broken in mkiv (works in mkii). > > minimal example: > > \starttext > > \startuniqueMPgraphic{circle} >        pickup pencircle scaled 1pt ; >        draw fullcircle scaled 2cm ; > \stopuniqueMPgraph

Re: [NTG-context] MetaPost broken mkiv latest minimals

2009-11-24 Thread Hans Hagen
Alan BRASLAU wrote: MetaPost is broken in mkiv (works in mkii). minimal example: \starttext \startuniqueMPgraphic{circle} pickup pencircle scaled 1pt ; draw fullcircle scaled 2cm ; \stopuniqueMPgraphic \uniqueMPgraphic{circle} \stoptext the problem was in the backend of

Re: [NTG-context] MetaPost broken mkiv latest minimals

2009-11-24 Thread Mojca Miklavec
On Tue, Nov 24, 2009 at 21:21, Hans Hagen wrote: > Alan BRASLAU wrote: >> >> MetaPost is broken in mkiv (works in mkii). >> >> minimal example: >> >> \starttext >> >> \startuniqueMPgraphic{circle} >>        pickup pe

Re: [NTG-context] MetaPost broken mkiv latest minimals

2009-11-24 Thread Alan BRASLAU
On Tuesday 24 November 2009 21:20:05 luigi scarso wrote: > On Tue, Nov 24, 2009 at 9:05 PM, Alan BRASLAU wrote: > > MetaPost is broken in mkiv (works in mkii). > > > > minimal example: > > > > \starttext > > > > \startuniqueMPgraphic{c

Re: [NTG-context] MetaPost broken mkiv latest minimals

2009-11-24 Thread Hans Hagen
Mojca Miklavec wrote: On Tue, Nov 24, 2009 at 21:21, Hans Hagen wrote: Alan BRASLAU wrote: MetaPost is broken in mkiv (works in mkii). minimal example: \starttext \startuniqueMPgraphic{circle} pickup pencircle scaled 1pt ; draw fullcircle scaled 2cm ; \stopuniqueMPgraphic

Re: [NTG-context] MetaPost broken mkiv latest minimals

2009-11-24 Thread Alan BRASLAU
On Tuesday 24 November 2009 21:49:06 Hans Hagen wrote: > Mojca Miklavec wrote: > > On Tue, Nov 24, 2009 at 21:21, Hans Hagen wrote: > >> Alan BRASLAU wrote: > >>> MetaPost is broken in mkiv (works in mkii). > >>> > >>> minimal example: &g

Re: [NTG-context] MetaPost broken mkiv latest minimals

2009-11-24 Thread luigi scarso
On Tue, Nov 24, 2009 at 10:51 PM, Alan BRASLAU wrote: > I rebuilt luatex from svn on Debian x86_64 and MP is fixed. hm. Can you also try with beta source http://foundry.supelec.fr/gf/download/frsrelease/359/1390/luatex-beta-0.45.0.tar.bz2 ? -- luigi ___

Re: [NTG-context] MetaPost broken mkiv latest minimals

2009-11-24 Thread Taco Hoekwater
luigi scarso wrote: On Tue, Nov 24, 2009 at 10:51 PM, Alan BRASLAU wrote: I rebuilt luatex from svn on Debian x86_64 and MP is fixed. hm. Can you also try with beta source http://foundry.supelec.fr/gf/download/frsrelease/359/1390/luatex-beta-0.45.0.tar.bz2 That one is broken, sorry. New beta

Re: [NTG-context] last chapter number in Metapost

2010-01-18 Thread Andreas Harder
t One more question appeared: How to access them in a Metapost environment? I tried some methods but none of them seems to work. % \setupMPvariables % [test] % [current={\somestructureheadnumber[chapter][current]}, %last={\somestructureheadnumber[chapter][last]}] \startuseMPgraphi

Re: [NTG-context] last chapter number in Metapost

2010-01-18 Thread Hans Hagen
On 18-1-2010 16:47, Andreas Harder wrote: \startuseMPgraphic{test} current := \somestructureheadnumber[chapter][current] ; last:= \somestructureheadnumber[chapter][last]; % current := 2 ; % last:= 6 ; skip:= TextHeight * (current-1)/last ; StartPage ; fill

Re: [NTG-context] MPinclusions/MetaPost sarith (graph) package

2010-03-08 Thread Alan BRASLAU
On Monday 08 March 2010 09:18:38 Wolfgang Schuster wrote: > > \startMPinclusions[+] > input sarith; > \stopMPinclusions > This probably explains other problems that I had experienced concerning \startMPinclusions\stopMPinclusions... Indeed, as metapost is processed in one run un

Re: [NTG-context] MPinclusions/MetaPost sarith (graph) package

2010-03-08 Thread luigi scarso
On Mon, Mar 8, 2010 at 3:28 PM, Alan BRASLAU wrote: > (Currently I externally use "awk" > via \immediate\write18 to manipulate data.) In mkiv you should be able to manipulate your data with lua & lpeg. You gain in portability -- no need of an external awk -- luigi __

[NTG-context] Setting expansion depth limit for metapost

2010-03-17 Thread Michal Suszko
I'm preparing quite long presentation -- nearly 3000 sides, 900 figures (500 distinct PNG files). I'm using ConTeXt MkIV installed using minimals (2010.03.12 19:49). Recently I'm hitting MetaPost capacity limit on expansion depth: !mplib : mp terminal: ! MetaPost ca

Re: [NTG-context] Metapost inclusion does not work

2010-03-30 Thread luigi scarso
On Wed, Mar 31, 2010 at 2:33 AM, Marco wrote: > Hi, > > the following example just prints »Hello World!«, without the square. > What's wrong? > > \startuseMPgraphic{test} > fill fullsquare scaled 5cm; > \stopuseMPgraphic > > \starttext > Hello World! > \useMPgraphic{test} > \stoptext > > ConTeXt  

Re: [NTG-context] Metapost inclusion does not work

2010-03-31 Thread Willi Egger
On 31 Mar 2010, at 03:00, luigi scarso wrote: On Wed, Mar 31, 2010 at 2:33 AM, Marco wrote: Hi, the following example just prints »Hello World!«, without the square. What's wrong? \startuseMPgraphic{test} fill fullsquare scaled 5cm; \stopuseMPgraphic \starttext Hello World! \useMPgraphic{t

Re: [NTG-context] Metapost inclusion does not work

2010-03-31 Thread Mojca Miklavec
On Wed, Mar 31, 2010 at 02:33, Marco wrote: > Hi, > > the following example just prints »Hello World!«, without the square. > What's wrong? Do you have all the formats generated? (mptopdf etc.) Mojca ___ If your ques

Re: [NTG-context] Metapost inclusion does not work

2010-03-31 Thread Marco
Hi, > Do you have all the formats generated? (mptopdf etc.) No. Thanks for the hint (the logfile also told me, I know now). It works now. The problem was that I use a system-wide setup and the $TEXMFCACHE tree was not writable by the users. I now introduced the »chmod« line, see below. I'm not a

Re: [NTG-context] Metapost inclusion does not work

2010-04-01 Thread Mojca Miklavec
On Wed, Mar 31, 2010 at 14:32, Marco wrote: > Hi, > >> Do you have all the formats generated? (mptopdf etc.) > > No. Thanks for the hint (the logfile also told me, I know now). It works > now. The problem was that I use a system-wide setup and the $TEXMFCACHE > tree was not writable by the users. I

<    6   7   8   9   10   11   12   13   14   15   >