[XeTeX] Using tipa.sty with XeLaTeX

Jonathan Kew jonathan_kew at sil.org
Mon Sep 10 13:37:11 CEST 2007


On 10 Sep 2007, at 6:24 am, R (Chandra) Chandrasekhar wrote:

> Dear Folks,
>
> I am trying to compile a file with IPA phonetic characters  
> originally typeset
> with the tipa.sty package and compiled with LaTeX.  I am now trying  
> to compile
> it with XeLaTeX but have run into problems.
>
> To illustrate the problem, a minimal example file is given below:
> ----------
> \documentclass[a4paper,10pt]{article}
> %
> \usepackage{fontspec}
> \usepackage{xunicode}
> \usepackage{xltxtra}
> \usepackage{tipa}
> %
> \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase,}
> \setromanfont[Numbers=OldStyle]{Minion Pro}
> \setsansfont[Numbers=OldStyle]{Myriad Pro}
> \setmonofont{DejaVu Sans Mono}
> %
> \begin{document}
>
> \noindent \textbf{thesis}/\textipa{"Ti:sIs}/ and
> \noindent\textbf{hypothesis}/\textipa{h2I"p6TIsIs}/
>
> \end{document}
> ----------
>
> Upon being compiled with xelatex, it chokes with the message:
> ----------
> ! Undefined control sequence.
> 2->\textezh
>
> l.16 ...t\textbf{hypothesis}/\textipa{h2I"p6TIsIs}
>                                                /
> ----------

This looks to me like a mistake in xunicode.sty, which is  
inconsistent regarding the name of this character: it uses \textezh  
in some places, but in others simply calls it \ezh.

Your example runs for me after the following changes (actually, not  
all these would be needed for this example, but trying to be complete  
about it):

--- texmf-dist/tex/xelatex/xunicode/xunicode.sty  (revision 3858)
+++ texmf-dist/tex/xelatex/xunicode/xunicode.sty  (working copy)
@@ -1159,7 +1159,7 @@
  \DeclareUTFcomposite[\UTFencname]{x01ED}{\textogonekoverline}{o}
  \DeclareUTFcomposite[\UTFencname]{x01ED}{\=}{\k o}
  \DeclareUTFcomposite[\UTFencname]{x01EE}{\v}{\EZH}
-\DeclareUTFcomposite[\UTFencname]{x01EF}{\v}{\ezh}
+\DeclareUTFcomposite[\UTFencname]{x01EF}{\v}{\textezh}
  \DeclareUTFcomposite[\UTFencname]{x01F0}{\v}{j}
  \DeclareUTFcomposite[\UTFencname]{x01F0}{\v}{\j}
  \DeclareUTFcharacter[\UTFencname]{x01F1}{\DZ}
@@ -1388,8 +1388,8 @@
  %\DeclareUTFcomposite[\UTFencname]{x0291}{\?}{z} % with curl
  \DeclareUTFcharacter[\UTFencname]{x0291}{\textctz}
  \DeclareUTFcomposite[\UTFencname]{x0292}{\m}{z}
-\DeclareUTFcharacter[\UTFencname]{x0292}{\ezh}          % TIPA-Z
-%\DeclareUTFcomposite[\UTFencname]{x0293}{\?}{\ezh} % with curl
+\DeclareUTFcharacter[\UTFencname]{x0292}{\textezh}          % TIPA-Z
+%\DeclareUTFcomposite[\UTFencname]{x0293}{\?}{\textezh} % with curl
  \DeclareUTFcharacter[\UTFencname]{x0293}{\textctyogh}
  \DeclareUTFcharacter[\UTFencname]{x0294}{\textglotstop} %  TIPA-P
  \DeclareUTFcharacter[\UTFencname]{x0295}{\textrevglotstop} %  TIPA-Q


However, I don't think the Adobe fonts you're selecting (Minion Pro &  
Myriad Pro) support most of the IPA characters, so although this will  
run without error, you'll get lots of undefined glyphs in the output.  
For full IPA support, you need a font with a richer character  
inventory. Some examples that work for me with your test include  
Charis SIL, Gentium, Lucida Grande, and Andale Mono WT J.


Note to Ross: could you check whether this is the appropriate fix?  
Which is preferred, \ezh or \textezh? Should \EZH be changed to  
match? I don't really know anything about tipa, etc...

JK



More information about the XeTeX mailing list