From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/95670 Path: news.gmane.org!.POSTED!not-for-mail From: Mohammad Hossein Bateni Newsgroups: gmane.comp.tex.context Subject: Re: \typescriptthree within the optional argument of \definefontsynonym Date: Thu, 4 Aug 2016 10:00:48 -0400 Message-ID: References: <57A3468F.4010609@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6541398269222493920==" X-Trace: blaine.gmane.org 1470319284 1040 195.159.176.226 (4 Aug 2016 14:01:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 4 Aug 2016 14:01:24 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Aug 04 16:01:19 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bVJD1-0007Vn-3W for gctc-ntg-context-518@m.gmane.org; Thu, 04 Aug 2016 16:01:15 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 9030C139F5; Thu, 4 Aug 2016 16:01:05 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eu1cU0oSkK4G; Thu, 4 Aug 2016 16:01:04 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id C6EC313A7A; Thu, 4 Aug 2016 16:01:04 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 029BF139F5 for ; Thu, 4 Aug 2016 16:01:04 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UajDuRkUMezh for ; Thu, 4 Aug 2016 16:01:01 +0200 (CEST) Original-Received: from mail-oi0-f52.google.com (mail-oi0-f52.google.com [209.85.218.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id DECC9139EE for ; Thu, 4 Aug 2016 16:00:50 +0200 (CEST) Original-Received: by mail-oi0-f52.google.com with SMTP id k131so15023805oib.1 for ; Thu, 04 Aug 2016 07:00:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=ttYnALDloa24DJ2gI+yREu98uU6KyWGSWL7kCgn7agU=; b=VDOSPjrRy7YV0rL27FsP+XrlsywxP8C6ZkGMS2+79DCHef2vMNE3MTdHJZ8TPz0Qt8 Zoux7Scymiuk1nxYQTlPUFsTAc6frpze+JU4kT3coE4Q1uF3TVcHOJ0PQ4w/6ulM18wL A7Z4ksu3KUNT5mXHWGG5J1Y9SVRKSj1a2kN0dkVdoZNzMoXWJIXvohe8oGeh7hQug7FB NIidHSTOR77I/Tw9aPZde54k4vqYYa8ua2FuBvh/oIGDXewr4oCCZbSjUTnJXsn1ioJA WFfUy5ECaMCByY0UVeEsS5QclVG1XKisswZ2Ge0TlzrcYcHoj8KDWil6rR4fr3T1VdgI Bf4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=ttYnALDloa24DJ2gI+yREu98uU6KyWGSWL7kCgn7agU=; b=Yn37vHX4Idma/xTXUbI7GkaibVyAapUje++6u1xnqGmvxsr2/JS/NOo0E/6scui/DK pt+izIeiqfzBBKOBkvbdRPgJDvzgDso9lUgt1eFqz3BdejsIlOU9i4tLYiUvxgKpATjI Oc1IJKUigGi06zsJjjnYwUAvVSAdVyh8pbo+uK+Z19qKQfuXmzTbz72tRihsm0ZBtF1F OPn6qQuXDO6R6maMCG6RkJJRJnazSe+JmeoBtKqDPckNifftRs3r5DH8kouwwCnU9zTy CAWO3cpn5mBFz1vdoO8DDyP5Z5B7SLTzhvS8DFQJE1FWMThsk6qMpXGVJU4jcM4C1alD R5mw== X-Gm-Message-State: AEkoous9hcuv2XqnyXUbW0uj8ucdzE3VdxwSLfc+My6mjTwyT211f4OydCFT00b+yNXjPqFDtp5/Rb1KFAYrMg== X-Received: by 10.202.169.79 with SMTP id s76mr36809659oie.45.1470319249183; Thu, 04 Aug 2016 07:00:49 -0700 (PDT) Original-Received: by 10.157.45.77 with HTTP; Thu, 4 Aug 2016 07:00:48 -0700 (PDT) In-Reply-To: <57A3468F.4010609@gmail.com> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:95670 Archived-At: --===============6541398269222493920== Content-Type: multipart/alternative; boundary=001a113cc0448dd8d305393f60c1 --001a113cc0448dd8d305393f60c1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable awesome! that's perfect, Wolfgang! =E2=80=94MHB On Thu, Aug 4, 2016 at 9:43 AM, Wolfgang Schuster < schuster.wolfgang@gmail.com> wrote: > Mohammad Hossein Bateni > 4. August 2016 um 15:24 > Hello Hans, > > Suppose you have a typescript as follows. > > \starttypescript [first] [MyFont] [GoodieOne,GoodieTwo] > \definefontsynonym [Serif] [\typescripttwo] [goodies=3D\typescriptthree= ] > \stoptypescript > > Using macros \typescriptX (for X=3Done, two, and three) works in the firs= t > and second arguments in \definefontsynonym but not in the optional > argument. This seems to be because the optional argument is not expanded= . > Is this a bug or a feature? > > What I want to do was have a set of "fixes" (correcting kern issues, etc.= ) > for a collection of fonts. I can either put these in separate goodie fil= es > or feature sets (the latter being what I was trying but not in the sample > above), and write generic typescripts that would load any of the fonts wi= th > its associated fixes. > > While I can use sans/serif/mono in the first argument, and name of the > font in the second argument (to be mapped appropriately using > \typescriptprefix to nmemonic name and real font name), the third > (optional) argument of \definefontsynonym does not expand immediately, > hence I'll end up with "undefined" \typescriptthree when it will be used. > > You can try to expand the value of \typescripthree with > > \starttypescript[...][...][...] > \expanded{\definefontsynonym[...][...][goodies=3D\typescriptthree]} > \expanded{\definefontsynonym[...][...][goodies=3D\typescriptthree]} > \stoptypescript > > or > > \starttypescript[...][...][...] > \startexpanded > \definefontsynonym[...][...][goodies=3D\typescriptthree] > \definefontsynonym[...][...][goodies=3D\typescriptthree] > \stopexpanded > \stoptypescript > > 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 : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ____________________________________________________________ > _______________________ > --001a113cc0448dd8d305393f60c1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
awesome! =C2=A0that's perfect, Wolfgang!
=E2=80=94= MHB

On= Thu, Aug 4, 2016 at 9:43 AM, Wolfgang Schuster <schuster.wolfga= ng@gmail.com> wrote:
= 4.=20 August 2016 um 15:24
Hello Hans,

Suppose you have a typescript as follows.

\starttypescrip= t [first] [MyFont] [GoodieOne,GoodieTwo]
=C2=A0 \definefontsynonym= =20 [Serif] [\typescripttwo] [goodies=3D\typescriptthree]
\stoptypesc= ript

Using macros \typescriptX (for X=3Done, two, and three) works in the first and= =20 second arguments in \definefontsynonym but not in the optional=20 argument.=C2=A0 This seems to be because the optional argument is not=20 expanded.=C2=A0 Is this a bug or a feature?

What I= =20 want to do was have a set of "fixes" (correcting kern issues, etc= .) for a collection of fonts.=C2=A0 I can either put these in separate goodie files= =20 or feature sets (the latter being what I was trying but not in the=20 sample above), and write generic typescripts that would load any of the=20 fonts with its associated fixes.

While I can=20 use sans/serif/mono in the first argument, and name of the font in the=20 second argument (to be mapped appropriately using \typescriptprefix to=20 nmemonic name and real font name), the third (optional) argument of=20 \definefontsynonym does not expand immediately, hence I'll end up with= =20 "undefined" \typescriptthree when it will be used.
You can try to expand the value of \typescripthree with

\starttypescript[...][...][...]
=C2=A0=C2=A0=C2=A0 \expanded{\definefontsynonym[...][...][goodies=3D\<= wbr>typescriptthree]}
=C2=A0=C2=A0=C2=A0 \expanded{\definefontsynonym[...][...][goodies=3D\<= wbr>typescriptthree]}
\stoptypescript

or

\starttypescript[...][...][...]
=C2=A0=C2=A0=C2=A0 \startexpanded
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 \definefontsynonym[...][...][goo= dies=3D\typescriptthree]
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 \definefontsynonym[...][...][goo= dies=3D\typescriptthree]
=C2=A0=C2=A0=C2=A0 \stopexpanded
\stoptypescript

Wolfgang

_____________________________________________________________= ______________________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" rel=3D"noreferrer= " target=3D"_blank">http://www.ntg.nl/mailman/listinfo/ntg-context=
webpage=C2=A0 : http://www.pragma-ade.nl / http://tex.aanhet.net
archive=C2=A0 : http://foundry.supelec.fr/project= s/contextrev/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
_________________________________________________________________= __________________

--001a113cc0448dd8d305393f60c1-- --===============6541398269222493920== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============6541398269222493920==--