18

On TeX.SX there are a lot of questions of the form "How do I typeset [some phonetic symbol]?" For example:

One of the issues that often comes up in answers to these questions is whether International Phonetic Alphabet (IPA) symbols should be typeset using

What should a user consider when deciding which of these approaches to use?

This question is related to Is \aa or å preferred?, but I'm focused on the tipa package specifically here, not the broader question of LaTeX-based macros vs. Unicode. This is also related to questions about pdfLaTeX vs. XeLaTeX vs. LuaLaTeX, but again I'm focused on tipa, which can be used with any of those.

13
  • Possible duplicate: tex.stackexchange.com/q/224058 This is the same question in my eyes and my answer would be the same. If you are fully compatible to UTF8 and you find it easy to type such stuff directly, you should do that. Your list of advantages is quite complete so you should make your own decision. Personally, I never use tipa but I am on LuaLaTeX and have never not-found any symbol in the unicode. The question on non unicode symbols in tipa would be answered by its documentation for sure.
    – LaRiFaRi
    Jan 21, 2015 at 7:02
  • @LaRiFaRi, I agree that the question you linked to is related, and certainly the advantages to using Unicode that I mention in my question would be relevant in answering that question. But my question is really about tipa specifically and whether anyone has chosen to use it instead of Unicode on the basis of its technical capabilities. I've edited my question to better reflect this. Jan 21, 2015 at 15:13
  • 1
    Both Unicode and tipa lack symbols. But tipa lacks way more -- it doesn't even cover the IPA itself, even though that was the reason tipa was created. But with XeLaTeX/LuaLaTeX, you can always find some font out there that has the extra symbols you need (I do this when I transcribe things with the Norwegian phonetic alphabet, which isn't included by Unicode yet). Doing that is much harder or impossible with LaTeX/tipa.
    – Sverre
    Jan 21, 2015 at 15:27
  • @LaRiFaRi, the tipa manual is a great resource, but it makes no mention of Unicode, let alone provide corresponding Unicode codepoints for each symbol (it was last updated in 2004, so this isn't too surprising). I know that tipa does contain some non-Unicode symbols, but I'm more concerned with whether there are tipa symbols that users have actually needed and haven't been able to find in any Unicode font. Jan 21, 2015 at 15:35
  • 2
    I think there are two reasons why tipa is used: (1) Inertia vel sim. I'm lucky that I started using TeX when XeTeX was fairly mature (in 2012). But if I started in 2002, I would probably be a tipa user today. (2). People want to use LaTeX. I sometimes use tipa, and the only reason is that I am writing a document that I wish to compile with LaTeX. LaTeX has some advantages over XeLaTeX (e.g. microtype), but LuaLaTeX will eventually close that gap.
    – Sverre
    Jan 21, 2015 at 16:14

4 Answers 4

19

Unicode's advantages

As I see it, there are many advantages to using a Unicode font with XeLaTeX/LuaLaTeX, some of which are mentioned in answers to the above questions and in other places, notably Alan Munn's answers to How to use phonetic IPA characters in LaTeX and Preparing a text for conversion to LaTeX: How to convert "ejective stops" in TIPA?:

  • Code readability. There's no doubt that [ˌɛkspləˈneɪʃən] is easier to (proof)read than \textipa{[""Ekspl@"neIS@n]}.
  • No special command/environment. There's no need for \textipa{...}, {\tipaencoding ...}, or \begin{IPA} ... \end{IPA}.
  • Cross-application compatibility
    • Copy and paste. If you are bringing your data into a .tex file from another application (e.g., Excel, Toolbox, ELAN, FLEx, etc.), Unicode input allows you to simply copy and paste without any conversion to tipa (or other LaTeX) macros. And if you want to take an example from your .tex file and put it in a Word document, email, or webpage, copy and paste works on the way out too.
    • Keyboard shortcuts. If you already use a Unicode IPA keyboard layout (or a keyboard layout specific to a language you work on), you can use the same shortcuts you would use in any other Unicode application. See my answer to Accessing IPA characters when using Charis SIL for more about using a keyboard layout for Unicode IPA input.
  • PDF usability. When you use a Unicode font, people who only have access to the resulting PDF can search for IPA symbols, and they can copy and paste them out of the document, too. This is only occasionally true for PDFs that use tipa, as discussed at How to use the real letters in a pdf?.
  • Flexibility in font selection. You can use any Unicode font that has the characters you need. tipa's options give you symbols designed to match Computer Modern, Times, or Helvetica, and that's it.
  • Font consistency. You can choose a font whose IPA symbols were created by the designer of the rest of the font, so they will match the body text. tipa matches Computer Modern quite well, but it merely approximates Times and Helvetica.
  • OpenType features. There are several Unicode fonts with full IPA coverage that also have OpenType features that you can make use of using fontspec in XeLaTeX or LuaLaTeX. For example, Charis SIL has alternate glyphs for literacy applications (<ɑɡ> instead of <ag>, etc.) and for localization (e.g., variant glyphs for <Ŋ> and <ʋ>).

tipa's advantages

There are at least two advantages to tipa, possibly a third:

  • Backwards compatibility. It's a lot of work to convert tipa code into Unicode, and it might not be worth it if most of the data you are working with is already coded for tipa.
  • Control over microtypography. tipa has commands (section 4 of the manual) that allow you to place diacritics manually and make some other fine adjustments to kerning, etc. Some Unicode fonts allow diacritic stacking and correct placement of modifier letters, but this varies widely across fonts.
  • Ease/speed of input. This is frequently mentioned in favor of tipa, but personally I've never found using tipa shortcuts to be any faster than using a Unicode IPA keyboard layout with mnemonic, semantic key assignment.

Conclusion

The package tipa should be considered a legacy method for using IPA characters in LaTeX, just as other non-Unicode fonts have been phased out (e.g., IPAPhon and the non-Unicode versions of the SIL and LaserIPA fonts). It may be necessary to use tipa in some circumstances for compatibility reasons (using already tipa-coded data, following a publisher's style guide, etc.), but in general users should strongly consider using Unicode with XeLaTeX or LuaLaTeX.

7
  • Still I'd recommend marking the use of IPA symbols as arguments to a macro that sets the T3 encoding (in case you're using pdflatex); you gain in flexibility.
    – egreg
    Apr 26, 2015 at 9:47
  • @Jason Zentz Then what about complex character like t͡ʃʰ, xelatex ignore it most of the time
    – karu
    Apr 14, 2016 at 14:51
  • 3
    @karu, that is a font issue. You have to load a font that has the symbols you need and uses diacritics and tie bars correctly. Charis SIL is one example of a font that will typeset t͡ʃʰ correctly. Apr 14, 2016 at 14:54
  • Sorry to comment on such an old question, but by any chance do you know which font with IPA glyphs is compatible with Latin Modern, using XeTeX? I know there are many fonts suitable for maths that are now available, but despite using XeLaTeX, I remain addicted to the old fashioned fonts.
    – Logos
    Oct 2, 2020 at 21:42
  • 1
    @Logos, I don't know of any, but I haven't actively worked with IPA or LaTeX for a few years. See Niranjan's answer below for mention of the unitipa package, but I'd agree with Alan Munn's point in the comments there that this doesn't capture all the benefits of using Unicode. Oct 5, 2020 at 14:30
5

If for some reason you have TIPA commands such as \textturnscripta in your LaTeX document but you are using an Unicode-compliant TeX engine and your current font contains all necessary glyphs (e.g., the FreeSerif font family), then here are some redefinitions of TIPA (and other similar LaTeX) commands that produce the corresponding Unicode characters:

\def\AA{Å}
\def\AE{Æ}
\def\DH{Ð}
\def\O{Ø}
\def\Thorn{Þ}
\def\TH{Þ}
\def\ss{ß}
\def\aa{å}
\def\ae{æ}
\def\dh{ð}
\def\o{ø}
\def\textthorn{þ}
\def\textthornvari{þ}
\def\textthornvarii{þ}
\def\textthornvariii{þ}
\def\textthornvariv{þ}
\def\th{þ}
\def\DJ{Đ}
\def\dj{đ}
\def\textcrd{đ}
\def\textHbar{Ħ}
\def\textcrh{ħ}
\def\texthbar{ħ}
\def\i{ı}
\def\j{ȷ}
\def\IJ{IJ}
\def\ij{ij}
\def\textkra{ĸ}
\def\L{Ł}
\def\textbarl{ł}
\def\l{ł}
\def\NG{Ŋ}
\def\ng{ŋ}
\def\OE{Œ}
\def\oe{œ}
\def\textTbar{Ŧ}
\def\textTstroke{Ŧ}
\def\texttbar{ŧ}
\def\texttstroke{ŧ}
\def\textcrb{ƀ}
\def\textBhook{Ɓ}
\def\textOopen{Ɔ}
\def\textChook{Ƈ}
\def\textchook{ƈ}
\def\texthtc{ƈ}
\def\textDafrican{Ɖ}
\def\textDhook{Ɗ}
\def\textEreversed{Ǝ}
\def\textEopen{Ɛ}
\def\textFhook{Ƒ}
\def\textflorin{ƒ}
\def\textGammaafrican{Ɣ}
\def\texthvlig{ƕ}
\def\hv{ƕ}
\def\textIotaafrican{Ɩ}
\def\textKhook{Ƙ}
\def\textkhook{ƙ}
\def\texthtk{ƙ}
\def\textcrlambda{ƛ}
\def\textNhookleft{Ɲ}
\def\OHORN{Ơ}
\def\ohorn{ơ}
\def\textPhook{Ƥ}
\def\textphook{ƥ}
\def\texthtp{ƥ}
\def\textEsh{Ʃ}
\def\ESH{Ʃ}
\def\textlooptoprevesh{ƪ}
\def\textpalhookbelow{ƫ}
\def\textThook{Ƭ}
\def\textthook{ƭ}
\def\texthtt{ƭ}
\def\textTretroflexhook{Ʈ}
\def\UHORN{Ư}
\def\uhorn{ư}
\def\textVhook{Ʋ}
\def\textYhook{Ƴ}
\def\textyhook{ƴ}
\def\textEzh{Ʒ}
\def\texteturned{ǝ}
\def\textturna{ɐ}
\def\textscripta{ɑ}
\def\textturnscripta{ɒ}
\def\textbhook{ɓ}
\def\texthtb{ɓ}
\def\textoopen{ɔ}
\def\textopeno{ɔ}
\def\textctc{ɕ}
\def\textdtail{ɖ}
\def\textrtaild{ɖ}
\def\textdhook{ɗ}
\def\texthtd{ɗ}
\def\textreve{ɘ}
\def\textschwa{ə}
\def\textrhookschwa{ɚ}
\def\texteopen{ɛ}
\def\textepsilon{ɛ}
\def\textrevepsilon{ɜ}
\def\textrhookrevepsilon{ɝ}
\def\textcloserevepsilon{ɞ}
\def\textbardotlessj{ɟ}
\def\texthtg{ɠ}
\def\textscriptg{ɡ}
\def\textscg{ɢ}
\def\textgammalatinsmall{ɣ}
\def\textgamma{ɣ}
\def\textramshorns{ɤ}
\def\textturnh{ɥ}
\def\texthth{ɦ}
\def\texththeng{ɧ}
\def\textbari{ɨ}
\def\textiotalatin{ɩ}
\def\textiota{ɩ}
\def\textsci{ɪ}
\def\textltilde{ɫ}
\def\textbeltl{ɬ}
\def\textrtaill{ɭ}
\def\textlyoghlig{ɮ}
\def\textturnm{ɯ}
\def\textturnmrleg{ɰ}
\def\textltailm{ɱ}
\def\textltailn{ɲ}
\def\textnhookleft{ɲ}
\def\textrtailn{ɳ}
\def\textscn{ɴ}
\def\textbaro{ɵ}
\def\textscoelig{ɶ}
\def\textcloseomega{ɷ}
\def\textphi{ɸ}
\def\textturnr{ɹ}
\def\textturnlonglegr{ɺ}
\def\textturnrrtail{ɻ}
\def\textlonglegr{ɼ}
\def\textrtailr{ɽ}
\def\textfishhookr{ɾ}
\def\textlhti{ɿ}
\def\textscr{ʀ}
\def\textinvscr{ʁ}
\def\textrtails{ʂ}
\def\textesh{ʃ}
\def\texthtbardotlessj{ʄ}
\def\textraisevibyi{ʅ}
\def\textctesh{ʆ}
\def\textturnt{ʇ}
\def\textrtailt{ʈ}
\def\texttretroflexhook{ʈ}
\def\textbaru{ʉ}
\def\textupsilon{ʊ}
\def\textscriptv{ʋ}
\def\textvhook{ʋ}
\def\textturnv{ʌ}
\def\textturnw{ʍ}
\def\textturny{ʎ}
\def\textscy{ʏ}
\def\textrtailz{ʐ}
\def\textctz{ʑ}
\def\textezh{ʒ}
\def\textyogh{ʒ}
\def\textctyogh{ʓ}
\def\textglotstop{ʔ}
\def\textrevglotstop{ʕ}
\def\textinvglotstop{ʖ}
\def\textstretchc{ʗ}
\def\textbullseye{ʘ}
\def\textscb{ʙ}
\def\textcloseepsilon{ʚ}
\def\texthtscg{ʛ}
\def\textsch{ʜ}
\def\textctj{ʝ}
\def\textturnk{ʞ}
\def\textscl{ʟ}
\def\texthtq{ʠ}
\def\textbarglotstop{ʡ}
\def\textbarrevglotstop{ʢ}
\def\textdzlig{ʣ}
\def\textdyoghlig{ʤ}
\def\textdctzlig{ʥ}
\def\texttslig{ʦ}
\def\textteshlig{ʧ}
\def\texttesh{ʧ}
\def\texttctclig{ʨ}
\def\textprimstress{ˈ}
\def\textlengthmark{ː}
1
  • 1
    The thorns are identical?
    – merrybot
    Aug 21, 2020 at 20:16
1

Unicode, definitely. The sole exception is if your publisher doesn’t support it. PDFTeX, for example, cannot handle combining Unicode characters, only precomposed ones.

The tipa package was last updated in 2004. The only fonts it supports are Computer Modern Roman/Sans-Serif/Typewriter, Times, and Helvetica. It loads an 8-bit font encoding, making it difficult to use in the same document as non-European scripts.

You can use Unicode input with tipa (other than combining accents in PDFTeX) by setting the Unicode character active with \DeclareUnicodeCharacter or newunicodechar. If you want to use tipa-like commands, a modern package would probably declare them to check \iffontchar, use the Unicode symbol in the current font if it has it, and fall back, perhaps to an 8-bit font, otherwise. You can write that yourself, but tipa doesn’t do it, nor does inputenc support T3.

1

If it helps, and to add to @yannis' answer, the old xunicode package (back when xelatex was the only UTF8-aware engine) redefines tipa commands to Unicode.

So you can use fontspec to choose whichever fonts are suitable.

xunicode can run under lualatex with one additional code line (see MWE).

Some examples:

CMU Serif

Linguistics Pro

Noto Serif

Gentium Plus

Not all fonts have full coverage of the glyphs.

Items in red indicate potential revision of the macro definition might be required.

Some slight typing corrections in the yannis list have been silently made.

Conclusion

IPA symbols are a script in their own right.

For large volumes, direct input (using a dedicated keyboard overlay) would be the most efficient input method.

For using a smaller set of glyphs, named macros would keep the source code readable and easier to maintain compared to using codepoints (e.g., ^^^^0259 = ə), at the expense of typing in the macro names and knowing what the names actually are and mean. Perhaps shortcuts for the more commonly-used ones would help.

Tipa-as-unicode would fall at this smaller end of the spectrum, in terms of usage and convenience.

MWE

\documentclass{article}
\usepackage{xcolor}
\usepackage{fontspec}
\setmainfont{Noto Serif}
\def\XeTeXpicfile{}%so can compile with LuaLatex
\usepackage{xunicode}
%\usepackage{tipa}

\newcommand\fnamea{Noto Serif}
\newcommand\fnameb{Junicode}
\newcommand\fnamec{Linguistics Pro}
\newcommand\fnamed{DejaVu Serif}
\newcommand\fnamee{Gentium Plus}
\newcommand\fnamef{Liberation Serif}
\newcommand\fnameg{CMU Serif}

\newfontfamily\ffonta{\fnamea}
\newfontfamily\ffontb{\fnameb}
\newfontfamily\ffontc{\fnamec}
\newfontfamily\ffontd{\fnamed}
\newfontfamily\ffonte{\fnamee}
\newfontfamily\ffontf{\fnamef}
\newfontfamily\ffontg{\fnameg}


\newcommand\dolist[2]{%1=font command,2=fontname
#1 Tipa Unicode commands using \fbox{{\large #2}} font.

First item is the Tipa macro, second item is the Unicode character directly.

\AA{Å}
\AE{Æ}
\DH{Ð}
\O{Ø}
\Thorn{Þ}
\TH{Þ}
\ss{ß}
\aa{å}
\ae{æ}
\dh{ð}
\o{ø}
\textthorn{þ}
\textthornvari{þ}
\textthornvarii{þ}
\textthornvariii{þ}
\textthornvariv{þ}
\th{þ}
\DJ{Đ}
\dj{đ}
\textcrd{đ}
\textHbar{Ħ}
\textcrh{ħ}
\texthbar{ħ}
\i{ı}
\j{ȷ}
\IJ{IJ}
\ij{ij}
\textkra{ĸ}
\L{Ł}
\textbarl{ł}
\l{ł}
\NG{Ŋ}
\ng{ŋ}
\OE{Œ}
\oe{œ}
\textTbar{Ŧ}
\textTstroke{Ŧ}
\texttbar{ŧ}
\texttstroke{ŧ}
\textcrb{ƀ}
\textBhook{Ɓ}
\textOopen{Ɔ}
\textChook{Ƈ}
\textchook{ƈ}
\texthtc{ƈ}
\textDafrican{Ɖ}
\textDhook{Ɗ}
\textEreversed{Ǝ}
\textEopen{Ɛ}
\textFhook{Ƒ}
\textflorin{ƒ}
\textGammaafrican{Ɣ}
\texthvlig{ƕ}
\hv{ƕ}
\textIotaafrican{Ɩ}
\textKhook{Ƙ}
\textkhook{ƙ}
\texthtk{ƙ}
\textcrlambda{ƛ}
\textNhookleft{Ɲ}
\Ohorn{Ơ}
\ohorn{ơ}
\textPhook{Ƥ}
\textphook{ƥ}
\texthtp{ƥ}
\textEsh{Ʃ}
\ESH{Ʃ}
\textlooptoprevesh{ƪ}
\textcolor{red}{\textpalhookbelow{t}}{ƫ} %command takes argument
\textThook{Ƭ}
\textthook{ƭ}
\texthtt{ƭ}
\textTretroflexhook{Ʈ}
\Uhorn{Ư}
\uhorn{ư}
\textVhook{Ʋ}
\textYhook{Ƴ}
\textyhook{ƴ}
\textcolor{red}{\textEzh}{Ʒ} %Ǯǯ: misaligned char?
\texteturned{ǝ}
\textturna{ɐ}
\textscripta{ɑ}
\textturnscripta{ɒ}
\textbhook{ɓ}
\texthtb{ɓ}
\textoopen{ɔ}
\textopeno{ɔ}
\textctc{ɕ}
\textdtail{ɖ}
\textrtaild{ɖ}
\textdhook{ɗ}
\texthtd{ɗ}
\textreve{ɘ}
\textschwa{ə}
\textrhookschwa{ɚ}
\texteopen{ɛ}
\textepsilon{ɛ}
\textrevepsilon{ɜ}
\textrhookrevepsilon{ɝ}
\textcloserevepsilon{ɞ}
\textbardotlessj{ɟ}
\texthtg{ɠ}
\textscriptg{ɡ}
\textscg{ɢ}
\textgammalatinsmall{ɣ}
\textcolor{red}{\textgamma}{ɣ} % 
\textramshorns{ɤ}
\textturnh{ɥ}
\texthth{ɦ}
\texththeng{ɧ}
\textbari{ɨ}
\textiotalatin{ɩ}
\textiota{ɩ}
\textsci{ɪ}
\textltilde{ɫ}
\textbeltl{ɬ}
\textrtaill{ɭ}
\textlyoghlig{ɮ}
\textturnm{ɯ}
\textturnmrleg{ɰ}
\textltailm{ɱ}
\textltailn{ɲ}
\textnhookleft{ɲ}
\textrtailn{ɳ}
\textscn{ɴ}
\textbaro{ɵ}
\textscoelig{ɶ}
\textcloseomega{ɷ}
\textphi{ɸ}
\textturnr{ɹ}
\textturnlonglegr{ɺ}
\textturnrrtail{ɻ}
\textlonglegr{ɼ}
\textrtailr{ɽ}
\textfishhookr{ɾ}
\textlhti{ɿ}
\textscr{ʀ}
\textinvscr{ʁ}
\textrtails{ʂ}
\textesh{ʃ}
\texthtbardotlessj{ʄ}
\textcolor{red}{\textraisevibyi}{ʅ} %ʅ
\textctesh{ʆ}
\textturnt{ʇ}
\textrtailt{ʈ}
\texttretroflexhook{ʈ}
\textbaru{ʉ}
\textupsilon{ʋ}
\textscriptv{ʋ}
\textvhook{ʋ}
\textturnv{ʌ}
\textturnw{ʍ}
\textturny{ʎ}
\textscy{ʏ}
\textrtailz{ʐ}
\textctz{ʑ}
\textezh{ʒ}
\textyogh{ʒ}
\textctyogh{ʓ}
\textglotstop{ʔ}
\textrevglotstop{ʕ}
\textinvglotstop{ʖ}
\textstretchc{ʗ}
\textbullseye{ʘ}
\textscb{ʙ}
\textcloseepsilon{ʚ}
\texthtscg{ʛ}
\textsch{ʜ}
\textctj{ʝ}
\textturnk{ʞ}
\textscl{ʟ}
\texthtq{ʠ}
\textbarglotstop{ʡ}
\textbarrevglotstop{ʢ}
\textdzlig{ʣ}
\textdyoghlig{ʤ}
\textdctzlig{ʥ}
\texttslig{ʦ}
\textteshlig{ʧ}
\texttesh{ʧ}
\texttctclig{ʨ}
\textprimstress{ˈ}
\textlengthmark{ː}


\textsc{Shortcuts}: \textipa{["pI\*Di]}
\textipa{[\!b] [\:r] [\;B]}

\textsc{Input Methods}: 

[\textsecstress\textepsilon kspl\textschwa\textprimstress ne\textsci\textesh\textschwa n]
:
\textipa{[""Ekspl@"neIS@n]}

v\textturnv v w\textsca w y\textturny y [\textesh]
:
\textipa{v2v w\textsca w yLy [S]}

[\textipa{S}]
:
\textipa{[S]}
\par
\vspace{3ex}
\hrule
\vspace{4ex}
}



\begin{document}

\dolist{\ffonta}{\fnamea}
\dolist{\ffontb}{\fnameb}
\dolist{\ffontc}{\fnamec}
\dolist{\ffontd}{\fnamed}
\dolist{\ffonte}{\fnamee}
\dolist{\ffontf}{\fnamef}
\dolist{\ffontg}{\fnameg}

\end{document}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.