我如何才能获得无衬线 Linguex 注释?

我如何才能获得无衬线 Linguex 注释?

我正在使用 linguex 包对语言示例进行注释,总体来说我对它非常满意,所以我不想使用任何其他枚举/注释包。但是当我使用 Libertine Biolinum(=无衬线)字体时,注释示例总是带有衬线。我如何获得无衬线注释?

\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

答案1

您需要告诉 cgloss4e(linguex 调用来处理注释的样式文件),注释示例第一行和第二行中的每个单词都要设置为无衬线字体,方法是在序言中添加以下几行:

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

但是,正如 @egreg 在下面的评论中指出的那样,有一种方法可以使此代码更符合 LaTeX 的做事方式,即使用\renewcommand,前提是您运行的是相对较新版本的 cgloss4e:

\renewcommand{\eachwordone}{\textsf}
\renewcommand{\eachwordtwo}{\textsf}

相关内容