[XeTeX] XeTeX segmentation faults

Somadevah at aol.com Somadevah at aol.com
Wed Jun 16 21:51:48 CEST 2004


In a message dated 16/6/04 6:18:56 pm, musaf at runbox.com writes:


> 
> Is there anything I can do about where XeTeX places the dot when I use
> \d{H} ? When I used Hoefler through pdflatex, the dot is placed exactly
> where it should be. XeTeX places it far lower.
> 
> 

Dear Musa,

I had a similar problem and added the following code to the preamble (after 
setting up Hoefler or some OTF font).

 
%
%Diatop lets you put one character (or accent) above another
\def\diatop[#1|#2]{{\leavevmode\setbox1=\hbox{{#1{}}}\setbox2=\hbox{{#2{}}}%
    \dimen0=\ifdim\wd1>\wd2\wd1\else\wd2\fi%
    \dimen1=\ht2\advance\dimen1by-1ex%
    \setbox1=\hbox to1\dimen0{\hss#1\hss}%
    \rlap{\raise1\dimen1\box1}%
    \hbox to1\dimen0{\hss#2\hss}}}
%
%Redefinitions of \d{}
\def\d#1{\smash{\diatop[\raise-.55em\hbox{\hskip.125em.}|#1]}}
%

\begin{document}

Normal text. \d{H}e\d{r}e are \d{s}o\d{m}e un\d{d}erdots.
 
\end{document}

You can do even better than that if you have alegacy font that displays the 
underdot characters you need. You can then add \catcode redefinitions such as:

\catcode`\X=\active\defXm{\d{t}}   %typed X becomes t with underdot

where the "X" is to be replaced with any (probably option-)keystroke that 
produces the required underdot character in your font. You can do very similar 
things with LaTeX in the inputenc package (there is also a unicode package 
called ucr or something, I forget now). That means that your input window will show 
the correct character in you legacy font (typed as "X") and the output will 
be whatever is produced by \d{t}.

For Hoefler I had to add the value of   \hskip.125em to the redefinition of 
\d{} this is not necessary for OTF fonts I have tried. 

But as Jonathan has said, it is not advisable to carry on doing this sort of 
thing, it is far better to find Unicode fonts which support all of the 
characters needed or, as far as this is not illegal, produce one's own AAT version of 
the font. 

Also, this sort of thing does not produce properly searchable utf8 PDF 
files!!!
 
Hope this helps,

Somdeva 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20040616/f487119c/attachment.htm


More information about the XeTeX mailing list