From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/17935 Path: main.gmane.org!not-for-mail From: Thomas A.Schmitz Newsgroups: gmane.comp.tex.context Subject: Re: finishing a module Date: Mon, 24 Jan 2005 15:06:53 +0100 Message-ID: <32D27C67-6E11-11D9-A125-000A95B9ADE2@uni-bonn.de> References: <05DB4B12-6CB6-11D9-92C7-000A95B9ADE2@uni-bonn.de> <41F41618.90701@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1106575919 21720 80.91.229.6 (24 Jan 2005 14:11:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 24 Jan 2005 14:11:59 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 24 15:11:49 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 1Ct4wX-00040g-00 for ; Mon, 24 Jan 2005 15:11:49 +0100 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id F407012789; Mon, 24 Jan 2005 15:11:48 +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 05532-02; Mon, 24 Jan 2005 15:11:48 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 542F71278C; Mon, 24 Jan 2005 15:10:05 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 335AD1278C for ; Mon, 24 Jan 2005 15:10:03 +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 05457-02 for ; Mon, 24 Jan 2005 15:10:01 +0100 (CET) Original-Received: from mailout10.sul.t-online.com (unknown [194.25.134.21]) by ronja.ntg.nl (Postfix) with ESMTP id A323212789 for ; Mon, 24 Jan 2005 15:10:01 +0100 (CET) Original-Received: from fwd05.aul.t-online.de by mailout10.sul.t-online.com with smtp id 1Ct4un-0004sq-01; Mon, 24 Jan 2005 15:10:01 +0100 Original-Received: from [192.168.0.2] (ZXSHyQZbYe9wmS2RkpcKT42zZGs8uirTzDCMl3fM5WxrfOFEPUxW6S@[217.81.187.9]) by fmrl05.sul.t-online.com with esmtp id 1Ct4ue-1QkwjY0; Mon, 24 Jan 2005 15:09:52 +0100 In-Reply-To: <41F41618.90701@wxs.nl> Original-To: mailing list for ConTeXt users X-Mailer: Apple Mail (2.619) X-ID: ZXSHyQZbYe9wmS2RkpcKT42zZGs8uirTzDCMl3fM5WxrfOFEPUxW6S@t-dialin.net X-TOI-MSGID: 174e3e95-5796-49af-bcd0-80b2ee552a84 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:17935 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:17935 Thanks for your help and interest. OK, what I want to achieve is: setting up a collection of fonts for ancient (i.e. polytonic) Greek. These fonts need to be mixed into normal text, and there needs to be a simple way of switching to them. For the time being, I want to use the "babel"-encoding for writing Greek, so I need to make a couple of catcode changes (babel uses ~ and | for accents) [I guess if I can make this work, I will then try and see if I can cook something up that will actually take unicode characters and transform them into something palatable for TeX, taking Adam's work as a model). I also need to create commands to access a couple of special symbols like koppa, sampi and braces for critical editions. What I have: the fonts (there's 7 of them) in TeX-readable format (tfm + pfb) With the help of Giuseppe and several others, I have cooked up a macro that will switch to those fonts and do the catcode changes etc. Thus far, they had to be invoked with an \input for every single font. Problems: Depending on the Latin font used for the main document, the Greek font needs to be scaled or it will look ugly (too small, too big in comparison). Hence my attempt to use Context's "sa" construct. I want to simplify things by writing a single module that will give access to all the fonts by providing a unified way of choosing one of them. My idea was having a module that would provide a new command \setupgreek that would take two arguments: Name of the font suitable for users, scaling factor. E. g. \setupgreek[Oxonia][1.08] This module would then provide two commands for writing Greek, \localgreek{...} and \startgreek ... \stopgreek + commands for accessing the symbols. Problems so far: my module defines the Greek font as a body font. As far as I can see, this will only work for predefined sizes [4pt,5pt etc.]. When a user sepcifies an unusual font size for his main document or when TeX calculates a weird size (e.g. in footnotes, Alan Bowens's problem last week), the font isn't defined anymore, and the macro for writing Greek doesn't work. \definefont doesn't appear to have this problem, but it works only if I give the name of the font "manually," I couldn't make it accept an internal macro (Taco was very helpful yesterday, but I couldn't make it work). 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! 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 >