![](https://secure.gravatar.com/avatar/48c5b7faef52e59adf59c5e8f764aaf7.jpg?s=120&d=mm&r=g)
How can I setup a font -name, size, etc- inside a startuseMPgraphic environment? \startuseMPgraphic{map} \stopuseMPgraphic
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
Am 10.06.2012 um 16:25 schrieb Alfredo Catalina:
How can I setup a font -name, size, etc- inside a startuseMPgraphic environment?
\startuseMPgraphic{map}
\stopuseMPgraphic
- http://wiki.contextgarden.net/Command/defineMPinstance - http://wiki.contextgarden.net/Command/setupMPinstance Wolfgang
![](https://secure.gravatar.com/avatar/29c7bbff49b1599eddb2ec73fd9ffa6e.jpg?s=120&d=mm&r=g)
Being interested I looked up these links in the garden. The information given there is scarce, however. The parameters 'extensions' and 'initializations' with values yes/no especially. What are they for? What is the effect of yes/no? What exactly are these extensions and initializations? Is there documentation somewhere? Thanks in advance, Hans van der Meer On 10 jun. 2012, at 17:25, Wolfgang Schuster wrote: Am 10.06.2012 um 16:25 schrieb Alfredo Catalina: How can I setup a font -name, size, etc- inside a startuseMPgraphic environment? \startuseMPgraphic{map} \stopuseMPgraphic - http://wiki.contextgarden.net/Command/defineMPinstance - http://wiki.contextgarden.net/Command/setupMPinstance Wolfgang ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nlmailto:ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
Am 10.06.2012 um 18:23 schrieb Meer, H. van der:
Being interested I looked up these links in the garden. The information given there is scarce, however. The parameters 'extensions' and 'initializations' with values yes/no especially. What are they for? What is the effect of yes/no? What exactly are these extensions and initializations?
You can control whether the content of the \startMPextensions and \startMPinitializations environment is used or ignored in the metapost code. Wolfgang
![](https://secure.gravatar.com/avatar/48c5b7faef52e59adf59c5e8f764aaf7.jpg?s=120&d=mm&r=g)
I'm sorry but I don't know how to use them. I've tried \setupMPinstance [metafun] [textcolor=red] and got an "undefined control sequence" error. I've also tried \startMPenvironment [global] \usetypescript[palatino][ec] \switchtobodyfont[palatino,7pt] \stopMPenvironment and it changed the font size but the font type is not "palatino". thanks On Sun, Jun 10, 2012 at 5:25 PM, Wolfgang Schuster < schuster.wolfgang@googlemail.com> wrote:
Am 10.06.2012 um 16:25 schrieb Alfredo Catalina:
How can I setup a font -name, size, etc- inside a startuseMPgraphic environment?
\startuseMPgraphic{map}
\stopuseMPgraphic
- http://wiki.contextgarden.net/Command/defineMPinstance - http://wiki.contextgarden.net/Command/setupMPinstance
Wolfgang
___________________________________________________________________________________ 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-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
Am 10.06.2012 um 18:40 schrieb Alfredo Catalina:
I'm sorry but I don't know how to use them. I've tried
\setupMPinstance [metafun] [textcolor=red]
and got an "undefined control sequence" error.
I've also tried
\startMPenvironment [global] \usetypescript[palatino][ec] \switchtobodyfont[palatino,7pt] \stopMPenvironment
and it changed the font size but the font type is not "palatino".
1. Do you use MkII or MkIV? 2. Do you want Palatino only for the metapost labels or also for the main font in the document? Wolfgang
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
Am 10.06.2012 um 18:56 schrieb Alfredo Catalina:
1. Do you use MkII or MkIV?
2. Do you want Palatino only for the metapost labels or also for the main font in the document?
I am using MkIV. Whether it is possible I would like to use a different font for the metapost labels.
\setupbodyfont[pagella,11pt] %\setupMPinstance[metafun][textstyle=sans] \setupMPinstance[metafun][textstyle={\switchtobodyfont[termes,14pt]}] \starttext \input knuth \startMPcode draw textext("I’m different!") ; \stopMPcode \stoptext Wolfgang
![](https://secure.gravatar.com/avatar/48c5b7faef52e59adf59c5e8f764aaf7.jpg?s=120&d=mm&r=g)
\setupbodyfont[pagella,11pt]
%\setupMPinstance[metafun][textstyle=sans] \setupMPinstance[metafun][textstyle={\switchtobodyfont[termes,14pt]}]
\starttext
\input knuth
\startMPcode draw textext("I’m different!") ; \stopMPcode
\stoptext
It gives an error: ! Undefined control sequence. system > tex > error on line 1 in file GeneraMapa.tex: Undefined control sequence ... 1 >> \setupMPinstance[metafun][textstyle={\switchtobodyfont[termes,14pt]}] 2 3 \setuppagenumbering[location=] 4 \starttext 5 \input ./mapa.tex 6 \useMPgraphic{mapa} 7 \stoptext 8 l.1 \setupMPinstance [metafun][textstyle={\switchtobodyfont[termes,14pt]}] ?
![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
On Sun, 10 Jun 2012, Alfredo Catalina wrote:
\setupbodyfont[pagella,11pt]
%\setupMPinstance[metafun][textstyle=sans] \setupMPinstance[metafun][textstyle={\switchtobodyfont[termes,14pt]}]
\starttext
\input knuth
\startMPcode draw textext("I’m different!") ; \stopMPcode
\stoptext
It gives an error:
! Undefined control sequence. system > tex > error on line 1 in file GeneraMapa.tex: Undefined control sequence ... 1 >> \setupMPinstance[metafun][textstyle={\switchtobodyfont[termes,14pt]}] 2 3 \setuppagenumbering[location=] 4 \starttext 5 \input ./mapa.tex 6 \useMPgraphic{mapa} 7 \stoptext 8 l.1 \setupMPinstance [metafun][textstyle={\switchtobodyfont[termes,14pt]}] ?
You need to upgrade your ConTeXt installation. Aditya
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
Am 10.06.2012 um 20:07 schrieb Alfredo Catalina:
On Sun, Jun 10, 2012 at 7:14 PM, Aditya Mahajan
wrote You need to upgrade your ConTeXt installation.
I installed context two weeks ago. I've just run
mtxrun --selfupdate mtxrun --generate luatools --generate context --make and I've got the same error. Any ideas?
Do you use TeXLive or the ConTeXt Suite (installation from the context wiki)? Wolfgang
![](https://secure.gravatar.com/avatar/48c5b7faef52e59adf59c5e8f764aaf7.jpg?s=120&d=mm&r=g)
I've run first-setup.bat --modules=all and now it works. Thanks Wolfgang and Aditya!!
participants (4)
-
Aditya Mahajan
-
Alfredo Catalina
-
Meer, H. van der
-
Wolfgang Schuster