From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/69044 Path: news.gmane.org!not-for-mail From: Philipp Gesang Newsgroups: gmane.comp.tex.context Subject: [metafun] MPenvironment / font switching Date: Thu, 9 Jun 2011 23:20:57 +0200 Message-ID: <20110609212057.GA3842@orcus> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1007768204==" X-Trace: dough.gmane.org 1307654479 21069 80.91.229.12 (9 Jun 2011 21:21:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Jun 2011 21:21:19 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu Jun 09 23:21:11 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QUmf8-0006dx-4g for gctc-ntg-context-518@m.gmane.org; Thu, 09 Jun 2011 23:21:10 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4D473CADA4; Thu, 9 Jun 2011 23:21:09 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id t9XAfocJEWLE; Thu, 9 Jun 2011 23:21:06 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 74BD9CAD97; Thu, 9 Jun 2011 23:21:06 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3C7F2CAD97 for ; Thu, 9 Jun 2011 23:21:05 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id XpW11p69sDan for ; Thu, 9 Jun 2011 23:21:03 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id 4E78FCAD8B for ; Thu, 9 Jun 2011 23:21:03 +0200 (CEST) Original-Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p59LL2Sd014110 for ; Thu, 9 Jun 2011 23:21:02 +0200 Original-Received: from ix.urz.uni-heidelberg.de (cyrus-portal.urz.uni-heidelberg.de [129.206.100.176]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p59LL15r009306 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 9 Jun 2011 23:21:01 +0200 Original-Received: from extmail.urz.uni-heidelberg.de (extmail.urz.uni-heidelberg.de [129.206.100.140]) by ix.urz.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p59LL1Ia003684 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 9 Jun 2011 23:21:01 +0200 Original-Received: from localhost (dslb-188-110-139-135.pools.arcor-ip.net [188.110.139.135]) (authenticated bits=0) by extmail.urz.uni-heidelberg.de (8.13.4/8.13.1) with ESMTP id p59LKwCd005573 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Thu, 9 Jun 2011 23:20:59 +0200 X-Operating-System: Linux orcus 2.6.38-ARCH User-Agent: Mutt/1.5.21 (2010-09-15) X-Bayes-Prob: 0.4121 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=129.206.210.211; country=DE; region=01; city=Heidelberg; latitude=49.4167; longitude=8.7000; http://maps.google.com/maps?q=49.4167,8.7000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0xERVl2rK - 652a5ce754c1 - 20110609 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:69044 Archived-At: --===============1007768204== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi all, I=E2=80=99m struggling with the font used in metapost. The only way to actually change it appears to be enclosing the mp graphic in two statements of \setupbodyfont[=E2=80=A6] -- which I need to avoid. In the following example, the background text should be typeset (drawn) as lm sans, whereas the main font should be left untouched (serif). =C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2= =B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7= =C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2= =B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7= =C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2= =B7=C2=B7=C2=B7 \startMPenvironment %[global] \switchtobodyfont[sans] %\setupbodyfont[sans] \stopMPenvironment %\start\setupbodyfont[sans] \startuseMPgraphic{bg} verbatimtex \setupbodyfont[sans] etex ; draw btex I wanna get rid of those serifs! etex xysized (21cm, 5cm) withcolor blue ; \stopuseMPgraphic \definelayer[bg][x=3D0,y=3D0,width=3D\paperwidth,height=3D\paperheight] \setlayer[bg]{% %\setupbodyfont[sans] \useMPgraphic{bg} } \setupbackgrounds[paper][background=3Dbg] \setupbackgrounds[state=3Drepeat] %\stop \starttext \dorecurse{42}{I=E2=80=99d really like to keep my serifs! } \stoptext =C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2= =B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7= =C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2= =B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7= =C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2= =B7=C2=B7=C2=B7 Wrapping the mp code inside a group is fatal. \[start|stop]MPenvironment doesn=E2=80=99t seem to have an effect at all unless called with the =E2=80=9Cglobal=E2=80=9D flag -- in which case it wi= ll change the main body font as well. Also, inside mp=E2=80=99s =E2=80=9C[verbatim|b]tex ... etex=E2=80=9D font switches refuse to work. I=E2=80=99m really puzzled here, any hints? Thanks in advance Philipp --x+6KMIRAuhnl3hBn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk3xOTkACgkQ02lYlJYWs9KOyQCggK6hx3MKnTaLg3SYt8028ZcN KUkAn0TX1glnLdPLn8yS7auWdbvXI21V =bhfz -----END PGP SIGNATURE----- --x+6KMIRAuhnl3hBn-- --===============1007768204== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1007768204==--