4

I am glossing linguistic examples with the linguex package and generally I am very happy with it, so I don't want to use any other enumerating/glossing package. But when I use the Libertine Biolinum (=sans serif) font with it, the glossed examples always appear with serifs. How can I get sans serif glosses?

\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{libertine}
\renewcommand*\familydefault{\sfdefault}  
\usepackage[T1]{fontenc}
\usepackage{linguex}


\begin{document}

\section{Sans serif font: Libertine Biolinum}

Text text text text text

\ex. Linguex numbered example without interlinear glossing
\a. Every layer 
\a. appears in 
\a. sans serif font without interlinear glossing

But as soon as I use interlinear glossing

\exg. Both object language and \\
glossing appear with serifs\\
'Last line is sans serif again.\\




\end{document}

Pdf

3
  • Avoid the trailing \\ in \exg, it just causes a warning and does nothing good.
    – egreg
    Commented Feb 20, 2018 at 17:41
  • 1
    Just to be clear, only in the last (translation) line, not in the two gloss lines. Better is to use the \glt macro to introduce the translation.
    – Alan Munn
    Commented Feb 20, 2018 at 17:48
  • ah I see, thank you. when there is some b example directly following the translation line I usually want some space between these two lines. so its just a habit of mine, I guess.. Commented Feb 20, 2018 at 19:44

1 Answer 1

9

You need to tell cgloss4e (style file invoked by linguex to handle glosses) that each word in the first and second line of the glossed example is to be set in a sans serif font by adding the following lines to your preamble:

\let\eachwordone\sffamily
\let\eachwordtwo\sffamily

However, as @egreg notes in the comments below, there's a way of bringing this code more in line with the LaTeX way of doing things by using \renewcommand, provided you're running a relatively recent version of cgloss4e:

\renewcommand{\eachwordone}{\textsf}
\renewcommand{\eachwordtwo}{\textsf}
5
  • 1
    Newer versions of cgloss4e can use \textsf instead of \sffamily; I'd suggest \renewcommand{\eachwordone}{\textsf} and similarly for \eachwordtwo, which is more LaTeX-style.
    – egreg
    Commented Feb 20, 2018 at 17:40
  • Yes, of course, how silly of me. I'll edit my answer directly. Commented Feb 20, 2018 at 17:46
  • @egreg Why should we prefer \textsf to \sffamily here?
    – Alan Munn
    Commented Feb 20, 2018 at 17:53
  • @AlanMunn It's what the package documentation says. But I've no preference. Really, the documentation should have a thorough update.
    – egreg
    Commented Feb 20, 2018 at 17:54
  • @egreg True. :)
    – Alan Munn
    Commented Feb 20, 2018 at 18:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .