From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/44632 Path: news.gmane.org!not-for-mail From: "Mojca Miklavec" Newsgroups: gmane.comp.tex.context Subject: Re: Some Metapost Problems Date: Tue, 7 Oct 2008 23:38:43 +0200 Message-ID: <6faad9f00810071438x1c8001d5j9be911bac9b665fa@mail.gmail.com> References: <48EBDA9E.23505.27A9140@wwl.musensturm.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1223415630 28273 80.91.229.12 (7 Oct 2008 21:40:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Oct 2008 21:40:30 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Tue Oct 07 23:41:26 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1KnKJ4-0005YP-Dv for gctc-ntg-context-518@m.gmane.org; Tue, 07 Oct 2008 23:41:26 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id ECD391FCC7; Tue, 7 Oct 2008 23:40:19 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 31258-03-5; Tue, 7 Oct 2008 23:39:22 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 810051FC77; Tue, 7 Oct 2008 23:39:22 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2EE941FC77 for ; Tue, 7 Oct 2008 23:39:21 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 31781-09-16 for ; Tue, 7 Oct 2008 23:38:45 +0200 (CEST) Original-Received: from yw-out-1718.google.com (yw-out-1718.google.com [74.125.46.155]) by ronja.ntg.nl (Postfix) with ESMTP id 1E4131FB60 for ; Tue, 7 Oct 2008 23:38:44 +0200 (CEST) Original-Received: by yw-out-1718.google.com with SMTP id 5so587785ywm.74 for ; Tue, 07 Oct 2008 14:38:43 -0700 (PDT) Original-Received: by 10.151.38.12 with SMTP id q12mr10500540ybj.198.1223415523151; Tue, 07 Oct 2008 14:38:43 -0700 (PDT) Original-Received: by 10.151.83.13 with HTTP; Tue, 7 Oct 2008 14:38:43 -0700 (PDT) In-Reply-To: <48EBDA9E.23505.27A9140@wwl.musensturm.de> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:44632 Archived-At: On Tue, Oct 7, 2008 at 9:54 PM, Wolfgang Werners-Lucchini wrote: > 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? I don't know. Ask Hans or Taco. It might have to do with write18 (perhaps when it's desabled, one of them doesn't work, but I don't really know). >> 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? The \sometxt myway (http://wiki.contextgarden.net/My_Way). >> 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 > > > > \stopuseMPgraphic > } > > didn't work. Try: \switchtobodyfont[50pt] \startMPcode draw \sometxt{abc}; \stopMPcode Maybe the labels are typeset when you \useMPgraphic, not when you define it (but better have the sizes kept in sync). Mojca ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________