LaTeX: How do you insert IPA characters?

Discussions worth keeping around later.
MysteryMan23
Sanci
Sanci
Posts: 42
Joined: Sun Feb 05, 2012 6:35 pm

LaTeX: How do you insert IPA characters?

Post by MysteryMan23 »

I noticed a lot of people around here use LaTeX, and I've been using it myself recently. Thing is, I've been struggling with typing the IPA characters. Since any grammar written in LaTeX will likely make use of characters from the IPA, I've been wondering how you all handle IPA characters, like the glottal stop.

So, how do you insert IPA characters into your work?

User avatar
Herr Dunkel
Smeric
Smeric
Posts: 1088
Joined: Mon Jun 21, 2010 3:21 pm
Location: In this multiverse or another

Re: LaTeX: How do you insert IPA characters?

Post by Herr Dunkel »

You should get the linguistics package of LaTeX
sano wrote:
To my dearest Darkgamma,
http://www.dazzlejunction.com/greetings/thanks/thank-you-bear.gif
Sincerely,
sano

User avatar
Zhen Lin
Avisaru
Avisaru
Posts: 304
Joined: Mon Sep 27, 2004 9:59 am

Re: LaTeX: How do you insert IPA characters?

Post by Zhen Lin »

If you are using XeTeX or LuaTeX or any decent modern TeX engine with Unicode support, you can just insert the appropriate Unicode characters. Otherwise you can use commands like \textscr for ʀ, etc.
書不盡言、言不盡意

Tanni
Niš
Niš
Posts: 13
Joined: Fri Jan 07, 2011 11:08 am

Re: LaTeX: How do you insert IPA characters?

Post by Tanni »

MysteryMan23 wrote:I noticed a lot of people around here use LaTeX, and I've been using it myself recently. Thing is, I've been struggling with typing the IPA characters. Since any grammar written in LaTeX will likely make use of characters from the IPA, I've been wondering how you all handle IPA characters, like the glottal stop.

So, how do you insert IPA characters into your work?

Code: Select all

\documentclass[11pt,a4paper,fleqn]{article}

\usepackage{latexsym,verbatim,path}

\usepackage[T1]{fontenc}

\usepackage[extra]{tipa}

% \usepackage[extra,safe]{tipa}

% \usepackage[T3,OT2,T1]{fontenc}
% \usepackage[noenc]{tipa}

\parindent0pt
\parskip2.2ex


\begin{document}


% \textipa{[\!] [\:r] [\;B]}\quad{\tipasafemode
%  $ a\:a\quad b;\quad c\!c\quad\| $}\quad
% \textipa{[\!b] [\:r] [\;B] (back again!)}

\textipa
{
 [\textsecstress\textepsilon kspl\textschwa\textprimstress ne%
 \textsci\textesh\textschwa n]
}

\textipa{[""Ekspl@"neIS@n]}


Command:

\textipa{[\textsecstress Ekspl@\textprimstress neIS@n]}

Group:

{\tipaencoding
 [\textsecstress\textepsilon kspl\textschwa\textprimstress ne%
 \textsci\textesh\textschwa n]
}

Environment:

\begin{IPA}
 [\textsecstress\textepsilon kspl\textschwa\textprimstress ne%
 \textsci\textesh\textschwa n]
\end{IPA}

\begin{IPA}
 \*f \*k \*r \*t \*w
\end{IPA}


Only works when option ''safe'' is not in effect.


\textipa{\*f \*k \*r \*t \*w}

\textipa{\*j \*n \*h \*l \*z}

\textipa{\*A dOg \*B k\ae{}t, ma\super{\*{214}}}

\textipa{\;B \;E \;A \;H \;L \;R}

\textipa{\:d \:l \:n \:r \:s \:z}

\textipa{\!b \!d \!g \!j \!G \!o}


\end{document}
An extended and updated version of Mentors and Students concept is available here.

User avatar
Morrígan
Avisaru
Avisaru
Posts: 396
Joined: Thu Sep 09, 2004 9:33 am
Location: Wizard Tower

Re: LaTeX: How do you insert IPA characters?

Post by Morrígan »

I really recommend using XeLaTeX, I kind of hate TIPA. then I just type things in, and they appear correctly. Though I'm using Keyman/dbus+KMFL for input with a keyboard I wrote for myself...

MysteryMan23
Sanci
Sanci
Posts: 42
Joined: Sun Feb 05, 2012 6:35 pm

Re: LaTeX: How do you insert IPA characters?

Post by MysteryMan23 »

Okay, I decided to try Goatface's idea. I switched to TeX Live for my TeX installation, and set up my TeX editor, TeXStudio to use XeTeX. That way, I could input Unicode characters and have them appear in my document with little more than the usual rigamarole. Only thing is, TeXStudio isn't even saving my Unicode characters! They keep turning into question marks when I save them. I think it may have something to do with the encoding, but I don't know for sure. Any ideas?

User avatar
Jipí
Smeric
Smeric
Posts: 1128
Joined: Sat Apr 12, 2003 1:48 pm
Location: Litareng, Keynami
Contact:

Re: LaTeX: How do you insert IPA characters?

Post by Jipí »

I don't know the program, but to venture an educated guess, could it be that you need to set the standard encoding to UTF-8 when saving somewhere? Many text editors I've tried for some reason still assume you want to save stuff in iso-8859-1 by default.

User avatar
ol bofosh
Smeric
Smeric
Posts: 1169
Joined: Tue Dec 06, 2011 5:30 pm
Location: tʰæ.ɹʷˠə.ˈgɜʉ̯.nɜ kʰæ.tə.ˈlɜʉ̯.nʲɜ spɛ̝ɪ̯n ˈjʏː.ɹəʔp

Re: LaTeX: How do you insert IPA characters?

Post by ol bofosh »

God, I'm living in the copy-and-paste age still. :roll:
It was about time I changed this.

MysteryMan23
Sanci
Sanci
Posts: 42
Joined: Sun Feb 05, 2012 6:35 pm

Re: LaTeX: How do you insert IPA characters?

Post by MysteryMan23 »

Okay, I solved the problem. Apparently, I forgot to put an input encoding instruction to actually tell the program to actually use UTF-8 encoding. You see, the program was actually set to use UTF-8 encoding; I had thought that was the wrong encoding, but it wasn't. Unfortunately, the file wasn't being treated like a proper UTF-8 file because the file itself wasn't telling the program to do so. It's working now.

User avatar
Gulliver
Avisaru
Avisaru
Posts: 433
Joined: Mon May 05, 2003 2:58 pm
Location: The West Country
Contact:

Re: LaTeX: How do you insert IPA characters?

Post by Gulliver »

Can someone please explain to me the actual benefits, for the average writer, of doing things in *TeX rather than, saw, a word processor? I've tried and I've experimented and I've concluded that I do not have time for that shit. Why do people use it?

User avatar
Pthagnar
Avisaru
Avisaru
Posts: 702
Joined: Fri Sep 13, 2002 12:45 pm
Location: Hole of Aspiration

Re: LaTeX: How do you insert IPA characters?

Post by Pthagnar »

Gulliver wrote:Can someone please explain to me the actual benefits, for the average writer, of doing things in *TeX rather than, saw, a word processor? I've tried and I've experimented and I've concluded that I do not have time for that shit. Why do people use it?
There aren't any. It is for dorks who a) need to typeset mathematics and/or b) have the desire to sperg out intensely over programmatic typesetting and/or c) want to signal "look at this -- it's written in LaTeX! Computer Modern, everybody!"

NE: oh, and the document structuring, with automatic chapter/section numbers and bibliography management and so on is pretty good and easy to use -- better than the more common alternatives if you're writing a long and technical document requiring that kind of structure.

NE: oh yeah and there's a document class in LaTeX called "Beamer" [as though we had never won the war...] which is supposed to be pretty good for making slides for presentations, since having to do things in LaTeX markup suggests a better, more austere layout than the profligacy which Powerpoint encourages.
Last edited by Pthagnar on Wed Jul 18, 2012 4:12 am, edited 1 time in total.

Ars Lande
Avisaru
Avisaru
Posts: 382
Joined: Thu Oct 14, 2010 7:34 am
Location: Paris

Re: LaTeX: How do you insert IPA characters?

Post by Ars Lande »

Gulliver wrote:Can someone please explain to me the actual benefits, for the average writer, of doing things in *TeX rather than, saw, a word processor? I've tried and I've experimented and I've concluded that I do not have time for that shit. Why do people use it?
Word can be a major pain in the ass sometimes, especially if you have lots of tables, schematics and need to typeset mathematics.
Though I've always preferred Word, even when I was an engineering student. LaTex wasn't worth the trouble.

I've used Beamer for a few presentations, though, because I thought the results were much better-looking than with Powerpoint.
(I still think Beamer is better looking, actually, but I've developped a strong distaste for presentations since and now I rather like it when they're ugly).

User avatar
Gulliver
Avisaru
Avisaru
Posts: 433
Joined: Mon May 05, 2003 2:58 pm
Location: The West Country
Contact:

Re: LaTeX: How do you insert IPA characters?

Post by Gulliver »

Pthug wrote:NE: oh, and the document structuring, with automatic chapter/section numbers and bibliography management and so on is pretty good and easy to use -- better than the more common alternatives if you're writing a long and technical document requiring that kind of structure.
Ah, okay. Yes, I've found the handling of sections in Word a bit irritating. LibreOffice Writer seems to do it a bit better, but takes ten thousand years to start up when Word 2010 takes about a second and is much nicer looking.

As someone who can't even handle HTML without giving up and just installing Wordpress, I think I've concluded that LaTeX is not for me.

I'm actually moderately proficient at doing things like rescuing data from corrupt documents (thank you, Abiword, for cacking up my 3000 word uni assignment) as lots of them are just zip files so you can open them up and transplant the bits you want and editing the XML in templates and things, but as soon as I try to actually write any code I might as well be smearing poo on the walls for all the good it does me.

User avatar
Zhen Lin
Avisaru
Avisaru
Posts: 304
Joined: Mon Sep 27, 2004 9:59 am

Re: LaTeX: How do you insert IPA characters?

Post by Zhen Lin »

Pthug wrote:
Gulliver wrote:Can someone please explain to me the actual benefits, for the average writer, of doing things in *TeX rather than, saw, a word processor? I've tried and I've experimented and I've concluded that I do not have time for that shit. Why do people use it?
There aren't any. It is for dorks who a) need to typeset mathematics and/or b) have the desire to sperg out intensely over programmatic typesetting and/or c) want to signal "look at this -- it's written in LaTeX! Computer Modern, everybody!"
Getting rid of Computer Modern is the first thing I do with any LaTeX document I write...
書不盡言、言不盡意

Bob Johnson
Avisaru
Avisaru
Posts: 704
Joined: Fri Dec 03, 2010 9:41 am
Location: NY, USA

Re: LaTeX: How do you insert IPA characters?

Post by Bob Johnson »

I only use fonts you've never heard of.

User avatar
Pthagnar
Avisaru
Avisaru
Posts: 702
Joined: Fri Sep 13, 2002 12:45 pm
Location: Hole of Aspiration

Re: LaTeX: How do you insert IPA characters?

Post by Pthagnar »

Zhen Lin wrote:Getting rid of Computer Modern is the first thing I do with any LaTeX document I write...
that's because you've gone beyond signalling "look -- Computer Modern!" to the next level of "look -- it ISN'T Computer Modern!". this way lies only oscillation.

User avatar
Jipí
Smeric
Smeric
Posts: 1128
Joined: Sat Apr 12, 2003 1:48 pm
Location: Litareng, Keynami
Contact:

Re: LaTeX: How do you insert IPA characters?

Post by Jipí »

Image

trollface.gif :]

Travis B.
Sumerul
Sumerul
Posts: 3570
Joined: Mon Jun 20, 2005 12:47 pm
Location: Milwaukee, US

Re: LaTeX: How do you insert IPA characters?

Post by Travis B. »

I have always favored controlling what is typeset in a human-readable and editable source file from which an output file (whether PDF, PS, or DVI) is generated rather than trying to wrangle with making things look just right in a GUI word processor, which almost always seems like a pain in the ass, particularly with regard to keeping everything in order and looking consistent. For being supposedly "WYSIWYG" everything seems more difficult than it ought to be in them.

(I remember in particular at my previous job trying to create a sizeable body of documentation for a particular test application. Trying to make things be formatted right with "styles" under Word was a pain in the ass, especially when Word would try to change styles automatically for me as if I somehow wanted it to, making a mess of things. I would have had a much easier time with this were I able to use LaTeX for it.)
Dibotahamdn duthma jallni agaynni ra hgitn lakrhmi.
Amuhawr jalla vowa vta hlakrhi hdm duthmi xaja.
Irdro. Irdro. Irdro. Irdro. Irdro. Irdro. Irdro.

User avatar
Jerian
Lebom
Lebom
Posts: 129
Joined: Mon Jul 02, 2012 6:11 pm
Location: Ontario, Canada
Contact:

Re: LaTeX: How do you insert IPA characters?

Post by Jerian »

I copy/paste them from Wikipedia XD
"Man is least himself when he speaks in his own person. Give him a mask, and he will reveal his true face" --Oscar Wilde

User avatar
ol bofosh
Smeric
Smeric
Posts: 1169
Joined: Tue Dec 06, 2011 5:30 pm
Location: tʰæ.ɹʷˠə.ˈgɜʉ̯.nɜ kʰæ.tə.ˈlɜʉ̯.nʲɜ spɛ̝ɪ̯n ˈjʏː.ɹəʔp

Re: LaTeX: How do you insert IPA characters?

Post by ol bofosh »

Jerian_Nostigia wrote:I copy/paste them from Wikipedia XD
Oh good, I'm not the only one.

I have started collecting my personal phonology in one place (Excel) so I don't have to look for individual phones on Wikipedia each time. Also I don't have to put symbols for labialisation, lateral releases, velarisation and aspiration because I put them in their proper combinations. It's a bit easier like that.
It was about time I changed this.

User avatar
Jerian
Lebom
Lebom
Posts: 129
Joined: Mon Jul 02, 2012 6:11 pm
Location: Ontario, Canada
Contact:

Re: LaTeX: How do you insert IPA characters?

Post by Jerian »

alt shortcuts also help, if you can memorize them.

I'm using a mac, here's a quick alt + faceroll
¡™£¢∞§¶•≠œ∑´®†¥¨ˆøπ“‘«åß∂ƒ©˙∆˚¬…æΩ≈ç√∫˜µ≤≥÷

ß∂∫æ

and those are the four IPA symbols I can shortcut to atm. Might relink some more later though.
"Man is least himself when he speaks in his own person. Give him a mask, and he will reveal his true face" --Oscar Wilde

User avatar
Morrígan
Avisaru
Avisaru
Posts: 396
Joined: Thu Sep 09, 2004 9:33 am
Location: Wizard Tower

Re: LaTeX: How do you insert IPA characters?

Post by Morrígan »

I use Ekaya in Windows and KMFL in Linux, which both let me use uncompiled Keyman keyboard files. Over something like the last 7 years, I've developed and refined a pretty good keyboard system for IPA and common Latin characters, including combining diacritics.

User avatar
Nexapf
Niš
Niš
Posts: 4
Joined: Wed Dec 26, 2012 8:20 am
Location: Sweden
Contact:

Re: LaTeX: How do you insert IPA characters?

Post by Nexapf »

Go to http://tex.stackexchange.com/questions/ ... inguistics

See Alan Munn's answer:
documentclass{article}
\usepackage{fontspec}
\setmainfont{Doulos SIL}
\begin{document}
[θɪsɪzsəmaɪpeɪ]

[ɪtsɹilijizitutaɪp]
\end{document}
This is what I do too and it works great, I can write things like [ɸʷ̥uːʲ.hi], just like that.
Bye bye copy-paste!

The flip side is that fontspec doesn't seem to understand \textit{}, and it also fucks up your Quick Build if you use TexMaker...

EDIT: I can use {\itshape text in italics} to write italics. Seems to be a common problem with fontspec. Also, txfonts in combination with fontspec will screw up the {\itshape text in italics} command as well. Luckily you don't need txfonts when you have fontspec (I think).
Last edited by Nexapf on Fri Jan 25, 2013 12:53 pm, edited 4 times in total.
The plains are infinite

User avatar
Ulrike Meinhof
Avisaru
Avisaru
Posts: 267
Joined: Wed Apr 20, 2005 12:31 pm
Location: Lund
Contact:

Re: LaTeX: How do you insert IPA characters?

Post by Ulrike Meinhof »

Jerian wrote:ß∂∫æ

and those are the four IPA symbols I can shortcut to atm. Might relink some more later though.
Uhm, those first three aren't IPA symbols. I assume you were aiming for βðʃ, but those are different from your Eszett, partial derivative and sum symbol, respectively.

I mostly use Aszev's X-SAMPA to IPA converter when I need to type IPA.
Attention, je pelote !

User avatar
Io
Avisaru
Avisaru
Posts: 591
Joined: Sun Dec 19, 2004 5:00 am
Location: a.s.l. p.l.s.
Contact:

Re: LaTeX: How do you insert IPA characters?

Post by Io »

Jerian wrote:I copy/paste them from Wikipedia XD
I type into google "typing ipa" and use the first link.
Pthagnar wrote:[as though we had never won the war...]
But you didn't, you just ended up being on the winners' side. Likewise we didn't lose the war, we were just on the losers' side.

Also, thanks Gulls for asking exactly the same questions I've been wondering the same and expressing the same feelings to anything related to 'coding' that I have.

Post Reply