[XeTeX] XeTeX 0.9 and utf8accents.sty

Bruno Voisin bvoisin at mac.com
Fri Feb 25 15:22:15 CET 2005


Le 25 févr. 05, à 13:08, Jonathan Kew a écrit :

> Could you send me a sample file that demonstrates this problem? It's 
> possible that it's new a XeTeX bug, but it didn't happen on a XeLaTeX 
> paper (using fontspec and utf8accents) that I just ran....

Jonathan, Ross,

It turns out the problem was caused by writing \~{} at any place inside 
the document. Using \textasciitilde instead makes the problem 
disappear, and replacing "\~{} " by "\~\ " make it disappear as well. 
I'm puzzled whether this problem has been introduced with XeTeX 0.9, or 
was there unnoticed before. My impression is this is caused by the way 
utf8accents.sty deals with gobbled spaces.

A sample file:

> \documentclass[12pt,a4paper]{article}
>
> \usepackage{utf8accents}
>
> \DeclareFontFamily{U}{trebuchet}{}
> \DeclareFontShape{U}{trebuchet}{m}{n}
>   {<-> "Trebuchet\space MS:mapping=tex-text"}{}
> \DeclareFontShape{U}{trebuchet}{m}{it}
>   {<-> "Trebuchet\space MS\space Italic:mapping=tex-text"}{}
> \DeclareFontShape{U}{trebuchet}{b}{n}
>   {<-> "Trebuchet\space MS\space Bold:mapping=tex-text"}{}
> \DeclareFontShape{U}{trebuchet}{b}{it}
>   {<-> "Trebuchet\space MS\space Bold\space Italic:mapping=tex-text"}{}
> \DeclareFontShape{U}{trebuchet}{m}{sl}
>   {<-> ssub * trebuchet/m/it}{}
> \DeclareFontShape{U}{trebuchet}{b}{sl}
>   {<-> ssub * trebuchet/b/it}{}
> \DeclareFontShape{U}{trebuchet}{bx}{n}
>   {<-> ssub * trebuchet/b/n}{}
> \DeclareFontShape{U}{trebuchet}{bx}{it}
>   {<-> ssub * trebuchet/b/it}{}
> \renewcommand{\sfdefault}{trebuchet}
>
> \renewcommand{\familydefault}{\sfdefault}
> \renewcommand{\encodingdefault}{U}
>
> \begin{document}
>
> blah blah \textasciitilde{} ah!
>
> blah blah \~\ ah!
>
> blah blah \~{} ah!
>
> \end{document}

Without utf8accents.sty, the three lines of output are identical. With 
it, XeLaTeX chokes on the third line. Here's the console output:

> This is XeTeX, Version 3.141592-2.2-0.9 (Web2C 7.5.3)
> entering extended mode
> (./test.tex
> LaTeX2e <2003/12/01>
> Babel <v3.8d> and hyphenation patterns for american, british, french, 
> german, n
> german, dutch, italian, norsk, portuges, spanish, swedish, 
> nohyphenation, loade
> d.
> (/usr/local/teTeX/share/texmf.tetex/tex/latex/base/article.cls
> Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
> (/usr/local/teTeX/share/texmf.tetex/tex/latex/base/size12.clo))
> (/Users/brunovoisin/Library/texmf/tex/xelatex/utf8syms/utf8accents.sty
> *** did you really mean 'n ? ***
> ) (./test.aux)
> ! Missing \endcsname inserted.
> <to be read again>
>                    \char
> l.33 blah blah \~{}
>                     ah!
> ? s
> OK, entering \scrollmode...
> ! Too many }'s.
> \U\~ ...ite {\add at encoded@accent {0303}{#1}{02DC}}
>
> l.33 blah blah \~{}
>                     ah!
> [1] (./test.aux) )
> (see the transcript file for additional information)
> Output written on test.pdf (1 page).
> Transcript written on test.log

Bruno



More information about the XeTeX mailing list