ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Mojca Miklavec" <mojca.miklavec.lists@gmail.com>
Subject: Re: active unicode characters
Date: Tue, 27 Jun 2006 00:20:17 +0200	[thread overview]
Message-ID: <6faad9f00606261520s56b39f88g1eee618a16088194@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0606262322570.28815@gaston.pm>

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

  reply	other threads:[~2006-06-26 22:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-26 21:28 Peter Münster
2006-06-26 22:20 ` Mojca Miklavec [this message]
2006-06-28 20:04   ` Peter Münster
2006-06-28 22:04     ` Mojca Miklavec
2006-06-29  8:09       ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6faad9f00606261520s56b39f88g1eee618a16088194@mail.gmail.com \
    --to=mojca.miklavec.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).