From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/17946 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: finishing a module Date: Mon, 24 Jan 2005 19:03:12 +0100 Message-ID: <41F53860.2030400@wxs.nl> References: <05DB4B12-6CB6-11D9-92C7-000A95B9ADE2@uni-bonn.de> <41F41618.90701@wxs.nl> <32D27C67-6E11-11D9-A125-000A95B9ADE2@uni-bonn.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1106591458 17159 80.91.229.6 (24 Jan 2005 18:30:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 24 Jan 2005 18:30:58 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 24 19:30:39 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Ct8z1-0005Yc-00 for ; Mon, 24 Jan 2005 19:30:39 +0100 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6182912771; Mon, 24 Jan 2005 19:30:39 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 01666-03; Mon, 24 Jan 2005 19:30:38 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3909712777; Mon, 24 Jan 2005 19:03:12 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 278E712777 for ; Mon, 24 Jan 2005 19:03:10 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 01194-09 for ; Mon, 24 Jan 2005 19:03:08 +0100 (CET) Original-Received: from mailrelay02.solcon.nl (unknown [212.45.32.200]) by ronja.ntg.nl (Postfix) with ESMTP id D94921276D for ; Mon, 24 Jan 2005 19:03:08 +0100 (CET) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay02.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id j0OI34QI017748 for ; Mon, 24 Jan 2005 19:03:04 +0100 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id 2FECB17B1F; Mon, 24 Jan 2005 18:55:58 +0100 (CET) Original-Received: from [10.100.1.191] (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id A07115722 for ; Mon, 24 Jan 2005 17:55:56 +0000 (UTC) User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <32D27C67-6E11-11D9-A125-000A95B9ADE2@uni-bonn.de> X-Virus-Scanned: ClamAV 0.80/540/Tue Oct 19 14:59:23 2004 clamav-milter version 0.80j on mailrelay02 X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:17946 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:17946 Thomas A.Schmitz wrote: > If anybody can spare five minutes, I append what I have got so far; > maybe I'm overlooking something obvious. Sorry for the lengthy post and > for taking your time! hm, this is a ll i can do in five minutes: - just use the fontname remapper instead of processaction and intermediate vars - use getvariables instead of interface specific getparameters - end the par inside the start/stopgreek - no low level hacking needed \starttext \setvariables[Greek][scale=1,font=Kadmos] \definefontsynonym[Oxonia] [greeoxon] \definefontsynonym[Ibycus] [fibr] \definefontsynonym[Bosporos][bosporos] \definefontsynonym[Gentium] [gentiumgr] \definefontsynonym[Kadmos] [kadmo] \definefontsynonym[Leipzig] [grbl] \definefontsynonym[Teubner] [teubnerc] % \definefont[Gf][\getvariable{Greek}{font} sa \getvariable{Greek}{scale}] \definebodyfont [4pt,5pt,6pt,7pt,8pt,9pt,10pt,10.5pt,11pt,12pt, 14pt,14.4pt,16pt,18pt,20pt,22pt] [rm] [Gf=\getvariable{Greek}{font} sa \getvariable{Greek}{scale}] \def\enablegreek {\language[greek]% \catcode`~=\other \catcode`|=\other \catcode`'=\other} \def\startgreek{\par\begingroup\Gf\enablegreek} \def\stopgreek {\par\endgroup} \def\localgreek{\groupedcommand{\Gf\enablegreek}\donothing} \define\sampi {{\Gf \char 34}} \define\digamma{{\Gf \char 35}} \define\stigma {{\Gf \char 36}} \define\koppa {{\Gf \char 37}} \define\lunars {{\Gf \char 1}} \define\lunarS {{\Gf \char 13}} \define\brcl {{\Gf \char 8}} \define\brcr {{\Gf \char 9}} \define\hbrl {{\Gf \char123}} \define\hbrr {{\Gf \char125}} \define\crux {{\Gf \char 43}} I have no greek, so: \definefontsynonym[kadmo][cmvtt10] \crux \stoptext > Thanks everybody! > > Thomas > > %module t-greek providing method for Greek input in ConTeXt > > \unprotect > > \def\setupgreek#1[#2]{% > \getparameters[GG][Scale=,Font=,#2]%Font,Scale > \xdef\MyScale{\GGScale}% > \processaction[\GGFont] > [ Oxonia=>\gdef\MyFont{greeoxon },%this switches from the "logical" > name of the font to the actual tfm > Ibycus=>\gdef\MyFont{fibr }, > Bosporos=>\gdef\MyFont{Bosporos }, > Gentium=>\gdef\MyFont{gentiumgr }, > Kadmos=>\gdef\MyFont{kadmo }, > Leipzig=>\gdef\MyFont{grbl }, > Teubner=>\gdef\MyFont{Teubnerc }]% > } > > \protect > > %\definefont[Gf][kadmo ] %When given the name of the tfm in clear, this > works > > %\definefont[Gf][\MyFont]%This does not work, and I have no clue why > > \definebodyfont[4pt,5pt,6pt,7pt,8pt,9pt,10pt,10.5pt,11pt,12pt,14pt,14.4p > t,16pt,18pt,20pt,22pt][rm][Gf=\MyFont sa \MyScale] %This DOES work, and > I can't see what's the fundamental difference to the preceding line. > > \def\enablegreek{\language[greek]\catcode`~=\other\catcode`|=\other\catc > ode`'=\other}%this was provided by Giuseppe > > \def\startgreek{\par\begingroup\Gf\enablegreek} > > \let\stopgreek\endgroup > > \def\localgreek{\groupedcommand{\Gf\enablegreek}{}} > > \define\sampi{{\Gf \char34}}%and this by Taco > > \define\digamma{{\Gf \char35}} > > \define\stigma{{\Gf \char36}} > > \define\koppa{{\Gf \char37}} > > \define\lunars{{\Gf \char1}} > > \define\lunarS{{\Gf \char13}} > > \define\brcl{{\Gf \char8}} > > \define\brcr{{\Gf \char9}} > > \define\hbrl{{\Gf \char123}} > > \define\hbrr{{\Gf \char125}} > > \define\crux{{\Gf \char43}} > > On Jan 23, 2005, at 10:24 PM, h h extern wrote: > >> Thomas A.Schmitz wrote: >> >>> I spent some (too much) time today improving my Greek module. For >>> the time being, two questions remain; I'm confident that they're >>> not too difficult for the experts; any help would be appreciated. >> >> >> what exactly do you want to achieve, if it's only some font following >> the sizes and styyles ... >> >> \definefontsynonym [Funny] [cmr10] >> \definefontsynonym [FunnyBold] [cmbx10] >> \definefontsynonym [FunnyItalic] [cmti10] >> % \definefontsynonym [FunnySlanted] [...] >> % \definefontsynonym [FunnyBoldItalic] [...] >> % \definefontsynonym [FunnyBoldSlanted] [...] >> >> \def\MyFunnyFont{\symbolicfont{Funny}} >> >> test {\MyFunnyFont test} test >> test {\it \MyFunnyFont test} test >> test {\bf \MyFunnyFont test} test >> >> >> ----------------------------------------------------------------- >> Hans Hagen | PRAGMA ADE >> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >> tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com >> | www.pragma-pod.nl >> ----------------------------------------------------------------- >> >> _______________________________________________ >> ntg-context mailing list >> ntg-context@ntg.nl >> http://www.ntg.nl/mailman/listinfo/ntg-context >> > > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > > > -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------