[XeTeX] Weird character swap when using xelatex+fontspec+listings
Ulrike Fischer
news3 at nililand.de
Tue Jun 1 22:31:13 CEST 2010
Am Tue, 1 Jun 2010 12:51:30 -0400 schrieb Alan Munn:
> Wow, Ulrike, thanks. This is a really useful bit of code. I'm not
> sure I understand the difference between the commented out code and
> the initial \lst at CCPut line.
>
> If I comment out the \lst at CCPut line, and replace EURO with €, I get
> the same result, correct? Why is this so, and is there a reason to do
> it one way or the other?
Well as far as I can see there are two commands to add definitions:
\lst at CCPut <ProcessCommand>
<one or more char numbers> e.g. {"30}{"31}
\z@ %<- the stop command
which should be used if you want to add a simple char with
input=output.
and
\lst at CCPutMacro <ProcessCommand>
<one or more char numbers + commands>
% e.g. {"30}{thirty} {"31}{thirtyone}
\@empty\z@\@empty % <- stop command
which should be used if you want a more complicated output.
The process command can be \lst at ProcessDigit or \lst at ProcessLetter
or \lst at ProcessOther and will at my opinion decide how the char is
handled in keywords etc. See also the keys alsoletter, alsodigit in
the docu.
--
Ulrike Fischer
More information about the XeTeX
mailing list