2

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}

enter image description here

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

2
\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}

enter image description here

  • 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. – oopcode May 15 '17 at 0:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.