active unicode characters
Hello, I believe, that I've already read something about this in this list, but I can't find it anymore: how to activate a unicode character? With iso-latin I could do "\defineactivecharacter X {special meaning}" but with utf-encoding, this does not work. And I would like to switch to utf... In the attachment I send a special example to show what I want. Thanks in advance for any hint! Cheers, Peter -- http://pmrb.free.fr/contact/
On 6/26/06, Peter Münster wrote:
Hello, I believe, that I've already read something about this in this list, but I can't find it anymore: how to activate a unicode character?
With iso-latin I could do "\defineactivecharacter X {special meaning}" but with utf-encoding, this does not work. And I would like to switch to utf...
In the attachment I send a special example to show what I want.
You can do that with XeTeX (see some comments on http://wiki.contextgarden.net/Encodings_and_Regimes_in_XeTeX; it might be that some macros should be extended to support the same command in ConTeXt to work properly - I didn't test it yet). But I'm afraid that if you want to keep using pdfTeX you have to modify the whole "switch-case" construct (redefine the whole unicode range, ie. approximately 100 characters) since Unicode characters are already active (that was the only way to make them work). I'm afraid that they cannot be modified in the core itself since we (Slovenia), the Germans, ... use them in another direction, so that wouldn't be fair to the others. Well, if you really need that dirty trick, you might redefine \rightguillemot to be something like {\,\myrightguillemot} but then you also need additional definitions for font encodings. Use the example below at your own risk!!! \enableregime[utf] % forgetting the encoding in which encoding this message comes \starttext «hello» \def\leftguillemot{\myleftguillemot\,} \def\rightguillemot{\,\myrightguillemot} \startencoding[ec][ec] \definecharacter myleftguillemot 19 \definecharacter myrightguillemot 20 \stopencoding \usetypescript[modern][ec] \setupbodyfont[modern] «hello» \stoptext But I would use \quotation{} in your case unless you really have some very good reason why you want to keep the literal characters. I use the \quotation because: - I never know where to find the proper characters for our quotes - I never know what the TeX command for getting the proper quotes is - I can change the style of quotes at any time later (we can use both guillemots or double quotes) - there is some special care taken about spacing, kernig, hyphenation, ... Mojca
On Tue, 27 Jun 2006, Mojca Miklavec wrote:
With iso-latin I could do "\defineactivecharacter X {special meaning}" but with utf-encoding, this does not work. And I would like to switch to utf...
You can do that with XeTeX (see some comments on http://wiki.contextgarden.net/Encodings_and_Regimes_in_XeTeX; it might be that some macros should be extended to support the same command in ConTeXt to work properly - I didn't test it yet).
Yes, perhaps XeTeX is an alternative for pdfTeX. Does it support all the pdf-interaction features, hz and hanging of pdfTeX? The page http://wiki.contextgarden.net/XeTeX#Issues is from 2004, so perhaps the issues are gone away in the meantime?
But I would use \quotation{} in your case unless you really have some very good reason why you want to keep the literal characters. I use the \quotation because:
I agree, that \quotation{} has some advantages. I use the «» characters, because I'm for 99,99% sure, that I won't change it later on, and because I want my input (the TeX-file) as readable as possible. «» is just easier to type and to read than \quotation{}, and in French it's the standard to go for quotations. I also use m² instead of $^2$, ± instead of $\pm$ etc... Cheers, Peter -- http://pmrb.free.fr/contact/
On 6/28/06, Peter Münster wrote:
On Tue, 27 Jun 2006, Mojca Miklavec wrote:
With iso-latin I could do "\defineactivecharacter X {special meaning}" but with utf-encoding, this does not work. And I would like to switch to utf...
You can do that with XeTeX (see some comments on http://wiki.contextgarden.net/Encodings_and_Regimes_in_XeTeX; it might be that some macros should be extended to support the same command in ConTeXt to work properly - I didn't test it yet).
Yes, perhaps XeTeX is an alternative for pdfTeX. Does it support all the pdf-interaction features
Partly
hz and hanging of pdfTeX
As far as I know not (yet).
The page http://wiki.contextgarden.net/XeTeX#Issues is from 2004, so perhaps the issues are gone away in the meantime?
I didn't dare to touch them without someone approving the change since I'm not sure what exactly each one means: Font metrics - I guess it was fixed recently Grid typesetting - never tried Paper size - I guess it was fixed recently Object reuse - I have problems including figures at all anyway (but I'm talking about Linux & Windows ports) Bookmarks - problems still there PDF Literals - most probably still a problem Occasionally Explodes - it's written that it was fixed, so it may be removed I guess Hoefler Italic is too fancy - no idea how to test Mojca
Mojca Miklavec wrote:
On 6/28/06, Peter M�nster wrote:
On Tue, 27 Jun 2006, Mojca Miklavec wrote:
With iso-latin I could do "\defineactivecharacter X {special meaning}" but with utf-encoding, this does not work. And I would like to switch to utf...
You can do that with XeTeX (see some comments on http://wiki.contextgarden.net/Encodings_and_Regimes_in_XeTeX; it might be that some macros should be extended to support the same command in ConTeXt to work properly - I didn't test it yet).
Yes, perhaps XeTeX is an alternative for pdfTeX. Does it support all the pdf-interaction features
Partly
since dvipdfmx supports them, most features are supported (not the position related ones since dvipos is not yet adapted to the extended dvi format) 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 -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Mojca Miklavec
-
Peter Münster