1

Firstly, I write a grammar about a language. Secondly, I use \usepackage{tipa} to represent letters LaTeX (TeXmaker) can't represent by itself. If for example I want a ɢ or χ, I use \;G and X respectively in the \textipa{} environment. However if I copy and paste these, the result is X and å. And that's with all letters which I use with the \usepackage{tipa}.

How can I solve this, so that if I copy and paste a text, I get the letters represented in the pdf.

Alan Munn
  • 218,180
Arhama
  • 39
  • 2
    I don't think I understand the question: you want to copy phonetic symbols from the PDF and have the copied text end up as TIPA markup? That's impossible to do. Or is the problem that when you copy phonetic symbols from a PDF made with TIPA the symbols don't copy as you expect. If that's the case, don't use TIPA but use xelatex and an OpenType font that supports IPA characters. See How to use phonetic IPA characters in LaTeX – Alan Munn Jan 16 '16 at 21:29
  • It's not really a big problem. It's more a cosmetical one. Who knows maybe I want to copy and paste a text from my PDF to a Forum or something (btw, I do a grammar of a conlang (contrusted language)). It'd would be a waste of time to change all false letters. Also, I'm very new to LaTeX. Could I just copy and paste my grammar into XeLaTeX (or the other formats) or do they function very different? – Arhama Jan 16 '16 at 21:45
  • 1
    It's perfectly reasonable to want the characters cut and pasted from the PDF to be the same as those that show up in it. So then you should definitely use XeLaTeX. You can't really use TIPA with XeLaTeX very well, though, so you would need to rewrite some things. See Using XeLaTeX instead of pdfLaTeX on the basics of switching (and the other question I linked to in my earlier comment.) – Alan Munn Jan 16 '16 at 22:01

2 Answers2

4

The tipa package uses 8-bit fonts because it was developed at a time when only 8-bit fonts were accessible by TeX. The underlying encoding mimics ASCII IPA schemes (like SAMPA), so when you cut and paste them from the pdf they are somewhat sensible (but not perfect matches, specially for the more rare ones).

When you want a pdf files with the "true characters" in it you need to use a Unicode TeX derivative (like XeTeX or LuaTeX) and a sufficiently rich Unicode font.

1

If you are used to write IPA characters in your documents with package TIPA, but want them in Unicode; you might want to use a new package named tipauni. This package converts the TIPA commands into Unicode characters and thus one can easily change the font; make IPA characters bold, italic; copy and paste them elsewhere. One just needs to add three letters to their documents. i.e. \usepackage{tipauni} in place of \usepackage{tipa}. The package assumes that you are using Xe/LuaLaTeX and you have the Charis SIL font. Here is an example -

\documentclass{article}
\usepackage{tipauni}

\begin{document} Hello world!

\textipa{;GX} are copy-pastable now!

You can even make them bold :-)

\textbf{\textipa{;GX}} \end{document}

1

Niranjan
  • 3,435