From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/12947 Path: main.gmane.org!not-for-mail From: Simon Pepping Newsgroups: gmane.comp.tex.context Subject: Re: How do I use entities in DocBook in ConTeXt Date: Thu, 21 Aug 2003 21:49:32 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <20030821194932.GA2825@scaprea> References: <5.2.0.9.1.20030819173135.03317de8@server-1> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1061495827 10789 80.91.224.253 (21 Aug 2003 19:57:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 21 Aug 2003 19:57:07 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Thu Aug 21 21:57:06 2003 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 19pvYQ-0007Fx-00 for ; Thu, 21 Aug 2003 21:57:06 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id BDEDE10B61; Thu, 21 Aug 2003 21:57:01 +0200 (MEST) Original-Received: from hgatenl.hobby.nl (ns.hobby.nl [212.72.224.8]) by ref.ntg.nl (Postfix) with ESMTP id E2E1110B2A for ; Thu, 21 Aug 2003 21:50:13 +0200 (MEST) Original-Received: from hgatenl.hobby.nl (localhost [127.0.0.1]) by hgatenl.hobby.nl (8.12.9/8.12.9) with ESMTP id h7LJoB0i019474 for ; Thu, 21 Aug 2003 21:50:11 +0200 (CEST) (envelope-from spepping@scaprea.hobby.nl) Original-Received: (from uucp@localhost) by hgatenl.hobby.nl (8.12.9/8.12.9/Submit) with UUCP id h7LJoBJL019473 for ntg-context@ntg.nl; Thu, 21 Aug 2003 21:50:11 +0200 (CEST) Original-Received: from simon by scaprea.salix.nl with local (Exim 3.35 #1 (Debian)) id 19pvR6-0000rJ-00; Thu, 21 Aug 2003 21:49:32 +0200 Original-To: ntg-context@ntg.nl Mail-Followup-To: ntg-context@ntg.nl Content-Disposition: inline In-Reply-To: <5.2.0.9.1.20030819173135.03317de8@server-1> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavisd-new 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:12947 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:12947 On Tue, Aug 19, 2003 at 05:31:47PM +0200, Hans Hagen wrote: > At 15:54 19/08/2003 +0800, you wrote: > >Although I use emacs as a text editor, I'm not confident in using > >utf-8 encodings. So if I can I'd prefer to use entities for the > >characters not defined in ASCII. > > > >How can I define entities such as "“" (for the left double > >quotation character) and "”" (for the right double quotation > >character) so as the context-processor can process them. > > see xtag-ent.tex Docbook comes with a lot of entities defined, see the subdirectory ent in the docbookx distribution. Unfortunately, DocbookInContext does not yet recognize those entities. I suppose I should make an effort to translate the entity files to Context. xtag-ent can only be used if it agrees with the entity definitions in the DTD. emacs 21 is really a good utf-8 editor. It has the TeX input method, meaning that many characters can be input by giving their TeX name, e.g. \sum. Loading utf-8 files is a bit clumsy, with the command `C-x RET c' (universal-coding-system-argument). If you put this at the end of the file, it is automatically read in utf-8 encoding next time: %% Local Variables: %% current-language-environment: UTF-8 %% coding: utf-8 %% default-input-method: TeX %% End: And this is a better way to read it in utf-8 encoding non-automatically (commands to be put in .emacs): ;; find a file (read-only) with utf-8 coding system (defun find-file-utf-8 (file) "Find file FILE with utf-8 coding system." (interactive "FFile name: ") (let ((coding-system-for-read 'utf-8)) (find-file file))) (defun find-file-read-only-utf-8 (file) "Find file FILE read-only with utf-8 coding system." (interactive "FFile name read-only: ") (let ((coding-system-for-read 'utf-8)) (find-file-read-only file))) ;; bind C-x C-f and C-x C-r to these functions (global-set-key [(control ?x)(control ?f)] 'find-file-utf-8) (global-set-key [(control ?x)(control ?r)] 'find-file-read-only-utf-8) Regards, Simon -- Simon Pepping email: spepping@scaprea.hobby.nl home page: scaprea.hobby.nl