[NTG-context] Some Metapost Problems
Wolfgang Werners-Lucchini
wwl at musensturm.de
Tue Oct 7 21:54:38 CEST 2008
Hallo Mojca,
> > 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
strange
> You need
> \runMPgraphicstrue
Yes, this helps!
But what are the sideeffects? When is the opposite needed?
> 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;
This works.
> b) write your own handle
> \definetextext[scaled]{\switchtobodyfont[8pt]\strut}
> and then
> label.top(\sometxt[scaled]{Samstag}, z0) ;
This works, too. Where is this documented?
> 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\stopuseMPgraphicwithscal
> edtext
> {\bgroup\switchtobodyfont[8pt]\startuseMPgraphic#1\stopuseMPgraphic\
> egroup}
This is not working.
Even an explizit
{\switchtobodyfont[8pt]
\startuseMPgraphic
<mp-code>
\stopuseMPgraphic
}
didn't work.
I will use one of the other solutions. Thank you very much!
Wolfgang
More information about the ntg-context
mailing list