![](https://secure.gravatar.com/avatar/ab73c799733cb79686500b0adbf33bb8.jpg?s=120&d=mm&r=g)
Hallo, I have a lot of problems with the following example: ------------------------------------------------ \usetypescriptfile[type-exa] \usetypescript[iwona][ec] \setupbodyfont[iwona,11pt] \startMPenvironment%[global] \usetypescript[iwona][ec] \setupbodyfont[iwona,8pt] \stopMPenvironment \startuseMPgraphic{Wochentage} save x,y ; z0 = (3cm,6cm) ; for i:=1 upto 6: z[i] = z[i-1] rotatedaround((3cm,3cm),720/7) ; endfor ; label.top(\sometxt{Samstag}, z0) ; label.lft(\sometxt{Donnerstag}, z1) ; label.lrt(\sometxt{Dienstag}, z2) ; label.urt(\sometxt{Sonntag}, z3) ; label.ulft(\sometxt{Freitag}, z4) ; label.llft(\sometxt{Mittwoch}, z5) ; label.rt(\sometxt{Montag}, z6) ; \stopuseMPgraphic \startuseMPgraphic{Tierkreis} save x,y ; z0 = (4cm,8cm) rotatedaround((4cm,4cm),15) ; for i:=1 upto 11: z[i] = z[i-1] rotatedaround((4cm,4cm),30) ; endfor ; label.ulft(\sometxt{Zwillinge}, z0) ; label.ulft(\sometxt{Stier}, z1) ; label.lft(\sometxt{Widder}, z2) ; label.lft(\sometxt{Fische}, z3) ; label.llft(\sometxt{Wassermann}, z4) ; label.llft(\sometxt{Steinbock}, z5) ; label.lrt(\sometxt{Schütze}, z6) ; label.lrt(\sometxt{Skorpion}, z7) ; label.rt(\sometxt{Waage}, z8) ; label.rt(\sometxt{Jungfrau}, z9) ; label.urt(\sometxt{Löwe}, z[10]) ; label.urt(\sometxt{Krebs}, z[11]) ; \stopuseMPgraphic \starttext \useMPgraphic{Wochentage} Bla \useMPgraphic{Tierkreis} \stoptext ------------------------------------------------ 1. The labels of the first graphic are xscaled (randomly) when the second graphic is included. Comment the second, and the first is ok. What I am doing wrong here? This seems to be ok with luatex. 2. The settings in \startMPenvironment do not use the smaller font size [8pt] without [global]. And the outside Text (Bla) remains not big [11pt] with [global]. How can I toggle the two sizes differently? 3. After editing the mp-code I allways have to purge files between two runs. Is this normal? Thanks for your help Wolfgang
![](https://secure.gravatar.com/avatar/6114858d84b0f40cf715f12237ab67a1.jpg?s=120&d=mm&r=g)
On Sun, Oct 5, 2008 at 8:03 PM, Wolfgang Werners-Lucchini wrote:
Hallo,
I have a lot of problems with the following example: ------------------------------------------------
\startuseMPgraphic{Wochentage} ... label.top(\sometxt{Samstag}, z0) ;
1. The labels of the first graphic are xscaled (randomly)
They are not scaled randomly :P They inherit the sizes from the second graphic. See http://archive.contextgarden.net/message/20061204.102337.280a6589.en.html
when the second graphic is included. Comment the second, and the first is ok. What I am doing wrong here?
You need \runMPgraphicstrue
This seems to be ok with luatex.
LuaTeX is a story on its own. It works differentrly anyway.
2. The settings in \startMPenvironment do not use the smaller font size [8pt] without [global]. And the outside Text (Bla) remains not big [11pt] with [global]. How can I toggle the two sizes differently?
These settings are used exclusevely for btex ... etex and textext. \sometxt uses the surounding font. There could be some settings for fonts in metapost graphics, but I'm not aware of any. However, it's rather easy to either: a) write your own metapost macro for placing labels that scales down everything by 20% label.top(myscaled(\sometxt{Samstag}), z0) ; where vardef myscaled(expr t) = (t scaled 0.8) enddef; b) write your own handle \definetextext[scaled]{\switchtobodyfont[8pt]\strut} and then label.top(\sometxt[scaled]{Samstag}, z0) ; c) write your own macro or put some font size switch in front of the graphic (I did not try it out) \long\def\startuseMPgraphicwithscaledtext#1\stopuseMPgraphicwithscaledtext {\bgroup\switchtobodyfont[8pt]\startuseMPgraphic#1\stopuseMPgraphic\egroup} Disclaimer: I did not try out any of the methods mentioned about, so it might be that they don't work and need some syntactic changes, but they should work in principle.
3. After editing the mp-code I allways have to purge files between two runs. Is this normal?
Probably not, but I somehow got used to run every document twice before getting the right graphic. It should be fixed, but Hans is probably focused on mkiv now. Mojca
participants (2)
-
Mojca Miklavec
-
Wolfgang Werners-Lucchini