1

I'm fairly new to ExPex and the documentation is fairly large and I couldn't find anything about font size. Maybe I'm looking for the wrong words. I basically want to make a 5 storied gloss (original language, phonetics, inflections, description of inflections, translation) and have different font size for them. The main reason being is the inflections and descriptions of inflections can become relatively long which makes the whole gloss long, especially because I want ExPex for longer texts.

Thus, how can I make different font sizes for different gloss parts.

Alan Munn
  • 218,180
Arhama
  • 39

1 Answers1

4

The formatting of the gloss lines is controlled by the everygl<level> key (where level can be a, b, or c, or a user defined level) which can be set globally using the \lingset macro, or added to particular examples. This is described in section 9 of the ExPex documentation.

Here's an example showing how all three gloss lines can be set to use different sizes using the built-in font size commands \small and \footnotesize. For a 10pt document, this corresponds to 9pt and 8pt, respectively. I've also shown how to define a new gloss line for the phonetic transcription and set that line to use the tipa font. (In practice, though I would recommend using XeLaTeX and using IPA characters directly in the source, as in the second code example.)

pdfLaTeX code

\documentclass{article}
\usepackage{expex}
\usepackage[T1]{tipa}
\begin{document}
\defineglwlevels{ipa}
\lingset{everygla=\normalsize\itshape,everyglipa=\tipaencoding,everyglb=\small,everyglc=\footnotesize}
\ex
\begingl
\gla This is the first gloss line//
\glipa DIs Iz D@ f@nEtIk glOs laIn//
\glb This is the second gloss line//
\glc This is the third gloss line//
\glft This is the free translation line//
\endgl
\xe
\end{document}

output of pdflatex code

XeLaTeX code

In this example I've used XeLaTeX and set the font size using two different methods, one directly specifying the font size and the other using the same commands as in the previous example. As you can see, there is no discernible difference. Since the regular font size commands are relative to the document font size, they are safer to use than specifying absolute sizes.

\documentclass{article}
\usepackage{expex}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}
\setmonofont{Linux Libertine Mono O}
\begin{document}
\defineglwlevels{ipa}
\lingset{everygla=\normalsize\itshape,everyglipa=\normalsize,everyglb=\small,everyglc=\footnotesize}
\pex
\a
\begingl
\gla This is the first gloss line//
\glipa ðɪs ɪz ðə fənɛtɪk glɔs laɪn//
\glb This is the second gloss line//
\glc This is the third gloss line//
\glft This is the free translation line//
\endgl
\a
\begingl[everygla=\normalsize\itshape,everyglipa=\normalsize,everyglb=\fontsize{9}{10.8}\selectfont,everyglc=\fontsize{8}{9.6}\selectfont]
\gla This is the first gloss line//
\glipa ðɪs ɪz ðə fənɛtɪk glɔs laɪn//
\glb This is the second gloss line//
\glc This is the third gloss line//
\glft This is the free translation line//
\endgl
\xe
\end{document}

output of XeLaTeX code

Alan Munn
  • 218,180