I'm writing a document in Spanish language, and I'd like to introduce English phonetics for some words. Is it possible to do so?
I've tried this:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{tipa}
\usepackage[utf8]{inputenc}
\begin{document}
/fəˈnɛtɪk/
\end{document}
but it doesn't work.
I've retaken this to make some tests but it's not working for me.
I'm using the preamble provided by egreg's answer but I'm having the error \select@language{spanish}
How can I fix this?
Best Answer
If you want to use UTF-8 characters for the phonetic symbols, you have to teach them to LaTeX, because the
tipa
package doesn't provide support for this. Alternatively, you can input them with the shorthands provided by the package.How to extend the set of supported characters? Let's see, for instance,
I added
\textipa{/ˌjuːnɪˈvɜːsɪtɪ/}
to the example above and, upon runningpdflatex
, I saw the errorsThen I went to the manual of
tipa
, Appendix A Annotated List of TIPA Symbols and looked for the characters, just like I did for the previous ones. The last one appears like in the image belowso I know what shorthand to put in the second argument to
\newunicodechar
.Here is the full example:
Instead of
\newunicodechar
you could useinstead of
\newunicodechar{ɜ}{3}
, but I find it more convenient to have the “real” character instead of its code point.