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: [EMAIL PROTECTED]
home page: scaprea.hobby.nl

_______________________________________________
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to