9
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tipa}
\usepackage{gb4e}
\usepackage{nomencl}

\begin{document}

\begin{exe}
 \ex

 \gll \noautomath \textipa{\|[to} pani pito\\
 ram.3P.M.Sg. water.F.Sg. drink.PERF.M.Sg.\\
 \trans ram drinks water


\end{exe} 

\end{document}
Alan Munn
  • 218,180
Archie
  • 91

2 Answers2

11

This is caused by a bug in gb4e that arose after changes to the LaTeX kernel a few years ago. The solution is to add.

\makeatletter
\def\new@fontshape{}
\makeatother

before you load gb4e.

But additionally, you need to load tipa after gb4e since gb4e also defines \|. (Thanks to Ulrike for noticing this.)

Here's a full example.

\documentclass{article}
\usepackage[utf8]{inputenc}


\makeatletter
\def\new@fontshape{}
\makeatother
\usepackage{gb4e}
\noautomath
\usepackage{tipa}
\usepackage{nomencl}

\begin{document}

\begin{exe}
 \ex
 \gll  \textipa{\|[to} pani pito\\
 ram.3P.M.Sg. water.F.Sg. drink.PERF.M.Sg.\\
 \trans ram drinks water
\end{exe} 


\end{document}

output of code

Alan Munn
  • 218,180
0

To add to the answer by @AlanMunn,

\textipa can use Unicode (via xunicode package), but direct input is easier.

Either way, system fonts can then be used (via fontspec package).

Compile with xelatex or lualatex.

direct input Unicode

MWE

\documentclass{article}
%\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage{fontspec}
\setmainfont{Noto Serif}
\newfontfamily\fipamain{Noto Serif}[Colour=blue]
\newfontfamily\fipa{Noto Sans}[Colour=red]
\newfontfamily\fipab{CMU Serif}%'tipa font'

\makeatletter \def\new@fontshape{} \makeatother \usepackage{gb4e} \noautomath %\usepackage{tipa} \providecommand\XeTeXpicfile{ROSS, grmmble:-)}% with luatex that means "pretending" to be xetex just while you load the package %https://tex.stackexchange.com/questions/357686/does-fontspec-no-longer-provide-the-textipa-command \usepackage{xunicode} \def\useTIPAfont{\fipamain}%https://tex.stackexchange.com/questions/358118/tipa-tone-bar-glyph-missing-with-xecjk

\usepackage{nomencl}

\begin{document}

\textbackslash textipa{} input:

\begin{exe} \ex \gll \textipa{|[to} pani pito\ ram.3P.M.Sg. water.F.Sg. drink.PERF.M.Sg.\ \trans ram drinks water \end{exe}

Direct input:

\begin{exe} \ex \gll t̪o pani pito\ ram.3P.M.Sg. water.F.Sg. drink.PERF.M.Sg.\ \trans ram drinks water \end{exe}

\end{document}

Cicada
  • 10,129