Re: [NTG-context] question for metapost experts

2017-08-10 Thread Schmitz Thomas A.
one of included metapost graphics, so now I can correct this! All best Thomas ___ 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/m

Re: [NTG-context] about makempy (metapost outlines)

2018-02-18 Thread Otared Kavian
:21, Jeong Dal wrote: > > > Hi, > > During the search Euler font, I found a manual “creating metapost outlines”. > It is what I looking for at the last year. > > I tried an example for section head, but it issued an undefined control > sequence message. > > Ple

Re: [NTG-context] about makempy (metapost outlines)

2018-02-19 Thread Hans Hagen
On 2/19/2018 8:09 AM, Otared Kavian wrote: Tha sample code below runs correctly, except that the Korean words are not displayed, since there is no body fonts set up for that language. Could you please send a more complete sample in order for us to see what you are reporting? \setupbodyfont[unf

Re: [NTG-context] about makempy (metapost outlines)

2018-02-19 Thread Hans Hagen
On 2/19/2018 3:21 AM, Jeong Dal wrote: tex error       > tex error on line 4 in file /Users/graph/Documents/TeXfiles/test-mpgraph.tex: ! Undefined control sequence \setstrut \begstrut \getheadtitle                                   \endstrut \MPLIBgraphictext ...\startTEXpage [scale=1]#

Re: [NTG-context] about makempy (metapost outlines)

2018-02-19 Thread Jeong Dal
Dear Otared, I am sorry that the sample code is not fully loaded. Although Hans said that we don’t need ‘makempy’, I copied the whole code again for the sake of test. \setuphead[section][style={\effect[outer]}] is working well. For korean, use \setupbodyfont[unfonts] as Hans said. Thank you.

Re: [NTG-context] Circled text in metapost

2018-03-29 Thread Henri Menke
On 03/29/2018 10:28 PM, Gerhard Kugler wrote: > Hi, > > in documentations I can find various examples of circled text. But > copying them I had no success till now. > > I want to place text in half circles of various radiuses. Is there > anywhere a simple example? The Metafun experts would proba

Re: [NTG-context] Circled text in metapost

2018-03-29 Thread Hans Hagen
On 3/29/2018 11:52 AM, Henri Menke wrote: On 03/29/2018 10:28 PM, Gerhard Kugler wrote: Hi, in documentations I can find various examples of circled text. But copying them I had no success till now. I want to place text in half circles of various radiuses. Is there anywhere a simple example?

Re: [NTG-context] Circled text in metapost

2018-03-29 Thread Gerhard Kugler
Thank you very much for these examples. The most important hints are given now. Perhaps I am able to apply them. One misunderstanding made by my post: I want to write the text curved as a (half-)circle. Gerhard -- Gerhard Kugler Bensheim _

Re: [NTG-context] Circled text in metapost

2018-03-29 Thread Alan Braslau
On Thu, 29 Mar 2018 12:43:56 +0200 Gerhard Kugler wrote: > One misunderstanding made by my post: I want to write the text curved > as a (half-)circle. Take a look at the Metafun manual. Alan ___ If your question is

Re: [NTG-context] Circled text in metapost

2018-03-29 Thread Gerhard Kugler
On Thu, Mar 29, 2018 at 07:11:50AM -0600, Alan Braslau wrote: > On Thu, 29 Mar 2018 12:43:56 +0200 > Gerhard Kugler wrote: > > > One misunderstanding made by my post: I want to write the text curved > > as a (half-)circle. > > Take a look at the Metafun manual. > In the manual is an example on

Re: [NTG-context] Circled text in metapost

2018-03-30 Thread Gerhard Kugler
Hello, my problem is that in other programming langguages there is a main procedure which calls others. In metapost in the context of ConteXt I can use \starttext ... \stoptext or \startMPpage ... \stopMPpage or \beginfig ... \endfig And it seems not to be transparent how procedures are called

Re: [NTG-context] Circled text in metapost

2018-03-30 Thread Alan Braslau
Hello, luatex includes the MetaPost library MPlib, so MetaPost code is called and then injected into the output stream. As a user, it is useful to know that MP is in fact called in two passes, thus twice, and this can have some unexpected consequences when not programmed cleanly. Global variable

Re: [NTG-context] Circled text in metapost

2018-03-30 Thread Gerhard Kugler
Thank you, this seems a very informative explanation for me, and now I will try to transpose it for my intention. Gerhard On Fri, Mar 30, 2018 at 08:44:23AM -0600, Alan Braslau wrote: > Hello, > > luatex includes the MetaPost library MPlib, so MetaPost code is called > and then i

Re: [NTG-context] Circled text in metapost

2018-03-30 Thread Henri Menke
On Thu, 2018-03-29 at 18:05 +0200, Gerhard Kugler wrote: > On Thu, Mar 29, 2018 at 07:11:50AM -0600, Alan Braslau wrote: > > > > On Thu, 29 Mar 2018 12:43:56 +0200 > > Gerhard Kugler wrote: > > > > > > > > One misunderstanding made by my post: I want to write the text curved > > > as a (half-)c

Re: [NTG-context] Circled text in metapost

2018-03-30 Thread Henri Menke
On Sat, 2018-03-31 at 12:22 +1300, Henri Menke wrote: > On Thu, 2018-03-29 at 18:05 +0200, Gerhard Kugler wrote: > > > > On Thu, Mar 29, 2018 at 07:11:50AM -0600, Alan Braslau wrote: > > > > > > > > > On Thu, 29 Mar 2018 12:43:56 +0200 > > > Gerhard Kugler wrote: > > > > > > > > > > > > > >

Re: [NTG-context] Circled text in metapost

2018-03-31 Thread Gerhard Kugler
Hi, my very slow proceedings are here: \useMPlibrary[txt] \starttext \setupbodyfont[pp1] \setupcolors[state=start] \setuplayout [topspace=192pt, backspace=48pt, cutspace=12pt, width=400pt, margin=0cm, rightedge=88pt, rightedgedistance=48pt, header=0cm, footer=0cm, height=400pt]

Re: [NTG-context] Circled text in metapost

2018-04-02 Thread Hans Hagen
On 3/31/2018 7:22 PM, Gerhard Kugler wrote: Hi, my very slow proceedings are here: \useMPlibrary[txt] \starttext \setupbodyfont[pp1] \setupcolors[state=start] \setuplayout [topspace=192pt, backspace=48pt, cutspace=12pt, width=400pt, margin=0cm, rightedge=88pt, rightedgedistance=4

Re: [NTG-context] Circled text in metapost

2018-04-02 Thread Alan Braslau
On Mon, 2 Apr 2018 15:16:11 +0200 Hans Hagen wrote: > \useMPlibrary[txt] > > \starttext > > \startuseMPgraphic{followtokens} > path RotPath ; RotPath := halfcircle scaled 7cm rotated 180 ; > for i=1 upto 6 : > draw halfcircle scaled (i*cm) rotated 180 ; > endfor ; > \sto

Re: [NTG-context] Circled text in metapost

2018-04-02 Thread Gerhard Kugler
Thank you very much! And if I want to place different text between the (half-)circles? Gerhard On Mon, Apr 02, 2018 at 03:16:11PM +0200, Hans Hagen wrote: > \useMPlibrary[txt] > > \starttext > > \startuseMPgraphic{followtokens} > path RotPath ; RotPath := halfcircle scaled 7cm rotated 180

Re: [NTG-context] Circled text in metapost

2018-04-02 Thread Hans Hagen
On 4/2/2018 5:52 PM, Gerhard Kugler wrote: Thank you very much! And if I want to place different text between the (half-)circles? \startuseMPgraphic{followtokens-1} path RotPath ; RotPath := halfcircle scaled 7cm rotated 180 ; for i=1 upto 6 : draw halfcircle scaled (i*cm) rota

Re: [NTG-context] Circled text in metapost

2018-04-02 Thread Gerhard Kugler
Finally I want to place 8 (halfcircled) texts within 8 colores (full)rings. Your proposal places the second text outside of the circles. Gerhard On Mon, Apr 02, 2018 at 06:08:56PM +0200, Hans Hagen wrote: > On 4/2/2018 5:52 PM, Gerhard Kugler wrote: > >Thank you very much! > > > >And if I want t

Re: [NTG-context] Circled text in metapost

2018-04-02 Thread Gerhard Kugler
Perhaps it is better if I send the final graphic which I have prorammed with the programming langguage "logo". See attachment! The problem: it is pixel graphic. Gerhard On Mon, Apr 02, 2018 at 06:34:42PM +0200, Gerhard Kugler wrote: > Finally I want to place 8 (halfcircled) texts within 8 color

Re: [NTG-context] Circled text in metapost

2018-04-02 Thread Alan Braslau
This is very easy to do in MetaPost, but you should not expect the mailing list to design your graphic for you. Alan On Mon, 2 Apr 2018 19:21:05 +0200 Gerhard Kugler wrote: > Perhaps it is better if I send the final graphic which I have > prorammed with the programming langguage "

Re: [NTG-context] Circled text in metapost

2018-04-02 Thread Gerhard Kugler
On Mon, Apr 02, 2018 at 11:30:05AM -0600, Alan Braslau wrote: > This is very easy to do in MetaPost, but you should not expect the > mailing list to design your graphic for you. > You are right totally. It is not my expectation. I succeeded in programming several graphics in metapost in

Re: [NTG-context] Circled text in metapost

2018-04-04 Thread Gerhard Kugler
One question: How can I give the several half circle text lines the same origin (that of the circles)? Gerhard -- Gerhard Kugler Bensheim ___ If your question is of interest to others as well, please add an entry t

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

2018-04-07 Thread Gerhard Kugler
Hi, the code: - \mainlanguage[de] \enableregime[utf-8] \useMPlibrary[txt] \starttext \setupbodyfont[big] \setupcolors[state=start] \setuplayout [topspace=192pt, backspace=48pt, cutspace=12pt, width=500pt, margin=0cm, rightedge=88pt, rightedgedistance=48pt, header=0cm, footer=0cm, heigh

Re: [NTG-context] Metapost graphic in setupbackground

2019-02-08 Thread Marco Patzer
On Fri, 8 Feb 2019 12:36:16 +0100 "Jan U. Hasecke" wrote: > \definelayer[kreisbackground][width=70mm,height=70mm] \definelayer[kreisbackground][width=70mm,height=70mm, state=repeat] start: layer appears only on the current page stop : layer doesn't show up repeat : layer prints on all

Re: [NTG-context] Metapost graphic in setupbackground

2019-02-08 Thread Wolfgang Schuster
Jan U. Hasecke schrieb am 08.02.19 um 12:36: Hi all, I make my first steps with Metapost. I would like to set the background of all pages to a Metapost graphic. But only the first page has the defined background. I also tried with \startuseMPgraphic with no success --- mwe

Re: [NTG-context] Metapost graphic in setupbackground

2019-02-08 Thread Jan U. Hasecke
Thanks a lot Wolfgang and Marco. :-) juh Am 08.02.19 um 12:57 schrieb Wolfgang Schuster: > > > Jan U. Hasecke schrieb am 08.02.19 um 12:36: >> Hi all, >> >> I make my first steps with Metapost. >> >> I would like to set the background of all pages to

Re: [NTG-context] fontsize drawing in metapost

2013-05-06 Thread Marco Patzer
On 2013–05–06 Meer, H. van der wrote: > What is the simplest way to change the size of fonts in labels drawn in > MetaPost? Probably a font switch directly in the label: label("\small foobar", origin); > \switchtobodyfont[size] can be done in \startMPenvironment and i

Re: [NTG-context] fontsize drawing in metapost

2013-05-06 Thread Meer, H. van der
possible things cannot be done other than by putting a fontchange inside each label. Hans van der Meer On 6 May 2013, at 6:04 PM, Marco Patzer wrote: > On 2013–05–06 Meer, H. van der wrote: > >> What is the simplest way to change the size of fonts in labels drawn in

Re: [NTG-context] fontsize drawing in metapost

2013-05-06 Thread Meer, H. van der
a solution. It is however quite possible things cannot be done other than by putting a fontchange inside each label. Hans van der Meer On 6 May 2013, at 6:04 PM, Marco Patzer mailto:home...@lavabit.com>> wrote: On 2013–05–06 Meer, H. van der wrote: What is the simplest way to change the

Re: [NTG-context] fontsize drawing in metapost

2013-05-06 Thread Meer, H. van der
The reason behind starting this thread was the fact that I want my \useMPgraphic's arbitrarily (and perfectly) scaled. In Metapost/Metafun that is easily done through a \MPvar{scale} variable, applied to the main dimensions on which all measures in my figures depend. But for the fontsizes

Re: [NTG-context] fontsize drawing in metapost

2013-05-07 Thread Marco Patzer
On 2013–05–07 Meer, H. van der wrote: > Perhaps a better and possibly more elegant way seems the following > route. When I turn Metapost figures into external pdf-files, these > can be placed with \useexternalfigure and the scaled as a whole, > drawing and text alike. My question is:

Re: [NTG-context] fontsize drawing in metapost

2013-05-07 Thread Meer, H. van der
van der wrote: > >> Perhaps a better and possibly more elegant way seems the following >> route. When I turn Metapost figures into external pdf-files, these >> can be placed with \useexternalfigure and the scaled as a whole, >> drawing and text alike. My question is: can thi

Re: [NTG-context] MetaPost label direction prefix

2013-08-23 Thread Hans Hagen
likewise, code using the mpfun_ prefix fails on traditional MetaPost. So is anyone using mkiv still using MkII? Is this prefix required? It breaks old code and required a branch in every new project. And I don't really see a reason for this incompatibility. Here is an example defining a new dire

Re: [NTG-context] MetaPost label direction prefix

2013-08-23 Thread Marco Patzer
fun_labyf.foo := 1 ; > > > > %% MkII > > pair laboff.foo ; laboff.foo := (.5,-1) ; > > labxf.foo := labyf.foo := 1 ; > > > > label.foo("second", origin); > > \stopMPcode > >\stoptext > > I wasn't aware of users defining

Re: [NTG-context] MetaPost label direction prefix

2013-08-23 Thread Hans Hagen
f.foo := (.5,-1) ; labxf.foo := labyf.foo := 1 ; label.foo("second", origin); \stopMPcode \stoptext I wasn't aware of users defining extra ones. I'll add this: Probably not many users will tinker with custom label directions, but MetaPost package authors do. Some packa

Re: [NTG-context] MetaPost label direction prefix

2013-08-24 Thread Marco Patzer
; enddef ; The minimal example works with your version, but the old MetaPost code does not. The def variant works fine with both. 2) Replace startplaincompatibity → startplaincompatibility stopplaincompatibity → stopplaincompatibility 3) This one is truly optional and just a sugges

Re: [NTG-context] MetaPost label direction prefix

2013-08-25 Thread Hans Hagen
l enddef ; enddef ; The minimal example works with your version, but the old MetaPost code does not. The def variant works fine with both. ok 2) Replace startplaincompatibity → startplaincompatibility stopplaincompatibity → stopplaincompatibility ok, best check the next bet

[NTG-context] functions and paths in metapost

2013-10-14 Thread Jean Magnan de Bornier
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 define a path with a function ("picture" after

Re: [NTG-context] Statistical module for Metapost

2013-12-24 Thread Hans Hagen
On 12/23/2013 7:55 PM, DesdeChaves wrote: I'm trying play with the statistical package** for metapost from Anthony Phan. I found this strange problem: This code runs fine: \startMPcode label.bot(btex Metapost and Statistics etex,(5mm,0)) ; \stopMPcode Also, this code run

Re: [NTG-context] Statistical module for Metapost

2013-12-24 Thread DesdeChaves
Thanks a lot. Merry Christmas Jorge 2013/12/24 Hans Hagen > On 12/23/2013 7:55 PM, DesdeChaves wrote: > >> >> >> I'm trying play with the statistical package** for metapost from Anthony >> Phan. I found this strange problem: >> >> >> This

Re: [NTG-context] [metapost] troubles with labels

2013-12-29 Thread Hans Hagen
On 12/29/2013 12:07 PM, Pol Stra wrote: Dear all, with this minimalist content of metapost file: ``` beginfig(1); dotlabel.ulft("A", origin); endfig; end. ``` And this conteXt file: ``` \starttext \startMPrun input mymp.mp; \stopMPrun \externalfigure[mprun.21][width=5cm]

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

2014-02-14 Thread DesdeChaves
I need to create some graphics to teach energy. One of the illustrations is about the sound energy that I represent using linear_shade function. In the following example the first illustration is represented correctly, but the second call of the function SoundEnergy implies the loss of gradient. Wh

[NTG-context] Edit the arrows default Metapost

2014-05-22 Thread Fabrice Couvreur
Hello, Is it possible to change the appearance Metafun arrows default to make them resemble those of PSTricks that I find most beautiful. Regards, Fabrice ___ If your question is of interest to others as well, please ad

Re: [NTG-context] Strange behavior with Metapost

2014-05-27 Thread Hans Hagen
On 5/27/2014 10:19 PM, Fabrice Couvreur wrote: Hello, Why curve drawn is not that expected ? Fabrice use /20 \starttext \startMPcode input hvdm; l:=2.8mm; r:=0.6; alfa:=45; beta:=0; gamma:=0; defineDefaultArrow (l, r, alfa, beta, gamma); numeric xmin, xmax, ymin, ymax

Re: [NTG-context] Strange behavior with Metapost

2014-05-27 Thread Fabrice
It works. But how to choose not to avoid this problem (/10 or /20 or ) ? Another little problem: if I use " setbounds currentpicture to boundingbox (((xmin,ymin) --(xmax,ymax)) scaled u) ; " the images are not adjusted to the BoundingBox. So I'm back to my original idea. Fabrice \midali

Re: [NTG-context] Strange behavior with Metapost

2014-05-27 Thread Hans Hagen
On 5/28/2014 12:09 AM, Fabrice wrote: It works. But how to choose not to avoid this problem (/10 or /20 or ) ? well, you can guess the amount of steps ... but the 1000 you had originally was way too much -

Re: [NTG-context] Strange behavior with Metapost

2014-05-28 Thread Fabrice
Hello, Firstly, thank you for your reply. However, I would like some further explanation please. If I understand, but I'm not sure at all, calculating (xmax-xmin) / 10 gives the number of points to draw the curve. However, in my example, xmax = 4 and xmin = -2, so (xmax-xmin) / 10 = 0.6. My que

[NTG-context] Strange problem with metapost graphics

2008-04-17 Thread Jean Magnan de Bornier
Hi all, Here is minimal example of some trouble I have: ... \startMPinclusions numeric u; u=1cm; \stopMPinclusions \starttext \startuseMPgraphic{dummy} drawarrow (0,0)..(8u,0); label.bot(\sometxt{temps}, (7u,-.5u)); \stopuseMPgraphic \placefigure[fig:Uncontratdans

[NTG-context] MetaPost v1.003: graph package broken

2008-04-24 Thread Stephan Hennig
A note from the MetaPost developers: We have noticed an incompatibility between the latest MetaPost v1.003 and the graph package. Severity is considered high, since it prevents compilation of even the most simple figures. The problem is identified and a fix is under way. A workaround is not

[NTG-context] Metapost on OS X 10.5

2008-05-05 Thread Taco Hoekwater
Hi Thomas, Can you please replace the c-std.h in src/texk/kpathsea with the attached one and see if that helps? The one I am distributing with metapost is slightly different from the one in tl, and we need to exclude differences that from the list of causes (either that, or we found the cause

Re: [NTG-context] Metapost beta 1.090 released

2008-07-18 Thread Yue Wang
Hi, Taco: > This MetaPost release is based on MPlib. Oh! My God!!! Such a big change~ So are you sure the code is stable enough? btw, If we insist to use the mplib, why not make mpost a symbol link to LuaTeX in TeXLive 2008? (just revise a few code of LuaTeX, make it behave like metapost w

Re: [NTG-context] Metapost beta 1.090 released

2008-07-18 Thread Taco Hoekwater
Hi, Yue Wang wrote: > Hi, Taco: > >> This MetaPost release is based on MPlib. > > Oh! My God!!! Such a big change~ So are you sure the code is stable enough? I have to push out the code sometime, otherwise it will never be ready. But it will not be on this year's texlive

Re: [NTG-context] Metapost beta 1.090 released

2008-07-18 Thread Hans Hagen
> Yue Wang wrote: >> Hi, Taco: >> >>> This MetaPost release is based on MPlib. >> Oh! My God!!! Such a big change~ So are you sure the code is stable enough? > > I have to push out the code sometime, otherwise it will never be ready. > But it will not be

Re: [NTG-context] MetaPost graphics within formulas

2008-07-25 Thread Peter Rolf
> \Phi(\useMPgraphic{tetrahedral})=F_{kln}^{ijm}\,v_iv_jv_kv_l\, > \delta_{j^*nk^*}\,\delta_{l^*n^*i^*}\,\Phi(\emptyset) > \stopformula > > > \stoptext > --- > > Now if I only knew how to properly alig

Re: [NTG-context] MetaPost graphics within formulas

2008-07-26 Thread Oliver Buerschaper
,v_iv_jv_kv_l\, > \delta_{j^*nk^*}\,\delta_{l^*n^*i^*}\,\Phi(\emptyset) > \stopformula > > \stoptext That's exactly what I was looking for … thanks very much! Out of curiosity just a few questions … why do you use grouping in the MetaPost code and why do you draw the bounding box expl

Re: [NTG-context] MetaPost graphics within formulas

2008-07-26 Thread Peter Rolf
tetrahedral}}}% needs >> some fiddling :) >> >> \startformula >> \Phi(\Tetrahedral)=F_{kln}^{ijm}\,v_iv_jv_kv_l\, >> \delta_{j^*nk^*}\,\delta_{l^*n^*i^*}\,\Phi(\emptyset) >> \stopformula >> >> \stoptext > > That's exactly what I was looking

Re: [NTG-context] MetaPost graphics within formulas

2008-07-26 Thread Peter Münster
On Fri, Jul 25 2008, Oliver Buerschaper wrote: > \Phi(\useMPgraphic{tetrahedral})=F_{kln}^{ijm}\,v_iv_jv_kv_l\, > [...] > Now if I only knew how to properly align my MetaPost figure with the > rest of the formula … any ideas? \Phi\left(\vcenter{\useMPgraphic{tetrahedral}}\right)=

Re: [NTG-context] passing dimensions to metapost

2008-08-28 Thread Hans Hagen
Thomas A. Schmitz wrote: > Hi all, > > cleaning up the code in my module, I run into a very interesting > problem. I want to pass a user-defined value to Metapost. Until now, > the value "scale" had to be numeric, and I used it like this: > > draw fullcircle

Re: [NTG-context] passing dimensions to metapost

2008-08-28 Thread Thomas A. Schmitz
nd > > for mkii you can use \doifdimensionelse (it reminds me to implement > that > in mkiv) Hey, I WAS using \doifdimensionelse and \doifnumberelse! :-) And it appears to be working in mkiv as well! I found out the error in my code (it was too complex, and I was overwriting a vari

[NTG-context] metapost and luatex (or xetex)

2008-10-03 Thread Diego Depaoli
Hi all, from metafun manual, page 157, I took this example \startuniqueMPgraphic{copyright} picture p ; p := btex COPYRIGHT etex rotated 90 ; setbounds p to boundingbox p enlarged 1pt ; draw p withcolor .8white ; xyscale_currentpicture(\the\leftmarginwidth,\the\textheight) ; \stopuniqueMPgraphic \

[NTG-context] Color rendering & transparency with metapost

2008-10-31 Thread Renaud Aubin
Hi, I have some trouble using a gradient background (solid) with a transparent element : \startMPinclusions def test_shade (expr a, b) = pickup pencircle scaled 1mm ; color ca ; ca := \MPcolor{a} ; color cb ; cb := \MPcolor{b} ; color cc ; cc := \MPcolor{c} ; sh := defi

[NTG-context] trouble with xetex and metapost

2009-01-11 Thread Jesse Alama
Using MkII (ver: 2009.01.09 16:57 MKII fmt: 2009.1.11 int: english/english), XeTeX (3.1415926-2.2-0.999.6 (Web2C 7.5.7)), and metapost (Version 1.005 (Web2C 7.5.7)), and metafun (2008-10-19 15:21), I run into some trouble with \usestaticMPfigure: [snip] systems : end file texexec

Re: [NTG-context] Labels in MetaPost (MetaObj)

2011-01-20 Thread Taco Hoekwater
On 01/18/2011 01:17 PM, Stefan Müller wrote: Hi list, I'm having some trouble with MetaPost in general and MetaObj in particular. The core problem is that context mkiv loads the metapost code twice when you are typesetting labels, and that causes trouble for metaobj which does not expect

Re: [NTG-context] Labels in MetaPost (MetaObj)

2011-01-21 Thread Hans Hagen
On 20-1-2011 9:59, Taco Hoekwater wrote: On 01/18/2011 01:17 PM, Stefan Müller wrote: Hi list, I'm having some trouble with MetaPost in general and MetaObj in particular. The core problem is that context mkiv loads the metapost code twice when you are typesetting labels, and that c

Re: [NTG-context] Labels in MetaPost (MetaObj)

2011-01-21 Thread Aditya Mahajan
On Sat, 22 Jan 2011, Hans Hagen wrote: On 20-1-2011 9:59, Taco Hoekwater wrote: On 01/18/2011 01:17 PM, Stefan Müller wrote: Hi list, I'm having some trouble with MetaPost in general and MetaObj in particular. The core problem is that context mkiv loads the metapost code twice when yo

Re: [NTG-context] Labels in MetaPost (MetaObj)

2011-01-22 Thread Stefan Müller
fi; flag := true; \stopMPpage \stoptext On 22.01.2011 02:38, Aditya Mahajan wrote: On Sat, 22 Jan 2011, Hans Hagen wrote: On 20-1-2011 9:59, Taco Hoekwater wrote: On 01/18/2011 01:17 PM, Stefan Müller wrote: Hi list, I'm having some trouble with MetaPost in general and MetaObj in particul

Re: [NTG-context] Labels in MetaPost (MetaObj)

2011-01-22 Thread Aditya Mahajan
On Sat, 22 Jan 2011, Stefan Müller wrote: So its either using text or using metaobj? Too bad, metaobj is quite fun... I still hope you guys can fix this, but it's not urgent (to me). Anyway, what does the [+] after \startMPinclusions? I did not find documentation for that on the wiki. \star

Re: [NTG-context] Labels in MetaPost (MetaObj)

2011-01-23 Thread Stefan Müller
On 22.01.2011 17:30, Aditya Mahajan wrote: On Sat, 22 Jan 2011, Stefan Müller wrote: So its either using text or using metaobj? Too bad, metaobj is quite fun... I still hope you guys can fix this, but it's not urgent (to me). Anyway, what does the [+] after \startMPinclusions? I did not find d

Re: [NTG-context] Labels in MetaPost (MetaObj)

2011-01-23 Thread Stefan Müller
On 23.01.2011 12:40, Stefan Müller wrote: On 22.01.2011 17:30, Aditya Mahajan wrote: On Sat, 22 Jan 2011, Stefan Müller wrote: So its either using text or using metaobj? Too bad, metaobj is quite fun... I still hope you guys can fix this, but it's not urgent (to me). Anyway, what does the [+]

Re: [NTG-context] Labels in MetaPost (MetaObj)

2011-01-23 Thread Aditya Mahajan
On Sun, 23 Jan 2011, Stefan Müller wrote: Sorry for double posting... The method with "if not flag" is a bit arkward, because assignObj isn't the only problem. "rotateObj(s, 90)" would rotate the object 180 degrees instead of 90; when defining the relation between several objects some equation

Re: [NTG-context] Labels in MetaPost (MetaObj)

2011-01-23 Thread Stefan Müller
On 23.01.2011 18:22, Aditya Mahajan wrote: On Sun, 23 Jan 2011, Stefan Müller wrote: Sorry for double posting... The method with "if not flag" is a bit arkward, because assignObj isn't the only problem. "rotateObj(s, 90)" would rotate the object 180 degrees instead of 90; when defining the re

Re: [NTG-context] Labels in MetaPost (MetaObj)

2011-01-24 Thread Stefan Müller
Wikified: http://wiki.contextgarden.net/MetaObj_and_Labels Please update/change as appropriate. Best regards, Stefan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :

Re: [NTG-context] metapost fill between outlines

2011-02-20 Thread Hongwen Qiu
On 02/20/2011 04:25 PM, Reviczky, Adam wrote: As a workaround I fill out the bigger one with color black and the smaller one with color white, but I need to put this on different background colors, so the use of this is very limited. You can fill out the bigger one, than clips the smaller one.

Re: [NTG-context] metapost fill between outlines

2011-02-20 Thread Reviczky, Adam
> You can fill out the bigger one, than clips the smaller one. Can you give me an example with the clip? I can't get it work in a way I want to have it. I've found another thread here: http://www.tug.org/pipermail/metapost/2006-September/000650.html But I fail to see the conclus

Re: [NTG-context] metapost fill between outlines

2011-02-20 Thread Hongwen Qiu
On 02/21/2011 03:52 AM, Reviczky, Adam wrote: As for the path of the difference, how do you mean that? Example? \startMPpage path p ; p := fullcircle scaled 1cm ; path q ; q := fullcircle scaled .5cm ; path r ; r := p -- reverse q -- cycle ; drawarrow r withcolor green ; fill r withcolor red ; \

Re: [NTG-context] metapost fill between outlines

2011-02-20 Thread Reviczky, Adam
> \startMPpage > path p ; > p := fullcircle scaled 1cm ; > path q ; > q := fullcircle scaled .5cm ; > path r ; > r := p -- reverse q -- cycle ; > drawarrow r withcolor green ; > fill r withcolor red ; > \stopMPpage > > This works here. Based on this I can now cut out the smaller one from a fullcir

Re: [NTG-context] metapost fill between outlines

2011-02-20 Thread Hongwen Qiu
On 02/21/2011 01:12 PM, Reviczky, Adam wrote: \starttext \framed[background=color,backgroundcolor=red,height=fit,width=fit]{ \startMPcode path p[]; p1 := (6.949220,13.046900)..controls (9.539060,13.046900) and (10.023400,10.781200)..(10.023400,8.679690)..controls (10.023400,5.335940) and (6.949

Re: [NTG-context] metapost fill between outlines

2011-02-20 Thread Reviczky, Adam
>> Maybe you can know why now, from the above code. The direction of the >> path is important. I get it now, thanks for your help! ___ If your question is of interest to others as well, please add an entry to the Wiki

Re: [NTG-context] metapost fill between outlines

2011-02-20 Thread Reviczky, Adam
So with this method, I can cut out some fillings of letters in a logo, but for this example it draws a small line through the letter: %%% \starttext \framed[background=color,backgroundcolor=red,height=fit,width=fit]{ \startMPcode path db[],df[],dc[]; drawoptions (withcolor (0.00,0.329412,0.56

Re: [NTG-context] metapost fill between outlines

2011-02-20 Thread Hongwen Qiu
On 02/21/2011 02:41 PM, Reviczky, Adam wrote: but for this example it draws a small line through the letter: \starttext \framed[background=color,backgroundcolor=red,height=fit,width=fit]{ \startMPcode path db[],df[],dc[]; drawoptions (withcolor (0.00,0.329412,0.560784)); db1 := (86.812500,0

Re: [NTG-context] metapost fill between outlines

2011-02-21 Thread Reviczky, Adam
The only letter ("g") I have left in the logo has two spaces that I want to cut out. I can't make a single path out of it so that it doesn't go through the entire letter, so what to do in this case? Here's the example: %%% \starttext \framed[background=color,backgroundcolor=red,height=fit,width=

Re: [NTG-context] metapost fill between outlines

2011-02-21 Thread Hongwen Qiu
On 02/21/2011 05:09 PM, Reviczky, Adam wrote: The only letter ("g") I have left in the logo has two spaces that I want to cut out. I can't make a single path out of it so that it doesn't go through the entire letter, so what to do in this case? Can't you construct four outlines instead of three

Re: [NTG-context] metapost fill between outlines

2011-02-21 Thread Mojca Miklavec
Just as a thought ... what you currently do with metapost at the moment is a bit of cheating to overcome lack of a feature in metapost - there is still an infinitely thin line between segments and a dumb renderer might display artifacts. If I wanted to draw a logo (very important graphic that will

Re: [NTG-context] metapost fill between outlines

2011-02-21 Thread Reviczky, Adam
>> Just as a thought ... what you currently do with metapost at the >> moment is a bit of cheating to overcome lack of a feature in metapost >> - there is still an infinitely thin line between segments and a dumb >> renderer might display artifacts. Yes, I am aware of t

Re: [NTG-context] Position of MetaPost graphics

2011-04-03 Thread Peter Rolf
Am 01.04.2011 11:39, schrieb Tim Steenvoorden: > Dear list, > > I'm trying to make some fancy chapter headers. With MetaPost I drew a > wave, which I'd like to place in the margin. I've read details.pdf and > metafun.pdf, but I don't manage to get the positio

Re: [NTG-context] Position of MetaPost graphics

2011-04-03 Thread Aditya Mahajan
On Fri, 1 Apr 2011, Tim Steenvoorden wrote: (Untested). \startuniqueMPgraphic{wave} numeric periods, width; path wave; periods := 3 + 1/4; width := periods * 2*pi; wave:= origin for x=0 step 0.1 until width: -- (x,x*sin(x)) endfor; pickup pencircle scaled 1pt; draw w

Re: [NTG-context] Position of MetaPost graphics

2011-04-03 Thread Tim Steenvoorden
Thanks Peter! You are right it is easier to draw both the wave and the line in Metapost. And the dx=-\cutspace is just what I needed for left pages! I striped the frames out of the code and placed just the graphics in the layer with a reuseMPgraphic. Also, I pulled out the definition of the wave

Re: [NTG-context] Position of MetaPost graphics

2011-04-04 Thread Wolfgang Schuster
Am 04.04.2011 um 01:22 schrieb Tim Steenvoorden: > Thanks Peter! You are right it is easier to draw both the wave and the > line in Metapost. And the dx=-\cutspace is just what I needed for left > pages! > > I striped the frames out of the code and placed just the graphics in >

Re: [NTG-context] Position of MetaPost graphics

2011-04-06 Thread Tim Steenvoorden
Thanks for your tips Wolfgang! I switched to a solution as on the wiki, using overlays and frames in place of layers. After setting the boudingboxes right it works! I have to increase the \objectoffset though, because otherwise the graphic is chopped of: \setuppapersize[A5][A5] \setuppagenumbering

[NTG-context] Context and metapost: using \frac

2011-04-26 Thread mat
Hi I am using context to run a metapost graph. I am however unable to insert a label with \frac, since this is not pure Tex but Latex. This seems to be a known problem for metapost: -Seems for metapost only, one should add %&latex (http://ryanmlayer.wordpress.com/tag/metapost/). -I saw

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

2011-05-10 Thread Michal Kvasnička
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 code is like this: verbatimtex \definety

[NTG-context] MetaPost visibly drawing at 0pt

2011-09-19 Thread 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 0pt; draw origin--(w,h); Did I always mis this or has something

Re: [NTG-context] metapost not adding picture

2011-10-09 Thread Peter Rolf
Am 09.10.2011 22:01, schrieb Meer, H. van der: > I have this question on the implementation of metapost. > The following program ends in an error: > > \startMPpage > picture v; > draw origin--(1cm,1cm); > v = currentpicture; > clearit; > draw (1cm,0)--(0,1cm); > cu

Re: [NTG-context] macro string in metapost

2011-11-02 Thread Hans Hagen
On 1-11-2011 23:21, Meer, H. van der wrote: The goal is to make the following string in metapost: string s; where s must become "\MPcolor{Blue}". and ultimately execute this at the right moment with: scantokens s; The following makes s = "MPcolor{Blue}": s := &quo

[NTG-context] Arrows and boxes in metapost.

2011-11-14 Thread Christian
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-answered on this list: "How to use

Re: [NTG-context] Wrong MetaPost text output

2019-08-11 Thread Hans Hagen
On 8/11/2019 6:09 PM, Henri Menke wrote: Dear devs, There seems to be a bug in the MetaPost integration of ConTeXt. The MWE below should produce three different labels “dummy foo bar” but instead produces “bar bar bar”. The same example works correctly in plain MetaPost. Originally reported

Re: [NTG-context] Wrong MetaPost text output

2019-08-11 Thread Henri Menke
On 8/11/19 10:51 AM, Hans Hagen wrote: > I'll do this (lmtx): > > metapost> use 'textext(.)' instead of 'btex . etex' > metapost> rewrapping btex ... etex at the outer level [[dummy]] > metapost> rewrapping btex

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