# Preparing a text for conversion to LaTeX: How to convert “ejective stops” in TIPA?

So I'm going to convert a lengthy document from Word to LaTeX. The document is full of glottal stops like p' t' k' (in Word format) When I passed them into a LaTeX format, the ['] symbol is unreadable and makes a mess. Sure, I can replace each one one-by-one after I paste it into LaTeX, but that's a pain. Is there any other symbol equivalent to the "left hand single quotes" mark that I can use in a search-and-replace in Word?

• For me this feels more a Word question? Which program do you use to convert from Word to LaTeX? Can you show a screenshot from the word file and the converted text? Just to make your question better ... – Mensch May 24 '13 at 23:06
• If you encode your document with UTF-8 you can use the pasted Word text directly. Either use \usepackage[utf8]{inputenc} if you are using pdfTeX or use LuaTeX or XeTeX in which case you don't need that package. Also, if you have text using Doulos SIL or Charis SIL you can paste that directly too if you are using XeTeX or LuaTeX, and then you don't need to use TIPA. – Alan Munn May 25 '13 at 1:31

Since this answer might be of use to other linguists, I'm giving a detailed answer of how to effectively transfer documents from Word to TeX, assuming you are using the regular SIL phonetic fonts in Word.

The modern TeX engines LuaTeX and XeLaTeX both use UTF-8 as their file encoding, and can use any OpenType font on your system. See the following for some differences between them and regular pdfTeX.

Because they can use OpenType fonts and assume UTF-8 encoded source, they can deal directly with text copied from Word, including phonetic symbols if you are using the SIL phonetic fonts. For example, here is an image of a Word document. Notice that it uses Word's "smart" quotes (the same one that you are using for your ejective consonants).

And here is the text of that document pasted into a LaTeX file with some markup added. Note that none of the text has been changed in the source file (well, I did add one phrase to the first sentence); only markup and the appropriate packages have been added, and crucially, the TIPA package has not been loaded. This document is saved as UTF-8 and compiled with XeLaTeX (or LuaLateX).

% !TEX TS-program = XeLaTeX

\documentclass[12pt]{article}
\usepackage{fontspec}
\setmainfont{Charis SIL}
\usepackage{tabularx}
\usepackage{gb4e}
\begin{document}
This is a sample document typed in MSWord and then pasted directly into a LaTeX document. It uses Charis SIL as the main font of the document. Charis is an OpenType font that has a full range of IPA characters as well. Here is an example of some IPA text:
\begin{exe}
\ex{Allophones of /l/ in English}
\label{allophones}
\sn
\begin{tabularx}{.85\textwidth}{XXXX}
laɪf & ‘life’ & faɪɫ & ‘file’\\
lip & ‘leap’ & lɪft & ‘lift’\\
əlaʊ & ‘allow’ &  ɔɫ & ‘all’\\
bəlun & ‘balloon’ & bɔɫ & ‘ball’\\
ɪlɑdʒɨkəɫ & ‘illogical’ & ɪɫ & ‘ill’\\
bəloʊ & ‘below’ & bɛɫ & ‘bell’\\
sloʊ & ‘slow’ & hoɫz & ‘holes’\\
bɑɾɫ̩ & ‘bottle’ & lɪɾɫ̩ & ‘little’
\end{tabularx}
\end{exe}
\end{document}


And here is the typeset output of this document: