There is an error occurred when I tried to reproduce a tex document to produce sentence bracketing in gb4e.
This is the tex document, courtesy of Alan Munn:
\documentclass{article}
\usepackage{gb4e}
\primebars
\begin{document}
\begin{exe}
\ex{\lb{CP} \lb{DP} who_{i} ] \lb{C} did_{j} ] \lb{TP} \lb{DP} you ] \lb{\ibar{T}} t_{j} \lb{VP} see t_{i} ]]]]}
\end{exe}
\end{document}
I tried to reproduce the exact same code, however an error is occurred in mine:
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./testlagi.tex
LaTeX2e <2023-11-01> patch level 1
L3 programming layer <2024-02-20>
(/usr/local/texlive/2024/texmf-dist/tex/latex/base/article.cls
Document Class: article 2023/05/17 v1.4n Standard LaTeX document class
(/usr/local/texlive/2024/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2024/texmf-dist/tex/latex/gb4e/gb4e.sty
(/usr/local/texlive/2024/texmf-dist/tex/latex/gb4e/cgloss4e.sty))
(/usr/local/texlive/2024/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)
(./testlagi.aux)
./testlagi.tex:9: LaTeX Error: Command \rmfamily invalid in math mode.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
./testlagi.tex:9: LaTeX Error: Command \rmfamily invalid in math mode.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.9 \ex{\lb{CP} \lb{DP} w
ho_{i} ] \lb{C} did_{j} ] \lb{TP} \lb{DP} you ] \lb...
?
l.9 \ex{\lb{CP} \lb
{DP} who_{i} ] \lb{C} did_{j} ] \lb{TP} \lb{DP} you ] \lb...
?
I am on TeXShop in Mac.
Is there any solution for this?