[NTG-context] utf-based lang-* files?
Salvete, while I am aware that my Japanese is ages away from creating anything releasable, I thought about creating a lang-jap.tex file for my personal use (and maybe for having it corrected by someone actually speaking the language). Now, checking lang-chi.tex, I find it is encoded in a way I don't really want to copy. I'd much rather write the whole file in “proper” utf-8. Is it possible to simply enclose the file in a \startregime[utf]...\stopregime pair or do I risk havoc by doing this? (Should I start with this project, I'll have more questions, such as: How do I make a unicode character such as 。active, for good line breaks?) Christopher ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] utf-based lang-* files?
Adam Lindsay wrote: Is it possible to simply enclose the file in a \startregime[utf]...\stopregime pair or do I risk havoc by doing this? Well, if you're using a regime, it still (usually) depends on symbolic character names being defined under the hood. Also, such an approach Sure. But editing the file is oh so much easier when I can just type \def\japChapterNumber#1{第#1章} than if I have to look up the unicode numbers first and type \def\japChapterNumber{\uchar{123}{44}#1\uchar{122}{224}} (explicitly calling \startregime[utf]) doesn't make XeTeX as happy as it could be (XeTeX is happiest if you just pass through Unicode characters. That implies that ConTeXt should switch off all conversions when running in XeTeX and seeing \startregime[utf], right? (I certainly want to use the whole thing in XeTeX, if I ever do start it. I would prefer not to make the code depend on that. I could live with som \if... switches at the beginning and end, sure.) Christopher ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] utf-based lang-* files?
Christopher Creutzig wrote: Adam Lindsay wrote: Is it possible to simply enclose the file in a \startregime[utf]...\stopregime pair or do I risk havoc by doing this? Well, if you're using a regime, it still (usually) depends on symbolic character names being defined under the hood. Also, such an approach Sure. But editing the file is oh so much easier when I can just type \def\japChapterNumber#1{第#1章} than if I have to look up the unicode numbers first and type \def\japChapterNumber{\uchar{123}{44}#1\uchar{122}{224}} (explicitly calling \startregime[utf]) doesn't make XeTeX as happy as it could be (XeTeX is happiest if you just pass through Unicode characters. If xetex handles utf-8 by just looking at catcodes letter, you don't need a regime; you just have to make sure that when the file is loaded the chars 128-255 have the right catcode \dostepwiserecurse{128}{255}{1}{\catcode\recurselevel=11\relax} Hans - 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