ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* active unicode characters
@ 2006-06-26 21:28 Peter Münster
  2006-06-26 22:20 ` Mojca Miklavec
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Münster @ 2006-06-26 21:28 UTC (permalink / raw)


[-- Attachment #1: Type: TEXT/PLAIN, Size: 439 bytes --]

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/

[-- Attachment #2: Type: APPLICATION/x-tex, Size: 141 bytes --]

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: active unicode characters
  2006-06-26 21:28 active unicode characters Peter Münster
@ 2006-06-26 22:20 ` Mojca Miklavec
  2006-06-28 20:04   ` Peter Münster
  0 siblings, 1 reply; 5+ messages in thread
From: Mojca Miklavec @ 2006-06-26 22:20 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: active unicode characters
  2006-06-26 22:20 ` Mojca Miklavec
@ 2006-06-28 20:04   ` Peter Münster
  2006-06-28 22:04     ` Mojca Miklavec
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Münster @ 2006-06-28 20:04 UTC (permalink / raw)


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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: active unicode characters
  2006-06-28 20:04   ` Peter Münster
@ 2006-06-28 22:04     ` Mojca Miklavec
  2006-06-29  8:09       ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Mojca Miklavec @ 2006-06-28 22:04 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: active unicode characters
  2006-06-28 22:04     ` Mojca Miklavec
@ 2006-06-29  8:09       ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2006-06-29  8:09 UTC (permalink / raw)


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
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-06-29  8:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-26 21:28 active unicode characters Peter Münster
2006-06-26 22:20 ` Mojca Miklavec
2006-06-28 20:04   ` Peter Münster
2006-06-28 22:04     ` Mojca Miklavec
2006-06-29  8:09       ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).