# Control gb4e's font family selection

In beamer, the default font is sans serif. But gb4e will override this default and select a serif font for both the line to be glossed (introduced with \gll) and the glosses. Only the translation line will be sans serif. How can I control the font families chosen by gb4e so that I can get sans serif in every line?

\documentclass{beamer}
\usepackage{fontspec}
\setmainfont{Latin Modern Roman}
\setsansfont{Latin Modern Sans}
\setmonofont{Latin Modern Mono}
\usepackage{gb4e}
\begin{document}
\begin{frame}
\begin{exe}
\ex
\gll f g f g\\ % this appears as serif
f g f g\\ % this appears as serif
\trans f g f g. % this appears as sans serif
\end{exe}
\end{frame}
\end{document}


(My bet is that something like this has been asked before, but I haven't been able to find a duplicate).

\documentclass{beamer}
\usepackage{fontspec}
\setmainfont{Latin Modern Roman}
\setsansfont{Latin Modern Sans}
\setmonofont{Latin Modern Mono}
\usepackage{gb4e}
\let\eachwordone=\sffamily %or \normalfont
\let\eachwordtwo=\sffamily
\begin{document}
\begin{frame}
\begin{exe}
\ex
\gll f g f g\\ % this appears as serif
f g f g\\ % this appears as serif
\trans f g f g. % this appears as sans serif
\end{exe}
\end{frame}
\end{document}


• Sorry to interrupt, but how do you change font size for gb4e examples? It doesn't seem to react to what you write in \documentclass. May 15 '17 at 0:28
• This solution does not allow small caps in the gloss line. Sep 22 '21 at 8:58
• @Eline Latin Modern Sans doesn't have small caps, you will have to use another font. Sep 22 '21 at 9:08
• @UlrikeFischer, can you suggest a sans serif font with small caps (and preferably IPA)? I see other people have asked (e.g. in comments here) but I haven't seen an answer. Sep 23 '21 at 11:47
• no, sorry. Call (assuming that you have a current texsystem) on a command line albatross 0x025D (or other unicode code point numbers from IPA) , this should give a list of fonts on your system supporting the symbol, and then check the font. Sep 23 '21 at 12:01