ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \startMPenvironment : personal font weirdness
@ 2006-08-03 20:09 David Wooten
  2006-08-03 22:56 ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: David Wooten @ 2006-08-03 20:09 UTC (permalink / raw)


Greetings all,

I've been experimenting with MetaPost/Fun of late. It is indeed fun. In 
trying to have a uniform font in both text and MP areas, however, I am 
running into some difficulty. With a little file like this:

---

\setupcolors[state=start]
\setuppagenumbering[state=stop]

\startMPenvironment [global]
    \usetypescript[palatino][ec]
    \switchtobodyfont[palatino,12pt]
\stopMPenvironment

\starttext

The following example should be very interesting:
\blank

\startuseMPgraphic{very-interesting}

z40 = (2cm,0cm)    ;     z41 = (3cm,0cm) ;
z42 = (3cm,1cm)    ;     z43 = (2cm,1cm) ;
z46 = (2.5cm,.5cm) ;

path F ; F := (z40--z41--z42--z43--cycle) ;

linejoin := mitered ;

drawpath F ;
label("very", z46) ;

\stopuseMPgraphic

\useMPgraphic{very-interesting}

\stoptext

---

everything works very nicely (fonts identical). When I use my own 
typescript file, however:

---

\startMPenvironment [global]
    \usetypescriptfile[minionpro-diss]
    \usetypescript[Minion]
    \switchtobodyfont[Minion,12pt]   
\stopMPenvironment

---

The text appears in the correct font, but the MP section, _while at 
first showing the correct font_, then changes to CM before my eyes. (my 
pdf viewer auto-updates).

Any clues?

Many thanks,
David

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: \startMPenvironment : personal font weirdness
  2006-08-03 20:09 \startMPenvironment : personal font weirdness David Wooten
@ 2006-08-03 22:56 ` Hans Hagen
  2006-08-03 23:07   ` David Wooten
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2006-08-03 22:56 UTC (permalink / raw)


David Wooten wrote:
> Greetings all,
>
> I've been experimenting with MetaPost/Fun of late. It is indeed fun. In 
> trying to have a uniform font in both text and MP areas, however, I am 
> running into some difficulty. With a little file like this:
>
> ---
>
> \setupcolors[state=start]
> \setuppagenumbering[state=stop]
>
> \startMPenvironment [global]
>     \usetypescript[palatino][ec]
>     \switchtobodyfont[palatino,12pt]
> \stopMPenvironment
>
> \starttext
>
> The following example should be very interesting:
> \blank
>
> \startuseMPgraphic{very-interesting}
>
> z40 = (2cm,0cm)    ;     z41 = (3cm,0cm) ;
> z42 = (3cm,1cm)    ;     z43 = (2cm,1cm) ;
> z46 = (2.5cm,.5cm) ;
>
> path F ; F := (z40--z41--z42--z43--cycle) ;
>
> linejoin := mitered ;
>
> drawpath F ;
> label("very", z46) ;
>
> \stopuseMPgraphic
>
> \useMPgraphic{very-interesting}
>
> \stoptext
>
> ---
>
> everything works very nicely (fonts identical). When I use my own 
> typescript file, however:
>
> ---
>
> \startMPenvironment [global]
>     \usetypescriptfile[minionpro-diss]
>     \usetypescript[Minion]
>     \switchtobodyfont[Minion,12pt]   
> \stopMPenvironment
>   
dangerous to use such a upper/lowercase mix (typos)
> ---
>
> The text appears in the correct font, but the MP section, _while at 
> first showing the correct font_, then changes to CM before my eyes. (my 
> pdf viewer auto-updates).
>   
hm, looks like a bronwser problem 

what happens if you only include the graphic, 

\startMPpage 
z40 = (2cm,0cm)    ;     z41 = (3cm,0cm) ;
z42 = (3cm,1cm)    ;     z43 = (2cm,1cm) ;
z46 = (2.5cm,.5cm) ;

path F ; F := (z40--z41--z42--z43--cycle) ;

linejoin := mitered ;

drawpath F ;
label("very", z46) ;
\stopMPpage 

so, no other text 

Hans 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: \startMPenvironment : personal font weirdness
  2006-08-03 22:56 ` Hans Hagen
@ 2006-08-03 23:07   ` David Wooten
  2006-08-03 23:13     ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: David Wooten @ 2006-08-03 23:07 UTC (permalink / raw)


Hans Hagen wrote:

 >> \startMPenvironment [global]
 >>     \usetypescriptfile[minionpro-diss]
 >>     \usetypescript[Minion]
 >>     \switchtobodyfont[Minion,12pt]   
 >> \stopMPenvironment
 >>   
 > dangerous to use such a upper/lowercase mix (typos)

I see what you mean.
 
 > hm, looks like a bronwser problem
 >
 > what happens if you only include the graphic,
 >
 > \startMPpage
 > z40 = (2cm,0cm)    ;     z41 = (3cm,0cm) ;
 > z42 = (3cm,1cm)    ;     z43 = (2cm,1cm) ;
 > z46 = (2.5cm,.5cm) ;
 >
 > path F ; F := (z40--z41--z42--z43--cycle) ;
 >
 > linejoin := mitered ;
 >
 > drawpath F ;
 > label("very", z46) ;
 > \stopMPpage
 >
 > so, no other text

Same results, and I also checked with a different viewer. Points to my 
typescript file as a problem, does it? (Which works fine in non-MP 
ConTeXt).

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: \startMPenvironment : personal font weirdness
  2006-08-03 23:07   ` David Wooten
@ 2006-08-03 23:13     ` Hans Hagen
  2006-08-03 23:30       ` David Wooten
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2006-08-03 23:13 UTC (permalink / raw)


David Wooten wrote:
> Hans Hagen wrote:
>
>  >> \startMPenvironment [global]
>  >>     \usetypescriptfile[minionpro-diss]
>  >>     \usetypescript[Minion]
>  >>     \switchtobodyfont[Minion,12pt]   
>  >> \stopMPenvironment
>  >>   
>  > dangerous to use such a upper/lowercase mix (typos)
>
> I see what you mean.
>  
>  > hm, looks like a bronwser problem
>  >
>  > what happens if you only include the graphic,
>  >
>  > \startMPpage
>  > z40 = (2cm,0cm)    ;     z41 = (3cm,0cm) ;
>  > z42 = (3cm,1cm)    ;     z43 = (2cm,1cm) ;
>  > z46 = (2.5cm,.5cm) ;
>  >
>  > path F ; F := (z40--z41--z42--z43--cycle) ;
>  >
>  > linejoin := mitered ;
>  >
>  > drawpath F ;
>  > label("very", z46) ;
>  > \stopMPpage
>  >
>  > so, no other text
>
> Same results, and I also checked with a different viewer. Points to my 
> typescript file as a problem, does it? (Which works fine in non-MP 
> ConTeXt).
>   

what is the label font then? probably defaultfont so you need to set 
that as well

also, label does not use tex, use

label(\textext("very"),z46)

and friends

Hans

-- 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: \startMPenvironment : personal font weirdness
  2006-08-03 23:13     ` Hans Hagen
@ 2006-08-03 23:30       ` David Wooten
  2006-08-04  8:46         ` Mojca Miklavec
  0 siblings, 1 reply; 8+ messages in thread
From: David Wooten @ 2006-08-03 23:30 UTC (permalink / raw)


Hans Hagen wrote:
> what is the label font then? probably defaultfont so you need to set 
> that as well
> also, label does not use tex, use
>
> label(\textext("very"),z46)
>   
That's it, indeed (though without the back-slash for textext):

label(textext("very"),z46)
> and friends
>
> Hans

Many thanks!
David

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: \startMPenvironment : personal font weirdness
  2006-08-03 23:30       ` David Wooten
@ 2006-08-04  8:46         ` Mojca Miklavec
  2006-08-04 11:24           ` Hans van der Meer
  2006-08-04 12:13           ` Hans Hagen
  0 siblings, 2 replies; 8+ messages in thread
From: Mojca Miklavec @ 2006-08-04  8:46 UTC (permalink / raw)


On 8/4/06, David Wooten wrote:
> Hans Hagen wrote:
> > what is the label font then? probably defaultfont so you need to set
> > that as well
> > also, label does not use tex, use
> >
> > label(\textext("very"),z46)

should be \textext{very}

> That's it, indeed (though without the back-slash for textext):
>
> label(textext("very"),z46)

I would use
    label(\sometxt{very},z46);

It works much better and you don't need to specify anything in the
MPenvironment. The default document font will be used.

Mojca

To Hans: \textext is not documented anywhere yet. Would it make sense
to make it a synonym for \sometxt perhaps?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: \startMPenvironment : personal font weirdness
  2006-08-04  8:46         ` Mojca Miklavec
@ 2006-08-04 11:24           ` Hans van der Meer
  2006-08-04 12:13           ` Hans Hagen
  1 sibling, 0 replies; 8+ messages in thread
From: Hans van der Meer @ 2006-08-04 11:24 UTC (permalink / raw)



On Aug 4, 2006, at 10:46, Mojca Miklavec wrote:

> On 8/4/06, David Wooten wrote:
>> Hans Hagen wrote:
>>> what is the label font then? probably defaultfont so you need to set
>>> that as well
>>> also, label does not use tex, use
>>>
>>> label(\textext("very"),z46)
>
> should be \textext{very}
>
>> That's it, indeed (though without the back-slash for textext):
>>
>> label(textext("very"),z46)
>
> I would use
>     label(\sometxt{very},z46);
>
> It works much better and you don't need to specify anything in the
> MPenvironment. The default document font will be used.
>
> Mojca
>
> To Hans: \textext is not documented anywhere yet. Would it make sense
> to make it a synonym for \sometxt perhaps?

Please don't. I have experienced a difference between textext and  
sometext, the former needed when metapost variables are combined.

Hans van der Meer

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: \startMPenvironment : personal font weirdness
  2006-08-04  8:46         ` Mojca Miklavec
  2006-08-04 11:24           ` Hans van der Meer
@ 2006-08-04 12:13           ` Hans Hagen
  1 sibling, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2006-08-04 12:13 UTC (permalink / raw)


Mojca Miklavec wrote:
> On 8/4/06, David Wooten wrote:
>   
>> Hans Hagen wrote:
>>     
>>> what is the label font then? probably defaultfont so you need to set
>>> that as well
>>> also, label does not use tex, use
>>>
>>> label(\textext("very"),z46)
>>>       
>
> should be \textext{very}
>   
indeed -)
>   
>> That's it, indeed (though without the back-slash for textext):
>>
>> label(textext("very"),z46)
>>     
>
> I would use
>     label(\sometxt{very},z46);
>
> It works much better and you don't need to specify anything in the
> MPenvironment. The default document font will be used.
>   
usable in 90% of the cases (not in loops)
> To Hans: \textext is not documented anywhere yet. Would it make sense
> to make it a synonym for \sometxt perhaps?
>   
too confusing

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-08-04 12:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-03 20:09 \startMPenvironment : personal font weirdness David Wooten
2006-08-03 22:56 ` Hans Hagen
2006-08-03 23:07   ` David Wooten
2006-08-03 23:13     ` Hans Hagen
2006-08-03 23:30       ` David Wooten
2006-08-04  8:46         ` Mojca Miklavec
2006-08-04 11:24           ` Hans van der Meer
2006-08-04 12:13           ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).