15

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.

  • 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 '15 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. – Jason Zentz Jan 21 '15 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 '15 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. – Jason Zentz Jan 21 '15 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 '15 at 16:14
16

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.

| improve this answer | |
  • 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 '15 at 9:47
  • @Jason Zentz Then what about complex character like t͡ʃʰ, xelatex ignore it most of the time – karu Apr 14 '16 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. – Jason Zentz Apr 14 '16 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 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. – Jason Zentz Oct 5 at 14:30
2

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{ː}
| improve this answer | |
  • The thorns are identical? – merrybot Aug 21 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.

| improve this answer | |
1

As @Davislor says in their answer,

You can use Unicode input with tipa (other than combining accents in PDFTeX) by setting the Unicode character active with \DeclareUnicodeCharacter or newunicodechar.

There is a new package on CTAN named unitipa which converts not only the independent consonant and vowel characters, but also the dependent vowel diacritics with the help of LuaLaTeX. See the following example.

%!TeX Program = lualatex
\documentclass{article}
\usepackage{unitipa}

\begin{document}
hɛlo wəːld

ðɪs ɪz aɪ pʰiː eɪ

k̥ e̬ o̹ o̜ u̟ l̠ e̽ m̩ a̯ b̤ t̼ l̴ ɛ̝ e̞ e̘ e̙ t̪ t̺ n̻ p̚
\end{document}

Notice that Unicode input is producing tipa typefaces.

This package is only designed for getting the beautiful visual output of package tipa and making the input side more versatile. eg. One can very easily remove this package, use package fontspec and font Charis/Doulos to get a Unicode based output which has all the advantages marked by @Jason Zentz. It basically connects the Unicode to the package output of package tipa for the lovers of good old typefaces.

| improve this answer | |
  • 1
    I really think this is a bad idea. The T3 encoding creates output that is not cut and pasteable in the way that using a proper unicode font would be. The cm-unicode font covers most of the IPA symbols, so if people are really wedded to Computer Modern, I would recommend they use that font rather than your solution. – Alan Munn Sep 23 at 14:08
  • There are about 100 IPA symbols listed in the unitipa package documentation which are not available with the computer modern font. Copy pasting is a problem, I agree, but IMO that can't be the sole reason for discarding a good typeface. LaTeX mathematics also sometimes uses T3, do we discard it because it's not copy-pastable? – Niranjan Sep 23 at 17:22
  • Fair enough. But I guess I would still recommend using a unicode font. I've never been a big fan of CM myself anyway, so I've always used the SIL phonetics fonts. – Alan Munn Sep 23 at 17:28

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.