% Enum Cohrs, 2018-12-06
% license: CC-BY-SA

\documentclass{article}

\usepackage[landscape,margin=1cm,bottom=2cm]{geometry}
\usepackage{tipa}
\usepackage{xcolor}
\usepackage{pbox}

\def\tsix#1#2#3{\tt\string#1 & \textcolor{gray}{\tt\string#2} & \rm\textipa{#3}\\}
\def\tsi#1#2{\tsix{#1}{#2}{#1}}
\def\tsif#1#2{\protect\protect\footnote{\tt#1} & \textcolor{gray}{\tt\string#2} & \rm\textipa{#1}\\}
\def\ti#1{\tt\string#1 & \textcolor{white}{m} & \rm\textipa{#1}\\}
\def\sama#1{\tsi{#1}{#1}}
\def\sub#1{\setlength{\tabcolsep}{2pt}\begin{tabular}{rcl}#1\end{tabular}}
\def\ssama#1{\sub{\sama{#1}}}
\def\stsi#1#2{\sub{\tsi{#1}{#2}}}
\def\sti#1{\sub{\ti{#1}}}
\def\bs{\textbackslash}
\def\us{\textunderscore}

\begin{document}

\title{Rosetta Stone for IPA, X-SAMPA and TextIPA}
\date{}
\maketitle

\section*{Pulmonic Consonants}
\setlength{\tabcolsep}{3pt}
\footnotesize
\begin{tabular}{r|c|c|ccc|c|c|c|c|c|c}
  & Bilabial & Labiodental & Dental & Alveolar & Postalveolar & Retroflex & Palatal & Velar & Uvular & Pharyngeal & Glottal\\
  \hline
  Plosive & \sub{\sama{p}\sama{b}} & & & \sub{\sama{t}\sama{d}} & & \sub{\tsi{\:t}{t`}\tsi{\:d}{d`}} & \sub{\sama{c}\tsi{\textbardotlessj}{J\bs}}& \sub{\sama{k}\sama{g}} & \sub{\sama{q}\tsi{\;G}{G\bs}}& & \stsi{P}{?}\\
  \hline
  Nasal & \ssama{m} & \stsi{M}{F} & & \ssama{n} & & \stsi{\:n}{n`} & \stsi{\textltailn}{J} & \ssama{N} & \stsi{\;N}{N\bs} &\\
  \hline
  Trill & \stsi{\;B}{B\bs} & & & \ssama{r} & & & & & \stsi{\;R}{R\bs} & & \\
  \hline
  Tap/Flap & & & & \stsi{R}{4} & & \stsi{\:r}{r`} & & & & & \\
  \hline
  Fricative & \sub{\tsi{F}{p\bs}\sama{B}} & \sub{\sama{f}\sama{v}} & \sub{\sama{T}\sama{D}} & \sub{\sama{s}\sama{z}} & \sub{\sama{S}\sama{Z}} & \sub{\tsi{\:s}{s`}\tsi{\:z}{z`}} & \sub{\tsix{\c\{c\}}{C}{\c{c}}\tsi{J}{j\bs}} & \sub{\sama{x}\sama{G}} & \sub{\sama{X}\tsi{K}{R}} & \sub{\tsi{\textcrh}{X\bs}\tsi{Q}{?\bs}} & \sub{\sama{h}\tsi{H}{h\bs}} \\
  \hline
  \pbox{\textwidth}{Lateral\\Fricative} & & & & \sub{\tsi{\textbeltl}{K}\tsi{\textlyoghlig}{K\bs}} & & & & & & & \\
  \hline
  Approximant & & \stsi{V}{v\bs} & & \stsi{\*r}{r\bs} & & \stsi{\:R}{r\bs`} & \ssama{j} & \sub{\tsi{\textturnmrleg}{M\bs}} & & & \\
  Lateral A. & & & & \ssama{l} & & \stsi{\:l}{l`} & \ssama{L} & \stsi{\;L}{L\bs} & & &\\
  \hline
\end{tabular}

\section*{Other consonants}

\begin{tabular}{cl|cl|cl|cl}
  Clicks & & Implosives & & Ejectives & & Coarticulated &\\
  \hline
  \stsi{\!o}{O\bs} & Bilabial & \stsi{\!b}{b\us<} & Bilabial & \stsi{'}{_>} & Examples: & \stsi{\*w}{W} & Voiceless labial-velar fric.\\
  \stsi{|}{|\bs} & Laminal alveolar / dental & \stsi{\!d}{d\us<} & Alveolar & \stsi{p'}{p\us>} & Bilabial & \ssama{w} & Voiced labial-velar approx.\\
  \stsi{!}{!\bs} & Apical (post)alveolar & \stsi{\!j}{J\bs\us<} & Palatal & \stsi{t'}{t\us>} & Alveolar & \stsi{4}{H} & Voiced labial-palatal approx.\\
  \stsi{\textdoublebarpipe}{=\bs} & Laminal postalv. / palatoalv. & \stsi{\!g}{g\us<} & Velar & \stsi{k'}{k\us>} & Velar & \stsi{C}{s\bs} & Voiceless alveolopalatal fric.\\
  \stsi{||}{|\bs|\bs} & Lateral coronal & \stsi{\!G}{G\bs\us<} & Uvular & \stsi{s'}{s\us>} & Alveolar fric. & \stsi{\textctz}{z\bs} & Voiced alveolopalatal fric.\\
  \hline
\end{tabular}

\section*{Vowels}

\def\vtsi#1#2{\quad\tt\string#1 & \textcolor{gray}{\tt#2} & \rm\textipa{#1}\quad}
\def\novow{&&}
  \normalsize
\begin{tabular}{|rclrcl|rclrcl|rclrcl|}
  \hline
  \vtsi{i}{i} & \vtsi{y}{y} & \vtsi{1}{1} & \vtsi{0}{\}} & \vtsi{W}{M} & \vtsi{u}{u}\\
  \vtsi{I}{I} & \vtsi{Y}{Y} & \novow & \novow & \novow & \vtsi{U}{U}\\
  \hline
  \vtsi{e}{e} & \vtsi{\o}{2} & \vtsi{9}{@\bs} & \vtsi{8}{8} & \vtsi{7}{7} & \vtsi{o}{o}\\
  \novow & \novow & \vtsi{@}{@} & \novow & \novow & \novow \\
  \vtsi{E}{E} & \vtsi{\oe}{9} & \vtsi{3}{3} & \vtsi{\textcloserevepsilon}{3\bs} & \vtsi{2}{V} & \vtsi{O}{O}\\
  \hline
  \vtsi{\ae}{\{} & \novow & \vtsi{5}{6} & \novow & \novow & \novow\\
  \vtsi{a}{a} & \vtsi{\OE}{\&} & \vtsi{\"a}{a\us"} & \novow & \vtsi{A}{A} & \vtsi{6}{Q}\\
  \hline
\end{tabular}
\\\\\\
For each triplet, left to right: \texttt{TIPA} \textcolor{gray}{\tt X-SAMPA} \textrm{IPA}.\\

\end{document}
