From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/15236 Path: main.gmane.org!not-for-mail From: Idris Samawi Hamid Newsgroups: gmane.comp.tex.context Subject: Re: Re[2]: \=i Date: Thu, 27 May 2004 13:11:41 -0600 Organization: Colorado State University Sender: ntg-context-admin@ntg.nl Message-ID: References: <6.0.1.1.2.20040521122805.02ba09d8@server-1> <1847436607.20040527123110@iol.it> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1085685285 14583 80.91.224.253 (27 May 2004 19:14:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 27 May 2004 19:14:45 +0000 (UTC) Cc: "B_Jackowski@gust.org.pl" Original-X-From: ntg-context-admin@ntg.nl Thu May 27 21:14:30 2004 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BTQKk-0000Tk-00 for ; Thu, 27 May 2004 21:14:30 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 71E4E10B6A; Thu, 27 May 2004 21:09:42 +0200 (MEST) Original-Received: from eagle.acns.ColoState.EDU (eagle.acns.colostate.edu [129.82.100.90]) by ref.ntg.nl (Postfix) with ESMTP id 7CD6110B6A for ; Thu, 27 May 2004 21:07:09 +0200 (MEST) Original-Received: from lamar.colostate.edu (lamar.acns.colostate.edu [129.82.100.75]) by eagle.acns.ColoState.EDU (AIX5.1/8.11.6p2/8.11.0) with ESMTP id i4RJBmL656766; Thu, 27 May 2004 13:11:49 -0600 Original-Received: from IHAMID (ihamid.libarts.colostate.edu [129.82.187.166]) by lamar.colostate.edu (AIX5.1/8.11.6p2/8.11.0) with ESMTP id i4RJBge816102; Thu, 27 May 2004 13:11:42 -0600 Original-To: ntg-context@ntg.nl In-Reply-To: <1847436607.20040527123110@iol.it> User-Agent: Opera7.23/Win32 M2 build 3227 Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:15236 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:15236 On Thu, 27 May 2004 12:31:10 +0200, Giuseppe Bilotta wrote: > Wednesday, May 26, 2004 Idris Samawi Hamid wrote: > >> Could not interest anyone in the \=i problem, I guess. Anyway, could >> someone tell me how ConTeXt defines \=i (so as to always get plain >> \=\i)? > > Very funky stuff, accents in ConTeXt. You'd have to dig up in > enco-acc plus the other enco-* files. I actually found this last night, digging in the ConTeXt code. U're right: VERY funky stuff;-) But it's really nice, since, thnx 2 the way Hans has abstracted things, the solution for \=i has no effect on \=I or anything else:-) Anyway, I now have a working proper accent now for \tf and \it; =============imacron.tex================== \setupoutput[pdftex] \setupbodyfontenvironment[default][em=italic] \def\SHIFT#1{\dimen0=.00#1ex \multiply\dimen0 by\fontdimen1\font \kern-.0156\dimen0} % compensate for slant/italic in lower accents \def\USHIFT#1{\dimen0=.00#1ex \multiply\dimen0 by\fontdimen1\font \kern.0156\dimen0} % compensate for slant/italic in upper accents \def\IBAR% {\leavevmode\vbox{\offinterlineskip\lineskip0.295ex% %\ialign{##\cr\USHIFT{120}\hbox to .27777em% %% for width of i-box %{\leaders\hrule height .067354ex\hfill}% %\SHIFT{1}\cr\i\cr}}} \ialign{##\cr\USHIFT{120}\hfill\hbox to .21243em% %% for width of i-glyph base {\leaders\hrule height .067354ex\hfill}% \hfill\SHIFT{1}\cr\i\cr}}} \starttext \definecharacter imacron % {\buildtextaccent\textmacron \dotlessi} % original def from enco-def.tex \=i \=I {\em b\=in\=ary} f\=i\high{\txx c}\=i % {\bi b\=in\=ary} % need conditionals for bold and small caps \blank[big] \definecharacter imacron {\IBAR} % new imacron \=i \=I {\em b\=in\=ary} f\=i\high{\txx c}\=i % {\bi b\=in\=ary} \stoptext ================================================================== A word on the parameters: I ran tftopl on cmr12.tfm, made a note of the QUAD and X-HEIGHT values, as well as the width of the i-box. I opened \cmr12.pfb in FontLab and made some measurements of the i-glyph and the macron bar; dividing a given width by the QUAD-value gives the rlative em values used above (similarly for the lineskip calculation, dividing heights by X-HEIGHT). The definition of \IBAR has two possibilities: macron is width of the i-box, or it's the width of the base of the i-glyph. Upon experimentation, I found the latter width more aesthetically pleasing, but I have kept the other as an option (commented). In fact, making the macron the width of the i-box may make better sense for \sc. PROBLEM: Now I need to learn more about \TeX conditionals, because this solution does not work for \bf, \bi, and the like. The height of the imacron bar needs to be greater for bold fonts. How can I make a set of three conditionals such that the definition of \IBAR has a different expansion for \tf, \it, \sl etc. \bf, \bi, \bs etc. \sc ??? That is, when \bf is on, the definition of \IBAR should expand a conditional that is based on the bold-dependent parameters. Anyway, for \tf and \it this looks soooo much better than the plain.tex imacron; Please try it out! And I'm open to suggestions on tweaking the parameters to make this look better. Best Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523