fontspec does not generally play nicely with TIPA these days. My intention in this question is to find out what exactly is causing the problem.
In attempting to diagnose the problem, I began with the following, simple MWE:
\documentclass[12pt]{article}
\pagestyle{plain}
\usepackage[margin=1.8cm]{geometry}
\geometry{a4paper}
\usepackage[parfill]{parskip}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tipa}
\usepackage[no-math]{fontspec} %no-math option provided to remove guff
%from the log file
\AtBeginDocument{
\renewcommand\textipa[2][r]{{\fontfamily{cm#1}\tipaencoding #2}}
}
\renewenvironment{IPA}[1][r]{\fontfamily{cm#1}\tipaencoding}{}
\begin{document}
\begin{IPA}
kAT
\end{IPA}
\end{document}
This, to my surprise, is an MWE that actually works, it does exactly what it should do.
Introducing an accent, however, breaks things. This:
\documentclass[12pt]{article}
\pagestyle{plain}
\usepackage[margin=1.8cm]{geometry}
\geometry{a4paper}
\usepackage[parfill]{parskip}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tipa}
\usepackage[no-math]{fontspec} %no-math option provided to remove guff
%from the log file
\AtBeginDocument{
\renewcommand\textipa[2][r]{{\fontfamily{cm#1}\tipaencoding #2}}
}
\renewenvironment{IPA}[1][r]{\fontfamily{cm#1}\tipaencoding}{}
\begin{document}
\begin{IPA}
kAT\'{a}
\end{IPA}
\end{document}
Won't compile. And when I say, "won't compile," xelatex does not terminate, but it does use up 100% CPU and my laptop fan starts. Eventually, I am forced to interrupt with Ctrl-c. What follows are the final lines printed on my terminal:
(/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1enc.def)
(/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1lmr.fd))
(/usr/share/texlive/texmf-dist/tex/xelatex/xunicode/xunicode.sty
(/usr/share/texmf/tex/latex/tipa/t3enc.def
(/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1lmss.fd))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg)
(/usr/share/texlive/texmf-dist/tex/xelatex/xetex-def/xetex.def))))
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
(./TIPA_Experiment.aux) (/usr/share/texmf/tex/latex/tipa/t3cmr.fd)
*geometry* driver: auto-detecting
*geometry* detected driver: xetex
^C! Interruption.
\reserved@c ->\tipaupperaccent
{1}
l.19 kAT\'{
a}
?
And this is the final 15%, or so, of the .log file:
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
(./TIPA_Experiment.aux)
\openout1 = `TIPA_Experiment.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 16.
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 16.
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 16.
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 16.
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 16.
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 16.
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Checking defaults for T3/cmr/m/n on input line 16.
LaTeX Font Info: Try loading font information for T3+cmr on input line 16.
(/usr/share/texmf/tex/latex/tipa/t3cmr.fd
File: t3cmr.fd 2001/12/31 TIPA font definitions
)
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Checking defaults for EU1/lmr/m/n on input line 16.
LaTeX Font Info: ... okay on input line 16.
*geometry* driver: auto-detecting
*geometry* detected driver: xetex
*geometry* verbose mode - [ preamble ] result:
* driver: xetex
* paper: a4paper
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* modes:
* h-part:(L,W,R)=(51.21504pt, 495.07779pt, 51.21504pt)
* v-part:(T,H,B)=(51.21504pt, 742.61676pt, 51.21504pt)
* \paperwidth=597.50787pt
* \paperheight=845.04684pt
* \textwidth=495.07779pt
* \textheight=742.61676pt
* \oddsidemargin=-21.05495pt
* \evensidemargin=-21.05495pt
* \topmargin=-58.05495pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=12.0pt
* \footskip=30.0pt
* \marginparwidth=44.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.8pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
! Interruption.
\reserved@c ->\tipaupperaccent
{1}
l.19 kAT\'{
a}
? x
Here is how much of TeX's memory you used:
14318 strings out of 493918
287219 string characters out of 6150563
322624 words of memory out of 5000000
17533 multiletter control sequences out of 15000+600000
5735 words of font info for 24 fonts, out of 8000000 for 9000
1144 hyphenation exceptions out of 8191
46i,1n,35p,10393b,95s stack positions out of 5000i,500n,10000p,200000b,80000s
No pages of output.
This doesn't actually help me to understand what's going wrong.
I should also point out that exactly what is printed seems to vary. On one occasion (after actually leaving it for quite a long while) the .log file finished here:
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocol
And then the ! Interruption stuff was printed beneath.
(I may have mistaken exactly where \@twocolumnfalse was truncated, I didn't copy it at the time).
Another example of terminal output is:
^C! Interruption.
\new@ifnextchar ...rved@a {#2}\def \reserved@b {#3
}\futurelet \@let@token \n...
l.19 kAT\'{
a}
?
So: What is the nature of this problem?
