From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/23917 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: ConTeXt, XML en-dash Date: Tue, 29 Nov 2005 10:15:32 +0100 Message-ID: <438C1C34.1070502@wxs.nl> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1133269211 8255 80.91.229.2 (29 Nov 2005 13:00:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 29 Nov 2005 13:00:11 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Nov 29 14:00:00 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1Eh1c1-0000zw-35 for gctc-ntg-context-518@m.gmane.org; Tue, 29 Nov 2005 10:17:22 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C277E127E0; Tue, 29 Nov 2005 10:17:20 +0100 (CET) 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 20794-01; Tue, 29 Nov 2005 10:17:20 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A8D8C127CE; Tue, 29 Nov 2005 10:15:35 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 38BC1127CE for ; Tue, 29 Nov 2005 10:15:34 +0100 (CET) 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 20409-05-2 for ; Tue, 29 Nov 2005 10:15:33 +0100 (CET) Original-Received: from controller-1 (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by ronja.ntg.nl (Postfix) with ESMTP id 8525012772 for ; Tue, 29 Nov 2005 10:15:33 +0100 (CET) Original-Received: from [10.100.1.102] (unverified [10.100.1.102]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 5501 for multiple; Tue, 29 Nov 2005 10:20:30 +0300 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: graumann@its.caltech.edu, mailing list for ConTeXt users In-Reply-To: X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: 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: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:23917 Archived-At: Johannes Graumann wrote: >Hello, > >I just started to experiment with typesetting XML using ConTeXt ... >I ran into this problem which I'm unable to solve: >1) I added the following rule to my xml map file: > \defineXMLentity [en] -- >2) yet calling &en; in my document results in the TeX equivalent of "-" >rather than "--" being typeset. > >Any pointers? > > add this to type-exa.tex (or to your doc file) \starttypescript [serif,sans,mono] [handling] [noligs] \setupfontsynonym [\typescriptprefix\typescriptone ] [handling=\typescriptthree] \setupfontsynonym [\typescriptprefix\typescriptone Bold] [handling=\typescriptthree] \setupfontsynonym [\typescriptprefix\typescriptone Slanted] [handling=\typescriptthree] \setupfontsynonym [\typescriptprefix\typescriptone Italic] [handling=\typescriptthree] \setupfontsynonym [\typescriptprefix\typescriptone BoldSlanted] [handling=\typescriptthree] \setupfontsynonym [\typescriptprefix\typescriptone BoldItalic] [handling=\typescriptthree] \stoptypescript explanation for David Arnold (who is eager to know the obscure typescript features -): the macro \typescriptprefix{serif} will expand to Serif, because in type-def we have the definition: \definetypescriptprefix [serif] [Serif] \definetypescriptprefix [sans] [Sans] \definetypescriptprefix [mono] [Mono] so, instead of defining 3 times n_of_encodings we can stick to one typescriptdefinition which is much more efficient. ok, after this is done, you need to define a typeface using this handling; because of the nature of the underlying tex font mechanism (global optimizations in tex itself) we need to do it this way: \usetypescript[serif][handling][noligs] \definetypeface[mine][rm][serif][latin-modern][default][encoding=texnansi] \definetypeface[mine][rm][serif][latin-modern][default][encoding=texnansi] \setupbodyfont[mine,10pt] \starttext asjemenou-het--lijkt---te----werken \stoptext The noligs handling is selective (only ? ! - -- --- are taken care of, so you keep the fi ligatures) Hans