# [XeTeX] Localized XeLaTeX / greek XeLaTeX

Axel Freyn axel-freyn at gmx.de
Sat Oct 16 13:52:40 CEST 2010

Hi Ulrike,
On Fri, Oct 15, 2010 at 05:30:03PM +0200, Ulrike Fischer wrote:
> Am Fri, 15 Oct 2010 15:51:02 +0300 schrieb Alexandros Gotsis:
> > When, however, length units are used
> > internally by the typesetting system, such as in "\vskip 1 cm",
> > then it would be much more elegant if the change of the keyboard
> > could be avoided. For this useage, a nice solution would be to
> > replace "cm" with e.g. "εκ" (small greek letter epsilon + small
> > greek letter kappa; which are the first letters for the greek
> > word "ekatosto" for centimeter).
>
> That's not possible without changing the engine, but like above you
> can define commands \newcommand\mycm{cm} and use \vskip 1\mycm
>
>
Well, I'm not really programming in xelatex -- but wouldn't it be
possible analogous to LaTeX be making ε an active character, which
verifies whether the next character is κ, an then is replaced by "cm" ?
OK, of course the disadvantage is that one has to be very careful
whether this destroys other occurences of ε.
I'm thinking of something in the lines of (Don't know whether this
compiles exactly like that in xelatex? Can I define ε directly to be an
active character?):

\makeatletter
\def\my at epsilon{\@ifnextchar κ{cm}{ε}}
\catcodeε=\active
\letε=\my at epsilon
\makeatother

Axel
`