[XeTeX] dealing with $ character

Steffen Prohaska prohaska at zib.de
Fri Jul 9 08:29:32 CEST 2004


On Jul 8, 2004, at 9:30 AM, Bruno Voisin wrote:

> Le 8 juil. 04, à 09:00, Jonathan Kew a écrit :
>> It's not quite the same issue as the accent commands; at least the  
>> legacy TeX fonts support the standard character code for dollar, so a  
>> definition such as \char"24 (or changing the \catcode so that $  
>> simply prints as itself) should access the right glyph in anything  
>> except special legacy symbol fonts. The trouble with the accent  
>> commands is that the CM fonts have accents at non-standard code  
>> positions and so the macro definitions are inherently font-specific.
> Well, it looks like what would be needed is a motivated individual  
> writing a .tex file redefining all such predefined plain TeX control  
> sequences (\$ \' etc.) in terms of the corresponding Unicode code  
> points, and similarly for LaTeX (chasing beforehand all such control  
> sequences inside the various LaTeX files where they reside, i.e. .ltx,  
> .enc, textcomp.sty files etc.). (I can't be this individual, sorry.)

Here's a file which I tried to get completely working for me. I also  
attached it in an archive to protect the unicode encoding. You might  
want to use the attached version. I basically tried to get ö and --  
working together with bibtex in the 'usual' (pdftex) way. But I'm  
stuck. I can't figure out how to deal with --. I followed the  
description of 'hanging punctation' from the TeXbook as pointet out  
suggested by Jonathan Kew recently.

I'm not sure if all this will work for me. The basic question arose: Is  
it possible to 'undefine' all the unwanted stuff from the plain/latex  
format afterwards and clean them up for 'utf-8' font encoding. This  
would mean to remove all the \".. \' macros and replace them with  
unicode safe ones. The next problem is to 'simulate' the right font  
encoding '' -> ", -- -> – and so on. I don't know if this is really  
possible without breaking other stuff.

Any suggestions?


--- SNIP ---

      {<-> "Hoefler\space Text"}{}
      {<-> "Hoefler\space Text\space Italic"}{}
      {<-> "Hoefler\space Text\space Black"}{}
      {<-> ssub * hoefl/bx/n}{}
      {<-> "Hoefler\space Text\space Black\space Italic"}{}
      {<-> ssub * hoefl/bx/it}{}
      {<-> "Hoefler\space Text:Letter\space Case=Small\space Caps"}{}


% this is super weired.
% As I understand it now:
%   - first set " to be a letter (catcode 11) to do some magic which
%   deactivates already defined macros starting with \" ?
%   - next define macros which map \"o to the unicode representation
% Seems to be fine for ' and ` but I have no idea how to get it working  
for --
\catcode`'=\active \def'{\futurelet\next\urquotetest}

% this will break the cite stuff
%\catcode`-=\active \def-{\futurelet\next\udashtest}

% What to do here. If I make ` active it's really hard to do use tex  
% E.g. you can't continue using \catcode`...
\catcode``=\active \def`{\futurelet\next\ulquotetest}

As was earlier noted in \cite{Bergeron:Vis-93} and \cite{Tory:SFU-02}  

\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi
\expandafter\ifx\csname url\endcsname\relax
   \def\url#1{{\tt #1}}\fi

\newblock Visualization reference model (panel session position  
\newblock In {\em Proceedings of IEEE Visualization 1993}, pages  

\bibitem[Tory and M{\"o}ller(2002)]{Tory:SFU-02}
M.~Tory and T.~M{\"o}ller.
\newblock A model-based visualization taxonomy.
\newblock Technical Report SFU-CMPT-TR2002-06, Computing Science Dept.,  
   Fraser University, 2002.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: xetexspecialchars.tar
Type: application/x-tar
Size: 10240 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20040709/134cba28/xetexspecialchars-0001.tar
-------------- next part --------------

Zuse Institute Berlin, Takustrasse 7
D-14195 Berlin-Dahlem, Germany
phone: +49 (30) 841 85-337, fax: +49 (30) 841 85-107
email: prohaska at zib.de, web: http://www.zib.de/prohaska/

PGP Public Key: http://www.zib.de/prohaska/prohaska.pgp
Key id: 0xDA749299
Key fingerprint: 8B59 83A8 A43D E0E2 DEDB  D479 3157 2FEA DA74 9299

More information about the XeTeX mailing list