From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/50250 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Font switching question Date: Mon, 11 May 2009 17:23:09 +0200 Message-ID: References: <68bfdc900905110508l6aba12f1of1aa8edb420a1e84@mail.gmail.com> <68bfdc900905110738i4aeca7bfw3f2b52ccb34a1a7@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1242055490 17231 80.91.229.12 (11 May 2009 15:24:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 May 2009 15:24:50 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon May 11 17:24:40 2009 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 1M3XMt-0006vf-22 for gctc-ntg-context-518@m.gmane.org; Mon, 11 May 2009 17:24:39 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7EBE11FECE; Mon, 11 May 2009 17:24:38 +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 25468-01-2; Mon, 11 May 2009 17:23:54 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 58F561FEAF; Mon, 11 May 2009 17:23:54 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B3D061FEAF for ; Mon, 11 May 2009 17:23:52 +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 25476-01-2 for ; Mon, 11 May 2009 17:23:44 +0200 (CEST) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by ronja.ntg.nl (Postfix) with ESMTP id 246571FEAB for ; Mon, 11 May 2009 17:23:44 +0200 (CEST) Original-Received: from mail-fx0-f176.google.com (mail-fx0-f176.google.com [209.85.220.176]) by filter4-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n4BFNhCJ019221 for ; Mon, 11 May 2009 17:23:43 +0200 Original-Received: by fxm24 with SMTP id 24so2969622fxm.2 for ; Mon, 11 May 2009 08:23:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=pboP1Nrn7ZmVMBE87Zxm7tbiIac4IZOvuaUG9aoh+Jg=; b=kukKyM0gUrntJDfRUzbEZTjlYWZ+21SdzgdX4inmR9NXaEYIRi2/Mc79H9Sc++3JJp IkaSKDoQ9vglULvV6M1ONfv1DZWZs70xmacbBoaSTG6ndhzEpPvGRVxHC1pSzfJIf2uY wFHlP82phHRYS4rIyYYo3XuoyelsNtBnkHeeQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=u4QlzC97KZdvAntJmNgM5TfV4bqWBulYEcLURfmRNP27PoBUJk8Z45ttRyXLq+nvLr DZSRflVHHtj/DQaMnzSoC/QlfOP+AxLB5nYeLjFbYs11KwrDk42xzyML38fH/u5pp4iq dT2PRiQw4FuSXy+3Rzo5GAkGr5mFn4/gSNypE= Original-Received: by 10.86.91.3 with SMTP id o3mr6609805fgb.40.1242055422960; Mon, 11 May 2009 08:23:42 -0700 (PDT) Original-Received: from ?10.40.139.231? ([82.113.121.152]) by mx.google.com with ESMTPS id 4sm6961591fgg.28.2009.05.11.08.23.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 11 May 2009 08:23:42 -0700 (PDT) In-Reply-To: <68bfdc900905110738i4aeca7bfw3f2b52ccb34a1a7@mail.gmail.com> X-Mailer: Apple Mail (2.930.3) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.220.176; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 223220887 - 2426438936df - 20090511 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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:50250 Archived-At: Am 11.05.2009 um 16:38 schrieb Yue Wang: > Hi Hans: > > let me give a better explanation. > > we define a typescript foobar. so we can call \foobar to load the > foobar typeface. > then we should define a macro like this: > \def\switchtofoobar{\savecurrentstyle\foobar\getcurrentstyle} > and call it like that: > > text 1 {\swichtofoobar text2} text 3 > when \savecurrentstyle is called, it define a macro named > \getcurrentstyle in order to save the style of text 1 (like \ss\it, > 10pt) into that. that's all we want. From font-ini.mkii (\push/\popcurrentfont): % \definetypeface[one][rm][serif][computer-roman][default] % \definetypeface[two][rm][serif][computer-roman][default][rscale=.9] % % {\one \bf test \two test} % {\one \bf test \pushcurrentfont \two \popcurrentfont test} there are more helper macros like \savefont and \restorefont 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________