Re: [NTG-context] Font for MetaPost graphics

2012-05-10 Thread Marco
On 2012-05-10 Procházka Lukáš Ing. - Pontex s. r. o. wrote: > With the permission, I tried to replace the tag with to > get source and result. > > > ... > > > Unfortunately, the result doesn't appear. The code is MkIV only and the wiki uses MkII. > So, what to do to make the example work?

Re: [NTG-context] Font for MetaPost graphics

2012-05-10 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello, many thanks Marco for wikifying. On Tue, 08 May 2012 21:57:04 +0200, Marco wrote: Thanks a lot Hans for implementing this. Wikified: http://wiki.contextgarden.net/Command/defineMPinstance http://wiki.contextgarden.net/Command/setupMPinstance Best wishes Marco With the permissio

Re: [NTG-context] Font for MetaPost graphics

2012-05-08 Thread Marco
On 2012-05-08 Hans Hagen wrote: > ok, can you add this to cont-new.mkiv (after \unprotect): > > \def\m_meta_colo_initializations{% > vardef OverlayLineColor=\MPcolor{\overlaylinecolor} enddef; > vardef OverlayColor=\MPcolor{\overlaycolor} enddef; > } That works. > As I've used that p

Re: [NTG-context] Font for MetaPost graphics

2012-05-08 Thread Hans Hagen
On 8-5-2012 19:19, Marco wrote: On 2012-05-08 Hans Hagen wrote: On 8-5-2012 19:01, Marco wrote: On 2012-05-05 Hans Hagen wrote: Did I? My bad ;) This code fails: \defineMPinstance [mympinstance] [metafun] [textcolor=red] \starttext \startMPcode draw textext("some text") ; \

Re: [NTG-context] Font for MetaPost graphics

2012-05-08 Thread Marco
On 2012-05-08 Hans Hagen wrote: > On 8-5-2012 19:01, Marco wrote: > > On 2012-05-05 Hans Hagen wrote: > > Did I? My bad ;) > > This code fails: > > > > \defineMPinstance [mympinstance] [metafun] [textcolor=red] > > > > \starttext > > > > \startMPcode > > draw textext("some text") ; > > \s

Re: [NTG-context] Font for MetaPost graphics

2012-05-08 Thread Hans Hagen
On 8-5-2012 19:01, Marco wrote: On 2012-05-05 Hans Hagen wrote: Did I? This code fails: \defineMPinstance [mympinstance] [metafun] [textcolor=red] \starttext \startMPcode draw textext("some text") ; \stopMPcode \startMPcode{mympinstance} draw textext("some text") ; \stopM

Re: [NTG-context] Font for MetaPost graphics

2012-05-08 Thread Marco
On 2012-05-05 Hans Hagen wrote: This code fails: \defineMPinstance [mympinstance] [metafun] [textcolor=red] \starttext \startMPcode draw textext("some text") ; \stopMPcode \startMPcode{mympinstance} draw textext("some text") ; \stopMPcode \stoptext Marco __

Re: [NTG-context] Font for MetaPost graphics

2012-05-05 Thread Aditya Mahajan
On Sat, 5 May 2012, Marco wrote: On 2012-05-05 Hans Hagen wrote: That means, MPenvironment will be dropped, right? But what is the new interface, \setupMPtext or MPinstance? \setupMPinstance The advantage is that you can have multiple instances in parallel. Aditya _

Re: [NTG-context] Font for MetaPost graphics

2012-05-05 Thread Marco
On 2012-05-05 Hans Hagen wrote: That means, MPenvironment will be dropped, right? But what is the new interface, \setupMPtext or MPinstance? > > +1 > > > > Marco > > So .. we know who is going to wikify this ... You're welcome :) Marco

Re: [NTG-context] Font for MetaPost graphics

2012-05-05 Thread Hans Hagen
On 4-5-2012 09:13, Aditya Mahajan wrote: On Fri, 4 May 2012, Mojca Miklavec wrote: I can think of many workarounds to this, but I agree that there is a valid reason why \startMPenvironment (or some other command) should be able to change the font inside metapost labels only. A better alternat

Re: [NTG-context] Font for MetaPost graphics

2012-05-05 Thread Hans Hagen
On 4-5-2012 13:09, Marco wrote: On 2012-05-04 Aditya Mahajan wrote: On Fri, 4 May 2012, Mojca Miklavec wrote: But my guess is that the argument goes into the opposite way. I past (and still in MKII) one *had to* set up fonts twice - once for the main document and once for MetaPost since

Re: [NTG-context] Font for MetaPost graphics

2012-05-04 Thread Marco
On 2012-05-04 Aditya Mahajan wrote: > On Fri, 4 May 2012, Mojca Miklavec wrote: > > But my guess is that the argument goes into the opposite way. I > > past (and still in MKII) one *had to* set up fonts twice - once > > for the main document and once for MetaPost since MetaPost did > > its o

Re: [NTG-context] Font for MetaPost graphics

2012-05-04 Thread Aditya Mahajan
On Fri, 4 May 2012, Mojca Miklavec wrote: I can think of many workarounds to this, but I agree that there is a valid reason why \startMPenvironment (or some other command) should be able to change the font inside metapost labels only. A better alternative would to define \setupMPtext [

Re: [NTG-context] Font for MetaPost graphics

2012-05-04 Thread Mojca Miklavec
On Thu, May 3, 2012 at 3:13 AM, Marco wrote: > > The text in Metapost adapts to the text set in ConTeXt. But the font > setup should *only* be set for MetaPost, not regular text. > > Does that mean, that MPenvironment is deprecated and does not work > at all? Please don't rely on my answer since I

Re: [NTG-context] Font for MetaPost graphics

2012-05-02 Thread Marco
On 2012-05-02 Aditya Mahajan wrote: > Metapost now runs as a library. All the text is first typeset by ConTeXt > and metapost only knows the bounding box of the labels. > > You can try (untested): > > \starttext > > This is serif > > \switchtobodyfont[sans] > \startMPcode > draw textext("Thi

Re: [NTG-context] Font for MetaPost graphics

2012-05-02 Thread Aditya Mahajan
On Thu, 3 May 2012, Marco wrote: The wiki claims setting up an MPenvironment is enough to change the font in MetaPost graphics: \startMPenvironment%[global] \switchtobodyfont [sans] \stopMPenvironment \starttext This should be serif. \startMPcode draw t